Skip to content

Commit 8ae597d

Browse files
authored
Update binaryen (#2477)
1 parent e06557c commit 8ae597d

File tree

89 files changed

+1599
-1396
lines changed

Some content is hidden

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

89 files changed

+1599
-1396
lines changed

Diff for: package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"engineStrict": true,
2727
"dependencies": {
28-
"binaryen": "109.0.0-nightly.20220826",
28+
"binaryen": "109.0.0-nightly.20220831",
2929
"long": "^5.2.0"
3030
},
3131
"devDependencies": {

Diff for: src/compiler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ export class Compiler extends DiagnosticEmitter {
781781
}
782782
}
783783

784-
// Just stubbed memory. Will update later in finalizeMemory
784+
// Setup internal memory with default name "0"
785785
module.setMemory(
786786
initialPages,
787787
maximumPages,

Diff for: src/module.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,11 @@ export const enum RefAsOp {
10951095
/** ref.as_data */
10961096
Data = 2 /* _BinaryenRefAsData */,
10971097
/** ref.as_i31 */
1098-
I31 = 3 /* _BinaryenRefAsI31 */
1098+
I31 = 3 /* _BinaryenRefAsI31 */,
1099+
/** extern.internalize */
1100+
ExternInternalize = 4 /* TODO_BinaryenExternInternalize */,
1101+
/** extern.externalize */
1102+
ExternExternalize = 5 /* TODO_BinaryenExternExternalize */
10991103
}
11001104

11011105
/** Binaryen BrOn operation constants. */

Diff for: tests/compiler/NonNullable.release.wat

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
return
3333
end
3434
local.get $1
35-
i32.const 0
35+
i32.eqz
3636
local.get $0
37-
select
3837
i32.eqz
38+
i32.or
3939
if
4040
i32.const 0
4141
return

Diff for: tests/compiler/bindings/esm.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@
202202
local.tee $1
203203
i32.eqz
204204
if
205-
i32.const 0
205+
local.get $0
206+
i32.load $0 offset=8
207+
i32.eqz
206208
local.get $0
207209
i32.const 18588
208210
i32.lt_u
209-
local.get $0
210-
i32.load $0 offset=8
211-
select
211+
i32.and
212212
i32.eqz
213213
if
214214
i32.const 0

Diff for: tests/compiler/bindings/noExportRuntime.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@
163163
local.tee $1
164164
i32.eqz
165165
if
166-
i32.const 0
166+
local.get $0
167+
i32.load $0 offset=8
168+
i32.eqz
167169
local.get $0
168170
i32.const 18188
169171
i32.lt_u
170-
local.get $0
171-
i32.load $0 offset=8
172-
select
172+
i32.and
173173
i32.eqz
174174
if
175175
i32.const 0

Diff for: tests/compiler/bindings/raw.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@
202202
local.tee $1
203203
i32.eqz
204204
if
205-
i32.const 0
205+
local.get $0
206+
i32.load $0 offset=8
207+
i32.eqz
206208
local.get $0
207209
i32.const 18588
208210
i32.lt_u
209-
local.get $0
210-
i32.load $0 offset=8
211-
select
211+
i32.and
212212
i32.eqz
213213
if
214214
i32.const 0

Diff for: tests/compiler/builtins.release.wat

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@
8888
return
8989
end
9090
local.get $1
91-
i32.const 0
91+
i32.eqz
9292
local.get $0
93-
select
9493
i32.eqz
94+
i32.or
9595
if
9696
i32.const 0
9797
return

Diff for: tests/compiler/call-super.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -2086,13 +2086,13 @@
20862086
local.tee $0
20872087
i32.eqz
20882088
if
2089-
i32.const 0
2089+
local.get $1
2090+
i32.load $0 offset=8
2091+
i32.eqz
20902092
local.get $1
20912093
i32.const 17980
20922094
i32.lt_u
2093-
local.get $1
2094-
i32.load $0 offset=8
2095-
select
2095+
i32.and
20962096
i32.eqz
20972097
if
20982098
i32.const 0

Diff for: tests/compiler/class-implements.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -1461,13 +1461,13 @@
14611461
local.tee $0
14621462
i32.eqz
14631463
if
1464-
i32.const 0
1464+
local.get $1
1465+
i32.load $0 offset=8
1466+
i32.eqz
14651467
local.get $1
14661468
i32.const 17948
14671469
i32.lt_u
1468-
local.get $1
1469-
i32.load $0 offset=8
1470-
select
1470+
i32.and
14711471
i32.eqz
14721472
if
14731473
i32.const 0

Diff for: tests/compiler/class-overloading-cast.release.wat

+6-6
Original file line numberDiff line numberDiff line change
@@ -1276,10 +1276,10 @@
12761276
return
12771277
end
12781278
local.get $1
1279-
i32.const 0
1279+
i32.eqz
12801280
local.get $0
1281-
select
12821281
i32.eqz
1282+
i32.or
12831283
if
12841284
i32.const 0
12851285
return
@@ -1899,13 +1899,13 @@
18991899
local.tee $0
19001900
i32.eqz
19011901
if
1902-
i32.const 0
1902+
local.get $1
1903+
i32.load $0 offset=8
1904+
i32.eqz
19031905
local.get $1
19041906
i32.const 18084
19051907
i32.lt_u
1906-
local.get $1
1907-
i32.load $0 offset=8
1908-
select
1908+
i32.and
19091909
i32.eqz
19101910
if
19111911
i32.const 0

Diff for: tests/compiler/class-overloading.release.wat

+6-6
Original file line numberDiff line numberDiff line change
@@ -1300,10 +1300,10 @@
13001300
return
13011301
end
13021302
local.get $1
1303-
i32.const 0
1303+
i32.eqz
13041304
local.get $0
1305-
select
13061305
i32.eqz
1306+
i32.or
13071307
if
13081308
i32.const 0
13091309
return
@@ -3033,13 +3033,13 @@
30333033
local.tee $0
30343034
i32.eqz
30353035
if
3036-
i32.const 0
3036+
local.get $1
3037+
i32.load $0 offset=8
3038+
i32.eqz
30373039
local.get $1
30383040
i32.const 18316
30393041
i32.lt_u
3040-
local.get $1
3041-
i32.load $0 offset=8
3042-
select
3042+
i32.and
30433043
i32.eqz
30443044
if
30453045
i32.const 0

Diff for: tests/compiler/class.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@
119119
local.tee $1
120120
i32.eqz
121121
if
122-
i32.const 0
122+
local.get $0
123+
i32.load $0 offset=8
124+
i32.eqz
123125
local.get $0
124126
i32.const 17972
125127
i32.lt_u
126-
local.get $0
127-
i32.load $0 offset=8
128-
select
128+
i32.and
129129
i32.eqz
130130
if
131131
i32.const 0

Diff for: tests/compiler/constructor.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -1919,13 +1919,13 @@
19191919
local.tee $0
19201920
i32.eqz
19211921
if
1922-
i32.const 0
1922+
local.get $1
1923+
i32.load $0 offset=8
1924+
i32.eqz
19231925
local.get $1
19241926
i32.const 17988
19251927
i32.lt_u
1926-
local.get $1
1927-
i32.load $0 offset=8
1928-
select
1928+
i32.and
19291929
i32.eqz
19301930
if
19311931
i32.const 0

Diff for: tests/compiler/do.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -1777,13 +1777,13 @@
17771777
local.tee $0
17781778
i32.eqz
17791779
if
1780-
i32.const 0
1780+
local.get $1
1781+
i32.load $0 offset=8
1782+
i32.eqz
17811783
local.get $1
17821784
i32.const 17892
17831785
i32.lt_u
1784-
local.get $1
1785-
i32.load $0 offset=8
1786-
select
1786+
i32.and
17871787
i32.eqz
17881788
if
17891789
i32.const 0

Diff for: tests/compiler/duplicate-fields.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@
127127
local.tee $1
128128
i32.eqz
129129
if
130-
i32.const 0
130+
local.get $0
131+
i32.load $0 offset=8
132+
i32.eqz
131133
local.get $0
132134
i32.const 17980
133135
i32.lt_u
134-
local.get $0
135-
i32.load $0 offset=8
136-
select
136+
i32.and
137137
i32.eqz
138138
if
139139
i32.const 0

Diff for: tests/compiler/empty-exportruntime.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@
100100
local.tee $1
101101
i32.eqz
102102
if
103-
i32.const 0
103+
local.get $0
104+
i32.load $0 offset=8
105+
i32.eqz
104106
local.get $0
105107
i32.const 17980
106108
i32.lt_u
107-
local.get $0
108-
i32.load $0 offset=8
109-
select
109+
i32.and
110110
i32.eqz
111111
if
112112
i32.const 0

Diff for: tests/compiler/empty-new.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -1320,13 +1320,13 @@
13201320
local.tee $0
13211321
i32.eqz
13221322
if
1323-
i32.const 0
1323+
local.get $1
1324+
i32.load $0 offset=8
1325+
i32.eqz
13241326
local.get $1
13251327
i32.const 17852
13261328
i32.lt_u
1327-
local.get $1
1328-
i32.load $0 offset=8
1329-
select
1329+
i32.and
13301330
i32.eqz
13311331
if
13321332
i32.const 0

Diff for: tests/compiler/exportstar-rereexport.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -1494,13 +1494,13 @@
14941494
local.tee $0
14951495
i32.eqz
14961496
if
1497-
i32.const 0
1497+
local.get $1
1498+
i32.load $0 offset=8
1499+
i32.eqz
14981500
local.get $1
14991501
i32.const 17956
15001502
i32.lt_u
1501-
local.get $1
1502-
i32.load $0 offset=8
1503-
select
1503+
i32.and
15041504
i32.eqz
15051505
if
15061506
i32.const 0

Diff for: tests/compiler/extends-baseaggregate.release.wat

+4-4
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@
125125
local.tee $1
126126
i32.eqz
127127
if
128-
i32.const 0
128+
local.get $0
129+
i32.load $0 offset=8
130+
i32.eqz
129131
local.get $0
130132
i32.const 18156
131133
i32.lt_u
132-
local.get $0
133-
i32.load $0 offset=8
134-
select
134+
i32.and
135135
i32.eqz
136136
if
137137
i32.const 0

0 commit comments

Comments
 (0)