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

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
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": {

src/compiler.ts

Lines changed: 1 addition & 1 deletion
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,

src/module.ts

Lines changed: 5 additions & 1 deletion
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. */

tests/compiler/NonNullable.release.wat

Lines changed: 2 additions & 2 deletions
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

tests/compiler/bindings/esm.release.wat

Lines changed: 4 additions & 4 deletions
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

tests/compiler/bindings/noExportRuntime.release.wat

Lines changed: 4 additions & 4 deletions
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

tests/compiler/bindings/raw.release.wat

Lines changed: 4 additions & 4 deletions
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

tests/compiler/builtins.release.wat

Lines changed: 2 additions & 2 deletions
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

tests/compiler/call-super.release.wat

Lines changed: 4 additions & 4 deletions
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

0 commit comments

Comments
 (0)