Skip to content

Commit d559f5f

Browse files
committed
Fix issue with bytes_to_string in library.
Fixes #5573
1 parent e35190a commit d559f5f

File tree

8 files changed

+15
-12
lines changed

8 files changed

+15
-12
lines changed

jscomp/core/js_of_lam_string.ml

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76406,6 +76406,7 @@ let format = "Caml_format"
7640676406
let string = "Caml_string"
7640776407

7640876408
let bytes = "Caml_bytes"
76409+
let bytes_ = "Bytes"
7640976410

7641076411
let float = "Caml_float"
7641176412

@@ -94673,7 +94674,7 @@ let set_byte e e0 e1 = E.assign (E.array_index e e0) e1
9467394674
]}
9467494675
*)
9467594676
let bytes_to_string e =
94676-
E.runtime_call Js_runtime_modules.bytes "bytes_to_string" [ e ]
94677+
E.runtime_call Js_runtime_modules.bytes_ "bytes_to_string" [ e ]
9467794678

9467894679
let bytes_of_string s =
9467994680
E.runtime_call Js_runtime_modules.bytes "bytes_of_string" [ s ]

lib/4.06.1/unstable/js_playground_compiler.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76406,6 +76406,7 @@ let format = "Caml_format"
7640676406
let string = "Caml_string"
7640776407

7640876408
let bytes = "Caml_bytes"
76409+
let bytes_ = "Bytes"
7640976410

7641076411
let float = "Caml_float"
7641176412

@@ -94673,7 +94674,7 @@ let set_byte e e0 e1 = E.assign (E.array_index e e0) e1
9467394674
]}
9467494675
*)
9467594676
let bytes_to_string e =
94676-
E.runtime_call Js_runtime_modules.bytes "bytes_to_string" [ e ]
94677+
E.runtime_call Js_runtime_modules.bytes_ "bytes_to_string" [ e ]
9467794678

9467894679
let bytes_of_string s =
9467994680
E.runtime_call Js_runtime_modules.bytes "bytes_of_string" [ s ]

lib/4.06.1/whole_compiler.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252272,6 +252272,7 @@ let format = "Caml_format"
252272252272
let string = "Caml_string"
252273252273

252274252274
let bytes = "Caml_bytes"
252275+
let bytes_ = "Bytes"
252275252276

252276252277
let float = "Caml_float"
252277252278

@@ -263944,7 +263945,7 @@ let set_byte e e0 e1 = E.assign (E.array_index e e0) e1
263944263945
]}
263945263946
*)
263946263947
let bytes_to_string e =
263947-
E.runtime_call Js_runtime_modules.bytes "bytes_to_string" [ e ]
263948+
E.runtime_call Js_runtime_modules.bytes_ "bytes_to_string" [ e ]
263948263949

263949263950
let bytes_of_string s =
263950263951
E.runtime_call Js_runtime_modules.bytes "bytes_of_string" [ s ]

lib/es6/char.js

Lines changed: 3 additions & 3 deletions
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

Lines changed: 3 additions & 3 deletions
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)