Skip to content

Commit 040ba95

Browse files
committed
tweak
1 parent b4597ad commit 040ba95

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

jscomp/runtime/caml_format.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ let dec_of_pos_int64 x =
381381

382382

383383
(if x < 0L then
384-
let s = ref "" in
384+
385385
let wbase = 10L in
386386
let cvtbl = "0123456789" in
387387
let y = Caml_int64.discard_sign x in
@@ -401,9 +401,9 @@ let dec_of_pos_int64 x =
401401
ref (Caml_int64_extern.add (Caml_int64_extern.add quotient_l c )
402402
e) in
403403
let modulus = ref f in
404-
s .contents<-
405-
Caml_string_extern.get_string_unsafe
406-
cvtbl (Caml_int64_extern.to_int modulus.contents) ^ s.contents ;
404+
let s = ref
405+
(Caml_string_extern.get_string_unsafe
406+
cvtbl (Caml_int64_extern.to_int modulus.contents)) in
407407

408408
while quotient.contents <> 0L do
409409
let a, b = Caml_int64.div_mod (quotient.contents) wbase in

lib/es6/caml_format.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,6 @@ function dec_of_pos_int64(x) {
581581
/* hi */0,
582582
/* lo */0
583583
])) {
584-
var s = "";
585584
var wbase = /* int64 */[
586585
/* hi */0,
587586
/* lo */10
@@ -598,7 +597,7 @@ function dec_of_pos_int64(x) {
598597
/* lo */3435973836
599598
], match[0]), match$1[0]);
600599
var modulus = match$1[1];
601-
s = cvtbl[Caml_int64.to_int32(modulus)] + s;
600+
var s = cvtbl[Caml_int64.to_int32(modulus)];
602601
while(Caml_int64.neq(quotient, /* int64 */[
603602
/* hi */0,
604603
/* lo */0

lib/js/caml_format.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,6 @@ function dec_of_pos_int64(x) {
581581
/* hi */0,
582582
/* lo */0
583583
])) {
584-
var s = "";
585584
var wbase = /* int64 */[
586585
/* hi */0,
587586
/* lo */10
@@ -598,7 +597,7 @@ function dec_of_pos_int64(x) {
598597
/* lo */3435973836
599598
], match[0]), match$1[0]);
600599
var modulus = match$1[1];
601-
s = cvtbl[Caml_int64.to_int32(modulus)] + s;
600+
var s = cvtbl[Caml_int64.to_int32(modulus)];
602601
while(Caml_int64.neq(quotient, /* int64 */[
603602
/* hi */0,
604603
/* lo */0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"test-bsb": "node scripts/ciTest.js -bsb",
1616
"test-ocaml": "node scripts/ciTest.js -ounit",
1717
"postinstall": "node scripts/install.js",
18-
"coverage" : "nyc --timeout=3000 --report=html mocha jscomp/test/*test.js && open ./coverage/index.html"
18+
"coverage" : "nyc --timeout=3000 --reporter=html mocha jscomp/test/*test.js && open ./coverage/index.html"
1919
},
2020
"name": "bs-platform",
2121
"version": "7.3.0-dev.1",

0 commit comments

Comments
 (0)