Skip to content

Commit 87f3f2a

Browse files
committed
update submodule ocaml hash
1 parent 1e14f41 commit 87f3f2a

16 files changed

+725
-927
lines changed

jscomp/test/ext_filename_test.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,7 @@ function path_as_directory(x) {
4040

4141
function absolute_path(s) {
4242
var s$1 = s;
43-
var s$2;
44-
if (Curry._1(Filename.is_relative, s$1)) {
45-
var tag = cwd.tag | 0;
46-
s$2 = Filename.concat(tag === 250 ? cwd[0] : (
47-
tag === 246 ? CamlinternalLazy.force_lazy_block(cwd) : cwd
48-
), s$1);
49-
} else {
50-
s$2 = s$1;
51-
}
43+
var s$2 = Curry._1(Filename.is_relative, s$1) ? Filename.concat(CamlinternalLazy.force(cwd), s$1) : s$1;
5244
var aux = function (_s) {
5345
while(true) {
5446
var s = _s;
@@ -236,10 +228,7 @@ function find_package_json_dir(cwd) {
236228
}
237229

238230
var package_dir = Caml_obj.caml_lazy_make((function (param) {
239-
var tag = cwd.tag | 0;
240-
var cwd$1 = tag === 250 ? cwd[0] : (
241-
tag === 246 ? CamlinternalLazy.force_lazy_block(cwd) : cwd
242-
);
231+
var cwd$1 = CamlinternalLazy.force(cwd);
243232
return find_root_filename(cwd$1, Test_literals.bsconfig_json);
244233
}));
245234

jscomp/test/gpr_3697_test.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,15 @@ function fix(param) {
1212
function unfixLeak(_param) {
1313
while(true) {
1414
var param = _param;
15-
var f = param[0];
16-
var tag = f.tag | 0;
17-
_param = tag === 250 ? f[0] : (
18-
tag === 246 ? CamlinternalLazy.force_lazy_block(f) : f
19-
);
15+
_param = CamlinternalLazy.force(param[0]);
2016
continue ;
2117
};
2218
}
2319

2420
function unfix(p) {
2521
while(true) {
2622
var match = p[0];
27-
var match$1 = match[0];
28-
var tag = match$1.tag | 0;
29-
p[0] = tag === 250 ? match$1[0] : (
30-
tag === 246 ? CamlinternalLazy.force_lazy_block(match$1) : match$1
31-
);
23+
p[0] = CamlinternalLazy.force(match[0]);
3224
};
3325
return /* () */0;
3426
}

jscomp/test/hamming_test.js

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,7 @@ function pr(param) {
134134

135135
function map(f, l) {
136136
return Caml_obj.caml_lazy_make((function (param) {
137-
var tag = l.tag | 0;
138-
var match = tag === 250 ? l[0] : (
139-
tag === 246 ? CamlinternalLazy.force_lazy_block(l) : l
140-
);
137+
var match = CamlinternalLazy.force(l);
141138
return /* Cons */[
142139
Curry._1(f, match[0]),
143140
map(f, match[1])
@@ -147,14 +144,8 @@ function map(f, l) {
147144

148145
function merge(cmp, l1, l2) {
149146
return Caml_obj.caml_lazy_make((function (param) {
150-
var tag = l1.tag | 0;
151-
var match = tag === 250 ? l1[0] : (
152-
tag === 246 ? CamlinternalLazy.force_lazy_block(l1) : l1
153-
);
154-
var tag$1 = l2.tag | 0;
155-
var match$1 = tag$1 === 250 ? l2[0] : (
156-
tag$1 === 246 ? CamlinternalLazy.force_lazy_block(l2) : l2
157-
);
147+
var match = CamlinternalLazy.force(l1);
148+
var match$1 = CamlinternalLazy.force(l2);
158149
var ll2 = match$1[1];
159150
var x2 = match$1[0];
160151
var ll1 = match[1];
@@ -188,10 +179,7 @@ function iter_interval(f, _l, _param) {
188179
return /* () */0;
189180
} else {
190181
var start = param[0];
191-
var tag = l.tag | 0;
192-
var match = tag === 250 ? l[0] : (
193-
tag === 246 ? CamlinternalLazy.force_lazy_block(l) : l
194-
);
182+
var match = CamlinternalLazy.force(l);
195183
if (start <= 0) {
196184
Curry._1(f, match[0]);
197185
}
@@ -213,39 +201,15 @@ var hamming = Caml_obj.caml_lazy_make((function (param) {
213201
}));
214202

215203
var ham2 = Caml_obj.caml_lazy_make((function (param) {
216-
var lzarg = map(x2, hamming);
217-
var tag = lzarg.tag | 0;
218-
if (tag === 250) {
219-
return lzarg[0];
220-
} else if (tag === 246) {
221-
return CamlinternalLazy.force_lazy_block(lzarg);
222-
} else {
223-
return lzarg;
224-
}
204+
return CamlinternalLazy.force(map(x2, hamming));
225205
}));
226206

227207
var ham3 = Caml_obj.caml_lazy_make((function (param) {
228-
var lzarg = map(x3, hamming);
229-
var tag = lzarg.tag | 0;
230-
if (tag === 250) {
231-
return lzarg[0];
232-
} else if (tag === 246) {
233-
return CamlinternalLazy.force_lazy_block(lzarg);
234-
} else {
235-
return lzarg;
236-
}
208+
return CamlinternalLazy.force(map(x3, hamming));
237209
}));
238210

239211
var ham5 = Caml_obj.caml_lazy_make((function (param) {
240-
var lzarg = map(x5, hamming);
241-
var tag = lzarg.tag | 0;
242-
if (tag === 250) {
243-
return lzarg[0];
244-
} else if (tag === 246) {
245-
return CamlinternalLazy.force_lazy_block(lzarg);
246-
} else {
247-
return lzarg;
248-
}
212+
return CamlinternalLazy.force(map(x5, hamming));
249213
}));
250214

251215
iter_interval(pr, hamming, /* tuple */[

jscomp/test/lazy_test.js

Lines changed: 13 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ var v = Caml_obj.caml_lazy_make((function (param) {
1717

1818
function lazy_test(param) {
1919
var h = u[0];
20-
var tag = v.tag | 0;
21-
if (tag !== 250) {
22-
if (tag === 246) {
23-
CamlinternalLazy.force_lazy_block(v);
24-
}
25-
26-
}
20+
CamlinternalLazy.force(v);
2721
var g = u[0];
2822
return /* tuple */[
2923
h,
@@ -32,26 +26,12 @@ function lazy_test(param) {
3226
}
3327

3428
function f(param) {
35-
var match = param[0];
36-
var tag = match.tag | 0;
37-
if (tag !== 250) {
38-
if (tag === 246) {
39-
CamlinternalLazy.force_lazy_block(match);
40-
}
41-
42-
}
43-
var match$1 = param[2][/* contents */0];
44-
if (match$1 !== undefined) {
45-
var match$2 = param[1];
46-
var tag$1 = match$2.tag | 0;
47-
if (tag$1 !== 250) {
48-
if (tag$1 === 246) {
49-
CamlinternalLazy.force_lazy_block(match$2);
50-
}
51-
52-
}
53-
var match$3 = param[2][/* contents */0];
54-
if (match$3 !== undefined) {
29+
CamlinternalLazy.force(param[0]);
30+
var match = param[2][/* contents */0];
31+
if (match !== undefined) {
32+
CamlinternalLazy.force(param[1]);
33+
var match$1 = param[2][/* contents */0];
34+
if (match$1 !== undefined) {
5535
return 1;
5636
} else {
5737
throw [
@@ -105,25 +85,9 @@ var u$1 = Caml_obj.caml_lazy_make((function (param) {
10585
return /* () */0;
10686
}));
10787

108-
var tag = u$1.tag | 0;
88+
CamlinternalLazy.force(u$1);
10989

110-
if (tag !== 250) {
111-
if (tag === 246) {
112-
CamlinternalLazy.force_lazy_block(u$1);
113-
}
114-
115-
}
116-
117-
function exotic(param) {
118-
var tag = param.tag | 0;
119-
if (tag === 250) {
120-
return param[0];
121-
} else if (tag === 246) {
122-
return CamlinternalLazy.force_lazy_block(param);
123-
} else {
124-
return param;
125-
}
126-
}
90+
var exotic = CamlinternalLazy.force;
12791

12892
var l_from_fun = Lazy.from_fun((function (param) {
12993
return 3;
@@ -191,11 +155,8 @@ Mt.from_pair_suites("Lazy_test", /* :: */[
191155
/* tuple */[
192156
"lazy_from_fun",
193157
(function (param) {
194-
var tag = l_from_fun.tag | 0;
195158
return /* Eq */Block.__(0, [
196-
tag === 250 ? l_from_fun[0] : (
197-
tag === 246 ? CamlinternalLazy.force_lazy_block(l_from_fun) : l_from_fun
198-
),
159+
CamlinternalLazy.force(l_from_fun),
199160
3
200161
]);
201162
})
@@ -204,12 +165,8 @@ Mt.from_pair_suites("Lazy_test", /* :: */[
204165
/* tuple */[
205166
"lazy_from_val",
206167
(function (param) {
207-
var lzarg = Lazy.from_val(3);
208-
var tag = lzarg.tag | 0;
209168
return /* Eq */Block.__(0, [
210-
tag === 250 ? lzarg[0] : (
211-
tag === 246 ? CamlinternalLazy.force_lazy_block(lzarg) : lzarg
212-
),
169+
CamlinternalLazy.force(Lazy.from_val(3)),
213170
3
214171
]);
215172
})
@@ -218,16 +175,8 @@ Mt.from_pair_suites("Lazy_test", /* :: */[
218175
/* tuple */[
219176
"lazy_from_val2",
220177
(function (param) {
221-
var lzarg = Lazy.from_val(3);
222-
var tag = lzarg.tag | 0;
223-
var prim = tag === 250 ? lzarg[0] : (
224-
tag === 246 ? CamlinternalLazy.force_lazy_block(lzarg) : lzarg
225-
);
226-
var tag$1 = prim.tag | 0;
227178
return /* Eq */Block.__(0, [
228-
tag$1 === 250 ? prim[0] : (
229-
tag$1 === 246 ? CamlinternalLazy.force_lazy_block(prim) : prim
230-
),
179+
CamlinternalLazy.force(CamlinternalLazy.force(Lazy.from_val(3))),
231180
3
232181
]);
233182
})
@@ -237,16 +186,8 @@ Mt.from_pair_suites("Lazy_test", /* :: */[
237186
"lazy_from_val3",
238187
(function (param) {
239188
debugger;
240-
var lzarg = Lazy.from_val(forward_test);
241-
var tag = lzarg.tag | 0;
242-
var prim = tag === 250 ? lzarg[0] : (
243-
tag === 246 ? CamlinternalLazy.force_lazy_block(lzarg) : lzarg
244-
);
245-
var tag$1 = prim.tag | 0;
246189
return /* Eq */Block.__(0, [
247-
tag$1 === 250 ? prim[0] : (
248-
tag$1 === 246 ? CamlinternalLazy.force_lazy_block(prim) : prim
249-
),
190+
CamlinternalLazy.force(CamlinternalLazy.force(Lazy.from_val(forward_test))),
250191
4
251192
]);
252193
})

jscomp/test/mpr_6033_test.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,13 @@ function eq(loc, x, y) {
2626
}
2727

2828
function f(x) {
29-
var tag = x.tag | 0;
30-
var y = tag === 250 ? x[0] : (
31-
tag === 246 ? CamlinternalLazy.force_lazy_block(x) : x
32-
);
29+
var y = CamlinternalLazy.force(x);
3330
return y + "abc";
3431
}
3532

3633
var x = "def";
3734

38-
var tag = x.tag | 0;
39-
40-
if (tag !== 250) {
41-
if (tag === 246) {
42-
CamlinternalLazy.force_lazy_block(x);
43-
}
44-
45-
}
35+
CamlinternalLazy.force(x);
4636

4737
var u = f(x);
4838

jscomp/test/ocaml_parsetree_test.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4510,15 +4510,7 @@ var yyact = /* array */[
45104510
];
45114511
}
45124512
var bindings$1 = List.map((function (lb) {
4513-
var lzarg = lb[/* lb_docs */3];
4514-
var tag = lzarg.tag | 0;
4515-
var lzarg$1 = lb[/* lb_text */4];
4516-
var tag$1 = lzarg$1.tag | 0;
4517-
return mk$17(lb[/* lb_loc */5], lb[/* lb_attributes */2], tag === 250 ? lzarg[0] : (
4518-
tag === 246 ? CamlinternalLazy.force_lazy_block(lzarg) : lzarg
4519-
), tag$1 === 250 ? lzarg$1[0] : (
4520-
tag$1 === 246 ? CamlinternalLazy.force_lazy_block(lzarg$1) : lzarg$1
4521-
), lb[/* lb_pattern */0], lb[/* lb_expression */1]);
4513+
return mk$17(lb[/* lb_loc */5], lb[/* lb_attributes */2], CamlinternalLazy.force(lb[/* lb_docs */3]), CamlinternalLazy.force(lb[/* lb_text */4]), lb[/* lb_pattern */0], lb[/* lb_expression */1]);
45224514
}), bindings);
45234515
str = mkstr(/* Pstr_value */Block.__(1, [
45244516
lbs[/* lbs_rec */1],

0 commit comments

Comments
 (0)