Skip to content

Commit f3d080f

Browse files
committed
inline Int64.succ and Int64.to_string
1 parent 1628e56 commit f3d080f

File tree

9 files changed

+34
-32
lines changed

9 files changed

+34
-32
lines changed

jscomp/core/lam_dispatch_primitive.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,10 @@ let translate loc (prim_name : string)
295295
end
296296
| "caml_bytes_equal" ->
297297
call Js_runtime_modules.caml_primitive
298+
| "caml_int64_succ" ->
299+
E.runtime_call Js_runtime_modules.int64 "succ" args
300+
| "caml_int64_to_string" ->
301+
E.runtime_call Js_runtime_modules.int64 "to_string" args
298302
| "caml_int64_equal_null"
299303
-> Js_long.equal_null args
300304
| "caml_int64_equal_undefined"

jscomp/main/builtin_cmj_datasets.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(* 1c67afbfcabae03627c965ef5a338b0c *)
1+
(* 442de69a70d003e5e42a71e854097867 *)
22
let module_names : string array = Obj.magic (
33
"Gc" (* 220 *),
44
"Js" (* 23 *),
@@ -162,7 +162,7 @@ let module_data : string array = Obj.magic (
162162
(* Array *)"\132\149\166\190\000\000\0020\000\000\000\164\000\000\002\029\000\000\001\252\160\b\000\000l\000\176#map\144\160\160B@@@\176#mem\144\160\160B@@@\176#sub\144\160\160C@@@\176$blit\144\160\160E@@@\176$copy\144\160\160A@@@\176$fill\144\160\160D@@@\176$init\144\160\160B@@@\176$iter\144\160\160B@@@\176$map2\144\160\160C@@@\176$mapi\144\160\160B@@@\176$memq\144\160\160B@@@\176$sort\144\160\160B@@@\176%iter2\144\160\160C@@@\176%iteri\144\160\160B@@@\176&append\144\160\160B@@@\176&concat\144\160\160A@@\144\180A\160\176\001\005\195$prim@@\151\176\149\1761caml_array_concatA \160\144\004\n@\176\1923stdlib-406/array.ml`\001\006\247\001\006\247\192\004\002`\001\006\247\001\0078@\176&exists\144\160\160B@@@\176'for_all\144\160\160B@@@\176'of_list\144\160\160A@@@\176'to_list\144\160\160A@@@\176)fast_sort\144\160\160B@@@\176)fold_left\144\160\160C@@@\176*fold_right\144\160\160C@@@\176*make_float\144\160\160A@@\144\180A\160\176\001\005\201\0049@@\151\176\149\1764caml_make_float_vectA\0048\160\144\004\b@\176\192\0047d\001\007\219\001\007\236\192\0048d\001\007\219\001\007\248@\176+make_matrix\144\160\160C@@@\176+stable_sort\144\004'@\176-create_matrix\144\004\b@A",
163163
(* Bytes *)"\132\149\166\190\000\000\003\243\000\000\001\020\000\000\003\160\000\000\003g\160\b\000\000\168\000\176#cat\144\160\160B@@@\176#map\144\160\160B@@@\176#sub\144\160\160C@@@\176$blit\144\160\160E@@@\176$copy\144\160\160A@@@\176$fill\144\160\160D@@@\176$init\144\160\160B@@@\176$iter\144\160\160B@@@\176$make\144\160\160B@@@\176$mapi\144\160\160B@@@\176$trim\144\160\160A@@@\176%equal\144\160\160B@@\144\180B\160\176\001\005\198$prim@\160\176\001\005\197\004\003@@\151\176\149\1760caml_bytes_equalB \160\144\004\012\160\144\004\011@\176\1923stdlib-406/bytes.ml\001\001A\001%\215\001%\215\192\004\002\001\001A\001%\215\001&\011@\176%index\144\160\160B@@@\176%iteri\144\160\160B@@@\176&concat\144\160\160B@@@\176&extend\144\160\160C@@@\176&rindex\144\160\160B@@@\176'compare\144\160\160B@@\144\180B\160\176\001\005\132!x@\160\176\001\005\133!y@@\151\176\149\1762caml_bytes_compareB \160\144\004\r\160\144\004\012@\176\192\0044\001\001@\001%\164\001%\192\192\0045\001\001@\001%\164\001%\214@\176'escaped\144\160\160A@@@\176(contains\144\160\160B@@@\176)index_opt\144\160\160B@@@\176)lowercase\144\160\160A@@@\176)of_string\144\160\160A@@@\176)to_string\144\160\160A@@@\176)uppercase\144\160\160A@@@\176*capitalize\144\160\160A@@@\176*index_from\144\160\160C@@@\176*rindex_opt\144\160\160B@@@\176*sub_string\144\160\160C@@@\176+blit_string\144\160\160E@@@\176+rindex_from\144\160\160C@@@\176,uncapitalize\144\160\160A@@@\176-contains_from\144\160\160C@@@\176.index_from_opt\144\160\160C@@@\176.rcontains_from\144\160\160C@@@\176/lowercase_ascii\144\160\160A@@@\176/rindex_from_opt\144\160\160C@@@\176/uppercase_ascii\144\160\160A@@@\1760capitalize_ascii\144\160\160A@@@\1760unsafe_of_string\144\160\160A@@\144\180A\160\176\001\005\195\004\182@@\151\176A\160\144\004\005@\176\192\004\173b\001\007\171\001\007\171\192\004\174b\001\007\171\001\007\235@\1760unsafe_to_string\144\160\160A@@\144\180A\160\176\001\005\196\004\198@@\151\176@\160\144\004\005@\176\192\004\189a\001\007j\001\007j\192\004\190a\001\007j\001\007\170@\1762uncapitalize_ascii\144\160\160A@@@A",
164164
(* Int32 *)"\132\149\166\190\000\000\001\234\000\000\000\135\000\000\001\177\000\000\001\160\160\b\000\000 \000\176#abs\144\160\160A@@@\176$pred\144\160\160A@@\144\180A\160\176\001\004\002!n@@\151\176\b\000\000\004\019A\160\144\004\007\160\146\149\018_i\000\000\000\000\001@\176\1923stdlib-406/int32.mlq\001\t\151\001\t\164\192\004\002q\001\t\151\001\t\172@\176$succ\144\160\160A@@\144\180A\160\176\001\004\000!n@@\151\176\b\000\000\004\018A\160\144\004\007\160\146\149\018_i\000\000\000\000\001@\176\192\004\023p\001\t\129\001\t\142\192\004\024p\001\t\129\001\t\150@\176%equal\144\160\160B@@@\176&lognot\144\160\160A@@\144\180A\160\176\001\004\b!n@@\151\176\b\000\000\004\025A\160\144\004\007\160\146\149\018_i\000\255\255\255\255@\176\192\0042u\001\n\n\001\n\025\192\0043u\001\n\n\001\n'@\176'compare\144\160\160B@@\144\180B\160\176\001\004\017!x@\160\176\001\004\018!y@@\151\176\149\1762caml_int32_compareB:caml_int32_compare_unboxed\160\144\004\r\160\144\004\012@\176\192\004L\000C\001\011[\001\011w\192\004M\000C\001\011[\001\011\141@\176)to_string\144\160\160A@@\144\180A\160\176\001\004\011!n@@\151\176\149\1761caml_int32_formatB \160\146\146\"%d\160\144\004\014@\176\192\004ex\001\nk\001\n}\192\004fx\001\nk\001\n\138@\176-of_string_opt\144\160\160A@@@A",
165-
(* Int64 *)"\132\149\166\190\000\000\001\246\000\000\000\135\000\000\001\180\000\000\001\160\160\b\000\000 \000\176#abs\144\160\160A@@@\176$pred\144\160\160A@@\144\180A\160\176\001\004\004!n@@\151\176\b\000\000\004\019B\160\144\004\007\160\146\150\018_j\000\000\000\000\000\000\000\000\001@\176\1923stdlib-406/int64.mlo\001\t\131\001\t\144\192\004\002o\001\t\131\001\t\152@\176$succ\144\160\160A@@\144\180A\160\176\001\004\002!n@@\151\176\b\000\000\004\018B\160\144\004\007\160\146\150\018_j\000\000\000\000\000\000\000\000\001@\176\192\004\023n\001\tm\001\tz\192\004\024n\001\tm\001\t\130@\176%equal\144\160\160B@@@\176&lognot\144\160\160A@@\144\180A\160\176\001\004\n!n@@\151\176\b\000\000\004\025B\160\144\004\007\160\146\150\018_j\000\255\255\255\255\255\255\255\255@\176\192\0042s\001\n\006\001\n\021\192\0043s\001\n\006\001\n#@\176'compare\144\160\160B@@\144\180B\160\176\001\004\021!x@\160\176\001\004\022!y@@\151\176\149\1762caml_int64_compareB:caml_int64_compare_unboxed\160\144\004\r\160\144\004\012@\176\192\004L\000J\001\012b\001\012~\192\004M\000J\001\012b\001\012\148@\176)to_string\144\160\160A@@\144\180A\160\176\001\004\r!n@@\151\176\149\1761caml_int64_formatB \160\146\146\"%d\160\144\004\014@\176\192\004ev\001\ng\001\ny\192\004fv\001\ng\001\n\134@\176-of_string_opt\144\160\160A@@@A",
165+
(* Int64 *)"\132\149\166\190\000\000\001\246\000\000\000\128\000\000\001\169\000\000\001\146\160\b\000\000 \000\176#abs\144\160\160A@@@\176$pred\144\160\160A@@\144\180A\160\176\001\004\003!n@@\151\176\b\000\000\004\019B\160\144\004\007\160\146\150\018_j\000\000\000\000\000\000\000\000\001@\176\1923stdlib-406/int64.mlp\001\t\188\001\t\201\192\004\002p\001\t\188\001\t\209@\176$succ\144\160\160A@@\144\180A\160\176\001\004?$prim@@\151\176\149\176/caml_int64_succA \160\144\004\n@\176\192\004\022o\001\t\137\001\t\137\192\004\023o\001\t\137\001\t\187@\176%equal\144\160\160B@@@\176&lognot\144\160\160A@@\144\180A\160\176\001\004\t!n@@\151\176\b\000\000\004\025B\160\144\004\007\160\146\150\018_j\000\255\255\255\255\255\255\255\255@\176\192\0041t\001\n?\001\nN\192\0042t\001\n?\001\n\\@\176'compare\144\160\160B@@\144\180B\160\176\001\004\019!x@\160\176\001\004\020!y@@\151\176\149\1762caml_int64_compareB:caml_int64_compare_unboxed\160\144\004\r\160\144\004\012@\176\192\004K\000K\001\012\185\001\012\213\192\004L\000K\001\012\185\001\012\235@\176)to_string\144\160\160A@@\144\180A\160\176\001\004>\004J@@\151\176\149\1764caml_int64_to_stringA\004I\160\144\004\b@\176\192\004^w\001\n\160\001\n\160\192\004_w\001\n\160\001\n\221@\176-of_string_opt\144\160\160A@@@A",
166166
(* Js_re *)"\132\149\166\190\000\000\000\003\000\000\000\001\000\000\000\003\000\000\000\003\160\128A",
167167
(* Queue *)"\132\149\166\190\000\000\001\162\000\000\000\134\000\000\001\170\000\000\001\153\160\b\000\0008\000\176#add\144\160\160B@@@\176#pop\144\160\160A@@@\176#top\144\160\160A@@@\176$copy\144\160\160A@@@\176$fold\144\160\160C@@@\176$iter\144\160\160B@@@\176$peek\144\004\020@\176$push\144\004!@\176$take\144\004\031@\176%clear\144\160\160A@@@\176&create\144\160\160A@@\144\180A\160\176\001\003\246%param@@\151\176\177@\146\176&length%first$lastA\160\146\144@\160\146\168@\160#Nil\160AA\160\146\168@\160\004\006\160AA@\176\1923stdlib-406/queue.ml]\001\005:\001\005J\192\004\002a\001\005v\001\005w@\176&length\144\160\160A@@\144\180A\160\176\001\004\022!q@@\151\176\162@\160\004#A\160\144\004\b@\176\192\004\020\000b\001\t\215\001\t\217\192\004\021\000b\001\t\215\001\t\225@\176(is_empty\144\160\160A@@\144\180A\160\176\001\004\020!q@@\151\176\152@\160\151\176\162@\160\004:A\160\144\004\012@\176\192\004+\000_\001\t\184\001\t\186\192\004,\000_\001\t\184\001\t\194@\160\146\144@@\176\004\006\192\0041\000_\001\t\184\001\t\198@\176(transfer\144\160\160B@@@A",
168168
(* Scanf *)"\132\149\166\190\000\000\001\014\000\000\000O\000\000\001\011\000\000\000\252\160\b\000\0000\000\176%scanf\144\160\160A@@@\176&bscanf\144\160\160B@@@\176&fscanf\144\160\160B@@@\176&kscanf\144\160\160C@@@\176&sscanf\144\160\160B@@@\176'kfscanf\144\160\160C@@@\176'ksscanf\144\160\160C@@@\176(Scanning\145\b\000\0004\000@\160\160A@@\160\160A@@\160\160A@@\004\006\004\004\160\160A@@\160\160A@@\160\160A@@\160\160A@@\160\160A@@\160\160A@@@@\176)unescaped\144\160\160A@@@\176-bscanf_format\144\160\160C@@@\176-sscanf_format\144\160\160C@@@\1762format_from_string\144\160\160B@@@@",

jscomp/stdlib-406/int64.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,16 @@ external to_nativeint : int64 -> nativeint = "%int64_to_nativeint"
4343
let zero = 0L
4444
let one = 1L
4545
let minus_one = -1L
46-
let succ n = add n 1L
46+
(* let succ n = add n 1L *)
47+
external succ : int64 -> int64 = "caml_int64_succ"
4748
let pred n = sub n 1L
4849
let abs n = if n >= 0L then n else neg n
4950
let min_int = 0x8000000000000000L
5051
let max_int = 0x7FFFFFFFFFFFFFFFL
5152
let lognot n = logxor n (-1L)
5253

5354
external format : string -> int64 -> string = "caml_int64_format"
54-
let to_string n = format "%d" n
55+
external to_string : int64 -> string = "caml_int64_to_string"
5556

5657
external of_string : string -> int64 = "caml_int64_of_string"
5758

jscomp/test/caml_format_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ var int64_suites_001 = /* :: */[
18511851
"i64_simple7",
18521852
(function (param) {
18531853
return /* Eq */Block.__(0, [
1854-
Caml_format.caml_int64_format("%d", /* int64 */[
1854+
Caml_int64.to_string(/* int64 */[
18551855
/* hi */0,
18561856
/* lo */3333
18571857
]),

jscomp/test/gpr_1503_test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
var Mt = require("./mt.js");
44
var Block = require("../../lib/js/block.js");
55
var Int64 = require("../../lib/js/int64.js");
6+
var Caml_int64 = require("../../lib/js/caml_int64.js");
67
var Caml_format = require("../../lib/js/caml_format.js");
78

89
var suites = {
@@ -31,23 +32,23 @@ function eq(loc, x, y) {
3132
}
3233

3334
function id(x) {
34-
return Caml_format.caml_int64_of_string(Caml_format.caml_int64_format("%d", x));
35+
return Caml_format.caml_int64_of_string(Caml_int64.to_string(x));
3536
}
3637

3738
var i = /* int64 */[
3839
/* hi */2074848171,
3940
/* lo */2880154539
4041
];
4142

42-
var s = Caml_format.caml_int64_format("%d", i);
43+
var s = Caml_int64.to_string(i);
4344

4445
var i$prime = Caml_format.caml_int64_of_string(s);
4546

4647
eq("File \"gpr_1503_test.ml\", line 18, characters 5-12", i, i$prime);
4748

48-
eq("File \"gpr_1503_test.ml\", line 21, characters 7-14", Int64.max_int, Caml_format.caml_int64_of_string(Caml_format.caml_int64_format("%d", Int64.max_int)));
49+
eq("File \"gpr_1503_test.ml\", line 21, characters 7-14", Int64.max_int, Caml_format.caml_int64_of_string(Caml_int64.to_string(Int64.max_int)));
4950

50-
eq("File \"gpr_1503_test.ml\", line 22, characters 7-14", Int64.min_int, Caml_format.caml_int64_of_string(Caml_format.caml_int64_format("%d", Int64.min_int)));
51+
eq("File \"gpr_1503_test.ml\", line 22, characters 7-14", Int64.min_int, Caml_format.caml_int64_of_string(Caml_int64.to_string(Int64.min_int)));
5152

5253
Mt.from_pair_suites("Gpr_1503_test", suites.contents);
5354

jscomp/test/int64_mul_div_test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ var Int64 = require("../../lib/js/int64.js");
99
var Printf = require("../../lib/js/printf.js");
1010
var Caml_int64 = require("../../lib/js/caml_int64.js");
1111
var Pervasives = require("../../lib/js/pervasives.js");
12-
var Caml_format = require("../../lib/js/caml_format.js");
1312

1413
function commutative_mul(result, a, b) {
1514
return /* Eq */Block.__(0, [
@@ -1705,7 +1704,7 @@ function from_to_string(xs) {
17051704
(function (param) {
17061705
return /* Eq */Block.__(0, [
17071706
str_a,
1708-
Caml_format.caml_int64_format("%d", a)
1707+
Caml_int64.to_string(a)
17091708
]);
17101709
})
17111710
];

jscomp/test/int64_string_bench.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
var Int64 = require("../../lib/js/int64.js");
44
var Caml_int64 = require("../../lib/js/caml_int64.js");
5-
var Caml_format = require("../../lib/js/caml_format.js");
65

76
console.time("Int64.to_string");
87

@@ -12,15 +11,15 @@ var u = Caml_int64.sub(Int64.max_int, /* int64 */[
1211
]);
1312

1413
for(var i = 0; i <= 100000; ++i){
15-
Caml_format.caml_int64_format("%d", u);
14+
Caml_int64.to_string(u);
1615
}
1716

1817
console.timeEnd("Int64.to_string");
1918

2019
console.time("Int64.to_string");
2120

2221
for(var i$1 = 0; i$1 <= 100000; ++i$1){
23-
Caml_format.caml_int64_format("%d", /* int64 */[
22+
Caml_int64.to_string(/* int64 */[
2423
/* hi */0,
2524
/* lo */30000000
2625
]);
@@ -36,7 +35,7 @@ var u$1 = Caml_int64.add(Int64.min_int, /* int64 */[
3635
]);
3736

3837
for(var i$2 = 0; i$2 <= 100000; ++i$2){
39-
Caml_format.caml_int64_format("%d", u$1);
38+
Caml_int64.to_string(u$1);
4039
}
4140

4241
console.timeEnd("Int64.to_string");

jscomp/test/int64_string_test.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var Int64 = require("../../lib/js/int64.js");
55
var Belt_List = require("../../lib/js/belt_List.js");
66
var Caml_int32 = require("../../lib/js/caml_int32.js");
77
var Caml_int64 = require("../../lib/js/caml_int64.js");
8-
var Caml_format = require("../../lib/js/caml_format.js");
98
var Caml_builtin_exceptions = require("../../lib/js/caml_builtin_exceptions.js");
109

1110
var suites = {
@@ -20,12 +19,12 @@ function eq(loc, x, y) {
2019
return Mt.eq_suites(test_id, suites, loc, x, y);
2120
}
2221

23-
var v = Caml_format.caml_int64_format("%d", Int64.max_int);
22+
var v = Caml_int64.to_string(Int64.max_int);
2423

2524
eq("File \"int64_string_test.ml\", line 9, characters 6-13", v, "9223372036854775807");
2625

2726
function f(a, b) {
28-
return eq("File \"int64_string_test.ml\", line 11, characters 5-12", Caml_format.caml_int64_format("%d", a), b);
27+
return eq("File \"int64_string_test.ml\", line 11, characters 5-12", Caml_int64.to_string(a), b);
2928
}
3029

3130
var hh = Caml_int64.add(Int64.min_int, /* int64 */[
@@ -58,15 +57,15 @@ f(/* int64 */[
5857
], "1000000000000000");
5958

6059
for(var i = 0; i <= 8; ++i){
61-
eq("File \"int64_string_test.ml\", line 25, characters 5-12", Caml_format.caml_int64_format("%d", Caml_int64.add(Int64.min_int, Caml_int64.of_int32(i))), "-922337203685477580" + String(8 - i | 0));
60+
eq("File \"int64_string_test.ml\", line 25, characters 5-12", Caml_int64.to_string(Caml_int64.add(Int64.min_int, Caml_int64.of_int32(i))), "-922337203685477580" + String(8 - i | 0));
6261
}
6362

6463
for(var i$1 = 0; i$1 <= 8; ++i$1){
65-
eq("File \"int64_string_test.ml\", line 29, characters 5-12", Caml_format.caml_int64_format("%d", Caml_int64.add(Int64.min_int, Caml_int64.of_int32(100 + i$1 | 0))), "-922337203685477570" + String(8 - i$1 | 0));
64+
eq("File \"int64_string_test.ml\", line 29, characters 5-12", Caml_int64.to_string(Caml_int64.add(Int64.min_int, Caml_int64.of_int32(100 + i$1 | 0))), "-922337203685477570" + String(8 - i$1 | 0));
6665
}
6766

6867
for(var i$2 = 0; i$2 <= 8; ++i$2){
69-
eq("File \"int64_string_test.ml\", line 33, characters 5-12", Caml_format.caml_int64_format("%d", Caml_int64.add(Int64.min_int, Caml_int64.of_int32(1000000 + i$2 | 0))), "-922337203685377580" + String(8 - i$2 | 0));
68+
eq("File \"int64_string_test.ml\", line 33, characters 5-12", Caml_int64.to_string(Caml_int64.add(Int64.min_int, Caml_int64.of_int32(1000000 + i$2 | 0))), "-922337203685377580" + String(8 - i$2 | 0));
7069
}
7170

7271
var u = /* int64 */[
@@ -75,7 +74,7 @@ var u = /* int64 */[
7574
];
7675

7776
for(var i$3 = 0; i$3 <= 6; ++i$3){
78-
eq("File \"int64_string_test.ml\", line 42, characters 5-12", Caml_format.caml_int64_format("%d", Caml_int64.add(u, Caml_int64.of_int32(Caml_int32.imul(i$3, 10000)))), "90071992547" + (String(3 + i$3 | 0) + "0991"));
77+
eq("File \"int64_string_test.ml\", line 42, characters 5-12", Caml_int64.to_string(Caml_int64.add(u, Caml_int64.of_int32(Caml_int32.imul(i$3, 10000)))), "90071992547" + (String(3 + i$3 | 0) + "0991"));
7978
}
8079

8180
var v$1 = /* int64 */[
@@ -84,25 +83,25 @@ var v$1 = /* int64 */[
8483
];
8584

8685
for(var i$4 = 0; i$4 <= 9; ++i$4){
87-
eq("File \"int64_string_test.ml\", line 49, characters 5-12", Caml_format.caml_int64_format("%d", Caml_int64.add(v$1, Caml_int64.of_int32(Caml_int32.imul(i$4, 10000)))), "-90071992547" + (String(9 - i$4 | 0) + "0991"));
86+
eq("File \"int64_string_test.ml\", line 49, characters 5-12", Caml_int64.to_string(Caml_int64.add(v$1, Caml_int64.of_int32(Caml_int32.imul(i$4, 10000)))), "-90071992547" + (String(9 - i$4 | 0) + "0991"));
8887
}
8988

90-
eq("File \"int64_string_test.ml\", line 52, characters 6-13", Caml_format.caml_int64_format("%d", /* int64 */[
89+
eq("File \"int64_string_test.ml\", line 52, characters 6-13", Caml_int64.to_string(/* int64 */[
9190
/* hi */2097151,
9291
/* lo */4294967295
9392
]), "9007199254740991");
9493

95-
eq("File \"int64_string_test.ml\", line 53, characters 6-13", Caml_format.caml_int64_format("%d", /* int64 */[
94+
eq("File \"int64_string_test.ml\", line 53, characters 6-13", Caml_int64.to_string(/* int64 */[
9695
/* hi */-2097152,
9796
/* lo */1
9897
]), "-9007199254740991");
9998

100-
eq("File \"int64_string_test.ml\", line 54, characters 6-13", Caml_format.caml_int64_format("%d", /* int64 */[
99+
eq("File \"int64_string_test.ml\", line 54, characters 6-13", Caml_int64.to_string(/* int64 */[
101100
/* hi */-1,
102101
/* lo */4294967063
103102
]), "-233");
104103

105-
eq("File \"int64_string_test.ml\", line 55, characters 6-13", Caml_format.caml_int64_format("%d", /* int64 */[
104+
eq("File \"int64_string_test.ml\", line 55, characters 6-13", Caml_int64.to_string(/* int64 */[
106105
/* hi */2147483647,
107106
/* lo */4294967295
108107
]), "9223372036854775807");
@@ -1322,7 +1321,7 @@ Belt_List.forEach(random_data, (function (u) {
13221321
];
13231322
}
13241323
var match = u[0];
1325-
return eq("File \"int64_string_test.ml\", line 160, characters 21-28", Caml_format.caml_int64_format("%d", match[0]), match[1]);
1324+
return eq("File \"int64_string_test.ml\", line 160, characters 21-28", Caml_int64.to_string(match[0]), match[1]);
13261325
} else {
13271326
throw [
13281327
Caml_builtin_exceptions.assert_failure,
@@ -1335,12 +1334,12 @@ Belt_List.forEach(random_data, (function (u) {
13351334
}
13361335
}));
13371336

1338-
eq("File \"int64_string_test.ml\", line 164, characters 7-14", Caml_format.caml_int64_format("%d", /* int64 */[
1337+
eq("File \"int64_string_test.ml\", line 164, characters 7-14", Caml_int64.to_string(/* int64 */[
13391338
/* hi */-2097152,
13401339
/* lo */1
13411340
]), "-9007199254740991");
13421341

1343-
eq("File \"int64_string_test.ml\", line 165, characters 7-14", Caml_format.caml_int64_format("%d", /* int64 */[
1342+
eq("File \"int64_string_test.ml\", line 165, characters 7-14", Caml_int64.to_string(/* int64 */[
13441343
/* hi */-2097152,
13451344
/* lo */0
13461345
]), "-9007199254740992");

0 commit comments

Comments
 (0)