Skip to content

Commit 4c31131

Browse files
committed
snapshot changes, using vendored ocamlopt (for even faster feedback loop without relying on opam)
1 parent 08c6ff6 commit 4c31131

File tree

164 files changed

+1470
-1457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+1470
-1457
lines changed

jscomp/compiler.ninja

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11

2+
ocamlopt = ../vendor/ocaml/bin/ocamlopt.opt
23
rule optc
3-
command = ocamlopt.opt -I +compiler-libs -I stubs -I ext -I common -I syntax -I depends -I core -I super_errors -I outcome_printer -I bsb -I main -g -w +6-40-30-23 -warn-error +a-40-30-23 -absname -c $in
4+
command = $ocamlopt -I +compiler-libs -I stubs -I ext -I common -I syntax -I depends -I core -I super_errors -I outcome_printer -I bsb -I main -g -w +6-40-30-23 -warn-error +a-40-30-23 -absname -c $in
45
rule archive
5-
command = ocamlopt.opt -a $in -o $out
6+
command = $ocamlopt -a $in -o $out
67
rule link
7-
command = ocamlopt.opt -g -I +compiler-libs $flags $libs $in -o $out
8+
command = $ocamlopt -g -I +compiler-libs $flags $libs $in -o $out
89
rule mk_bsversion
910
command = node $in
1011
generator = true
1112
rule gcc
12-
command = ocamlopt.opt -ccopt -O2 -ccopt -o -ccopt $out -c $in
13+
command = $ocamlopt -ccopt -O2 -ccopt -o -ccopt $out -c $in
1314
build stubs/ext_basic_hash_stubs.o : gcc stubs/ext_basic_hash_stubs.c
1415
rule ocamlmklib
1516
command = ocamlmklib $in -o $name
1617
build stubs/libbs_hash.a stubs/dllbs_hash.so: ocamlmklib stubs/ext_basic_hash_stubs.o
1718
name = stubs/bs_hash
1819
rule stubslib
19-
command = ocamlopt.opt -a $ml -o $out -cclib $clib
20+
command = $ocamlopt -a $ml -o $out -cclib $clib
2021
build stubs/stubs.cmxa : stubslib stubs/bs_hash_stubs.cmx stubs/libbs_hash.a
2122
ml = stubs/bs_hash_stubs.cmx
2223
clib = stubs/libbs_hash.a
@@ -50,6 +51,7 @@ build ./bin/bspack.exe: link ./stubs/ext_basic_hash_stubs.c ./bin/bspack.mli ./b
5051
rule bspack
5152
command = ./bin/bspack.exe $flags -bs-main $main -o $out
5253
depfile = $out.d
54+
generator = true
5355

5456
build snapshot: phony ../lib/whole_compiler.ml ../lib/bsppx.ml ../lib/bsdep.ml ../lib/bsb_helper.ml ../lib/bsb.ml ../lib/bspp.ml bin/all_ounit_tests.ml
5557

jscomp/test/a_filename_test.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function test(param, param$1) {
3030
return Ext_filename_test.node_relative_path(true, param, param$1);
3131
}
3232

33-
eq("File \"test/a_filename_test.ml\", line 10, characters 5-12", /* tuple */[
33+
eq("File \"a_filename_test.ml\", line 10, characters 5-12", /* tuple */[
3434
Ext_filename_test.combine("/tmp", "subdir/file.txt"),
3535
Ext_filename_test.combine("/tmp", "/a/tmp.txt"),
3636
Ext_filename_test.combine("/a/tmp.txt", "subdir/file.txt")
@@ -40,69 +40,69 @@ eq("File \"test/a_filename_test.ml\", line 10, characters 5-12", /* tuple */[
4040
"/a/tmp.txt/subdir/file.txt"
4141
]);
4242

43-
eq("File \"test/a_filename_test.ml\", line 22, characters 5-12", test(/* `File */[
43+
eq("File \"a_filename_test.ml\", line 22, characters 5-12", test(/* `File */[
4444
781515420,
4545
"./a/b.c"
4646
], /* `File */[
4747
781515420,
4848
"./a/u/g.c"
4949
]), "./u/g.c");
5050

51-
eq("File \"test/a_filename_test.ml\", line 27, characters 5-12", test(/* `File */[
51+
eq("File \"a_filename_test.ml\", line 27, characters 5-12", test(/* `File */[
5252
781515420,
5353
"./a/b.c"
5454
], /* `File */[
5555
781515420,
5656
"xxxghsoghos/ghsoghso/node_modules/buckle-stdlib/list.js"
5757
]), "buckle-stdlib/list.js");
5858

59-
eq("File \"test/a_filename_test.ml\", line 33, characters 5-12", test(/* `File */[
59+
eq("File \"a_filename_test.ml\", line 33, characters 5-12", test(/* `File */[
6060
781515420,
6161
"./a/b.c"
6262
], /* `File */[
6363
781515420,
6464
"xxxghsoghos/ghsoghso/node_modules//buckle-stdlib/list.js"
6565
]), "buckle-stdlib/list.js");
6666

67-
eq("File \"test/a_filename_test.ml\", line 39, characters 5-12", test(/* `File */[
67+
eq("File \"a_filename_test.ml\", line 39, characters 5-12", test(/* `File */[
6868
781515420,
6969
"./a/b.c"
7070
], /* `File */[
7171
781515420,
7272
"xxxghsoghos/ghsoghso/node_modules/./buckle-stdlib/list.js"
7373
]), "buckle-stdlib/list.js");
7474

75-
eq("File \"test/a_filename_test.ml\", line 45, characters 5-12", test(/* `File */[
75+
eq("File \"a_filename_test.ml\", line 45, characters 5-12", test(/* `File */[
7676
781515420,
7777
"./a/c.js"
7878
], /* `File */[
7979
781515420,
8080
"./a/b"
8181
]), "./b");
8282

83-
eq("File \"test/a_filename_test.ml\", line 50, characters 5-12", test(/* `File */[
83+
eq("File \"a_filename_test.ml\", line 50, characters 5-12", test(/* `File */[
8484
781515420,
8585
"./a/c"
8686
], /* `File */[
8787
781515420,
8888
"./a/b.js"
8989
]), "./b.js");
9090

91-
eq("File \"test/a_filename_test.ml\", line 55, characters 5-12", test(/* `Dir */[
91+
eq("File \"a_filename_test.ml\", line 55, characters 5-12", test(/* `Dir */[
9292
3405101,
9393
"./a/"
9494
], /* `File */[
9595
781515420,
9696
"./a/b.js"
9797
]), "./b.js");
9898

99-
eq("File \"test/a_filename_test.ml\", line 60, characters 5-12", Ext_filename_test.get_extension("a.txt"), ".txt");
99+
eq("File \"a_filename_test.ml\", line 60, characters 5-12", Ext_filename_test.get_extension("a.txt"), ".txt");
100100

101-
eq("File \"test/a_filename_test.ml\", line 64, characters 5-12", Ext_filename_test.get_extension("a"), "");
101+
eq("File \"a_filename_test.ml\", line 64, characters 5-12", Ext_filename_test.get_extension("a"), "");
102102

103-
eq("File \"test/a_filename_test.ml\", line 68, characters 5-12", Ext_filename_test.get_extension(".txt"), ".txt");
103+
eq("File \"a_filename_test.ml\", line 68, characters 5-12", Ext_filename_test.get_extension(".txt"), ".txt");
104104

105-
eq("File \"test/a_filename_test.ml\", line 73, characters 5-12", $$Array.map(Ext_filename_test.normalize_absolute_path, /* array */[
105+
eq("File \"a_filename_test.ml\", line 73, characters 5-12", $$Array.map(Ext_filename_test.normalize_absolute_path, /* array */[
106106
"/gsho/./..",
107107
"/a/b/../c../d/e/f",
108108
"/a/b/../c/../d/e/f",

jscomp/test/ari_regress_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ var suites_001 = /* :: */[
6060
],
6161
/* :: */[
6262
/* tuple */[
63-
"File \"test/ari_regress_test.ml\", line 20, characters 4-11",
63+
"File \"ari_regress_test.ml\", line 20, characters 4-11",
6464
(function (param) {
6565
return /* Eq */Block.__(0, [
6666
h[0],

jscomp/test/arity_deopt.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ function f3(x) {
4747
});
4848
}
4949

50-
eq("File \"test/arity_deopt.ml\", line 45, characters 7-14", 6, f0(1, 2, 3));
50+
eq("File \"arity_deopt.ml\", line 45, characters 7-14", 6, f0(1, 2, 3));
5151

52-
eq("File \"test/arity_deopt.ml\", line 46, characters 11-18", 6, (function (y, z) {
52+
eq("File \"arity_deopt.ml\", line 46, characters 11-18", 6, (function (y, z) {
5353
return (1 + y | 0) + z | 0;
5454
})(2, 3));
5555

56-
eq("File \"test/arity_deopt.ml\", line 47, characters 15-22", 6, Curry._1(f2(1, 2), 3));
56+
eq("File \"arity_deopt.ml\", line 47, characters 15-22", 6, Curry._1(f2(1, 2), 3));
5757

58-
eq("File \"test/arity_deopt.ml\", line 48, characters 15-22", 6, (function (y, z) {
58+
eq("File \"arity_deopt.ml\", line 48, characters 15-22", 6, (function (y, z) {
5959
return (1 + y | 0) + z | 0;
6060
})(2, 3));
6161

jscomp/test/array_subtle_test.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -34,34 +34,34 @@ var v = /* array */[
3434
3
3535
];
3636

37-
eq("File \"test/array_subtle_test.ml\", line 12, characters 5-12", /* tuple */[
37+
eq("File \"array_subtle_test.ml\", line 12, characters 5-12", /* tuple */[
3838
4,
3939
v.length
4040
]);
4141

42-
eq("File \"test/array_subtle_test.ml\", line 15, characters 5-12", /* tuple */[
42+
eq("File \"array_subtle_test.ml\", line 15, characters 5-12", /* tuple */[
4343
5,
4444
v.push(3)
4545
]);
4646

47-
eq("File \"test/array_subtle_test.ml\", line 16, characters 5-12", /* tuple */[
47+
eq("File \"array_subtle_test.ml\", line 16, characters 5-12", /* tuple */[
4848
5,
4949
v.length
5050
]);
5151

52-
eq("File \"test/array_subtle_test.ml\", line 17, characters 5-12", /* tuple */[
52+
eq("File \"array_subtle_test.ml\", line 17, characters 5-12", /* tuple */[
5353
5,
5454
v.length
5555
]);
5656

57-
eq("File \"test/array_subtle_test.ml\", line 21, characters 5-12", /* tuple */[
57+
eq("File \"array_subtle_test.ml\", line 21, characters 5-12", /* tuple */[
5858
3,
5959
Caml_array.caml_array_get(v, 2)
6060
]);
6161

6262
Caml_array.caml_array_set(v, 2, 4);
6363

64-
eq("File \"test/array_subtle_test.ml\", line 23, characters 5-12", /* tuple */[
64+
eq("File \"array_subtle_test.ml\", line 23, characters 5-12", /* tuple */[
6565
4,
6666
Caml_array.caml_array_get(v, 2)
6767
]);
@@ -70,7 +70,7 @@ while(v.length > 0) {
7070
v.pop();
7171
};
7272

73-
eq("File \"test/array_subtle_test.ml\", line 29, characters 5-12", /* tuple */[
73+
eq("File \"array_subtle_test.ml\", line 29, characters 5-12", /* tuple */[
7474
0,
7575
v.length
7676
]);
@@ -111,17 +111,17 @@ function fff4(x) {
111111
}
112112
}
113113

114-
eq("File \"test/array_subtle_test.ml\", line 51, characters 6-13", /* tuple */[
114+
eq("File \"array_subtle_test.ml\", line 51, characters 6-13", /* tuple */[
115115
fff3(/* array */[]),
116116
1
117117
]);
118118

119-
eq("File \"test/array_subtle_test.ml\", line 52, characters 6-13", /* tuple */[
119+
eq("File \"array_subtle_test.ml\", line 52, characters 6-13", /* tuple */[
120120
fff4(/* array */[]),
121121
2
122122
]);
123123

124-
eq("File \"test/array_subtle_test.ml\", line 53, characters 6-13", /* tuple */[
124+
eq("File \"array_subtle_test.ml\", line 53, characters 6-13", /* tuple */[
125125
fff4(/* array */[1]),
126126
1
127127
]);

jscomp/test/array_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ var array_suites_001 = /* :: */[
208208
],
209209
/* :: */[
210210
/* tuple */[
211-
"File \"test/array_test.ml\", line 63, characters 2-9",
211+
"File \"array_test.ml\", line 63, characters 2-9",
212212
(function (param) {
213213
var a0 = $$Array.init(100, (function (i) {
214214
return (i << 0);
@@ -247,7 +247,7 @@ var array_suites_001 = /* :: */[
247247
],
248248
/* :: */[
249249
/* tuple */[
250-
"File \"test/array_test.ml\", line 72, characters 2-9",
250+
"File \"array_test.ml\", line 72, characters 2-9",
251251
(function (param) {
252252
var a0 = $$Array.init(100, (function (i) {
253253
return (i << 0);

jscomp/test/ast_abstract_test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function xFromJs(param) {
7777
}
7878

7979
function idx(v) {
80-
return eq("File \"test/ast_abstract_test.ml\", line 32, characters 17-24", xFromJs(xToJs(v)), v);
80+
return eq("File \"ast_abstract_test.ml\", line 32, characters 17-24", xFromJs(xToJs(v)), v);
8181
}
8282

8383
var x0 = xToJs(/* a */97);
@@ -105,7 +105,7 @@ function aFromJs(param) {
105105
}
106106

107107
function id(x) {
108-
return eq("File \"test/ast_abstract_test.ml\", line 49, characters 8-15", aFromJs(aToJs(x)), x);
108+
return eq("File \"ast_abstract_test.ml\", line 49, characters 8-15", aFromJs(aToJs(x)), x);
109109
}
110110

111111
var a0 = aToJs(/* A */0);
@@ -134,7 +134,7 @@ var b0 = 0;
134134
var b1 = 1;
135135

136136
function idb(v) {
137-
return eq("File \"test/ast_abstract_test.ml\", line 71, characters 5-12", bFromJs(v + 0 | 0), v);
137+
return eq("File \"ast_abstract_test.ml\", line 71, characters 5-12", bFromJs(v + 0 | 0), v);
138138
}
139139

140140
idb(/* D0 */0);
@@ -159,7 +159,7 @@ function cFromJs(param) {
159159
var c0 = 3;
160160

161161
function idc(v) {
162-
return eq("File \"test/ast_abstract_test.ml\", line 83, characters 15-22", cFromJs(v + 3 | 0), v);
162+
return eq("File \"ast_abstract_test.ml\", line 83, characters 15-22", cFromJs(v + 3 | 0), v);
163163
}
164164

165165
idc(/* D0 */0);

jscomp/test/ast_js_mapper_poly_test.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ function eqUOpt(x, y) {
6565
}
6666
}
6767

68-
eq("File \"test/ast_js_mapper_poly_test.ml\", line 25, characters 5-12", eqUOpt(uFromJs("x"), /* f */102), true);
68+
eq("File \"ast_js_mapper_poly_test.ml\", line 25, characters 5-12", eqUOpt(uFromJs("x"), /* f */102), true);
6969

70-
eq("File \"test/ast_js_mapper_poly_test.ml\", line 26, characters 5-12", eqUOpt(uFromJs("D"), /* D */68), true);
70+
eq("File \"ast_js_mapper_poly_test.ml\", line 26, characters 5-12", eqUOpt(uFromJs("D"), /* D */68), true);
7171

72-
eq("File \"test/ast_js_mapper_poly_test.ml\", line 27, characters 5-12", eqUOpt(uFromJs("C"), /* C */67), true);
72+
eq("File \"ast_js_mapper_poly_test.ml\", line 27, characters 5-12", eqUOpt(uFromJs("C"), /* C */67), true);
7373

74-
eq("File \"test/ast_js_mapper_poly_test.ml\", line 28, characters 5-12", eqUOpt(uFromJs("f"), undefined), true);
74+
eq("File \"ast_js_mapper_poly_test.ml\", line 28, characters 5-12", eqUOpt(uFromJs("f"), undefined), true);
7575

76-
eq("File \"test/ast_js_mapper_poly_test.ml\", line 29, characters 5-12", $$Array.map(uToJs, /* array */[
76+
eq("File \"ast_js_mapper_poly_test.ml\", line 29, characters 5-12", $$Array.map(uToJs, /* array */[
7777
/* D */68,
7878
/* C */67,
7979
/* f */102
@@ -128,7 +128,7 @@ function s(param) {
128128
}
129129
}
130130

131-
eq("File \"test/ast_js_mapper_poly_test.ml\", line 54, characters 5-12", $$Array.map(vToJs, /* array */[
131+
eq("File \"ast_js_mapper_poly_test.ml\", line 54, characters 5-12", $$Array.map(vToJs, /* array */[
132132
/* A0 */0,
133133
/* A1 */1,
134134
/* A2 */2,
@@ -140,7 +140,7 @@ eq("File \"test/ast_js_mapper_poly_test.ml\", line 54, characters 5-12", $$Array
140140
5
141141
]);
142142

143-
eq("File \"test/ast_js_mapper_poly_test.ml\", line 55, characters 5-12", $$Array.map(vFromJs, /* array */[
143+
eq("File \"ast_js_mapper_poly_test.ml\", line 55, characters 5-12", $$Array.map(vFromJs, /* array */[
144144
0,
145145
1,
146146
2,
@@ -169,7 +169,7 @@ function v1FromJs(param) {
169169

170170
}
171171

172-
eq("File \"test/ast_js_mapper_poly_test.ml\", line 68, characters 5-12", $$Array.map(v1ToJs, /* array */[
172+
eq("File \"ast_js_mapper_poly_test.ml\", line 68, characters 5-12", $$Array.map(v1ToJs, /* array */[
173173
/* B0 */0,
174174
/* B1 */1,
175175
/* B2 */2,
@@ -185,7 +185,7 @@ eq("File \"test/ast_js_mapper_poly_test.ml\", line 68, characters 5-12", $$Array
185185
5
186186
]);
187187

188-
eq("File \"test/ast_js_mapper_poly_test.ml\", line 69, characters 5-12", $$Array.map(v1FromJs, /* array */[
188+
eq("File \"ast_js_mapper_poly_test.ml\", line 69, characters 5-12", $$Array.map(v1FromJs, /* array */[
189189
-1,
190190
0,
191191
1,
@@ -216,7 +216,7 @@ function v2FromJs(param) {
216216

217217
}
218218

219-
eq("File \"test/ast_js_mapper_poly_test.ml\", line 86, characters 5-12", $$Array.map(v2ToJs, /* array */[
219+
eq("File \"ast_js_mapper_poly_test.ml\", line 86, characters 5-12", $$Array.map(v2ToJs, /* array */[
220220
/* C0 */0,
221221
/* C1 */1,
222222
/* C2 */2,
@@ -232,7 +232,7 @@ eq("File \"test/ast_js_mapper_poly_test.ml\", line 86, characters 5-12", $$Array
232232
7
233233
]);
234234

235-
eq("File \"test/ast_js_mapper_poly_test.ml\", line 89, characters 5-12", $$Array.map(v2FromJs, /* array */[
235+
eq("File \"ast_js_mapper_poly_test.ml\", line 89, characters 5-12", $$Array.map(v2FromJs, /* array */[
236236
0,
237237
1,
238238
2,

jscomp/test/ast_mapper_defensive_test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ function cFromJs(param) {
7070
return Js_mapperRt.revSearchAssert(3, jsMapperConstantArray$1, param);
7171
}
7272

73-
$$throw("File \"test/ast_mapper_defensive_test.ml\", line 28, characters 16-23", (function (param) {
73+
$$throw("File \"ast_mapper_defensive_test.ml\", line 28, characters 16-23", (function (param) {
7474
aFromJs(3);
7575
return /* () */0;
7676
}));
7777

78-
$$throw("File \"test/ast_mapper_defensive_test.ml\", line 29, characters 15-22", (function (param) {
78+
$$throw("File \"ast_mapper_defensive_test.ml\", line 29, characters 15-22", (function (param) {
7979
bFromJs(2);
8080
return /* () */0;
8181
}));
8282

83-
$$throw("File \"test/ast_mapper_defensive_test.ml\", line 30, characters 15-22", (function (param) {
83+
$$throw("File \"ast_mapper_defensive_test.ml\", line 30, characters 15-22", (function (param) {
8484
cFromJs(33);
8585
return /* () */0;
8686
}));

jscomp/test/basic_module_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function eq(f, a, b) {
2525
return Mt_global.collect_eq(test_id, suites, f, a, b);
2626
}
2727

28-
eq("File \"test/basic_module_test.ml\", line 39, characters 12-19", count[0], 1);
28+
eq("File \"basic_module_test.ml\", line 39, characters 12-19", count[0], 1);
2929

3030
Mt.from_pair_suites("Basic_module_test", suites[0]);
3131

0 commit comments

Comments
 (0)