Skip to content

Commit 55cbe13

Browse files
committed
adapt changes from upstream
1 parent 848ccf5 commit 55cbe13

File tree

252 files changed

+2501
-2505
lines changed

Some content is hidden

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

252 files changed

+2501
-2505
lines changed

jscomp/core/js_fold_basic.ml

+2-4
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ let tag_is_zero (tag : J.expression) =
3838
| Blk_constructor _ -> true
3939
| Blk_tuple
4040
| Blk_array
41-
| Blk_exception
42-
| Blk_extension -> false
41+
| Blk_extension_slot -> false
4342
| Blk_na -> not (tag_is_zero tag )
4443

4544
let needBlockRuntimeInReleaseMode (tag : J.expression) (tag_info : J.tag_info) =
@@ -52,8 +51,7 @@ let needBlockRuntimeInReleaseMode (tag : J.expression) (tag_info : J.tag_info) =
5251
| Blk_constructor (_, 1)
5352
| Blk_na -> not (tag_is_zero tag)
5453
| Blk_constructor _ -> true
55-
| Blk_exception
56-
| Blk_extension -> false
54+
| Blk_extension_slot -> false
5755
(* converted to [Pcreate_extension] in the beginning*)
5856

5957

jscomp/core/lam.ml

+6-13
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ type tag_info = Lam_tag_info.t =
3737
| Blk_variant of string
3838
| Blk_record of string array
3939
| Blk_module of string list option
40-
| Blk_exception
41-
| Blk_extension
40+
| Blk_extension_slot
4241
| Blk_na
4342

4443
type mutable_flag = Asttypes.mutable_flag
@@ -1655,12 +1654,9 @@ let lam_prim ~primitive:( p : Lambda.primitive) ~args loc : t =
16551654
| Blk_module s ->
16561655
let info = Blk_module s in
16571656
prim ~primitive:(Pmakeblock (tag,info,mutable_flag)) ~args loc
1658-
| Blk_exception ->
1659-
let info = Blk_exception in
1657+
| Blk_extension_slot ->
1658+
let info = Blk_extension_slot in
16601659
prim ~primitive:(Pmakeblock (tag,info,mutable_flag)) ~args loc
1661-
| Blk_extension ->
1662-
let info = Blk_extension in
1663-
prim ~primitive:(Pmakeblock (tag,info,mutable_flag)) ~args loc
16641660
| Blk_na ->
16651661
let info = Blk_na in
16661662
prim ~primitive:(Pmakeblock (tag,info,mutable_flag)) ~args loc
@@ -1900,7 +1896,7 @@ let convert exports lam : _ * _ =
19001896
*)
19011897
begin match prim_name , args with
19021898
| "caml_set_oo_id" ,
1903-
[ Lprim (Pmakeblock(tag,( Blk_exception| Blk_extension), _),
1899+
[ Lprim (Pmakeblock(tag,Blk_extension_slot, _),
19041900
Lconst (Const_base(Const_string(name,_))) :: _,
19051901
loc
19061902
)]
@@ -2083,11 +2079,8 @@ let convert exports lam : _ * _ =
20832079
| Blk_module s ->
20842080
let t = Blk_module s in
20852081
Const_block (i,t, Ext_list.map convert_constant xs)
2086-
| Blk_exception ->
2087-
let t = Blk_exception in
2088-
Const_block (i,t, Ext_list.map convert_constant xs)
2089-
| Blk_extension ->
2090-
let t = Blk_extension in
2082+
| Blk_extension_slot ->
2083+
let t = Blk_extension_slot in
20912084
Const_block (i,t, Ext_list.map convert_constant xs)
20922085
| Blk_na ->
20932086
let t = Blk_na in

jscomp/core/lam_compile_util.ml

+1-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ let comment_of_tag_info (x : Lam_tag_info.t) =
5151
| Blk_module _ ->
5252
(* Turn it on next time to save some noise diff*)
5353
Some "module"
54-
| Blk_exception -> Some "exception"
55-
| Blk_extension -> Some "extension"
54+
| Blk_extension_slot -> None
5655
| Blk_na -> None
5756
let comment_of_pointer_info (x : Lam.pointer_info)=
5857
match x with

jscomp/core/lam_tag_info.ml

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@ type t =
2929
| Blk_variant of string
3030
| Blk_record of string array
3131
| Blk_module of string list option
32-
| Blk_exception
33-
| Blk_extension
32+
| Blk_extension_slot
3433
| Blk_na

jscomp/test/a_filename_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ var $$Array = require("../../lib/js/array.js");
55
var Block = require("../../lib/js/block.js");
66
var Ext_filename_test = require("./ext_filename_test.js");
77

8-
var suites = [/* [] */0];
8+
var suites = /* record */[/* contents : [] */0];
99

10-
var test_id = [0];
10+
var test_id = /* record */[/* contents */0];
1111

1212
function eq(loc, x, y) {
1313
test_id[0] = test_id[0] + 1 | 0;

jscomp/test/adt_optimize_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function f11(x) {
158158
} else if (x.tag) {
159159
throw [
160160
Caml_builtin_exceptions.assert_failure,
161-
[
161+
/* tuple */[
162162
"adt_optimize_test.ml",
163163
155,
164164
9

jscomp/test/argv_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ function anno_fun() {
99

1010
var usage_msg = "Usage:\n";
1111

12-
var compile = [false];
12+
var compile = /* record */[/* contents */false];
1313

14-
var test = [true];
14+
var test = /* record */[/* contents */true];
1515

1616
var arg_spec_000 = /* tuple */[
1717
"-c",

jscomp/test/ari_regress_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var Curry = require("../../lib/js/curry.js");
66

77
var g = 7;
88

9-
var h = [0];
9+
var h = /* record */[/* contents */0];
1010

1111
function g1(x, y) {
1212
var u = x + y | 0;

jscomp/test/arity_deopt.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ var Mt = require("./mt.js");
44
var Block = require("../../lib/js/block.js");
55
var Curry = require("../../lib/js/curry.js");
66

7-
var suites = [/* [] */0];
7+
var suites = /* record */[/* contents : [] */0];
88

9-
var test_id = [0];
9+
var test_id = /* record */[/* contents */0];
1010

1111
function eq(loc, x, y) {
1212
test_id[0] = test_id[0] + 1 | 0;

jscomp/test/array_subtle_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ var Block = require("../../lib/js/block.js");
55
var Caml_array = require("../../lib/js/caml_array.js");
66
var Js_primitive = require("../../lib/js/js_primitive.js");
77

8-
var suites = [/* [] */0];
8+
var suites = /* record */[/* contents : [] */0];
99

10-
var test_id = [0];
10+
var test_id = /* record */[/* contents */0];
1111

1212
function eq(loc, param) {
1313
var y = param[1];

jscomp/test/ast_abstract_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ var Mt = require("./mt.js");
44
var Block = require("../../lib/js/block.js");
55
var Js_mapperRt = require("../../lib/js/js_mapperRt.js");
66

7-
var suites = [/* [] */0];
7+
var suites = /* record */[/* contents : [] */0];
88

9-
var test_id = [0];
9+
var test_id = /* record */[/* contents */0];
1010

1111
function eq(loc, x, y) {
1212
test_id[0] = test_id[0] + 1 | 0;

jscomp/test/ast_js_mapper_poly_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ var $$Array = require("../../lib/js/array.js");
55
var Block = require("../../lib/js/block.js");
66
var Js_mapperRt = require("../../lib/js/js_mapperRt.js");
77

8-
var suites = [/* [] */0];
8+
var suites = /* record */[/* contents : [] */0];
99

10-
var test_id = [0];
10+
var test_id = /* record */[/* contents */0];
1111

1212
function eq(loc, x, y) {
1313
test_id[0] = test_id[0] + 1 | 0;

jscomp/test/ast_mapper_defensive_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ var Mt = require("./mt.js");
44
var Block = require("../../lib/js/block.js");
55
var Js_mapperRt = require("../../lib/js/js_mapperRt.js");
66

7-
var suites = [/* [] */0];
7+
var suites = /* record */[/* contents : [] */0];
88

9-
var test_id = [0];
9+
var test_id = /* record */[/* contents */0];
1010

1111
function $$throw(loc, x) {
1212
test_id[0] = test_id[0] + 1 | 0;

jscomp/test/basic_module_test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var Offset = require("./offset.js");
66
var Pr6726 = require("./pr6726.js");
77
var Mt_global = require("./mt_global.js");
88

9-
var count = [0];
9+
var count = /* record */[/* contents */0];
1010

1111
var M = [Offset.M[/* Set */1]];
1212

@@ -17,9 +17,9 @@ function test(set) {
1717

1818
test(Curry._1(Offset.M[/* Set */1][/* singleton */4], "42"));
1919

20-
var suites = [/* [] */0];
20+
var suites = /* record */[/* contents : [] */0];
2121

22-
var test_id = [0];
22+
var test_id = /* record */[/* contents */0];
2323

2424
function eq(f, a, b) {
2525
return Mt_global.collect_eq(test_id, suites, f, a, b);

jscomp/test/bb.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function ff(x) {
2525
default:
2626
throw [
2727
Caml_builtin_exceptions.assert_failure,
28-
[
28+
/* tuple */[
2929
"bb.ml",
3030
17,
3131
9
@@ -49,7 +49,7 @@ function test(x) {
4949
default:
5050
throw [
5151
Caml_builtin_exceptions.assert_failure,
52-
[
52+
/* tuple */[
5353
"bb.ml",
5454
26,
5555
13

jscomp/test/bdd.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ function getId(bdd) {
3131
}
3232
}
3333

34-
var nodeC = [1];
34+
var nodeC = /* record */[/* contents */1];
3535

36-
var sz_1 = [8191];
36+
var sz_1 = /* record */[/* contents */8191];
3737

38-
var htab = [Caml_array.caml_make_vect(sz_1[0] + 1 | 0, /* [] */0)];
38+
var htab = /* record */[/* contents */Caml_array.caml_make_vect(sz_1[0] + 1 | 0, /* [] */0)];
3939

40-
var n_items = [0];
40+
var n_items = /* record */[/* contents */0];
4141

4242
function hashVal(x, y, v) {
4343
return ((x << 1) + y | 0) + (v << 2) | 0;
@@ -55,7 +55,7 @@ function resize(newSize) {
5555
if (typeof n === "number") {
5656
throw [
5757
Caml_builtin_exceptions.assert_failure,
58-
[
58+
/* tuple */[
5959
"bdd.ml",
6060
54,
6161
27
@@ -125,7 +125,7 @@ function mkNode(low, v, high) {
125125
if (typeof n === "number") {
126126
throw [
127127
Caml_builtin_exceptions.assert_failure,
128-
[
128+
/* tuple */[
129129
"bdd.ml",
130130
99,
131131
31
@@ -325,7 +325,7 @@ function hwb(n) {
325325
return h(0, n - 1 | 0);
326326
}
327327

328-
var seed = [0];
328+
var seed = /* record */[/* contents */0];
329329

330330
function random() {
331331
seed[0] = Caml_int32.imul(seed[0], 25173) + 17431 | 0;
@@ -376,7 +376,7 @@ function main() {
376376
} else {
377377
throw [
378378
Caml_builtin_exceptions.assert_failure,
379-
[
379+
/* tuple */[
380380
"bdd.ml",
381381
233,
382382
2

0 commit comments

Comments
 (0)