Skip to content

Commit 0799d1c

Browse files
authored
Merge pull request #4547 from BuckleScript/disable_record_punning
curry-less for the runtime
2 parents 9b19074 + b74498e commit 0799d1c

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

jscomp/runtime/caml_io.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ let stdin = Caml_undefined_extern.empty
2828

2929
type out_channel = {
3030
mutable buffer : string;
31-
output : out_channel -> string -> unit
31+
output : (out_channel -> string -> unit [@bs])
3232
}
3333

3434
let stdout = {
3535
buffer = "";
36-
output = (fun _ s ->
36+
output = (fun [@bs] _ s ->
3737
let module String = Caml_string_extern in
3838
let v =Caml_string_extern.length s - 1 in
3939
if [%bs.raw{| (typeof process !== "undefined") && process.stdout && process.stdout.write|}] then
@@ -46,7 +46,7 @@ let stdout = {
4646

4747
let stderr = {
4848
buffer = "";
49-
output = fun _ s ->
49+
output = fun [@bs] _ s ->
5050
let module String = Caml_string_extern in
5151
let v =Caml_string_extern.length s - 1 in
5252
if s.[v] = '\n' then
@@ -71,7 +71,7 @@ let caml_ml_input_char (ic : in_channel) : char =
7171
let caml_ml_flush (oc : out_channel) : unit =
7272
if oc.buffer <> "" then
7373
begin
74-
oc.output oc oc.buffer;
74+
oc.output oc oc.buffer [@bs];
7575
oc.buffer <- ""
7676
end
7777

jscomp/runtime/release.ninja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ build runtime/caml_int32.cmj : cc_cmi runtime/caml_int32.ml | runtime/caml_int32
3131
build runtime/caml_int32.cmi : cc runtime/caml_int32.mli | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj
3232
build runtime/caml_int64.cmj : cc_cmi runtime/caml_int64.ml | runtime/caml_float.cmj runtime/caml_float_extern.cmj runtime/caml_int64.cmi runtime/caml_nativeint_extern.cmj runtime/caml_primitive.cmj runtime/caml_string_extern.cmj runtime/js.cmj
3333
build runtime/caml_int64.cmi : cc runtime/caml_int64.mli | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj
34-
build runtime/caml_io.cmj : cc_cmi runtime/caml_io.ml | runtime/caml_io.cmi runtime/caml_string_extern.cmj runtime/caml_undefined_extern.cmj runtime/curry.cmj runtime/js.cmj
34+
build runtime/caml_io.cmj : cc_cmi runtime/caml_io.ml | runtime/caml_io.cmi runtime/caml_string_extern.cmj runtime/caml_undefined_extern.cmj runtime/js.cmj
3535
build runtime/caml_io.cmi : cc runtime/caml_io.mli | runtime/bs_stdlib_mini.cmi runtime/caml_undefined_extern.cmj runtime/js.cmi runtime/js.cmj
3636
build runtime/caml_lexer.cmj : cc_cmi runtime/caml_lexer.ml | runtime/caml_lexer.cmi
3737
build runtime/caml_lexer.cmi : cc runtime/caml_lexer.mli | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj

lib/es6/caml_io.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11

22

3-
import * as Curry from "./curry.js";
43

54
var stdout = {
65
buffer: "",
@@ -34,7 +33,7 @@ var stderr = {
3433

3534
function caml_ml_flush(oc) {
3635
if (oc.buffer !== "") {
37-
Curry._2(oc.output, oc, oc.buffer);
36+
oc.output(oc, oc.buffer);
3837
oc.buffer = "";
3938
return ;
4039
}

lib/js/caml_io.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22

3-
var Curry = require("./curry.js");
43

54
var stdout = {
65
buffer: "",
@@ -34,7 +33,7 @@ var stderr = {
3433

3534
function caml_ml_flush(oc) {
3635
if (oc.buffer !== "") {
37-
Curry._2(oc.output, oc, oc.buffer);
36+
oc.output(oc, oc.buffer);
3837
oc.buffer = "";
3938
return ;
4039
}

0 commit comments

Comments
 (0)