Skip to content

Commit 7fedb80

Browse files
committed
Fix issue with bytes_to_string in library.
Fixes #5573
1 parent 15c902f commit 7fedb80

File tree

8 files changed

+15
-12
lines changed

8 files changed

+15
-12
lines changed

jscomp/core/js_of_lam_string.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ let set_byte e e0 e1 = E.assign (E.array_index e e0) e1
6060
]}
6161
*)
6262
let bytes_to_string e =
63-
E.runtime_call Js_runtime_modules.bytes "bytes_to_string" [ e ]
63+
E.runtime_call Js_runtime_modules.bytes_ "bytes_to_string" [ e ]
6464

6565
let bytes_of_string s =
6666
E.runtime_call Js_runtime_modules.bytes "bytes_of_string" [ s ]

jscomp/ext/js_runtime_modules.ml

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ let format = "Caml_format"
4141
let string = "Caml_string"
4242

4343
let bytes = "Caml_bytes"
44+
let bytes_ = "Bytes"
4445

4546
let float = "Caml_float"
4647

jscomp/test/test_bytes.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
'use strict';
22

33
var Bytes = require("../../lib/js/bytes.js");
4-
var Caml_bytes = require("../../lib/js/caml_bytes.js");
54

65
var f = Bytes.unsafe_to_string;
76

8-
var ff = Caml_bytes.bytes_to_string;
7+
var ff = Bytes.bytes_to_string;
98

109
exports.f = f;
1110
exports.ff = ff;

lib/4.06.1/unstable/js_compiler.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -76548,6 +76548,7 @@ let format = "Caml_format"
7654876548
let string = "Caml_string"
7654976549

7655076550
let bytes = "Caml_bytes"
76551+
let bytes_ = "Bytes"
7655176552

7655276553
let float = "Caml_float"
7655376554

@@ -94858,7 +94859,7 @@ let set_byte e e0 e1 = E.assign (E.array_index e e0) e1
9485894859
]}
9485994860
*)
9486094861
let bytes_to_string e =
94861-
E.runtime_call Js_runtime_modules.bytes "bytes_to_string" [ e ]
94862+
E.runtime_call Js_runtime_modules.bytes_ "bytes_to_string" [ e ]
9486294863

9486394864
let bytes_of_string s =
9486494865
E.runtime_call Js_runtime_modules.bytes "bytes_of_string" [ s ]

lib/4.06.1/unstable/js_playground_compiler.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -76548,6 +76548,7 @@ let format = "Caml_format"
7654876548
let string = "Caml_string"
7654976549

7655076550
let bytes = "Caml_bytes"
76551+
let bytes_ = "Bytes"
7655176552

7655276553
let float = "Caml_float"
7655376554

@@ -94858,7 +94859,7 @@ let set_byte e e0 e1 = E.assign (E.array_index e e0) e1
9485894859
]}
9485994860
*)
9486094861
let bytes_to_string e =
94861-
E.runtime_call Js_runtime_modules.bytes "bytes_to_string" [ e ]
94862+
E.runtime_call Js_runtime_modules.bytes_ "bytes_to_string" [ e ]
9486294863

9486394864
let bytes_of_string s =
9486494865
E.runtime_call Js_runtime_modules.bytes "bytes_of_string" [ s ]

lib/4.06.1/whole_compiler.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -252422,6 +252422,7 @@ let format = "Caml_format"
252422252422
let string = "Caml_string"
252423252423

252424252424
let bytes = "Caml_bytes"
252425+
let bytes_ = "Bytes"
252425252426

252426252427
let float = "Caml_float"
252427252428

@@ -264129,7 +264130,7 @@ let set_byte e e0 e1 = E.assign (E.array_index e e0) e1
264129264130
]}
264130264131
*)
264131264132
let bytes_to_string e =
264132-
E.runtime_call Js_runtime_modules.bytes "bytes_to_string" [ e ]
264133+
E.runtime_call Js_runtime_modules.bytes_ "bytes_to_string" [ e ]
264133264134

264134264135
let bytes_of_string s =
264135264136
E.runtime_call Js_runtime_modules.bytes "bytes_of_string" [ s ]

lib/es6/char.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
import * as Caml_bytes from "./caml_bytes.js";
3+
import * as Bytes from "./bytes.js";
44

55
function chr(n) {
66
if (n < 0 || n > 255) {
@@ -64,11 +64,11 @@ function escaped(c) {
6464
s[1] = 48 + (c / 100 | 0) | 0;
6565
s[2] = 48 + (c / 10 | 0) % 10 | 0;
6666
s[3] = 48 + c % 10 | 0;
67-
return Caml_bytes.bytes_to_string(s);
67+
return Bytes.bytes_to_string(s);
6868
case 2 :
6969
var s$1 = [0];
7070
s$1[0] = c;
71-
return Caml_bytes.bytes_to_string(s$1);
71+
return Bytes.bytes_to_string(s$1);
7272

7373
}
7474
}

lib/js/char.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var Caml_bytes = require("./caml_bytes.js");
3+
var Bytes = require("./bytes.js");
44

55
function chr(n) {
66
if (n < 0 || n > 255) {
@@ -64,11 +64,11 @@ function escaped(c) {
6464
s[1] = 48 + (c / 100 | 0) | 0;
6565
s[2] = 48 + (c / 10 | 0) % 10 | 0;
6666
s[3] = 48 + c % 10 | 0;
67-
return Caml_bytes.bytes_to_string(s);
67+
return Bytes.bytes_to_string(s);
6868
case 2 :
6969
var s$1 = [0];
7070
s$1[0] = c;
71-
return Caml_bytes.bytes_to_string(s$1);
71+
return Bytes.bytes_to_string(s$1);
7272

7373
}
7474
}

0 commit comments

Comments
 (0)