diff options
author | Daniel Bünzli <daniel.buenzli@erratique.ch> | 2018-08-30 19:15:32 +0200 |
---|---|---|
committer | Daniel Bünzli <daniel.buenzli@erratique.ch> | 2018-11-07 13:52:02 +0100 |
commit | a7afd89003096425ded67cbf7a004a5d2bc95b16 (patch) | |
tree | 47e737f2db5acc8916ea632ef4a73835e46ff525 /asmcomp | |
parent | f0aa5a170729aad811919dd120b39f70a093c46f (diff) | |
download | ocaml-a7afd89003096425ded67cbf7a004a5d2bc95b16.tar.gz |
s/string_of_int/Int.to_string/g
Diffstat (limited to 'asmcomp')
-rw-r--r-- | asmcomp/amd64/emit.mlp | 4 | ||||
-rw-r--r-- | asmcomp/cmmgen.ml | 42 | ||||
-rw-r--r-- | asmcomp/compilenv.ml | 2 | ||||
-rw-r--r-- | asmcomp/emitaux.ml | 2 | ||||
-rw-r--r-- | asmcomp/printmach.ml | 2 | ||||
-rw-r--r-- | asmcomp/reg.ml | 2 | ||||
-rw-r--r-- | asmcomp/selectgen.ml | 2 | ||||
-rw-r--r-- | asmcomp/strmatch.ml | 2 | ||||
-rw-r--r-- | asmcomp/x86_gas.ml | 4 |
9 files changed, 31 insertions, 31 deletions
diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp index 52f7d3fdea..e984ed56d4 100644 --- a/asmcomp/amd64/emit.mlp +++ b/asmcomp/amd64/emit.mlp @@ -160,8 +160,8 @@ let load_symbol_addr s arg = let emit_label lbl = match system with - | S_macosx | S_win64 -> "L" ^ string_of_int lbl - | _ -> ".L" ^ string_of_int lbl + | S_macosx | S_win64 -> "L" ^ Int.to_string lbl + | _ -> ".L" ^ Int.to_string lbl let label s = sym (emit_label s) diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml index 27fa279a6a..a034b15010 100644 --- a/asmcomp/cmmgen.ml +++ b/asmcomp/cmmgen.ml @@ -768,7 +768,7 @@ let call_cached_method obj tag cache pos args dbg = let cache = array_indexing log2_size_addr cache pos dbg in Compilenv.need_send_fun arity; Cop(Capply typ_val, - Cconst_symbol("caml_send" ^ string_of_int arity) :: + Cconst_symbol("caml_send" ^ Int.to_string arity) :: obj :: tag :: cache :: args, dbg) @@ -876,12 +876,12 @@ let rec expr_size env = function (* Record application and currying functions *) let apply_function n = - Compilenv.need_apply_fun n; "caml_apply" ^ string_of_int n + Compilenv.need_apply_fun n; "caml_apply" ^ Int.to_string n let curry_function n = Compilenv.need_curry_fun n; if n >= 0 - then "caml_curry" ^ string_of_int n - else "caml_tuplify" ^ string_of_int (-n) + then "caml_curry" ^ Int.to_string n + else "caml_tuplify" ^ Int.to_string (-n) (* Comparisons *) @@ -1404,9 +1404,9 @@ let simplif_primitive_32bits = function | Pbintcomp(Pint64, Lambda.Cle) -> Pccall (default_prim "caml_lessequal") | Pbintcomp(Pint64, Lambda.Cge) -> Pccall (default_prim "caml_greaterequal") | Pbigarrayref(_unsafe, n, Pbigarray_int64, _layout) -> - Pccall (default_prim ("caml_ba_get_" ^ string_of_int n)) + Pccall (default_prim ("caml_ba_get_" ^ Int.to_string n)) | Pbigarrayset(_unsafe, n, Pbigarray_int64, _layout) -> - Pccall (default_prim ("caml_ba_set_" ^ string_of_int n)) + Pccall (default_prim ("caml_ba_set_" ^ Int.to_string n)) | Pstring_load_64(_) -> Pccall (default_prim "caml_string_get64") | Pbytes_load_64(_) -> Pccall (default_prim "caml_bytes_get64") | Pbytes_set_64(_) -> Pccall (default_prim "caml_bytes_set64") @@ -1420,13 +1420,13 @@ let simplif_primitive p = | Pduprecord _ -> Pccall (default_prim "caml_obj_dup") | Pbigarrayref(_unsafe, n, Pbigarray_unknown, _layout) -> - Pccall (default_prim ("caml_ba_get_" ^ string_of_int n)) + Pccall (default_prim ("caml_ba_get_" ^ Int.to_string n)) | Pbigarrayset(_unsafe, n, Pbigarray_unknown, _layout) -> - Pccall (default_prim ("caml_ba_set_" ^ string_of_int n)) + Pccall (default_prim ("caml_ba_set_" ^ Int.to_string n)) | Pbigarrayref(_unsafe, n, _kind, Pbigarray_unknown_layout) -> - Pccall (default_prim ("caml_ba_get_" ^ string_of_int n)) + Pccall (default_prim ("caml_ba_get_" ^ Int.to_string n)) | Pbigarrayset(_unsafe, n, _kind, Pbigarray_unknown_layout) -> - Pccall (default_prim ("caml_ba_set_" ^ string_of_int n)) + Pccall (default_prim ("caml_ba_set_" ^ Int.to_string n)) | p -> if size_int = 8 then p else simplif_primitive_32bits p @@ -3293,7 +3293,7 @@ let send_function arity = let fun_args = [obj, typ_val; tag, typ_int; cache, typ_val] @ List.map (fun id -> (id, typ_val)) (List.tl args) in - let fun_name = "caml_send" ^ string_of_int arity in + let fun_name = "caml_send" ^ Int.to_string arity in Cfunction {fun_name; fun_args = List.map (fun (arg, ty) -> VP.create arg, ty) fun_args; @@ -3304,7 +3304,7 @@ let send_function arity = let apply_function arity = let (args, clos, body) = apply_function_body arity in let all_args = args @ [clos] in - let fun_name = "caml_apply" ^ string_of_int arity in + let fun_name = "caml_apply" ^ Int.to_string arity in Cfunction {fun_name; fun_args = List.map (fun arg -> (VP.create arg, typ_val)) all_args; @@ -3326,7 +3326,7 @@ let tuplify_function arity = if i >= arity then [] else get_field env (Cvar arg) i dbg :: access_components(i+1) in - let fun_name = "caml_tuplify" ^ string_of_int arity in + let fun_name = "caml_tuplify" ^ Int.to_string arity in Cfunction {fun_name; fun_args = [VP.create arg, typ_val; VP.create clos, typ_val]; @@ -3394,8 +3394,8 @@ let final_curry_function arity = newclos (n-1)) end in Cfunction - {fun_name = "caml_curry" ^ string_of_int arity ^ - "_" ^ string_of_int (arity-1); + {fun_name = "caml_curry" ^ Int.to_string arity ^ + "_" ^ Int.to_string (arity-1); fun_args = [VP.create last_arg, typ_val; VP.create last_clos, typ_val]; fun_body = curry_fun [] last_clos (arity-1); fun_codegen_options = []; @@ -3407,8 +3407,8 @@ let rec intermediate_curry_functions arity num = if num = arity - 1 then [final_curry_function arity] else begin - let name1 = "caml_curry" ^ string_of_int arity in - let name2 = if num = 0 then name1 else name1 ^ "_" ^ string_of_int num in + let name1 = "caml_curry" ^ Int.to_string arity in + let name2 = if num = 0 then name1 else name1 ^ "_" ^ Int.to_string num in let arg = V.create_local "arg" and clos = V.create_local "clos" in Cfunction {fun_name = name2; @@ -3417,15 +3417,15 @@ let rec intermediate_curry_functions arity num = if arity - num > 2 && arity <= max_arity_optimized then Cop(Calloc, [alloc_closure_header 5 Debuginfo.none; - Cconst_symbol(name1 ^ "_" ^ string_of_int (num+1)); + Cconst_symbol(name1 ^ "_" ^ Int.to_string (num+1)); int_const (arity - num - 1); - Cconst_symbol(name1 ^ "_" ^ string_of_int (num+1) ^ "_app"); + Cconst_symbol(name1 ^ "_" ^ Int.to_string (num+1) ^ "_app"); Cvar arg; Cvar clos], dbg) else Cop(Calloc, [alloc_closure_header 4 Debuginfo.none; - Cconst_symbol(name1 ^ "_" ^ string_of_int (num+1)); + Cconst_symbol(name1 ^ "_" ^ Int.to_string (num+1)); int_const 1; Cvar arg; Cvar clos], dbg); fun_codegen_options = []; @@ -3456,7 +3456,7 @@ let rec intermediate_curry_functions arity num = in let cf = Cfunction - {fun_name = name1 ^ "_" ^ string_of_int (num+1) ^ "_app"; + {fun_name = name1 ^ "_" ^ Int.to_string (num+1) ^ "_app"; fun_args; fun_body = iter (num+1) (List.map (fun (arg,_) -> Cvar arg) direct_args) clos; diff --git a/asmcomp/compilenv.ml b/asmcomp/compilenv.ml index cd499ce7ed..183ffa6ab3 100644 --- a/asmcomp/compilenv.ml +++ b/asmcomp/compilenv.ml @@ -357,7 +357,7 @@ let const_label = ref 0 let new_const_symbol () = incr const_label; - make_symbol (Some (string_of_int !const_label)) + make_symbol (Some (Int.to_string !const_label)) let snapshot () = !structured_constants let backtrack s = structured_constants := s diff --git a/asmcomp/emitaux.ml b/asmcomp/emitaux.ml index 9fd925d35c..e0476d171a 100644 --- a/asmcomp/emitaux.ml +++ b/asmcomp/emitaux.ml @@ -19,7 +19,7 @@ let output_channel = ref stdout let emit_string s = output_string !output_channel s -let emit_int n = output_string !output_channel (string_of_int n) +let emit_int n = output_string !output_channel (Int.to_string n) let emit_char c = output_char !output_channel c diff --git a/asmcomp/printmach.ml b/asmcomp/printmach.ml index 0a0b06a5e1..6ef11ce346 100644 --- a/asmcomp/printmach.ml +++ b/asmcomp/printmach.ml @@ -97,7 +97,7 @@ let intop = function begin match label_after_error with | None -> "" - | Some lbl -> string_of_int lbl + | Some lbl -> Int.to_string lbl end spacetime_index diff --git a/asmcomp/reg.ml b/asmcomp/reg.ml index ee3173d587..72b68dab92 100644 --- a/asmcomp/reg.ml +++ b/asmcomp/reg.ml @@ -117,7 +117,7 @@ let name t = in match t.part with | None -> with_spilled - | Some part -> with_spilled ^ "#" ^ string_of_int part + | Some part -> with_spilled ^ "#" ^ Int.to_string part let first_virtual_reg_stamp = ref (-1) diff --git a/asmcomp/selectgen.ml b/asmcomp/selectgen.ml index be57b93a20..302115c77c 100644 --- a/asmcomp/selectgen.ml +++ b/asmcomp/selectgen.ml @@ -842,7 +842,7 @@ method emit_expr (env:environment) exp = try env_find_static_exception nfail env with Not_found -> Misc.fatal_error ("Selection.emit_expr: unbound label "^ - string_of_int nfail) + Stdlib.Int.to_string nfail) in (* Intermediate registers to handle cases where some registers from src are present in dest *) diff --git a/asmcomp/strmatch.ml b/asmcomp/strmatch.ml index f4f9240bd6..b1efbf8f27 100644 --- a/asmcomp/strmatch.ml +++ b/asmcomp/strmatch.ml @@ -65,7 +65,7 @@ module Make(I:I) = struct let pp_match chan tag idxs cases = Printf.eprintf "%s: idx=[%s]\n" tag - (String.concat "; " (List.map string_of_int idxs)) ; + (String.concat "; " (List.map Int.to_string idxs)) ; do_pp_cases chan cases (* Utilities *) diff --git a/asmcomp/x86_gas.ml b/asmcomp/x86_gas.ml index f905dc336d..6d2363a76b 100644 --- a/asmcomp/x86_gas.ml +++ b/asmcomp/x86_gas.ml @@ -36,7 +36,7 @@ let arg_mem b {arch; typ=_; idx; scale; base; sym; displ} = begin match sym with | None -> if displ <> 0 || scale = 0 then - Buffer.add_string b (string_of_int displ) + Buffer.add_string b (Int.to_string displ) | Some s -> Buffer.add_string b s; opt_displ b displ @@ -49,7 +49,7 @@ let arg_mem b {arch; typ=_; idx; scale; base; sym; displ} = end; if base != None || scale <> 1 then Buffer.add_char b ','; print_reg b string_of_register idx; - if scale <> 1 then bprintf b ",%s" (string_of_int scale); + if scale <> 1 then bprintf b ",%s" (Int.to_string scale); Buffer.add_char b ')' end |