Skip to content

Update binaryen #2547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"engineStrict": true,
"dependencies": {
"binaryen": "110.0.0-nightly.20221105",
"binaryen": "111.0.0-nightly.20221122",
"long": "^5.2.0"
},
"devDependencies": {
Expand Down
40 changes: 21 additions & 19 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,25 +258,26 @@ export const enum ExpressionId {
StructGet = 61 /* _BinaryenStructGetId */,
StructSet = 62 /* _BinaryenStructSetId */,
ArrayNew = 63 /* _BinaryenArrayNewId */,
ArrayInit = 64 /* _BinaryenArrayInitId */,
ArrayGet = 65 /* _BinaryenArrayGetId */,
ArraySet = 66 /* _BinaryenArraySetId */,
ArrayLen = 67 /* _BinaryenArrayLenId */,
ArrayCopy = 68 /* _BinaryenArrayCopyId */,
RefAs = 69 /* _BinaryenRefAsId */,
StringNew = 70 /* _BinaryenStringNewId */,
StringConst = 71 /* _BinaryenStringConstId */,
StringMeasure = 72 /* _BinaryenStringMeasureId */,
StringEncode = 73 /* _BinaryenStringEncodeId */,
StringConcat = 74 /* _BinaryenStringConcatId */,
StringEq = 75 /* _BinaryenStringEqId */,
StringAs = 76 /* _BinaryenStringAsId */,
StringWTF8Advance = 77 /* _BinaryenStringWTF8AdvanceId */,
StringWTF16Get = 78 /* _BinaryenStringWTF16GetId */,
StringIterNext = 79 /* _BinaryenStringIterNextId */,
StringIterMove = 80 /* _BinaryenStringIterMoveId */,
StringSliceWTF = 81 /* _BinaryenStringSliceWTFId */,
StringSliceIter = 82 /* _BinaryenStringSliceIterId */
ArrayNewSeg = 64 /* TODO_BinaryenArrayNewSegId */,
ArrayInit = 65 /* _BinaryenArrayInitId */,
ArrayGet = 66 /* _BinaryenArrayGetId */,
ArraySet = 67 /* _BinaryenArraySetId */,
ArrayLen = 68 /* _BinaryenArrayLenId */,
ArrayCopy = 69 /* _BinaryenArrayCopyId */,
RefAs = 70 /* _BinaryenRefAsId */,
StringNew = 71 /* _BinaryenStringNewId */,
StringConst = 72 /* _BinaryenStringConstId */,
StringMeasure = 73 /* _BinaryenStringMeasureId */,
StringEncode = 74 /* _BinaryenStringEncodeId */,
StringConcat = 75 /* _BinaryenStringConcatId */,
StringEq = 76 /* _BinaryenStringEqId */,
StringAs = 77 /* _BinaryenStringAsId */,
StringWTF8Advance = 78 /* _BinaryenStringWTF8AdvanceId */,
StringWTF16Get = 79 /* _BinaryenStringWTF16GetId */,
StringIterNext = 80 /* _BinaryenStringIterNextId */,
StringIterMove = 81 /* _BinaryenStringIterMoveId */,
StringSliceWTF = 82 /* _BinaryenStringSliceWTFId */,
StringSliceIter = 83 /* _BinaryenStringSliceIterId */
}

/** Binaryen external kind constants. */
Expand Down Expand Up @@ -2749,6 +2750,7 @@ export class Module {
passes.push("vacuum");

passes.push("simplify-globals-optimizing");
passes.push("reorder-globals");
passes.push("remove-unused-brs");
passes.push("optimize-instructions");
}
Expand Down
1 change: 1 addition & 0 deletions tests/compiler/assert-nonnull.release.wat
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
(data (i32.const 1276) "|")
(data (i32.const 1288) "\02\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y")
(table $0 1 1 funcref)
(elem $0 (i32.const 1))
(export "memory" (memory $0))
(export "testVar" (func $export:assert-nonnull/testVar))
(export "testObj" (func $export:assert-nonnull/testObj))
Expand Down
1 change: 1 addition & 0 deletions tests/compiler/std/array-access.release.wat
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
(data (i32.const 1276) "\1c")
(data (i32.const 1288) "\02")
(table $0 1 1 funcref)
(elem $0 (i32.const 1))
(export "memory" (memory $0))
(export "i32ArrayArrayElementAccess" (func $export:std/array-access/i32ArrayArrayElementAccess))
(export "stringArrayPropertyAccess" (func $export:std/array-access/stringArrayPropertyAccess))
Expand Down
1 change: 1 addition & 0 deletions tests/compiler/ternary.release.wat
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
(data (i32.const 1036) "\1c")
(data (i32.const 1048) "\02\00\00\00\02\00\00\00a")
(table $0 1 1 funcref)
(elem $0 (i32.const 1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea what's going on here? Seems strange that this affects just a few release tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea. Perhaps a some regression in Binaryen?

Copy link
Member Author

@MaxGraey MaxGraey Nov 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug fixture contains this:

Copy link
Member Author

@MaxGraey MaxGraey Nov 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to remove new "reorder-globals" pass, but this didn't help

(export "test" (func $ternary/test))
(export "testDropWithTypeMismatch" (func $ternary/testDropWithTypeMismatch))
(export "memory" (memory $0))
Expand Down