Skip to content

Commit 688fbb3

Browse files
committed
pass unboxed from command line (auto-unbox)
1 parent d928b46 commit 688fbb3

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

jscomp/core/lam_pass_exits.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ let rec
9393
we should refresh
9494
*)
9595
type lam_subst =
96-
| Id of Lam.t [@@unboxed]
96+
| Id of Lam.t
9797
(* | Refresh of Lam.t *)
9898

9999
type subst_tbl = (Ident.t list * lam_subst ) Hash_int.t

jscomp/ext/ext_path.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
(* [@@@warning "-37"] *)
2626
type t =
2727
(* | File of string *)
28-
| Dir of string [@@unboxed]
28+
| Dir of string
2929

3030

3131
let simple_convert_node_path_to_os_path =

scripts/ninjaFactory.js

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
1-
2-
3-
41
//@ts-check
2+
3+
// -inline 1000 makes size too large
4+
// # TODO: make sure it can be bootstrapped, at least is a very good
5+
// # test case of our optimizations
6+
// # build bsdep.exe: cc bsdep.mli bsdep.ml
57
/**
6-
*
7-
* @param {{ocamlopt : string ; ext : string ; INCL : string, isWin : boolean}} config
8-
*
8+
*
9+
* @param {{ocamlopt : string ; ext : string ; INCL : string, isWin : boolean}} config
10+
*
911
*/
10-
function libNinja(config){
11-
return `
12+
function libNinja(config) {
13+
return `
1214
ocamlopt = ${config.ocamlopt}
1315
ext = ${config.ext}
1416
INCL = ${config.INCL}
1517
flags = -nodynlink -I $INCL -g -w -a ../jscomp/stubs/ext_basic_hash_stubs.c
1618
rule cc
17-
command = $ocamlopt -O2 $flags $in -o $out ${config.isWin? '' : '&& strip $out'}
19+
command = $ocamlopt -O2 $flags $in -o $out ${
20+
config.isWin ? "" : "&& strip $out"
21+
}
1822
description = Making $out
19-
# -inline 1000 makes size too large
20-
# TODO: make sure it can be bootstrapped, at least is a very good
21-
# test case of our optimizations
22-
# build bsdep.exe: cc bsdep.mli bsdep.ml
2323
build bsppx$ext: cc $INCL/bsppx.mli $INCL/bsppx.ml
24+
flags = $flags -unboxed-types
2425
# build bspp.exe: cc bspp.mli bspp.ml
2526
build bsb$ext: cc $INCL/bsb.mli $INCL/bsb.ml
26-
flags = $flags unix.cmxa str.cmxa
27+
flags = $flags -unboxed-types unix.cmxa str.cmxa
2728
build bsb_helper$ext: cc $INCL/bsb_helper.mli $INCL/bsb_helper.ml
28-
flags = $flags -w -a
29+
flags = $flags -unboxed-types -w -a
2930
build refmt$ext: cc $INCL/refmt_main3.mli $INCL/refmt_main3.ml
30-
flags = $flags -w -40-30 -no-alias-deps -I +compiler-libs ocamlcommon.cmxa
31+
flags = $flags -w -40-30 -no-alias-deps -I +compiler-libs ocamlcommon.cmxa
3132
build bsc$ext: cc $INCL/whole_compiler.mli $INCL/whole_compiler.ml
32-
`
33+
flags = $flags -unboxed-types
34+
`;
3335
}
3436

35-
exports.libNinja = libNinja
37+
exports.libNinja = libNinja;

0 commit comments

Comments
 (0)