diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-08-13 00:29:26 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-13 00:29:26 +0900 |
commit | e2f49d8227f2b71e4dede5cf4074bb9f65e3d77f (patch) | |
tree | 30b132b02824839d1d7718ed32c6b90cc0828151 | |
parent | 69ad1e8a8d2e1d395e30230433742f4f5668563b (diff) | |
download | binaryen-e2f49d8227f2b71e4dede5cf4074bb9f65e3d77f.tar.gz binaryen-e2f49d8227f2b71e4dede5cf4074bb9f65e3d77f.tar.bz2 binaryen-e2f49d8227f2b71e4dede5cf4074bb9f65e3d77f.zip |
Add basic exception handling support (#2282)
This adds basic support for exception handling instructions, according
to the spec:
https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md
This PR includes support for:
- Binary reading/writing
- Wast reading/writing
- Stack IR
- Validation
- binaryen.js + C API
- Few IR routines: branch-utils, type-updating, etc
- Few passes: just enough to make `wasm-opt -O` pass
- Tests
This PR does not include support for many optimization passes, fuzzer,
or interpreter. They will be follow-up PRs.
Try-catch construct is modeled in Binaryen IR in a similar manner to
that of if-else: each of try body and catch body will contain a block,
which can be omitted if there is only a single instruction. This block
will not be emitted in wast or binary, as in if-else. As in if-else,
`class Try` contains two expressions each for try body and catch body,
and `catch` is not modeled as an instruction. `exnref` value pushed by
`catch` is get by `pop` instruction.
`br_on_exn` is special: it returns different types of values when taken
and not taken. We make `exnref`, the type `br_on_exn` pushes if not
taken, as `br_on_exn`'s type.
52 files changed, 5548 insertions, 850 deletions
diff --git a/build-js.sh b/build-js.sh index dd43545b0..35ec946e3 100755 --- a/build-js.sh +++ b/build-js.sh @@ -227,6 +227,10 @@ export_function "_BinaryenMemoryInitId" export_function "_BinaryenDataDropId" export_function "_BinaryenMemoryCopyId" export_function "_BinaryenMemoryFillId" +export_function "_BinaryenTryId" +export_function "_BinaryenThrowId" +export_function "_BinaryenRethrowId" +export_function "_BinaryenBrOnExnId" export_function "_BinaryenPushId" export_function "_BinaryenPopId" @@ -579,6 +583,10 @@ export_function "_BinaryenMemoryInit" export_function "_BinaryenDataDrop" export_function "_BinaryenMemoryCopy" export_function "_BinaryenMemoryFill" +export_function "_BinaryenTry" +export_function "_BinaryenThrow" +export_function "_BinaryenRethrow" +export_function "_BinaryenBrOnExn" export_function "_BinaryenPush" export_function "_BinaryenPop" @@ -757,6 +765,23 @@ export_function "_BinaryenMemoryFillGetDest" export_function "_BinaryenMemoryFillGetValue" export_function "_BinaryenMemoryFillGetSize" +# 'Try' expression operations +export_function "_BinaryenTryGetBody" +export_function "_BinaryenTryGetCatchBody" + +# 'Throw' expression operations +export_function "_BinaryenThrowGetEvent" +export_function "_BinaryenThrowGetNumOperands" +export_function "_BinaryenThrowGetOperand" + +# 'Rethrow' expression operations +export_function "_BinaryenRethrowGetExnref" + +# 'BrOnExn' expression operations +export_function "_BinaryenBrOnExnGetEvent" +export_function "_BinaryenBrOnExnGetName" +export_function "_BinaryenBrOnExnGetExnref" + # 'Push' expression operations export_function "_BinaryenPushGetValue" @@ -511,7 +511,7 @@ def run_gcc_tests(): print('link: ', ' '.join(cmd)) subprocess.check_call(cmd) print('run...', output_file) - actual = subprocess.check_output([os.path.abspath(output_file)]) + actual = subprocess.check_output([os.path.abspath(output_file)]).decode('utf-8') os.remove(output_file) if sys.platform == 'darwin': # Also removes debug directory produced on Mac OS diff --git a/scripts/gen-s-parser.py b/scripts/gen-s-parser.py index 615febd7d..c98388ad8 100755 --- a/scripts/gen-s-parser.py +++ b/scripts/gen-s-parser.py @@ -423,7 +423,13 @@ instructions = [ ("f32x4.convert_i32x4_s", "makeUnary(s, UnaryOp::ConvertSVecI32x4ToVecF32x4)"), ("f32x4.convert_i32x4_u", "makeUnary(s, UnaryOp::ConvertUVecI32x4ToVecF32x4)"), ("f64x2.convert_i64x2_s", "makeUnary(s, UnaryOp::ConvertSVecI64x2ToVecF64x2)"), - ("f64x2.convert_i64x2_u", "makeUnary(s, UnaryOp::ConvertUVecI64x2ToVecF64x2)") + ("f64x2.convert_i64x2_u", "makeUnary(s, UnaryOp::ConvertUVecI64x2ToVecF64x2)"), + # exception handling instructions + ("try", "makeTry(s)"), + ("throw", "makeThrow(s)"), + ("catch", "makeCatch(s)"), + ("rethrow", "makeRethrow(s)"), + ("br_on_exn", "makeBrOnExn(s)") ] diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 81eff0c8a..5d7566e4a 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -354,6 +354,14 @@ BinaryenExpressionId BinaryenMemoryCopyId(void) { BinaryenExpressionId BinaryenMemoryFillId(void) { return Expression::Id::MemoryFillId; } +BinaryenExpressionId BinaryenTryId(void) { return Expression::Id::TryId; } +BinaryenExpressionId BinaryenThrowId(void) { return Expression::Id::ThrowId; } +BinaryenExpressionId BinaryenRethrowId(void) { + return Expression::Id::RethrowId; +} +BinaryenExpressionId BinaryenBrOnExnId(void) { + return Expression::Id::BrOnExnId; +} BinaryenExpressionId BinaryenPushId(void) { return Expression::Id::PushId; } BinaryenExpressionId BinaryenPopId(void) { return Expression::Id::PopId; } @@ -1591,6 +1599,73 @@ BinaryenExpressionRef BinaryenPop(BinaryenModuleRef module, BinaryenType type) { return static_cast<Expression*>(ret); } +BinaryenExpressionRef BinaryenTry(BinaryenModuleRef module, + BinaryenExpressionRef body, + BinaryenExpressionRef catchBody) { + auto* ret = Builder(*(Module*)module) + .makeTry((Expression*)body, (Expression*)catchBody); + if (tracing) { + traceExpression(ret, "BinaryenTry", body, catchBody); + } + return static_cast<Expression*>(ret); +} + +BinaryenExpressionRef BinaryenThrow(BinaryenModuleRef module, + const char* event, + BinaryenExpressionRef* operands, + BinaryenIndex numOperands) { + std::vector<Expression*> args; + for (BinaryenIndex i = 0; i < numOperands; i++) { + args.push_back((Expression*)operands[i]); + } + auto* ret = Builder(*(Module*)module).makeThrow(event, args); + + if (tracing) { + std::cout << " {\n"; + std::cout << " BinaryenExpressionRef operands[] = { "; + for (BinaryenIndex i = 0; i < numOperands; i++) { + if (i > 0) { + std::cout << ", "; + } + std::cout << "expressions[" << expressions[operands[i]] << "]"; + } + if (numOperands == 0) { + // ensure the array is not empty, otherwise a compiler error on VS + std::cout << "0"; + } + std::cout << " };\n "; + traceExpression( + ret, "BinaryenThrow", StringLit(event), "operands", numOperands); + std::cout << " }\n"; + } + return static_cast<Expression*>(ret); +} + +BinaryenExpressionRef BinaryenRethrow(BinaryenModuleRef module, + BinaryenExpressionRef exnref) { + auto* ret = Builder(*(Module*)module).makeRethrow((Expression*)exnref); + if (tracing) { + traceExpression(ret, "BinaryenRethrow", exnref); + } + return static_cast<Expression*>(ret); +} + +BinaryenExpressionRef BinaryenBrOnExn(BinaryenModuleRef module, + const char* name, + const char* eventName, + BinaryenExpressionRef exnref) { + Module* wasm = (Module*)module; + Event* event = wasm->getEventOrNull(eventName); + assert(event && "br_on_exn's event must exist"); + auto* ret = Builder(*wasm).makeBrOnExn(name, event, (Expression*)exnref); + + if (tracing) { + traceExpression( + ret, "BinaryenBrOnExn", StringLit(name), StringLit(eventName), exnref); + } + return static_cast<Expression*>(ret); +} + // Expression utility BinaryenExpressionId BinaryenExpressionGetId(BinaryenExpressionRef expr) { @@ -2721,6 +2796,7 @@ BinaryenExpressionRef BinaryenMemoryFillGetSize(BinaryenExpressionRef expr) { assert(expression->is<MemoryFill>()); return static_cast<MemoryFill*>(expression)->size; } +// Push BinaryenExpressionRef BinaryenPushGetValue(BinaryenExpressionRef expr) { if (tracing) { std::cout << " BinaryenPushGetValue(expressions[" << expressions[expr] @@ -2731,6 +2807,102 @@ BinaryenExpressionRef BinaryenPushGetValue(BinaryenExpressionRef expr) { assert(expression->is<Push>()); return static_cast<Push*>(expression)->value; } +// Try +BinaryenExpressionRef BinaryenTryGetBody(BinaryenExpressionRef expr) { + if (tracing) { + std::cout << " BinaryenTryGetBody(expressions[" << expressions[expr] + << "]);\n"; + } + + auto* expression = (Expression*)expr; + assert(expression->is<Try>()); + return static_cast<Try*>(expression)->body; +} +BinaryenExpressionRef BinaryenTryGetCatchBody(BinaryenExpressionRef expr) { + if (tracing) { + std::cout << " BinaryenTryGetCatchBody(expressions[" << expressions[expr] + << "]);\n"; + } + + auto* expression = (Expression*)expr; + assert(expression->is<Try>()); + return static_cast<Try*>(expression)->catchBody; +} +// Throw +const char* BinaryenThrowGetEvent(BinaryenExpressionRef expr) { + if (tracing) { + std::cout << " BinaryenThrowGetEvent(expressions[" << expressions[expr] + << "]);\n"; + } + + auto* expression = (Expression*)expr; + assert(expression->is<Throw>()); + return static_cast<Throw*>(expression)->event.c_str(); +} +BinaryenExpressionRef BinaryenThrowGetOperand(BinaryenExpressionRef expr, + BinaryenIndex index) { + if (tracing) { + std::cout << " BinaryenThrowGetOperand(expressions[" << expressions[expr] + << "], " << index << ");\n"; + } + + auto* expression = (Expression*)expr; + assert(expression->is<Throw>()); + assert(index < static_cast<Throw*>(expression)->operands.size()); + return static_cast<Throw*>(expression)->operands[index]; +} +BinaryenIndex BinaryenThrowGetNumOperands(BinaryenExpressionRef expr) { + if (tracing) { + std::cout << " BinaryenThrowGetNumOperands(expressions[" + << expressions[expr] << "]);\n"; + } + + auto* expression = (Expression*)expr; + assert(expression->is<Throw>()); + return static_cast<Throw*>(expression)->operands.size(); +} +// Rethrow +BinaryenExpressionRef BinaryenRethrowGetExnref(BinaryenExpressionRef expr) { + if (tracing) { + std::cout << " BinaryenRethrowGetExnref(expressions[" << expressions[expr] + << "]);\n"; + } + + auto* expression = (Expression*)expr; + assert(expression->is<Rethrow>()); + return static_cast<Rethrow*>(expression)->exnref; +} +// BrOnExn +const char* BinaryenBrOnExnGetEvent(BinaryenExpressionRef expr) { + if (tracing) { + std::cout << " BinaryenBrOnExnGetEvent(expressions[" << expressions[expr] + << "]);\n"; + } + + auto* expression = (Expression*)expr; + assert(expression->is<BrOnExn>()); + return static_cast<BrOnExn*>(expression)->event.c_str(); +} +const char* BinaryenBrOnExnGetName(BinaryenExpressionRef expr) { + if (tracing) { + std::cout << " BinaryenBrOnExnGetName(expressions[" << expressions[expr] + << "]);\n"; + } + + auto* expression = (Expression*)expr; + assert(expression->is<BrOnExn>()); + return static_cast<BrOnExn*>(expression)->name.c_str(); +} +BinaryenExpressionRef BinaryenBrOnExnGetExnref(BinaryenExpressionRef expr) { + if (tracing) { + std::cout << " BinaryenBrOnExnGetExnref(expressions[" << expressions[expr] + << "]);\n"; + } + + auto* expression = (Expression*)expr; + assert(expression->is<BrOnExn>()); + return static_cast<BrOnExn*>(expression)->exnref; +} // Functions diff --git a/src/binaryen-c.h b/src/binaryen-c.h index dc5d50fef..37e8c3204 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -127,6 +127,10 @@ BinaryenExpressionId BinaryenMemoryInitId(void); BinaryenExpressionId BinaryenDataDropId(void); BinaryenExpressionId BinaryenMemoryCopyId(void); BinaryenExpressionId BinaryenMemoryFillId(void); +BinaryenExpressionId BinaryenTryId(void); +BinaryenExpressionId BinaryenThrowId(void); +BinaryenExpressionId BinaryenRethrowId(void); +BinaryenExpressionId BinaryenBrOnExnId(void); BinaryenExpressionId BinaryenPushId(void); BinaryenExpressionId BinaryenPopId(void); @@ -701,6 +705,19 @@ BinaryenExpressionRef BinaryenMemoryFill(BinaryenModuleRef module, BinaryenExpressionRef dest, BinaryenExpressionRef value, BinaryenExpressionRef size); +BinaryenExpressionRef BinaryenTry(BinaryenModuleRef module, + BinaryenExpressionRef body, + BinaryenExpressionRef catchBody); +BinaryenExpressionRef BinaryenThrow(BinaryenModuleRef module, + const char* event, + BinaryenExpressionRef* operands, + BinaryenIndex numOperands); +BinaryenExpressionRef BinaryenRethrow(BinaryenModuleRef module, + BinaryenExpressionRef exnref); +BinaryenExpressionRef BinaryenBrOnExn(BinaryenModuleRef module, + const char* name, + const char* eventName, + BinaryenExpressionRef exnref); BinaryenExpressionRef BinaryenPush(BinaryenModuleRef module, BinaryenExpressionRef value); BinaryenExpressionRef BinaryenPop(BinaryenModuleRef module, BinaryenType type); @@ -855,6 +872,20 @@ BinaryenExpressionRef BinaryenMemoryFillGetDest(BinaryenExpressionRef expr); BinaryenExpressionRef BinaryenMemoryFillGetValue(BinaryenExpressionRef expr); BinaryenExpressionRef BinaryenMemoryFillGetSize(BinaryenExpressionRef expr); +BinaryenExpressionRef BinaryenTryGetBody(BinaryenExpressionRef expr); +BinaryenExpressionRef BinaryenTryGetCatchBody(BinaryenExpressionRef expr); + +const char* BinaryenThrowGetEvent(BinaryenExpressionRef expr); +BinaryenExpressionRef BinaryenThrowGetOperand(BinaryenExpressionRef expr, + BinaryenIndex index); +BinaryenIndex BinaryenThrowGetNumOperands(BinaryenExpressionRef expr); + +BinaryenExpressionRef BinaryenRethrowGetExnref(BinaryenExpressionRef expr); + +const char* BinaryenBrOnExnGetEvent(BinaryenExpressionRef expr); +const char* BinaryenBrOnExnGetName(BinaryenExpressionRef expr); +BinaryenExpressionRef BinaryenBrOnExnGetExnref(BinaryenExpressionRef expr); + BinaryenExpressionRef BinaryenPushGetValue(BinaryenExpressionRef expr); // Functions diff --git a/src/gen-s-parser.inc b/src/gen-s-parser.inc index 3fcb18000..15a73cdf2 100644 --- a/src/gen-s-parser.inc +++ b/src/gen-s-parser.inc @@ -25,6 +25,9 @@ switch (op[0]) { case 'i': if (strcmp(op, "br_if") == 0) { return makeBreak(s); } goto parse_error; + case 'o': + if (strcmp(op, "br_on_exn") == 0) { return makeBrOnExn(s); } + goto parse_error; case 't': if (strcmp(op, "br_table") == 0) { return makeBreakTable(s); } goto parse_error; @@ -38,12 +41,20 @@ switch (op[0]) { } } case 'c': { - switch (op[4]) { - case '\0': - if (strcmp(op, "call") == 0) { return makeCall(s, /*isReturn=*/false); } - goto parse_error; - case '_': - if (strcmp(op, "call_indirect") == 0) { return makeCallIndirect(s, /*isReturn=*/false); } + switch (op[2]) { + case 'l': { + switch (op[4]) { + case '\0': + if (strcmp(op, "call") == 0) { return makeCall(s, /*isReturn=*/false); } + goto parse_error; + case '_': + if (strcmp(op, "call_indirect") == 0) { return makeCallIndirect(s, /*isReturn=*/false); } + goto parse_error; + default: goto parse_error; + } + } + case 't': + if (strcmp(op, "catch") == 0) { return makeCatch(s); } goto parse_error; default: goto parse_error; } @@ -2237,18 +2248,26 @@ switch (op[0]) { if (strcmp(op, "push") == 0) { return makePush(s); } goto parse_error; case 'r': { - switch (op[6]) { - case '\0': - if (strcmp(op, "return") == 0) { return makeReturn(s); } + switch (op[3]) { + case 'h': + if (strcmp(op, "rethrow") == 0) { return makeRethrow(s); } goto parse_error; - case '_': { - switch (op[11]) { + case 'u': { + switch (op[6]) { case '\0': - if (strcmp(op, "return_call") == 0) { return makeCall(s, /*isReturn=*/true); } - goto parse_error; - case '_': - if (strcmp(op, "return_call_indirect") == 0) { return makeCallIndirect(s, /*isReturn=*/true); } + if (strcmp(op, "return") == 0) { return makeReturn(s); } goto parse_error; + case '_': { + switch (op[11]) { + case '\0': + if (strcmp(op, "return_call") == 0) { return makeCall(s, /*isReturn=*/true); } + goto parse_error; + case '_': + if (strcmp(op, "return_call_indirect") == 0) { return makeCallIndirect(s, /*isReturn=*/true); } + goto parse_error; + default: goto parse_error; + } + } default: goto parse_error; } } @@ -2258,9 +2277,25 @@ switch (op[0]) { case 's': if (strcmp(op, "select") == 0) { return makeSelect(s); } goto parse_error; - case 't': - if (strcmp(op, "then") == 0) { return makeThenOrElse(s); } - goto parse_error; + case 't': { + switch (op[1]) { + case 'h': { + switch (op[2]) { + case 'e': + if (strcmp(op, "then") == 0) { return makeThenOrElse(s); } + goto parse_error; + case 'r': + if (strcmp(op, "throw") == 0) { return makeThrow(s); } + goto parse_error; + default: goto parse_error; + } + } + case 'r': + if (strcmp(op, "try") == 0) { return makeTry(s); } + goto parse_error; + default: goto parse_error; + } + } case 'u': if (strcmp(op, "unreachable") == 0) { return makeUnreachable(); } goto parse_error; diff --git a/src/ir/ExpressionAnalyzer.cpp b/src/ir/ExpressionAnalyzer.cpp index 99c2798b0..f8f96d5c8 100644 --- a/src/ir/ExpressionAnalyzer.cpp +++ b/src/ir/ExpressionAnalyzer.cpp @@ -211,6 +211,13 @@ template<typename T> void visitImmediates(Expression* curr, T& visitor) { visitor.visitInt(curr->op); visitor.visitNonScopeName(curr->nameOperand); } + void visitTry(Try* curr) {} + void visitThrow(Throw* curr) { visitor.visitNonScopeName(curr->event); } + void visitRethrow(Rethrow* curr) {} + void visitBrOnExn(BrOnExn* curr) { + visitor.visitScopeName(curr->name); + visitor.visitNonScopeName(curr->event); + } void visitNop(Nop* curr) {} void visitUnreachable(Unreachable* curr) {} void visitPush(Push* curr) {} diff --git a/src/ir/ExpressionManipulator.cpp b/src/ir/ExpressionManipulator.cpp index 817dce561..e650f40a7 100644 --- a/src/ir/ExpressionManipulator.cpp +++ b/src/ir/ExpressionManipulator.cpp @@ -219,6 +219,24 @@ flexibleCopy(Expression* original, Module& wasm, CustomCopier custom) { builder.makeHost(curr->op, curr->nameOperand, std::move(operands)); return ret; } + Expression* visitTry(Try* curr) { + return builder.makeTry( + copy(curr->body), copy(curr->catchBody), curr->type); + } + Expression* visitThrow(Throw* curr) { + std::vector<Expression*> operands; + for (Index i = 0; i < curr->operands.size(); i++) { + operands.push_back(copy(curr->operands[i])); + } + return builder.makeThrow(curr->event, std::move(operands)); + } + Expression* visitRethrow(Rethrow* curr) { + return builder.makeRethrow(copy(curr->exnref)); + } + Expression* visitBrOnExn(BrOnExn* curr) { + return builder.makeBrOnExn( + curr->name, curr->event, copy(curr->exnref), curr->eventParams); + } Expression* visitNop(Nop* curr) { return builder.makeNop(); } Expression* visitUnreachable(Unreachable* curr) { return builder.makeUnreachable(); diff --git a/src/ir/ReFinalize.cpp b/src/ir/ReFinalize.cpp index 9e3b59c70..05abb76e1 100644 --- a/src/ir/ReFinalize.cpp +++ b/src/ir/ReFinalize.cpp @@ -62,6 +62,8 @@ void ReFinalize::visitBlock(Block* curr) { auto type = iter->second; if (type == none) { // we need to fix this up. set the values to unreachables + // note that we don't need to handle br_on_exn here, because its value + // type is never none for (auto* br : FindAll<Break>(curr).list) { handleBranchForVisitBlock(br, curr->name, getModule()); } @@ -155,6 +157,13 @@ void ReFinalize::visitSelect(Select* curr) { curr->finalize(); } void ReFinalize::visitDrop(Drop* curr) { curr->finalize(); } void ReFinalize::visitReturn(Return* curr) { curr->finalize(); } void ReFinalize::visitHost(Host* curr) { curr->finalize(); } +void ReFinalize::visitTry(Try* curr) { curr->finalize(); } +void ReFinalize::visitThrow(Throw* curr) { curr->finalize(); } +void ReFinalize::visitRethrow(Rethrow* curr) { curr->finalize(); } +void ReFinalize::visitBrOnExn(BrOnExn* curr) { + curr->finalize(); + updateBreakValueType(curr->name, curr->getSingleSentType()); +} void ReFinalize::visitNop(Nop* curr) { curr->finalize(); } void ReFinalize::visitUnreachable(Unreachable* curr) { curr->finalize(); } void ReFinalize::visitPush(Push* curr) { curr->finalize(); } diff --git a/src/ir/branch-utils.h b/src/ir/branch-utils.h index ce7d7b0f6..976dd72ec 100644 --- a/src/ir/branch-utils.h +++ b/src/ir/branch-utils.h @@ -37,20 +37,22 @@ inline bool isBranchReachable(Switch* sw) { sw->condition->type != unreachable; } +inline bool isBranchReachable(BrOnExn* br) { + return br->exnref->type != unreachable; +} + inline bool isBranchReachable(Expression* expr) { if (auto* br = expr->dynCast<Break>()) { return isBranchReachable(br); } else if (auto* sw = expr->dynCast<Switch>()) { return isBranchReachable(sw); + } else if (auto* br = expr->dynCast<BrOnExn>()) { + return isBranchReachable(br); } WASM_UNREACHABLE(); } -inline std::set<Name> getUniqueTargets(Break* br) { - std::set<Name> ret; - ret.insert(br->name); - return ret; -} +inline std::set<Name> getUniqueTargets(Break* br) { return {br->name}; } inline std::set<Name> getUniqueTargets(Switch* sw) { std::set<Name> ret; @@ -61,6 +63,8 @@ inline std::set<Name> getUniqueTargets(Switch* sw) { return ret; } +inline std::set<Name> getUniqueTargets(BrOnExn* br) { return {br->name}; } + // If we branch to 'from', change that to 'to' instead. inline bool replacePossibleTarget(Expression* branch, Name from, Name to) { bool worked = false; @@ -80,6 +84,11 @@ inline bool replacePossibleTarget(Expression* branch, Name from, Name to) { sw->default_ = to; worked = true; } + } else if (auto* br = branch->dynCast<BrOnExn>()) { + if (br->name == from) { + br->name = to; + worked = true; + } } else { WASM_UNREACHABLE(); } @@ -99,6 +108,7 @@ inline std::set<Name> getExitingBranches(Expression* ast) { } targets.insert(curr->default_); } + void visitBrOnExn(BrOnExn* curr) { targets.insert(curr->name); } void visitBlock(Block* curr) { if (curr->name.is()) { targets.erase(curr->name); @@ -153,15 +163,15 @@ struct BranchSeeker : public PostWalker<BranchSeeker> { BranchSeeker(Name target) : target(target) {} - void noteFound(Expression* value) { + void noteFound(Expression* value) { noteFound(value ? value->type : none); } + + void noteFound(Type type) { found++; if (found == 1) { valueType = unreachable; } - if (!value) { - valueType = none; - } else if (value->type != unreachable) { - valueType = value->type; + if (type != unreachable) { + valueType = type; } } @@ -202,6 +212,19 @@ struct BranchSeeker : public PostWalker<BranchSeeker> { } } + void visitBrOnExn(BrOnExn* curr) { + if (!named) { + // ignore an unreachable br_on_exn + if (curr->exnref->type == unreachable) { + return; + } + } + // check the br_on_exn + if (curr->name == target) { + noteFound(curr->getSingleSentType()); + } + } + static bool hasReachable(Expression* tree, Name target) { if (!target.is()) { return false; diff --git a/src/ir/effects.h b/src/ir/effects.h index dac5b878a..e3997f5d2 100644 --- a/src/ir/effects.h +++ b/src/ir/effects.h @@ -374,6 +374,11 @@ struct EffectAnalyzer // Atomics are also sequentially consistent with memory.grow. isAtomic = true; } + void visitTry(Try* curr) {} + // We safely model throws as branches + void visitThrow(Throw* curr) { branches = true; } + void visitRethrow(Rethrow* curr) { branches = true; } + void visitBrOnExn(BrOnExn* curr) { breakNames.insert(curr->name); } void visitNop(Nop* curr) {} void visitUnreachable(Unreachable* curr) { branches = true; } void visitPush(Push* curr) { calls = true; } diff --git a/src/ir/type-updating.h b/src/ir/type-updating.h index ef9fe78e9..09b1b4bdc 100644 --- a/src/ir/type-updating.h +++ b/src/ir/type-updating.h @@ -65,6 +65,8 @@ struct TypeUpdater blockInfos[target]; } blockInfos[sw->default_]; + } else if (auto* br = curr->dynCast<BrOnExn>()) { + blockInfos[br->name]; } // add a break to the info, for break and switch discoverBreaks(curr, +1); @@ -151,6 +153,8 @@ struct TypeUpdater noteBreakChange(br->name, change, br->value); } else if (auto* sw = curr->dynCast<Switch>()) { applySwitchChanges(sw, change); + } else if (auto* br = curr->dynCast<BrOnExn>()) { + noteBreakChange(br->name, change, br->getSingleSentType()); } } @@ -168,6 +172,10 @@ struct TypeUpdater // note the addition of a node void noteBreakChange(Name name, int change, Expression* value) { + noteBreakChange(name, change, value ? value->type : none); + } + + void noteBreakChange(Name name, int change, Type type) { auto iter = blockInfos.find(name); if (iter == blockInfos.end()) { return; // we can ignore breaks to loops @@ -186,7 +194,7 @@ struct TypeUpdater if (block->type != unreachable) { return; // was already reachable, had a fallthrough } - changeTypeTo(block, value ? value->type : none); + changeTypeTo(block, type); } } } diff --git a/src/ir/utils.h b/src/ir/utils.h index ae6368e3b..5c6a09290 100644 --- a/src/ir/utils.h +++ b/src/ir/utils.h @@ -144,6 +144,10 @@ struct ReFinalize void visitDrop(Drop* curr); void visitReturn(Return* curr); void visitHost(Host* curr); + void visitTry(Try* curr); + void visitThrow(Throw* curr); + void visitRethrow(Rethrow* curr); + void visitBrOnExn(BrOnExn* curr); void visitNop(Nop* curr); void visitUnreachable(Unreachable* curr); void visitPush(Push* curr); @@ -203,6 +207,10 @@ struct ReFinalizeNode : public OverriddenVisitor<ReFinalizeNode> { void visitDrop(Drop* curr) { curr->finalize(); } void visitReturn(Return* curr) { curr->finalize(); } void visitHost(Host* curr) { curr->finalize(); } + void visitTry(Try* curr) { curr->finalize(); } + void visitThrow(Throw* curr) { curr->finalize(); } + void visitRethrow(Rethrow* curr) { curr->finalize(); } + void visitBrOnExn(BrOnExn* curr) { curr->finalize(); } void visitNop(Nop* curr) { curr->finalize(); } void visitUnreachable(Unreachable* curr) { curr->finalize(); } void visitPush(Push* curr) { curr->finalize(); } diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index e08d3cf4d..a09ad76ab 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -78,6 +78,10 @@ Module['MemoryInitId'] = Module['_BinaryenMemoryInitId'](); Module['DataDropId'] = Module['_BinaryenDataDropId'](); Module['MemoryCopyId'] = Module['_BinaryenMemoryCopyId'](); Module['MemoryFillId'] = Module['_BinaryenMemoryFillId'](); +Module['TryId'] = Module['_BinaryenTryId'](); +Module['ThrowId'] = Module['_BinaryenThrowId'](); +Module['RethrowId'] = Module['_BinaryenRethrowId'](); +Module['BrOnExnId'] = Module['_BinaryenBrOnExnId'](); Module['PushId'] = Module['_BinaryenPushId'](); Module['PopId'] = Module['_BinaryenPopId'](); @@ -1771,6 +1775,22 @@ function wrapModule(module, self) { self['notify'] = function(ptr, notifyCount) { return Module['_BinaryenAtomicNotify'](module, ptr, notifyCount); }; + self['try'] = function(body, catchBody) { + return Module['_BinaryenTry'](module, body, catchBody); + }; + self['throw'] = function(event_, operands) { + return preserveStack(function() { + return Module['_BinaryenThrow'](module, strToStack(event_), i32sToStack(operands), operands.length); + }); + }; + self['rethrow'] = function(exnref) { + return Module['_BinaryenRethrow'](module, exnref); + }; + self['br_on_exn'] = function(label, event_, exnref) { + return preserveStack(function() { + return Module['_BinaryenBrOnExn'](module, strToStack(label), strToStack(event_), exnref); + }); + }; self['push'] = function(value) { return Module['_BinaryenPush'](module, value); }; @@ -2376,6 +2396,34 @@ Module['getExpressionInfo'] = function(expr) { 'value': Module['_BinaryenMemoryFillGetValue'](expr), 'size': Module['_BinaryenMemoryFillGetSize'](expr) }; + case Module['TryId']: + return { + 'id': id, + 'type': type, + 'body': Module['_BinaryenTryGetBody'](expr), + 'catchBody': Module['_BinaryenTryGetCatchBody'](expr) + }; + case Module['ThrowId']: + return { + 'id': id, + 'type': type, + 'event': UTF8ToString(Module['_BinaryenThrowGetEvent'](expr)), + 'operands': getAllNested(expr, Module['_BinaryenThrowGetNumOperands'], Module['_BinaryenThrowGetOperand']) + }; + case Module['RethrowId']: + return { + 'id': id, + 'type': type, + 'exnref': Module['_BinaryenRethrowGetExnref'](expr) + }; + case Module['BrOnExnId']: + return { + 'id': id, + 'type': type, + 'name': UTF8ToString(Module['_BinaryenBrOnExnGetName'](expr)), + 'event': UTF8ToString(Module['_BinaryenBrOnExnGetEvent'](expr)), + 'exnref': Module['_BinaryenBrOnExnGetExnref'](expr) + }; case Module['PushId']: return { 'id': id, diff --git a/src/passes/DeadCodeElimination.cpp b/src/passes/DeadCodeElimination.cpp index 61d16afc0..f913c5a93 100644 --- a/src/passes/DeadCodeElimination.cpp +++ b/src/passes/DeadCodeElimination.cpp @@ -144,6 +144,14 @@ struct DeadCodeElimination reachable = false; } + void visitBrOnExn(BrOnExn* curr) { + if (isDead(curr->exnref)) { + replaceCurrent(curr->exnref); + return; + } + addBreak(curr->name); + } + void visitReturn(Return* curr) { if (isDead(curr->value)) { replaceCurrent(curr->value); @@ -312,6 +320,14 @@ struct DeadCodeElimination DELEGATE(Push); case Expression::Id::PopId: DELEGATE(Pop); + case Expression::Id::TryId: + DELEGATE(Try); + case Expression::Id::ThrowId: + DELEGATE(Throw); + case Expression::Id::RethrowId: + DELEGATE(Rethrow); + case Expression::Id::BrOnExnId: + DELEGATE(BrOnExn); case Expression::Id::InvalidId: WASM_UNREACHABLE(); case Expression::Id::NumExpressionIds: diff --git a/src/passes/Precompute.cpp b/src/passes/Precompute.cpp index 55ff9e264..c4d90de04 100644 --- a/src/passes/Precompute.cpp +++ b/src/passes/Precompute.cpp @@ -130,6 +130,10 @@ public: Flow visitMemoryCopy(MemoryCopy* curr) { return Flow(NOTPRECOMPUTABLE_FLOW); } Flow visitMemoryFill(MemoryFill* curr) { return Flow(NOTPRECOMPUTABLE_FLOW); } Flow visitHost(Host* curr) { return Flow(NOTPRECOMPUTABLE_FLOW); } + Flow visitTry(Try* curr) { return Flow(NOTPRECOMPUTABLE_FLOW); } + Flow visitThrow(Throw* curr) { return Flow(NOTPRECOMPUTABLE_FLOW); } + Flow visitRethrow(Rethrow* curr) { return Flow(NOTPRECOMPUTABLE_FLOW); } + Flow visitBrOnExn(BrOnExn* curr) { return Flow(NOTPRECOMPUTABLE_FLOW); } Flow visitPush(Push* curr) { return Flow(NOTPRECOMPUTABLE_FLOW); } Flow visitPop(Pop* curr) { return Flow(NOTPRECOMPUTABLE_FLOW); } diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 812a69692..0bf61e784 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -1162,6 +1162,23 @@ struct PrintExpressionContents break; } } + void visitTry(Try* curr) { + printMedium(o, "try"); + if (isConcreteType(curr->type)) { + o << " (result " << printType(curr->type) << ')'; + } + } + void visitThrow(Throw* curr) { + printMedium(o, "throw "); + printName(curr->event, o); + } + void visitRethrow(Rethrow* curr) { printMedium(o, "rethrow"); } + void visitBrOnExn(BrOnExn* curr) { + printMedium(o, "br_on_exn "); + printName(curr->name, o); + o << " "; + printName(curr->event, o); + } void visitNop(Nop* curr) { printMinor(o, "nop"); } void visitUnreachable(Unreachable* curr) { printMinor(o, "unreachable"); } void visitPush(Push* curr) { prepareColor(o) << "push"; } @@ -1260,6 +1277,20 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> { o << maybeNewLine; } + // loop, if, and try can contain implicit blocks. But they are not needed to + // be printed in some cases. + void maybePrintImplicitBlock(Expression* curr, bool allowMultipleInsts) { + auto block = curr->dynCast<Block>(); + if (!full && block && block->name.isNull() && + (allowMultipleInsts || block->list.size() == 1)) { + for (auto expression : block->list) { + printFullLine(expression); + } + } else { + printFullLine(curr); + } + } + void visitBlock(Block* curr) { // special-case Block, because Block nesting (in their first element) can be // incredibly deep @@ -1319,22 +1350,9 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> { PrintExpressionContents(currFunction, o).visit(curr); incIndent(); printFullLine(curr->condition); - // ifTrue and False have implict blocks, avoid printing them if possible - if (!full && curr->ifTrue->is<Block>() && - curr->ifTrue->dynCast<Block>()->name.isNull() && - curr->ifTrue->dynCast<Block>()->list.size() == 1) { - printFullLine(curr->ifTrue->dynCast<Block>()->list.back()); - } else { - printFullLine(curr->ifTrue); - } + maybePrintImplicitBlock(curr->ifTrue, false); if (curr->ifFalse) { - if (!full && curr->ifFalse->is<Block>() && - curr->ifFalse->dynCast<Block>()->name.isNull() && - curr->ifFalse->dynCast<Block>()->list.size() == 1) { - printFullLine(curr->ifFalse->dynCast<Block>()->list.back()); - } else { - printFullLine(curr->ifFalse); - } + maybePrintImplicitBlock(curr->ifFalse, false); } decIndent(); if (full) { @@ -1345,16 +1363,7 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> { o << '('; PrintExpressionContents(currFunction, o).visit(curr); incIndent(); - auto block = curr->body->dynCast<Block>(); - if (!full && block && block->name.isNull()) { - // wasm spec has loops containing children directly, while our ast - // has a single child for simplicity. print out the optimal form. - for (auto expression : block->list) { - printFullLine(expression); - } - } else { - printFullLine(curr->body); - } + maybePrintImplicitBlock(curr->body, true); decIndent(); if (full) { o << " ;; end loop"; @@ -1631,6 +1640,54 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> { } } } + // try-catch-end is written in the folded wast format as + // (try + // ... + // (catch + // ... + // ) + // ) + // The parenthesis wrapping 'catch' is just a syntax and does not affect + // nested depths of instructions within. + void visitTry(Try* curr) { + o << '('; + PrintExpressionContents(currFunction, o).visit(curr); + incIndent(); + maybePrintImplicitBlock(curr->body, true); + doIndent(o, indent); + o << "(catch"; + incIndent(); + maybePrintImplicitBlock(curr->catchBody, true); + decIndent(); + o << "\n"; + decIndent(); + if (full) { + o << " ;; end try"; + } + } + void visitThrow(Throw* curr) { + o << '('; + PrintExpressionContents(currFunction, o).visit(curr); + incIndent(); + for (auto operand : curr->operands) { + printFullLine(operand); + } + decIndent(); + } + void visitRethrow(Rethrow* curr) { + o << '('; + PrintExpressionContents(currFunction, o).visit(curr); + incIndent(); + printFullLine(curr->exnref); + decIndent(); + } + void visitBrOnExn(BrOnExn* curr) { + o << '('; + PrintExpressionContents(currFunction, o).visit(curr); + incIndent(); + printFullLine(curr->exnref); + decIndent(); + } void visitNop(Nop* curr) { o << '('; PrintExpressionContents(currFunction, o).visit(curr); @@ -2198,7 +2255,8 @@ WasmPrinter::printStackIR(StackIR* ir, std::ostream& o, Function* func) { } case StackInst::BlockBegin: case StackInst::IfBegin: - case StackInst::LoopBegin: { + case StackInst::LoopBegin: + case StackInst::TryBegin: { doIndent(); PrintExpressionContents(func, o).visit(inst->origin); indent++; @@ -2206,7 +2264,8 @@ WasmPrinter::printStackIR(StackIR* ir, std::ostream& o, Function* func) { } case StackInst::BlockEnd: case StackInst::IfEnd: - case StackInst::LoopEnd: { + case StackInst::LoopEnd: + case StackInst::TryEnd: { indent--; doIndent(); o << "end"; @@ -2219,6 +2278,13 @@ WasmPrinter::printStackIR(StackIR* ir, std::ostream& o, Function* func) { indent++; break; } + case StackInst::Catch: { + indent--; + doIndent(); + o << "catch"; + indent++; + break; + } default: WASM_UNREACHABLE(); } diff --git a/src/passes/RemoveUnusedNames.cpp b/src/passes/RemoveUnusedNames.cpp index 3db5a2173..3b04522ad 100644 --- a/src/passes/RemoveUnusedNames.cpp +++ b/src/passes/RemoveUnusedNames.cpp @@ -42,6 +42,8 @@ struct RemoveUnusedNames : public WalkerPass<PostWalker<RemoveUnusedNames>> { branchesSeen[curr->default_].insert(curr); } + void visitBrOnExn(BrOnExn* curr) { branchesSeen[curr->name].insert(curr); } + void handleBreakTarget(Name& name) { if (name.is()) { if (branchesSeen.find(name) == branchesSeen.end()) { @@ -73,6 +75,10 @@ struct RemoveUnusedNames : public WalkerPass<PostWalker<RemoveUnusedNames>> { if (sw->default_ == curr->name) { sw->default_ = child->name; } + } else if (BrOnExn* br = branch->dynCast<BrOnExn>()) { + if (br->name == curr->name) { + br->name = child->name; + } } else { WASM_UNREACHABLE(); } diff --git a/src/wasm-binary.h b/src/wasm-binary.h index f58a10cf7..1efa24b48 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -613,12 +613,14 @@ enum ASTNodes { I64ExtendS16 = 0xc3, I64ExtendS32 = 0xc4, + // prefixes + MiscPrefix = 0xfc, SIMDPrefix = 0xfd, - AtomicPrefix = 0xfe -}; + AtomicPrefix = 0xfe, + + // atomic opcodes -enum AtomicOpcodes { AtomicNotify = 0x00, I32AtomicWait = 0x01, I64AtomicWait = 0x02, @@ -691,10 +693,10 @@ enum AtomicOpcodes { I64AtomicCmpxchg8U = 0x4c, I64AtomicCmpxchg16U = 0x4d, I64AtomicCmpxchg32U = 0x4e, - AtomicCmpxchgOps_End = 0x4e -}; + AtomicCmpxchgOps_End = 0x4e, + + // truncsat opcodes -enum TruncSatOpcodes { I32STruncSatF32 = 0x00, I32UTruncSatF32 = 0x01, I32STruncSatF64 = 0x02, @@ -703,9 +705,9 @@ enum TruncSatOpcodes { I64UTruncSatF32 = 0x05, I64STruncSatF64 = 0x06, I64UTruncSatF64 = 0x07, -}; -enum SIMDOpcodes { + // SIMD opcodes + V128Load = 0x00, V128Store = 0x01, V128Const = 0x02, @@ -845,14 +847,22 @@ enum SIMDOpcodes { F32x4ConvertSI32x4 = 0xaf, F32x4ConvertUI32x4 = 0xb0, F64x2ConvertSI64x2 = 0xb1, - F64x2ConvertUI64x2 = 0xb2 -}; + F64x2ConvertUI64x2 = 0xb2, + + // bulk memory opcodes -enum BulkMemoryOpcodes { MemoryInit = 0x08, DataDrop = 0x09, MemoryCopy = 0x0a, - MemoryFill = 0x0b + MemoryFill = 0x0b, + + // exception handling opcodes + + Try = 0x06, + Catch = 0x07, + Throw = 0x08, + Rethrow = 0x09, + BrOnExn = 0x0a }; enum MemoryAccess { @@ -1184,6 +1194,8 @@ public: void readNextDebugLocation(); void readSourceMapHeader(); + void handleBrOnExnNotTaken(Expression* curr); + // AST reading int depth = 0; // only for debugging @@ -1192,7 +1204,7 @@ public: void visitBlock(Block* curr); // Gets a block of expressions. If it's just one, return that singleton. - Expression* getBlockOrSingleton(Type type); + Expression* getBlockOrSingleton(Type type, unsigned numPops = 0); void visitIf(If* curr); void visitLoop(Loop* curr); @@ -1238,6 +1250,10 @@ public: void visitNop(Nop* curr); void visitUnreachable(Unreachable* curr); void visitDrop(Drop* curr); + void visitTry(Try* curr); + void visitThrow(Throw* curr); + void visitRethrow(Rethrow* curr); + void visitBrOnExn(BrOnExn* curr); void throwError(std::string text); }; diff --git a/src/wasm-builder.h b/src/wasm-builder.h index 923effb76..a0a43bc07 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -453,7 +453,6 @@ public: return ret; } Const* makeConst(Literal value) { - assert(isConcreteType(value.type)); auto* ret = allocator.alloc<Const>(); ret->value = value; ret->type = value.type; @@ -497,6 +496,53 @@ public: ret->finalize(); return ret; } + Try* makeTry(Expression* body, Expression* catchBody) { + auto* ret = allocator.alloc<Try>(); + ret->body = body; + ret->catchBody = catchBody; + ret->finalize(); + return ret; + } + Try* makeTry(Expression* body, Expression* catchBody, Type type) { + auto* ret = allocator.alloc<Try>(); + ret->body = body; + ret->catchBody = catchBody; + ret->finalize(type); + return ret; + } + Throw* makeThrow(Event* event, const std::vector<Expression*>& args) { + return makeThrow(event->name, args); + } + Throw* makeThrow(Name event, const std::vector<Expression*>& args) { + auto* ret = allocator.alloc<Throw>(); + ret->event = event; + ret->operands.set(args); + ret->finalize(); + return ret; + } + Rethrow* makeRethrow(Expression* exnref) { + auto* ret = allocator.alloc<Rethrow>(); + ret->exnref = exnref; + ret->finalize(); + return ret; + } + BrOnExn* makeBrOnExn(Name name, Event* event, Expression* exnref) { + return makeBrOnExn(name, event->name, exnref, event->params); + } + BrOnExn* makeBrOnExn(Name name, + Name event, + Expression* exnref, + std::vector<Type>& eventParams) { + auto* ret = allocator.alloc<BrOnExn>(); + ret->name = name; + ret->event = event; + ret->exnref = exnref; + // Copy params info into BrOnExn, because it is necessary when BrOnExn is + // refinalized without the module. + ret->eventParams = eventParams; + ret->finalize(); + return ret; + } Unreachable* makeUnreachable() { return allocator.alloc<Unreachable>(); } Push* makePush(Expression* value) { auto* ret = allocator.alloc<Push>(); diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index f683f9b38..53345f0ab 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -1048,6 +1048,10 @@ public: Flow visitAtomicNotify(AtomicNotify*) { WASM_UNREACHABLE(); } Flow visitPush(Push*) { WASM_UNREACHABLE(); } Flow visitPop(Pop*) { WASM_UNREACHABLE(); } + Flow visitTry(Try*) { WASM_UNREACHABLE(); } + Flow visitThrow(Throw*) { WASM_UNREACHABLE(); } + Flow visitRethrow(Rethrow*) { WASM_UNREACHABLE(); } + Flow visitBrOnExn(BrOnExn*) { WASM_UNREACHABLE(); } virtual void trap(const char* why) { WASM_UNREACHABLE(); } }; diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index c07cc49a9..d6ec89319 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -221,6 +221,11 @@ private: Expression* makeBreak(Element& s); Expression* makeBreakTable(Element& s); Expression* makeReturn(Element& s); + Expression* makeTry(Element& s); + Expression* makeCatch(Element& s); + Expression* makeThrow(Element& s); + Expression* makeRethrow(Element& s); + Expression* makeBrOnExn(Element& s); // Helper functions Type parseOptionalResultType(Element& s, Index& i); diff --git a/src/wasm-stack.h b/src/wasm-stack.h index 64718b7b2..562a00684 100644 --- a/src/wasm-stack.h +++ b/src/wasm-stack.h @@ -67,6 +67,9 @@ public: IfEnd, // the ending of a if LoopBegin, // the beginning of a loop LoopEnd, // the ending of a loop + TryBegin, // the beginning of a try + Catch, // the catch within a try + TryEnd // the ending of a try } op; Expression* origin; // the expression this originates from @@ -115,6 +118,10 @@ public: void visitSelect(Select* curr); void visitReturn(Return* curr); void visitHost(Host* curr); + void visitTry(Try* curr); + void visitThrow(Throw* curr); + void visitRethrow(Rethrow* curr); + void visitBrOnExn(BrOnExn* curr); void visitNop(Nop* curr); void visitUnreachable(Unreachable* curr); void visitDrop(Drop* curr); @@ -122,7 +129,8 @@ public: void visitPop(Pop* curr); void emitIfElse(); - void emitScopeEnd(); // emit an end at the end of a block/loop/if + void emitCatch(); + void emitScopeEnd(); // emit an end at the end of a block/loop/if/try void emitFunctionEnd(); // emit an end at the end of a function void emitUnreachable(); void mapLocalsAndEmitHeader(); @@ -185,6 +193,10 @@ public: void visitSelect(Select* curr); void visitReturn(Return* curr); void visitHost(Host* curr); + void visitTry(Try* curr); + void visitThrow(Throw* curr); + void visitRethrow(Rethrow* curr); + void visitBrOnExn(BrOnExn* curr); void visitNop(Nop* curr); void visitUnreachable(Unreachable* curr); void visitDrop(Drop* curr); @@ -198,6 +210,7 @@ private: void emit(Expression* curr) { static_cast<SubType*>(this)->emit(curr); } void emitHeader() { static_cast<SubType*>(this)->emitHeader(); } void emitIfElse(If* curr) { static_cast<SubType*>(this)->emitIfElse(curr); } + void emitCatch(Try* curr) { static_cast<SubType*>(this)->emitCatch(curr); } void emitScopeEnd(Expression* curr) { static_cast<SubType*>(this)->emitScopeEnd(curr); } @@ -305,7 +318,6 @@ template<typename SubType> void BinaryenIRWriter<SubType>::visitIf(If* curr) { return; } emit(curr); - // TODO: emit block contents directly, if possible visitPossibleBlockContents(curr->ifTrue); if (curr->ifFalse) { @@ -657,6 +669,40 @@ void BinaryenIRWriter<SubType>::visitHost(Host* curr) { emit(curr); } +template<typename SubType> void BinaryenIRWriter<SubType>::visitTry(Try* curr) { + emit(curr); + visitPossibleBlockContents(curr->body); + emitCatch(curr); + visitPossibleBlockContents(curr->catchBody); + emitScopeEnd(curr); + if (curr->type == unreachable) { + emitUnreachable(); + } +} + +template<typename SubType> +void BinaryenIRWriter<SubType>::visitThrow(Throw* curr) { + for (auto* operand : curr->operands) { + visit(operand); + } + emit(curr); +} + +template<typename SubType> +void BinaryenIRWriter<SubType>::visitRethrow(Rethrow* curr) { + visit(curr->exnref); + emit(curr); +} + +template<typename SubType> +void BinaryenIRWriter<SubType>::visitBrOnExn(BrOnExn* curr) { + visit(curr->exnref); + emit(curr); + if (curr->type == unreachable) { + emitUnreachable(); + } +} + template<typename SubType> void BinaryenIRWriter<SubType>::visitNop(Nop* curr) { emit(curr); } @@ -707,6 +753,7 @@ public: writer.mapLocalsAndEmitHeader(); } void emitIfElse(If* curr) { writer.emitIfElse(); } + void emitCatch(Try* curr) { writer.emitCatch(); } void emitScopeEnd(Expression* curr) { writer.emitScopeEnd(); } void emitFunctionEnd() { if (func->epilogLocation.size()) { @@ -740,6 +787,9 @@ public: void emitIfElse(If* curr) { stackIR.push_back(makeStackInst(StackInst::IfElse, curr)); } + void emitCatch(Try* curr) { + stackIR.push_back(makeStackInst(StackInst::Catch, curr)); + } void emitFunctionEnd() {} void emitUnreachable() { stackIR.push_back(makeStackInst(Builder(allocator).makeUnreachable())); diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h index 04ab5f04a..5e9925b63 100644 --- a/src/wasm-traversal.h +++ b/src/wasm-traversal.h @@ -70,6 +70,10 @@ template<typename SubType, typename ReturnType = void> struct Visitor { ReturnType visitDrop(Drop* curr) { return ReturnType(); } ReturnType visitReturn(Return* curr) { return ReturnType(); } ReturnType visitHost(Host* curr) { return ReturnType(); } + ReturnType visitTry(Try* curr) { return ReturnType(); } + ReturnType visitThrow(Throw* curr) { return ReturnType(); } + ReturnType visitRethrow(Rethrow* curr) { return ReturnType(); } + ReturnType visitBrOnExn(BrOnExn* curr) { return ReturnType(); } ReturnType visitNop(Nop* curr) { return ReturnType(); } ReturnType visitUnreachable(Unreachable* curr) { return ReturnType(); } ReturnType visitPush(Push* curr) { return ReturnType(); } @@ -158,6 +162,14 @@ template<typename SubType, typename ReturnType = void> struct Visitor { DELEGATE(Return); case Expression::Id::HostId: DELEGATE(Host); + case Expression::Id::TryId: + DELEGATE(Try); + case Expression::Id::ThrowId: + DELEGATE(Throw); + case Expression::Id::RethrowId: + DELEGATE(Rethrow); + case Expression::Id::BrOnExnId: + DELEGATE(BrOnExn); case Expression::Id::NopId: DELEGATE(Nop); case Expression::Id::UnreachableId: @@ -222,6 +234,10 @@ struct OverriddenVisitor { UNIMPLEMENTED(Drop); UNIMPLEMENTED(Return); UNIMPLEMENTED(Host); + UNIMPLEMENTED(Try); + UNIMPLEMENTED(Throw); + UNIMPLEMENTED(Rethrow); + UNIMPLEMENTED(BrOnExn); UNIMPLEMENTED(Nop); UNIMPLEMENTED(Unreachable); UNIMPLEMENTED(Push); @@ -311,6 +327,14 @@ struct OverriddenVisitor { DELEGATE(Return); case Expression::Id::HostId: DELEGATE(Host); + case Expression::Id::TryId: + DELEGATE(Try); + case Expression::Id::ThrowId: + DELEGATE(Throw); + case Expression::Id::RethrowId: + DELEGATE(Rethrow); + case Expression::Id::BrOnExnId: + DELEGATE(BrOnExn); case Expression::Id::NopId: DELEGATE(Nop); case Expression::Id::UnreachableId: @@ -436,6 +460,18 @@ struct UnifiedExpressionVisitor : public Visitor<SubType, ReturnType> { ReturnType visitHost(Host* curr) { return static_cast<SubType*>(this)->visitExpression(curr); } + ReturnType visitTry(Try* curr) { + return static_cast<SubType*>(this)->visitExpression(curr); + } + ReturnType visitThrow(Throw* curr) { + return static_cast<SubType*>(this)->visitExpression(curr); + } + ReturnType visitRethrow(Rethrow* curr) { + return static_cast<SubType*>(this)->visitExpression(curr); + } + ReturnType visitBrOnExn(BrOnExn* curr) { + return static_cast<SubType*>(this)->visitExpression(curr); + } ReturnType visitNop(Nop* curr) { return static_cast<SubType*>(this)->visitExpression(curr); } @@ -723,6 +759,18 @@ struct Walker : public VisitorType { static void doVisitHost(SubType* self, Expression** currp) { self->visitHost((*currp)->cast<Host>()); } + static void doVisitTry(SubType* self, Expression** currp) { + self->visitTry((*currp)->cast<Try>()); + } + static void doVisitThrow(SubType* self, Expression** currp) { + self->visitThrow((*currp)->cast<Throw>()); + } + static void doVisitRethrow(SubType* self, Expression** currp) { + self->visitRethrow((*currp)->cast<Rethrow>()); + } + static void doVisitBrOnExn(SubType* self, Expression** currp) { + self->visitBrOnExn((*currp)->cast<BrOnExn>()); + } static void doVisitNop(SubType* self, Expression** currp) { self->visitNop((*currp)->cast<Nop>()); } @@ -755,7 +803,6 @@ template<typename SubType, typename VisitorType = Visitor<SubType>> struct PostWalker : public Walker<SubType, VisitorType> { static void scan(SubType* self, Expression** currp) { - Expression* curr = *currp; switch (curr->_id) { case Expression::Id::InvalidId: @@ -961,6 +1008,30 @@ struct PostWalker : public Walker<SubType, VisitorType> { } break; } + case Expression::Id::TryId: { + self->pushTask(SubType::doVisitTry, currp); + self->pushTask(SubType::scan, &curr->cast<Try>()->catchBody); + self->pushTask(SubType::scan, &curr->cast<Try>()->body); + break; + } + case Expression::Id::ThrowId: { + self->pushTask(SubType::doVisitThrow, currp); + auto& list = curr->cast<Throw>()->operands; + for (int i = int(list.size()) - 1; i >= 0; i--) { + self->pushTask(SubType::scan, &list[i]); + } + break; + } + case Expression::Id::RethrowId: { + self->pushTask(SubType::doVisitRethrow, currp); + self->pushTask(SubType::scan, &curr->cast<Rethrow>()->exnref); + break; + } + case Expression::Id::BrOnExnId: { + self->pushTask(SubType::doVisitBrOnExn, currp); + self->pushTask(SubType::scan, &curr->cast<BrOnExn>()->exnref); + break; + } case Expression::Id::NopId: { self->pushTask(SubType::doVisitNop, currp); break; @@ -1196,6 +1267,35 @@ struct LinearExecutionWalker : public PostWalker<SubType, VisitorType> { self->maybePushTask(SubType::scan, &curr->cast<Return>()->value); break; } + case Expression::Id::TryId: { + self->pushTask(SubType::doVisitTry, currp); + self->pushTask(SubType::doNoteNonLinear, currp); + self->pushTask(SubType::scan, &curr->cast<Try>()->catchBody); + self->pushTask(SubType::doNoteNonLinear, currp); + self->pushTask(SubType::scan, &curr->cast<Try>()->body); + break; + } + case Expression::Id::ThrowId: { + self->pushTask(SubType::doVisitThrow, currp); + self->pushTask(SubType::doNoteNonLinear, currp); + auto& list = curr->cast<Throw>()->operands; + for (int i = int(list.size()) - 1; i >= 0; i--) { + self->pushTask(SubType::scan, &list[i]); + } + break; + } + case Expression::Id::RethrowId: { + self->pushTask(SubType::doVisitRethrow, currp); + self->pushTask(SubType::doNoteNonLinear, currp); + self->pushTask(SubType::scan, &curr->cast<Rethrow>()->exnref); + break; + } + case Expression::Id::BrOnExnId: { + self->pushTask(SubType::doVisitBrOnExn, currp); + self->pushTask(SubType::doNoteNonLinear, currp); + self->pushTask(SubType::scan, &curr->cast<BrOnExn>()->exnref); + break; + } case Expression::Id::UnreachableId: { self->pushTask(SubType::doVisitUnreachable, currp); self->pushTask(SubType::doNoteNonLinear, currp); diff --git a/src/wasm.h b/src/wasm.h index 3ac89b91d..d4441259e 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -479,6 +479,10 @@ public: MemoryFillId, PushId, PopId, + TryId, + ThrowId, + RethrowId, + BrOnExnId, NumExpressionIds }; Id _id; @@ -1003,6 +1007,52 @@ public: Pop(MixedArena& allocator) {} }; +class Try : public SpecificExpression<Expression::TryId> { +public: + Try(MixedArena& allocator) {} + + Expression* body; + Expression* catchBody; + + void finalize(); + void finalize(Type type_); +}; + +class Throw : public SpecificExpression<Expression::ThrowId> { +public: + Throw(MixedArena& allocator) : operands(allocator) {} + + Name event; + ExpressionList operands; + + void finalize(); +}; + +class Rethrow : public SpecificExpression<Expression::RethrowId> { +public: + Rethrow(MixedArena& allocator) {} + + Expression* exnref; + + void finalize(); +}; + +class BrOnExn : public SpecificExpression<Expression::BrOnExnId> { +public: + BrOnExn() { type = unreachable; } + BrOnExn(MixedArena& allocator) : BrOnExn() {} + + Name name; + Name event; + Expression* exnref; + // This is duplicate info of param types stored in Event, but this is required + // for us to know the type of the value sent to the target block. + std::vector<Type> eventParams; + + void finalize(); + Type getSingleSentType(); +}; + // Globals struct Importable { diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index 039cef5e5..7047b674e 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -1754,7 +1754,8 @@ void WasmBinaryBuilder::processExpressions() { throwError("unexpected end of input"); } auto peek = input[pos]; - if (peek == BinaryConsts::End || peek == BinaryConsts::Else) { + if (peek == BinaryConsts::End || peek == BinaryConsts::Else || + peek == BinaryConsts::Catch) { if (debug) { std::cerr << "== processExpressions finished with unreachable" << std::endl; @@ -2260,8 +2261,21 @@ BinaryConsts::ASTNodes WasmBinaryBuilder::readExpression(Expression*& curr) { break; case BinaryConsts::End: case BinaryConsts::Else: + case BinaryConsts::Catch: curr = nullptr; break; + case BinaryConsts::Try: + visitTry((curr = allocator.alloc<Try>())->cast<Try>()); + break; + case BinaryConsts::Throw: + visitThrow((curr = allocator.alloc<Throw>())->cast<Throw>()); + break; + case BinaryConsts::Rethrow: + visitRethrow((curr = allocator.alloc<Rethrow>())->cast<Rethrow>()); + break; + case BinaryConsts::BrOnExn: + visitBrOnExn((curr = allocator.alloc<BrOnExn>())->cast<BrOnExn>()); + break; case BinaryConsts::AtomicPrefix: { code = static_cast<uint8_t>(getU32LEB()); if (maybeVisitLoad(curr, code, /*isAtomic=*/true)) { @@ -2420,6 +2434,7 @@ void WasmBinaryBuilder::visitBlock(Block* curr) { if (debug) { std::cerr << "zz node: Block" << std::endl; } + // special-case Block and de-recurse nested blocks in their first position, as // that is a common pattern that can be very highly nested. std::vector<Block*> stack; @@ -2467,10 +2482,22 @@ void WasmBinaryBuilder::visitBlock(Block* curr) { } } -Expression* WasmBinaryBuilder::getBlockOrSingleton(Type type) { +// Gets a block of expressions. If it's just one, return that singleton. +// numPops is the number of pop instructions we add before starting to parse the +// block. Can be used when we need to assume certain number of values are on top +// of the stack in the beginning. +Expression* WasmBinaryBuilder::getBlockOrSingleton(Type type, + unsigned numPops) { Name label = getNextLabel(); breakStack.push_back({label, type != none && type != unreachable}); auto start = expressionStack.size(); + + Builder builder(wasm); + for (unsigned i = 0; i < numPops; i++) { + auto* pop = builder.makePop(exnref); + expressionStack.push_back(pop); + } + processExpressions(); size_t end = expressionStack.size(); if (end < start) { @@ -4347,6 +4374,73 @@ void WasmBinaryBuilder::visitDrop(Drop* curr) { curr->finalize(); } +void WasmBinaryBuilder::visitTry(Try* curr) { + if (debug) { + std::cerr << "zz node: Try" << std::endl; + } + // For simplicity of implementation, like if scopes, we create a hidden block + // within each try-body and catch-body, and let branches target those inner + // blocks instead. + curr->type = getType(); + curr->body = getBlockOrSingleton(curr->type); + if (lastSeparator != BinaryConsts::Catch) { + throwError("No catch instruction within a try scope"); + } + curr->catchBody = getBlockOrSingleton(curr->type, 1); + curr->finalize(curr->type); + if (lastSeparator != BinaryConsts::End) { + throwError("try should end with end"); + } +} + +void WasmBinaryBuilder::visitThrow(Throw* curr) { + if (debug) { + std::cerr << "zz node: Throw" << std::endl; + } + auto index = getU32LEB(); + if (index >= wasm.events.size()) { + throwError("bad event index"); + } + auto* event = wasm.events[index].get(); + curr->event = event->name; + size_t num = event->params.size(); + curr->operands.resize(num); + for (size_t i = 0; i < num; i++) { + curr->operands[num - i - 1] = popNonVoidExpression(); + } + curr->finalize(); +} + +void WasmBinaryBuilder::visitRethrow(Rethrow* curr) { + if (debug) { + std::cerr << "zz node: Rethrow" << std::endl; + } + curr->exnref = popNonVoidExpression(); + curr->finalize(); +} + +void WasmBinaryBuilder::visitBrOnExn(BrOnExn* curr) { + if (debug) { + std::cerr << "zz node: BrOnExn" << std::endl; + } + BreakTarget target = getBreakTarget(getU32LEB()); + curr->name = target.name; + auto index = getU32LEB(); + if (index >= wasm.events.size()) { + throwError("bad event index"); + } + curr->event = wasm.events[index]->name; + curr->exnref = popNonVoidExpression(); + + Event* event = wasm.getEventOrNull(curr->event); + assert(event && "br_on_exn's event must exist"); + + // Copy params info into BrOnExn, because it is necessary when BrOnExn is + // refinalized without the module. + curr->eventParams = event->params; + curr->finalize(); +} + void WasmBinaryBuilder::throwError(std::string text) { throw ParseException(text, 0, pos); } diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 485b3251f..e1413d5fd 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -1726,6 +1726,102 @@ Expression* SExpressionWasmBuilder::makeReturn(Element& s) { return ret; } +// try-catch-end is written in the folded wast format as +// (try +// ... +// (catch +// ... +// ) +// ) +// The parenthesis wrapping 'catch' is just a syntax and does not affect nested +// depths of instructions within. +Expression* SExpressionWasmBuilder::makeTry(Element& s) { + auto ret = allocator.alloc<Try>(); + Index i = 1; + Name sName; + if (s[i]->dollared()) { + // the try is labeled + sName = s[i++]->str(); + } else { + sName = "try"; + } + auto label = nameMapper.pushLabelName(sName); + Type type = parseOptionalResultType(s, i); // signature + if (elementStartsWith(*s[i], "catch")) { // empty try body + ret->body = makeNop(); + } else { + ret->body = parseExpression(*s[i++]); + } + if (!elementStartsWith(*s[i], "catch")) { + throw ParseException("catch clause does not exist"); + } + ret->catchBody = makeCatch(*s[i++]); + ret->finalize(type); + nameMapper.popLabelName(label); + // create a break target if we must + if (BranchUtils::BranchSeeker::hasNamed(ret, label)) { + auto* block = allocator.alloc<Block>(); + block->name = label; + block->list.push_back(ret); + block->finalize(ret->type); + return block; + } + return ret; +} + +Expression* SExpressionWasmBuilder::makeCatch(Element& s) { + if (!elementStartsWith(s, "catch")) { + throw ParseException("invalid catch clause", s.line, s.col); + } + auto ret = allocator.alloc<Block>(); + for (size_t i = 1; i < s.size(); i++) { + ret->list.push_back(parseExpression(s[i])); + } + ret->finalize(); + return ret; +} + +Expression* SExpressionWasmBuilder::makeThrow(Element& s) { + auto ret = allocator.alloc<Throw>(); + Index i = 1; + + ret->event = getEventName(*s[i++]); + if (!wasm.getEventOrNull(ret->event)) { + throw ParseException("bad event name", s[1]->line, s[1]->col); + } + for (; i < s.size(); i++) { + ret->operands.push_back(parseExpression(s[i])); + } + ret->finalize(); + return ret; +} + +Expression* SExpressionWasmBuilder::makeRethrow(Element& s) { + auto ret = allocator.alloc<Rethrow>(); + ret->exnref = parseExpression(*s[1]); + ret->finalize(); + return ret; +} + +Expression* SExpressionWasmBuilder::makeBrOnExn(Element& s) { + auto ret = allocator.alloc<BrOnExn>(); + size_t i = 1; + ret->name = getLabel(*s[i++]); + ret->event = getEventName(*s[i++]); + if (!wasm.getEventOrNull(ret->event)) { + throw ParseException("bad event name", s[1]->line, s[1]->col); + } + ret->exnref = parseExpression(s[i]); + + Event* event = wasm.getEventOrNull(ret->event); + assert(event && "br_on_exn's event must exist"); + // Copy params info into BrOnExn, because it is necessary when BrOnExn is + // refinalized without the module. + ret->eventParams = event->params; + ret->finalize(); + return ret; +} + // converts an s-expression string representing binary data into an output // sequence of raw bytes this appends to data, which may already contain // content. diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index b8ec4fa35..d3aba3b8c 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -1396,6 +1396,32 @@ void BinaryInstWriter::visitHost(Host* curr) { o << U32LEB(0); // Reserved flags field } +void BinaryInstWriter::visitTry(Try* curr) { + breakStack.emplace_back(IMPOSSIBLE_CONTINUE); + o << int8_t(BinaryConsts::Try); + o << binaryType(curr->type != unreachable ? curr->type : none); +} + +void BinaryInstWriter::emitCatch() { + assert(!breakStack.empty()); + breakStack.pop_back(); + breakStack.emplace_back(IMPOSSIBLE_CONTINUE); + o << int8_t(BinaryConsts::Catch); +} + +void BinaryInstWriter::visitThrow(Throw* curr) { + o << int8_t(BinaryConsts::Throw) << U32LEB(parent.getEventIndex(curr->event)); +} + +void BinaryInstWriter::visitRethrow(Rethrow* curr) { + o << int8_t(BinaryConsts::Rethrow); +} + +void BinaryInstWriter::visitBrOnExn(BrOnExn* curr) { + o << int8_t(BinaryConsts::BrOnExn) << U32LEB(getBreakIndex(curr->name)) + << U32LEB(parent.getEventIndex(curr->event)); +} + void BinaryInstWriter::visitNop(Nop* curr) { o << int8_t(BinaryConsts::Nop); } void BinaryInstWriter::visitUnreachable(Unreachable* curr) { @@ -1466,12 +1492,18 @@ void BinaryInstWriter::mapLocalsAndEmitHeader() { mappedLocals[i] = index + currLocalsByType[v128] - 1; continue; } + index += numLocalsByType[v128]; + if (type == exnref) { + mappedLocals[i] = index + currLocalsByType[exnref] - 1; + continue; + } WASM_UNREACHABLE(); } // Emit them. o << U32LEB((numLocalsByType[i32] ? 1 : 0) + (numLocalsByType[i64] ? 1 : 0) + (numLocalsByType[f32] ? 1 : 0) + (numLocalsByType[f64] ? 1 : 0) + - (numLocalsByType[v128] ? 1 : 0)); + (numLocalsByType[v128] ? 1 : 0) + + (numLocalsByType[exnref] ? 1 : 0)); if (numLocalsByType[i32]) { o << U32LEB(numLocalsByType[i32]) << binaryType(i32); } @@ -1487,6 +1519,9 @@ void BinaryInstWriter::mapLocalsAndEmitHeader() { if (numLocalsByType[v128]) { o << U32LEB(numLocalsByType[v128]) << binaryType(v128); } + if (numLocalsByType[exnref]) { + o << U32LEB(numLocalsByType[exnref]) << binaryType(exnref); + } } void BinaryInstWriter::emitMemoryAccess(size_t alignment, @@ -1513,6 +1548,8 @@ void StackIRGenerator::emit(Expression* curr) { stackInst = makeStackInst(StackInst::IfBegin, curr); } else if (curr->is<Loop>()) { stackInst = makeStackInst(StackInst::LoopBegin, curr); + } else if (curr->is<Try>()) { + stackInst = makeStackInst(StackInst::TryBegin, curr); } else { stackInst = makeStackInst(curr); } @@ -1527,6 +1564,8 @@ void StackIRGenerator::emitScopeEnd(Expression* curr) { stackInst = makeStackInst(StackInst::IfEnd, curr); } else if (curr->is<Loop>()) { stackInst = makeStackInst(StackInst::LoopEnd, curr); + } else if (curr->is<Try>()) { + stackInst = makeStackInst(StackInst::TryEnd, curr); } else { WASM_UNREACHABLE(); } @@ -1581,6 +1620,10 @@ void StackIRToBinaryWriter::write() { writer.emitIfElse(); break; } + case StackInst::Catch: { + writer.emitCatch(); + break; + } default: WASM_UNREACHABLE(); } diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 73731d3e5..8eb3341de 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -254,6 +254,7 @@ public: } void noteBreak(Name name, Expression* value, Expression* curr); + void noteBreak(Name name, Type valueType, Expression* curr); void visitBreak(Break* curr); void visitSwitch(Switch* curr); void visitCall(Call* curr); @@ -284,6 +285,10 @@ public: void visitDrop(Drop* curr); void visitReturn(Return* curr); void visitHost(Host* curr); + void visitTry(Try* curr); + void visitThrow(Throw* curr); + void visitRethrow(Rethrow* curr); + void visitBrOnExn(BrOnExn* curr); void visitFunction(Function* curr); // helpers @@ -519,11 +524,15 @@ void FunctionValidator::visitIf(If* curr) { void FunctionValidator::noteBreak(Name name, Expression* value, Expression* curr) { - Type valueType = none; - Index arity = 0; if (value) { - valueType = value->type; - shouldBeUnequal(valueType, none, curr, "breaks must have a valid value"); + shouldBeUnequal(value->type, none, curr, "breaks must have a valid value"); + } + noteBreak(name, value ? value->type : none, curr); +} + +void FunctionValidator::noteBreak(Name name, Type valueType, Expression* curr) { + Index arity = 0; + if (valueType != none) { arity = 1; } auto iter = breakInfos.find(name); @@ -1581,6 +1590,94 @@ void FunctionValidator::visitHost(Host* curr) { } } +void FunctionValidator::visitTry(Try* curr) { + if (curr->type != unreachable) { + shouldBeEqualOrFirstIsUnreachable( + curr->body->type, + curr->type, + curr->body, + "try's type does not match try body's type"); + shouldBeEqualOrFirstIsUnreachable( + curr->catchBody->type, + curr->type, + curr->catchBody, + "try's type does not match catch's body type"); + } + if (isConcreteType(curr->body->type)) { + shouldBeEqualOrFirstIsUnreachable( + curr->catchBody->type, + curr->body->type, + curr->catchBody, + "try's body type must match catch's body type"); + } + if (isConcreteType(curr->catchBody->type)) { + shouldBeEqualOrFirstIsUnreachable( + curr->body->type, + curr->catchBody->type, + curr->body, + "try's body type must match catch's body type"); + } +} + +void FunctionValidator::visitThrow(Throw* curr) { + if (!info.validateGlobally) { + return; + } + shouldBeEqual( + curr->type, unreachable, curr, "throw's type must be unreachable"); + auto* event = getModule()->getEventOrNull(curr->event); + if (!shouldBeTrue(!!event, curr, "throw's event must exist")) { + return; + } + if (!shouldBeTrue(curr->operands.size() == event->params.size(), + curr, + "event's param numbers must match")) { + return; + } + for (size_t i = 0; i < curr->operands.size(); i++) { + if (!shouldBeEqualOrFirstIsUnreachable(curr->operands[i]->type, + event->params[i], + curr->operands[i], + "event param types must match") && + !info.quiet) { + getStream() << "(on argument " << i << ")\n"; + } + } +} + +void FunctionValidator::visitRethrow(Rethrow* curr) { + shouldBeEqual( + curr->type, unreachable, curr, "rethrow's type must be unreachable"); + shouldBeEqual(curr->exnref->type, + exnref, + curr->exnref, + "rethrow's argument must be exnref type"); +} + +void FunctionValidator::visitBrOnExn(BrOnExn* curr) { + Event* event = getModule()->getEventOrNull(curr->event); + shouldBeTrue(event != nullptr, curr, "br_on_exn's event must exist"); + shouldBeTrue(event->params == curr->eventParams, + curr, + "br_on_exn's event params and event's params are different"); + noteBreak(curr->name, curr->getSingleSentType(), curr); + shouldBeTrue(curr->exnref->type == unreachable || + curr->exnref->type == exnref, + curr, + "br_on_exn's argument must be unreachable or exnref type"); + if (curr->exnref->type == unreachable) { + shouldBeTrue(curr->type == unreachable, + curr, + "If exnref argument's type is unreachable, br_on_exn should " + "be unreachable too"); + } else { + shouldBeTrue(curr->type == exnref, + curr, + "br_on_exn's type should be exnref unless its exnref argument " + "is unreachable"); + } +} + void FunctionValidator::visitFunction(Function* curr) { FeatureSet typeFeatures = getFeatures(curr->result); for (auto type : curr->params) { diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 04abbcd9f..97b60bfb5 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -168,6 +168,14 @@ const char* getExpressionName(Expression* curr) { return "push"; case Expression::Id::PopId: return "pop"; + case Expression::TryId: + return "try"; + case Expression::ThrowId: + return "throw"; + case Expression::RethrowId: + return "rethrow"; + case Expression::BrOnExnId: + return "br_on_exn"; case Expression::Id::NumExpressionIds: WASM_UNREACHABLE(); } @@ -204,6 +212,12 @@ struct TypeSeeker : public PostWalker<TypeSeeker> { } } + void visitBrOnExn(BrOnExn* curr) { + if (curr->name == targetName) { + types.push_back(curr->getSingleSentType()); + } + } + void visitBlock(Block* curr) { if (curr == target) { if (curr->list.size() > 0) { @@ -836,6 +850,48 @@ void Host::finalize() { } } +void Try::finalize() { + if (body->type == catchBody->type) { + type = body->type; + } else if (isConcreteType(body->type) && catchBody->type == unreachable) { + type = body->type; + } else if (isConcreteType(catchBody->type) && body->type == unreachable) { + type = catchBody->type; + } else { + type = none; + } +} + +void Try::finalize(Type type_) { + type = type_; + if (type == none && body->type == unreachable && + catchBody->type == unreachable) { + type = unreachable; + } +} + +void Throw::finalize() { type = unreachable; } + +void Rethrow::finalize() { type = unreachable; } + +void BrOnExn::finalize() { + if (exnref->type == unreachable) { + type = unreachable; + } else { + type = Type::exnref; + } +} + +// br_on_exn's type is exnref, which it pushes onto the stack when it is not +// taken, but the type of the value it pushes onto the stack when it is taken +// should be the event type. So this is the type we 'send' to the block end when +// it is taken. Currently we don't support multi value return from a block, we +// pick the type of the first param from the event. +// TODO Remove this function and generalize event type after multi-value support +Type BrOnExn::getSingleSentType() { + return eventParams.empty() ? none : eventParams.front(); +} + void Push::finalize() { if (value->type == unreachable) { type = unreachable; diff --git a/src/wasm2js.h b/src/wasm2js.h index e032ac26d..25c51f490 100644 --- a/src/wasm2js.h +++ b/src/wasm2js.h @@ -1872,6 +1872,22 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m, unimplemented(curr); WASM_UNREACHABLE(); } + Ref visitTry(Try* curr) { + unimplemented(curr); + WASM_UNREACHABLE(); + } + Ref visitThrow(Throw* curr) { + unimplemented(curr); + WASM_UNREACHABLE(); + } + Ref visitRethrow(Rethrow* curr) { + unimplemented(curr); + WASM_UNREACHABLE(); + } + Ref visitBrOnExn(BrOnExn* curr) { + unimplemented(curr); + WASM_UNREACHABLE(); + } Ref visitPush(Push* curr) { unimplemented(curr); WASM_UNREACHABLE(); diff --git a/test/binaryen.js/exception-handling.js b/test/binaryen.js/exception-handling.js new file mode 100644 index 000000000..adf67d2fa --- /dev/null +++ b/test/binaryen.js/exception-handling.js @@ -0,0 +1,61 @@ +function assert(x) { + if (!x) throw 'error!'; +} + +function cleanInfo(info) { + var ret = {}; + for (var x in info) { + if (x == 'id' || x == 'type' || x == 'name' || x == 'event') { + ret[x] = info[x]; + } + } + return ret; +} + +function stringify(expr) { + return JSON.stringify(cleanInfo(Binaryen.getExpressionInfo(expr))); +} + +var module = new Binaryen.Module(); +module.setFeatures(Binaryen.Features.ExceptionHandling); + +var v = module.addFunctionType("v", Binaryen.none, []); +var vi = module.addFunctionType("vi", Binaryen.none, [Binaryen.i32]); +var event_ = module.addEvent("e", 0, vi); + +// (try +// (throw $e (i32.const 0)) +// (catch +// ;; We don't support multi-value yet. Use locals instead. +// (local.set 0 (exnref.pop)) +// (drop +// (block $l (result i32) +// (rethrow +// (br_on_exn $l $e (local.get 0)) +// ) +// ) +// ) +// ) +// ) +var throw_ = module.throw("e", [module.i32.const(0)]); +var br_on_exn = module.br_on_exn("l", "e", module.local.get(0, Binaryen.exnref)); +var rethrow = module.rethrow(br_on_exn); +var try_ = module.try( + throw_, + module.block(null, [ + module.local.set(0, module.exnref.pop()), + module.drop( + module.block("l", [rethrow], Binaryen.i32) + ) + ] + ) +); +var func = module.addFunction("test", v, [Binaryen.exnref], try_); + +console.log(module.emitText()); +assert(module.validate()); + +console.log("getExpressionInfo(throw) = " + stringify(throw_)); +console.log("getExpressionInfo(br_on_exn) = " + stringify(br_on_exn)); +console.log("getExpressionInfo(rethrow) = " + stringify(rethrow)); +console.log("getExpressionInfo(try) = " + stringify(try_)); diff --git a/test/binaryen.js/exception-handling.js.txt b/test/binaryen.js/exception-handling.js.txt new file mode 100644 index 000000000..902ac55e6 --- /dev/null +++ b/test/binaryen.js/exception-handling.js.txt @@ -0,0 +1,32 @@ +(module + (type $v (func)) + (type $vi (func (param i32))) + (event $e (attr 0) (param i32)) + (func $test (; 0 ;) (type $v) + (local $0 exnref) + (try + (throw $e + (i32.const 0) + ) + (catch + (local.set $0 + (exnref.pop) + ) + (drop + (block $l (result i32) + (rethrow + (br_on_exn $l $e + (local.get $0) + ) + ) + ) + ) + ) + ) + ) +) + +getExpressionInfo(throw) = {"id":39,"type":7,"event":"e"} +getExpressionInfo(br_on_exn) = {"id":41,"type":6,"name":"l","event":"e"} +getExpressionInfo(rethrow) = {"id":40,"type":7} +getExpressionInfo(try) = {"id":38,"type":0} diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js index 1fde6222e..163fe8839 100644 --- a/test/binaryen.js/kitchen-sink.js +++ b/test/binaryen.js/kitchen-sink.js @@ -111,6 +111,10 @@ function test_ids() { console.log("DataDropId: " + Binaryen.DataDropId); console.log("MemoryCopyId: " + Binaryen.MemoryCopyId); console.log("MemoryFillId: " + Binaryen.MemoryFillId); + console.log("TryId: " + Binaryen.TryId); + console.log("ThrowId: " + Binaryen.ThrowId); + console.log("RethrowId: " + Binaryen.RethrowId); + console.log("BrOnExnId: " + Binaryen.BrOnExnId); console.log("PushId: " + Binaryen.PushId); console.log("PopId: " + Binaryen.PopId); } @@ -121,6 +125,10 @@ function test_core() { module = new Binaryen.Module(); + // Create an event + var vi = module.addFunctionType("vi", Binaryen.none, [Binaryen.i32]); + var event_ = module.addEvent("a-event", 0, vi); + // Literals and consts var constI32 = module.i32.const(1), @@ -401,6 +409,24 @@ function test_core() { // Tail Call module.returnCall("kitchen()sinker", [ makeInt32(13), makeInt64(37, 0), makeFloat32(1.3), makeFloat64(3.7) ], Binaryen.i32), module.returnCallIndirect(makeInt32(2449), [ makeInt32(13), makeInt64(37, 0), makeFloat32(1.3), makeFloat64(3.7) ], "iiIfF"), + + // Exception handling + module.try( + module.throw("a-event", [module.i32.const(0)]), + module.block(null, [ + module.local.set(5, module.exnref.pop()), + module.drop( + module.block("try-block", [ + module.rethrow( + module.br_on_exn("try-block", "a-event", + module.local.get(5, Binaryen.exnref)), + ) + ], Binaryen.i32) + ) + ] + ) + ), + // Push and pop module.push(module.i32.pop()), module.push(module.i64.pop()), @@ -429,16 +455,12 @@ function test_core() { var body = module.block("the-body", [ nothing, makeInt32(42) ]); // Create the function - var sinker = module.addFunction("kitchen()sinker", iiIfF, [ Binaryen.i32 ], body); + var sinker = module.addFunction("kitchen()sinker", iiIfF, [ Binaryen.i32, Binaryen.exnref ], body); // Create a global var initExpr = module.i32.const(1); var global = module.addGlobal("a-global", Binaryen.i32, false, initExpr) - // Create an event - var vi = module.addFunctionType("vi", Binaryen.none, [Binaryen.i32]); - var event_ = module.addEvent("a-event", 0, vi); - // Imports var fiF = module.addFunctionType("fiF", Binaryen.f32, [ Binaryen.i32, Binaryen.f64 ]); @@ -487,6 +509,7 @@ function test_core() { var features = Binaryen.Features.All; module.setFeatures(features); assert(module.getFeatures() == features); + console.log(module.emitText()); // Verify it validates assert(module.validate()); diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt index 2dd418806..a1baa5951 100644 --- a/test/binaryen.js/kitchen-sink.js.txt +++ b/test/binaryen.js/kitchen-sink.js.txt @@ -52,6 +52,10 @@ MemoryInitId: 32 DataDropId: 33 MemoryCopyId: 34 MemoryFillId: 35 +TryId: 38 +ThrowId: 39 +RethrowId: 40 +BrOnExnId: 41 PushId: 36 PopId: 37 getExpressionInfo={"id":15,"type":3,"op":6} @@ -64,8 +68,1427 @@ getExpressionInfo(i64.const)={"id":14,"type":2,"value":{"low":6,"high":7}} getExpressionInfo(f32.const)={"id":14,"type":3,"value":8.5} getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} (module + (type $vi (func (param i32))) (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) + (type $fiF (func (param i32 f64) (result f32))) + (type $v (func)) + (type $4 (func)) + (import "module" "base" (global $a-global-imp i32)) + (import "module" "base" (func $an-imported (param i32 f64) (result f32))) + (import "module" "base" (event $a-event-imp (attr 0) (param i32))) + (memory $0 1 256) + (data (i32.const 10) "hello, world") + (data passive "I am passive") + (table $0 1 funcref) + (elem (i32.const 0) "$kitchen()sinker") + (global $a-global i32 (i32.const 1)) + (event $a-event (attr 0) (param i32)) + (export "kitchen_sinker" (func "$kitchen()sinker")) + (export "a-global-exp" (global $a-global)) + (export "a-event-exp" (event $a-event)) + (export "mem" (memory $0)) + (start $starter) + (func "$kitchen()sinker" (; 1 ;) (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) + (local $4 i32) + (local $5 exnref) + (block $the-body (result i32) + (block $the-nothing + (drop + (block $the-value (result i32) + (drop + (i32.clz + (i32.const -10) + ) + ) + (drop + (i64.ctz + (i64.const -22) + ) + ) + (drop + (i32.popcnt + (i32.const -10) + ) + ) + (drop + (f32.neg + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.abs + (f64.const -9005.841) + ) + ) + (drop + (f32.ceil + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.floor + (f64.const -9005.841) + ) + ) + (drop + (f32.trunc + (f32.const -33.61199951171875) + ) + ) + (drop + (f32.nearest + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.sqrt + (f64.const -9005.841) + ) + ) + (drop + (i32.eqz + (i32.const -10) + ) + ) + (drop + (i64.extend_i32_s + (i32.const -10) + ) + ) + (drop + (i64.extend_i32_u + (i32.const -10) + ) + ) + (drop + (i32.wrap_i64 + (i64.const -22) + ) + ) + (drop + (i32.trunc_f32_s + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_f32_s + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_f32_u + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_f32_u + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_f64_s + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_f64_s + (f64.const -9005.841) + ) + ) + (drop + (i32.trunc_f64_u + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_f64_u + (f64.const -9005.841) + ) + ) + (drop + (i32.trunc_sat_f32_s + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_sat_f32_s + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_sat_f32_u + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_sat_f32_u + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_sat_f64_s + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_sat_f64_s + (f64.const -9005.841) + ) + ) + (drop + (i32.trunc_sat_f64_u + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_sat_f64_u + (f64.const -9005.841) + ) + ) + (drop + (i32.reinterpret_f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.reinterpret_f64 + (f64.const -9005.841) + ) + ) + (drop + (f32.convert_i32_s + (i32.const -10) + ) + ) + (drop + (f64.convert_i32_s + (i32.const -10) + ) + ) + (drop + (f32.convert_i32_u + (i32.const -10) + ) + ) + (drop + (f64.convert_i32_u + (i32.const -10) + ) + ) + (drop + (f32.convert_i64_s + (i64.const -22) + ) + ) + (drop + (f64.convert_i64_s + (i64.const -22) + ) + ) + (drop + (f32.convert_i64_u + (i64.const -22) + ) + ) + (drop + (f64.convert_i64_u + (i64.const -22) + ) + ) + (drop + (f64.promote_f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (f32.demote_f64 + (f64.const -9005.841) + ) + ) + (drop + (f32.reinterpret_i32 + (i32.const -10) + ) + ) + (drop + (f64.reinterpret_i64 + (i64.const -22) + ) + ) + (drop + (i8x16.splat + (i32.const 42) + ) + ) + (drop + (i16x8.splat + (i32.const 42) + ) + ) + (drop + (i32x4.splat + (i32.const 42) + ) + ) + (drop + (i64x2.splat + (i64.const 1958505087099) + ) + ) + (drop + (f32x4.splat + (f32.const 42) + ) + ) + (drop + (f64x2.splat + (f64.const 42) + ) + ) + (drop + (v128.not + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.any_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.all_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.any_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.all_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.any_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.all_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.any_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.all_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.abs + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.sqrt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.abs + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.sqrt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.trunc_sat_f32x4_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.trunc_sat_f32x4_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.trunc_sat_f64x2_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.trunc_sat_f64x2_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.convert_i32x4_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.convert_i32x4_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.convert_i64x2_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.convert_i64x2_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32.add + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (f64.sub + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (i32.div_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.div_u + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i64.rem_s + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i32.rem_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.and + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.or + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i32.xor + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.shl + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i64.shr_u + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i32.shr_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.rotl + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.rotr + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (f32.div + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.copysign + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f32.min + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.max + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (i32.eq + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (f32.ne + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (i32.lt_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.lt_u + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i64.le_s + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i32.le_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.gt_s + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i32.gt_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.ge_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.ge_u + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (f32.lt + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.le + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f64.gt + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f32.ge + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (i8x16.eq + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.ne + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.lt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.lt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.gt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.gt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.le_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.le_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.ge_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.ge_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.eq + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.ne + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.lt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.lt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.gt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.gt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.le_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.le_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.ge_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.ge_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.eq + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.ne + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.lt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.lt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.gt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.gt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.le_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.le_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.ge_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.ge_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.eq + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.ne + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.lt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.gt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.le + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.ge + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.ge + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.ne + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.lt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.gt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.le + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.ge + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + ( + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ( + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ( + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + (drop + (i8x16.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.add_saturate_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.add_saturate_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.sub_saturate_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.sub_saturate_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.mul + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.add_saturate_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.add_saturate_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.sub_saturate_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.sub_saturate_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.mul + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.mul + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.mul + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.div + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.min + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.max + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.mul + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.div + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.min + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.max + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.extract_lane_s 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.extract_lane_u 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.extract_lane_s 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.extract_lane_u 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.extract_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.extract_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.extract_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.extract_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 42) + ) + ) + (drop + (i8x16.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 42) + ) + ) + (drop + (i32x4.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 42) + ) + ) + (drop + (i64x2.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i64.const 184683593770) + ) + ) + (drop + (f32x4.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (f32.const 42) + ) + ) + (drop + (f64x2.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (f64.const 42) + ) + ) + (drop + (i8x16.shl + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i8x16.shr_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i8x16.shr_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i16x8.shl + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i16x8.shr_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i16x8.shr_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i32x4.shl + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i32x4.shr_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i32x4.shr_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i64x2.shl + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i64x2.shr_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i64x2.shr_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (v8x16.shuffle 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (v128.bitselect + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (memory.init 0 + (i32.const 1024) + (i32.const 0) + (i32.const 12) + ) + (data.drop 0) + (memory.copy + (i32.const 2048) + (i32.const 1024) + (i32.const 12) + ) + (memory.fill + (i32.const 0) + (i32.const 42) + (i32.const 1024) + ) + (block + ) + (if + (i32.const 1) + (drop + (i32.const 2) + ) + (drop + (i32.const 3) + ) + ) + (if + (i32.const 4) + (drop + (i32.const 5) + ) + ) + (drop + (loop $in (result i32) + (i32.const 0) + ) + ) + (drop + (loop (result i32) + (i32.const 0) + ) + ) + (drop + (br_if $the-value + (i32.const 1) + (i32.const 0) + ) + ) + (br_if $the-nothing + (i32.const 2) + ) + (br $the-value + (i32.const 3) + ) + (br $the-nothing) + (br_table $the-value $the-value + (i32.const 1) + (i32.const 0) + ) + (br_table $the-nothing $the-nothing + (i32.const 2) + ) + (drop + (i32.eqz + (call "$kitchen()sinker" + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + ) + ) + ) + (drop + (i32.eqz + (i32.trunc_f32_s + (call $an-imported + (i32.const 13) + (f64.const 3.7) + ) + ) + ) + ) + (drop + (i32.eqz + (call_indirect (type $iiIfF) + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + (i32.const 2449) + ) + ) + ) + (drop + (local.get $0) + ) + (local.set $0 + (i32.const 101) + ) + (drop + (local.tee $0 + (i32.const 102) + ) + ) + (drop + (i32.load + (i32.const 1) + ) + ) + (drop + (i64.load16_s offset=2 align=1 + (i32.const 8) + ) + ) + (drop + (f32.load + (i32.const 2) + ) + ) + (drop + (f64.load offset=2 + (i32.const 9) + ) + ) + (i32.store + (i32.const 10) + (i32.const 11) + ) + (i64.store offset=2 align=4 + (i32.const 110) + (i64.const 111) + ) + (drop + (select + (i32.const 3) + (i32.const 5) + (i32.const 1) + ) + ) + (return + (i32.const 1337) + ) + (return_call "$kitchen()sinker" + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + ) + (return_call_indirect (type $iiIfF) + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + (i32.const 2449) + ) + (try + (throw $a-event + (i32.const 0) + ) + (catch + (local.set $5 + (exnref.pop) + ) + (drop + (block $try-block (result i32) + (rethrow + (br_on_exn $try-block $a-event + (local.get $5) + ) + ) + ) + ) + ) + ) + (push + (i32.pop) + ) + (push + (i64.pop) + ) + (push + (f32.pop) + ) + (push + (f64.pop) + ) + (push + (v128.pop) + ) + (push + (exnref.pop) + ) + (nop) + (unreachable) + ) + ) + ) + (i32.const 42) + ) + ) + (func $starter (; 2 ;) (type $v) + (nop) + ) +) + +(module (type $vi (func (param i32))) + (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) (type $fiF (func (param i32 f64) (result f32))) (type $v (func)) (type $4 (func)) @@ -86,6 +1509,7 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} (start $starter) (func "$kitchen()sinker" (; 1 ;) (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) (local $4 i32) + (local $5 exnref) (block $the-body (result i32) (block $the-nothing (drop @@ -1431,6 +2855,25 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} (f64.const 3.7) (i32.const 2449) ) + (try + (throw $a-event + (i32.const 0) + ) + (catch + (local.set $5 + (exnref.pop) + ) + (drop + (block $try-block (result i32) + (rethrow + (br_on_exn $try-block $a-event + (local.get $5) + ) + ) + ) + ) + ) + ) (push (i32.pop) ) @@ -1990,6 +3433,11 @@ int main() { RelooperRef the_relooper = NULL; the_module = BinaryenModuleCreate(); expressions[size_t(NULL)] = BinaryenExpressionRef(NULL); + { + BinaryenType paramTypes[] = { 1 }; + functionTypes[0] = BinaryenAddFunctionType(the_module, "vi", 0, paramTypes, 1); + } + BinaryenAddEvent(the_module, "a-event", 0, functionTypes[0]); expressions[1] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); expressions[2] = BinaryenConst(the_module, BinaryenLiteralInt64(2)); expressions[3] = BinaryenConst(the_module, BinaryenLiteralFloat32(3.14)); @@ -1998,7 +3446,7 @@ int main() { expressions[6] = BinaryenConst(the_module, BinaryenLiteralFloat64(NAN)); { BinaryenType paramTypes[] = { 1, 2, 3, 4 }; - functionTypes[0] = BinaryenAddFunctionType(the_module, "iiIfF", 1, paramTypes, 4); + functionTypes[1] = BinaryenAddFunctionType(the_module, "iiIfF", 1, paramTypes, 4); } expressions[7] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); expressions[8] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); @@ -3306,20 +4754,40 @@ int main() { BinaryenExpressionRef operands[] = { expressions[651], expressions[652], expressions[653], expressions[654] }; expressions[655] = BinaryenReturnCallIndirect(the_module, expressions[650], operands, 4, "iiIfF"); } - expressions[656] = BinaryenPop(the_module, 1); - expressions[657] = BinaryenPush(the_module, expressions[656]); - expressions[658] = BinaryenPop(the_module, 2); - expressions[659] = BinaryenPush(the_module, expressions[658]); - expressions[660] = BinaryenPop(the_module, 3); - expressions[661] = BinaryenPush(the_module, expressions[660]); - expressions[662] = BinaryenPop(the_module, 4); - expressions[663] = BinaryenPush(the_module, expressions[662]); - expressions[664] = BinaryenPop(the_module, 5); - expressions[665] = BinaryenPush(the_module, expressions[664]); - expressions[666] = BinaryenPop(the_module, 6); - expressions[667] = BinaryenPush(the_module, expressions[666]); - expressions[668] = BinaryenNop(the_module); - expressions[669] = BinaryenUnreachable(the_module); + expressions[656] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[656] }; + expressions[657] = BinaryenThrow(the_module, "a-event", operands, 1); + } + expressions[658] = BinaryenPop(the_module, 6); + expressions[659] = BinaryenLocalSet(the_module, 5, expressions[658]); + expressions[660] = BinaryenLocalGet(the_module, 5, 6); + expressions[661] = BinaryenBrOnExn(the_module, "try-block", "a-event", expressions[660]); + expressions[662] = BinaryenRethrow(the_module, expressions[661]); + { + BinaryenExpressionRef children[] = { expressions[662] }; + expressions[663] = BinaryenBlock(the_module, "try-block", children, 1, 1); + } + expressions[664] = BinaryenDrop(the_module, expressions[663]); + { + BinaryenExpressionRef children[] = { expressions[659], expressions[664] }; + expressions[665] = BinaryenBlock(the_module, NULL, children, 2, 0); + } + expressions[666] = BinaryenTry(the_module, expressions[657], expressions[665]); + expressions[667] = BinaryenPop(the_module, 1); + expressions[668] = BinaryenPush(the_module, expressions[667]); + expressions[669] = BinaryenPop(the_module, 2); + expressions[670] = BinaryenPush(the_module, expressions[669]); + expressions[671] = BinaryenPop(the_module, 3); + expressions[672] = BinaryenPush(the_module, expressions[671]); + expressions[673] = BinaryenPop(the_module, 4); + expressions[674] = BinaryenPush(the_module, expressions[673]); + expressions[675] = BinaryenPop(the_module, 5); + expressions[676] = BinaryenPush(the_module, expressions[675]); + expressions[677] = BinaryenPop(the_module, 6); + expressions[678] = BinaryenPush(the_module, expressions[677]); + expressions[679] = BinaryenNop(the_module); + expressions[680] = BinaryenUnreachable(the_module); BinaryenExpressionGetId(expressions[30]); BinaryenExpressionGetType(expressions[30]); BinaryenUnaryGetOp(expressions[30]); @@ -3330,26 +4798,26 @@ getExpressionInfo={"id":15,"type":3,"op":6} (f32.const -33.61199951171875) ) - expressions[670] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); - BinaryenExpressionGetId(expressions[670]); - BinaryenExpressionGetType(expressions[670]); - BinaryenConstGetValueI32(expressions[670]); + expressions[681] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); + BinaryenExpressionGetId(expressions[681]); + BinaryenExpressionGetType(expressions[681]); + BinaryenConstGetValueI32(expressions[681]); getExpressionInfo(i32.const)={"id":14,"type":1,"value":5} - expressions[671] = BinaryenConst(the_module, BinaryenLiteralInt64(30064771078)); - BinaryenExpressionGetId(expressions[671]); - BinaryenExpressionGetType(expressions[671]); - BinaryenConstGetValueI64Low(expressions[671]); - BinaryenConstGetValueI64High(expressions[671]); + expressions[682] = BinaryenConst(the_module, BinaryenLiteralInt64(30064771078)); + BinaryenExpressionGetId(expressions[682]); + BinaryenExpressionGetType(expressions[682]); + BinaryenConstGetValueI64Low(expressions[682]); + BinaryenConstGetValueI64High(expressions[682]); getExpressionInfo(i64.const)={"id":14,"type":2,"value":{"low":6,"high":7}} - expressions[672] = BinaryenConst(the_module, BinaryenLiteralFloat32(8.5)); - BinaryenExpressionGetId(expressions[672]); - BinaryenExpressionGetType(expressions[672]); - BinaryenConstGetValueF32(expressions[672]); + expressions[683] = BinaryenConst(the_module, BinaryenLiteralFloat32(8.5)); + BinaryenExpressionGetId(expressions[683]); + BinaryenExpressionGetType(expressions[683]); + BinaryenConstGetValueF32(expressions[683]); getExpressionInfo(f32.const)={"id":14,"type":3,"value":8.5} - expressions[673] = BinaryenConst(the_module, BinaryenLiteralFloat64(9.5)); - BinaryenExpressionGetId(expressions[673]); - BinaryenExpressionGetType(expressions[673]); - BinaryenConstGetValueF64(expressions[673]); + expressions[684] = BinaryenConst(the_module, BinaryenLiteralFloat64(9.5)); + BinaryenExpressionGetId(expressions[684]); + BinaryenExpressionGetType(expressions[684]); + BinaryenConstGetValueF64(expressions[684]); getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} { BinaryenExpressionRef children[] = { expressions[24], expressions[26], expressions[28], expressions[30], expressions[32], @@ -3392,39 +4860,34 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} expressions[597], expressions[598], expressions[600], expressions[602], expressions[603], expressions[604], expressions[606], expressions[612], expressions[617], expressions[624], expressions[626], expressions[628], expressions[631], expressions[633], expressions[635], expressions[637], expressions[639], expressions[640], - expressions[641], expressions[642], expressions[644], expressions[649], expressions[655], expressions[657], - expressions[659], expressions[661], expressions[663], expressions[665], expressions[667], expressions[668], - expressions[669] }; - expressions[674] = BinaryenBlock(the_module, "the-value", children, 252, 0); + expressions[641], expressions[642], expressions[644], expressions[649], expressions[655], expressions[666], + expressions[668], expressions[670], expressions[672], expressions[674], expressions[676], expressions[678], + expressions[679], expressions[680] }; + expressions[685] = BinaryenBlock(the_module, "the-value", children, 253, 0); } - expressions[675] = BinaryenDrop(the_module, expressions[674]); + expressions[686] = BinaryenDrop(the_module, expressions[685]); { - BinaryenExpressionRef children[] = { expressions[675] }; - expressions[676] = BinaryenBlock(the_module, "the-nothing", children, 1, 0); + BinaryenExpressionRef children[] = { expressions[686] }; + expressions[687] = BinaryenBlock(the_module, "the-nothing", children, 1, 0); } - expressions[677] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[688] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); { - BinaryenExpressionRef children[] = { expressions[676], expressions[677] }; - expressions[678] = BinaryenBlock(the_module, "the-body", children, 2, 0); + BinaryenExpressionRef children[] = { expressions[687], expressions[688] }; + expressions[689] = BinaryenBlock(the_module, "the-body", children, 2, 0); } { - BinaryenType varTypes[] = { 1 }; - functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 1, expressions[678]); + BinaryenType varTypes[] = { 1, 6 }; + functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[1], varTypes, 2, expressions[689]); } - expressions[679] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - globals[0] = BinaryenAddGlobal(the_module, "a-global", 1, 0, expressions[679]); - { - BinaryenType paramTypes[] = { 1 }; - functionTypes[1] = BinaryenAddFunctionType(the_module, "vi", 0, paramTypes, 1); - } - BinaryenAddEvent(the_module, "a-event", 0, functionTypes[1]); + expressions[690] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + globals[0] = BinaryenAddGlobal(the_module, "a-global", 1, 0, expressions[690]); { BinaryenType paramTypes[] = { 1, 4 }; functionTypes[2] = BinaryenAddFunctionType(the_module, "fiF", 3, paramTypes, 2); } BinaryenAddFunctionImport(the_module, "an-imported", "module", "base", functionTypes[2]); BinaryenAddGlobalImport(the_module, "a-global-imp", "module", "base", 1); - BinaryenAddEventImport(the_module, "a-event-imp", "module", "base", 0, functionTypes[1]); + BinaryenAddEventImport(the_module, "a-event-imp", "module", "base", 0, functionTypes[0]); exports[0] = BinaryenAddFunctionExport(the_module, "kitchen()sinker", "kitchen_sinker"); exports[1] = BinaryenAddGlobalExport(the_module, "a-global", "a-global-exp"); exports[2] = BinaryenAddEventExport(the_module, "a-event", "a-event-exp"); @@ -3440,18 +4903,19 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} BinaryenFunctionGetResult(functions[0]); BinaryenFunctionGetNumVars(functions[0]); BinaryenFunctionGetVar(functions[0], 0); + BinaryenFunctionGetVar(functions[0], 1); BinaryenFunctionGetBody(functions[0]); { const char* funcNames[] = { "kitchen()sinker" }; BinaryenSetFunctionTable(the_module, 1, 4294967295, funcNames, 1); } - expressions[680] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + expressions[691] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); { const char segment0[] = { 104, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100 }; const char segment1[] = { 73, 32, 97, 109, 32, 112, 97, 115, 115, 105, 118, 101 }; const char* segments[] = { segment0, segment1 }; int8_t segmentPassive[] = { 0, 1 }; - BinaryenExpressionRef segmentOffsets[] = { expressions[680], expressions[0] }; + BinaryenExpressionRef segmentOffsets[] = { expressions[691], expressions[0] }; BinaryenIndex segmentSizes[] = { 12, 12 }; BinaryenSetMemory(the_module, 1, 256, "mem", segments, segmentPassive, segmentOffsets, segmentSizes, 2, 0); } @@ -3459,10 +4923,10 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} BinaryenType paramTypes[] = { 0 }; functionTypes[3] = BinaryenAddFunctionType(the_module, "v", 0, paramTypes, 0); } - expressions[681] = BinaryenNop(the_module); + expressions[692] = BinaryenNop(the_module); { BinaryenType varTypes[] = { 0 }; - functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[3], varTypes, 0, expressions[681]); + functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[3], varTypes, 0, expressions[692]); } BinaryenSetStart(the_module, functions[1]); { @@ -3472,11 +4936,1431 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} BinaryenModuleAutoDrop(the_module); BinaryenModuleSetFeatures(the_module, 255); BinaryenModuleGetFeatures(the_module); - BinaryenModuleValidate(the_module); BinaryenModulePrint(the_module); (module + (type $vi (func (param i32))) (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) + (type $fiF (func (param i32 f64) (result f32))) + (type $v (func)) + (type $4 (func)) + (import "module" "base" (global $a-global-imp i32)) + (import "module" "base" (func $an-imported (param i32 f64) (result f32))) + (import "module" "base" (event $a-event-imp (attr 0) (param i32))) + (memory $0 1 256) + (data (i32.const 10) "hello, world") + (data passive "I am passive") + (table $0 1 funcref) + (elem (i32.const 0) "$kitchen()sinker") + (global $a-global i32 (i32.const 1)) + (event $a-event (attr 0) (param i32)) + (export "kitchen_sinker" (func "$kitchen()sinker")) + (export "a-global-exp" (global $a-global)) + (export "a-event-exp" (event $a-event)) + (export "mem" (memory $0)) + (start $starter) + (func "$kitchen()sinker" (; 1 ;) (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) + (local $4 i32) + (local $5 exnref) + (block $the-body (result i32) + (block $the-nothing + (drop + (block $the-value (result i32) + (drop + (i32.clz + (i32.const -10) + ) + ) + (drop + (i64.ctz + (i64.const -22) + ) + ) + (drop + (i32.popcnt + (i32.const -10) + ) + ) + (drop + (f32.neg + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.abs + (f64.const -9005.841) + ) + ) + (drop + (f32.ceil + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.floor + (f64.const -9005.841) + ) + ) + (drop + (f32.trunc + (f32.const -33.61199951171875) + ) + ) + (drop + (f32.nearest + (f32.const -33.61199951171875) + ) + ) + (drop + (f64.sqrt + (f64.const -9005.841) + ) + ) + (drop + (i32.eqz + (i32.const -10) + ) + ) + (drop + (i64.extend_i32_s + (i32.const -10) + ) + ) + (drop + (i64.extend_i32_u + (i32.const -10) + ) + ) + (drop + (i32.wrap_i64 + (i64.const -22) + ) + ) + (drop + (i32.trunc_f32_s + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_f32_s + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_f32_u + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_f32_u + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_f64_s + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_f64_s + (f64.const -9005.841) + ) + ) + (drop + (i32.trunc_f64_u + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_f64_u + (f64.const -9005.841) + ) + ) + (drop + (i32.trunc_sat_f32_s + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_sat_f32_s + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_sat_f32_u + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.trunc_sat_f32_u + (f32.const -33.61199951171875) + ) + ) + (drop + (i32.trunc_sat_f64_s + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_sat_f64_s + (f64.const -9005.841) + ) + ) + (drop + (i32.trunc_sat_f64_u + (f64.const -9005.841) + ) + ) + (drop + (i64.trunc_sat_f64_u + (f64.const -9005.841) + ) + ) + (drop + (i32.reinterpret_f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (i64.reinterpret_f64 + (f64.const -9005.841) + ) + ) + (drop + (f32.convert_i32_s + (i32.const -10) + ) + ) + (drop + (f64.convert_i32_s + (i32.const -10) + ) + ) + (drop + (f32.convert_i32_u + (i32.const -10) + ) + ) + (drop + (f64.convert_i32_u + (i32.const -10) + ) + ) + (drop + (f32.convert_i64_s + (i64.const -22) + ) + ) + (drop + (f64.convert_i64_s + (i64.const -22) + ) + ) + (drop + (f32.convert_i64_u + (i64.const -22) + ) + ) + (drop + (f64.convert_i64_u + (i64.const -22) + ) + ) + (drop + (f64.promote_f32 + (f32.const -33.61199951171875) + ) + ) + (drop + (f32.demote_f64 + (f64.const -9005.841) + ) + ) + (drop + (f32.reinterpret_i32 + (i32.const -10) + ) + ) + (drop + (f64.reinterpret_i64 + (i64.const -22) + ) + ) + (drop + (i8x16.splat + (i32.const 42) + ) + ) + (drop + (i16x8.splat + (i32.const 42) + ) + ) + (drop + (i32x4.splat + (i32.const 42) + ) + ) + (drop + (i64x2.splat + (i64.const 1958505087099) + ) + ) + (drop + (f32x4.splat + (f32.const 42) + ) + ) + (drop + (f64x2.splat + (f64.const 42) + ) + ) + (drop + (v128.not + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.any_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.all_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.any_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.all_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.any_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.all_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.any_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.all_true + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.abs + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.sqrt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.abs + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.neg + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.sqrt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.trunc_sat_f32x4_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.trunc_sat_f32x4_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.trunc_sat_f64x2_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.trunc_sat_f64x2_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.convert_i32x4_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.convert_i32x4_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.convert_i64x2_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.convert_i64x2_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32.add + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (f64.sub + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (i32.div_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.div_u + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i64.rem_s + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i32.rem_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.and + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.or + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i32.xor + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.shl + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i64.shr_u + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i32.shr_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.rotl + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.rotr + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (f32.div + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.copysign + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f32.min + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.max + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (i32.eq + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (f32.ne + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (i32.lt_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.lt_u + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i64.le_s + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i32.le_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.gt_s + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (i32.gt_u + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i32.ge_s + (i32.const -10) + (i32.const -11) + ) + ) + (drop + (i64.ge_u + (i64.const 4294967274) + (i64.const 4294967273) + ) + ) + (drop + (f32.lt + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (f64.le + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f64.gt + (f64.const -9005.841) + (f64.const -9007.333) + ) + ) + (drop + (f32.ge + (f32.const -33.61199951171875) + (f32.const -62.5) + ) + ) + (drop + (i8x16.eq + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.ne + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.lt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.lt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.gt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.gt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.le_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.le_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.ge_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.ge_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.eq + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.ne + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.lt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.lt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.gt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.gt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.le_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.le_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.ge_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.ge_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.eq + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.ne + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.lt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.lt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.gt_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.gt_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.le_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.le_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.ge_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.ge_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.eq + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.ne + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.lt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.gt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.le + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.ge + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.ge + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.ne + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.lt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.gt + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.le + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.ge + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + ( + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ( + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ( + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + (drop + (i8x16.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.add_saturate_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.add_saturate_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.sub_saturate_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.sub_saturate_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.mul + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.add_saturate_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.add_saturate_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.sub_saturate_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.sub_saturate_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.mul + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.mul + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.mul + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.div + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.min + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.max + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.add + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.sub + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.mul + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.div + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.min + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.max + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.extract_lane_s 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i8x16.extract_lane_u 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.extract_lane_s 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.extract_lane_u 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i32x4.extract_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.extract_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f32x4.extract_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (f64x2.extract_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i16x8.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 42) + ) + ) + (drop + (i8x16.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 42) + ) + ) + (drop + (i32x4.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 42) + ) + ) + (drop + (i64x2.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i64.const 184683593770) + ) + ) + (drop + (f32x4.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (f32.const 42) + ) + ) + (drop + (f64x2.replace_lane 1 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (f64.const 42) + ) + ) + (drop + (i8x16.shl + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i8x16.shr_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i8x16.shr_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i16x8.shl + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i16x8.shr_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i16x8.shr_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i32x4.shl + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i32x4.shr_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i32x4.shr_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i64x2.shl + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i64x2.shr_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (i64x2.shr_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (i32.const 1) + ) + ) + (drop + (v8x16.shuffle 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (v128.bitselect + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (memory.init 0 + (i32.const 1024) + (i32.const 0) + (i32.const 12) + ) + (data.drop 0) + (memory.copy + (i32.const 2048) + (i32.const 1024) + (i32.const 12) + ) + (memory.fill + (i32.const 0) + (i32.const 42) + (i32.const 1024) + ) + (block + ) + (if + (i32.const 1) + (drop + (i32.const 2) + ) + (drop + (i32.const 3) + ) + ) + (if + (i32.const 4) + (drop + (i32.const 5) + ) + ) + (drop + (loop $in (result i32) + (i32.const 0) + ) + ) + (drop + (loop (result i32) + (i32.const 0) + ) + ) + (drop + (br_if $the-value + (i32.const 1) + (i32.const 0) + ) + ) + (br_if $the-nothing + (i32.const 2) + ) + (br $the-value + (i32.const 3) + ) + (br $the-nothing) + (br_table $the-value $the-value + (i32.const 1) + (i32.const 0) + ) + (br_table $the-nothing $the-nothing + (i32.const 2) + ) + (drop + (i32.eqz + (call "$kitchen()sinker" + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + ) + ) + ) + (drop + (i32.eqz + (i32.trunc_f32_s + (call $an-imported + (i32.const 13) + (f64.const 3.7) + ) + ) + ) + ) + (drop + (i32.eqz + (call_indirect (type $iiIfF) + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + (i32.const 2449) + ) + ) + ) + (drop + (local.get $0) + ) + (local.set $0 + (i32.const 101) + ) + (drop + (local.tee $0 + (i32.const 102) + ) + ) + (drop + (i32.load + (i32.const 1) + ) + ) + (drop + (i64.load16_s offset=2 align=1 + (i32.const 8) + ) + ) + (drop + (f32.load + (i32.const 2) + ) + ) + (drop + (f64.load offset=2 + (i32.const 9) + ) + ) + (i32.store + (i32.const 10) + (i32.const 11) + ) + (i64.store offset=2 align=4 + (i32.const 110) + (i64.const 111) + ) + (drop + (select + (i32.const 3) + (i32.const 5) + (i32.const 1) + ) + ) + (return + (i32.const 1337) + ) + (return_call "$kitchen()sinker" + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + ) + (return_call_indirect (type $iiIfF) + (i32.const 13) + (i64.const 37) + (f32.const 1.2999999523162842) + (f64.const 3.7) + (i32.const 2449) + ) + (try + (throw $a-event + (i32.const 0) + ) + (catch + (local.set $5 + (exnref.pop) + ) + (drop + (block $try-block (result i32) + (rethrow + (br_on_exn $try-block $a-event + (local.get $5) + ) + ) + ) + ) + ) + ) + (push + (i32.pop) + ) + (push + (i64.pop) + ) + (push + (f32.pop) + ) + (push + (f64.pop) + ) + (push + (v128.pop) + ) + (push + (exnref.pop) + ) + (nop) + (unreachable) + ) + ) + ) + (i32.const 42) + ) + ) + (func $starter (; 2 ;) (type $v) + (nop) + ) +) + + BinaryenModuleValidate(the_module); + BinaryenModulePrint(the_module); +(module (type $vi (func (param i32))) + (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) (type $fiF (func (param i32 f64) (result f32))) (type $v (func)) (type $4 (func)) @@ -3497,6 +6381,7 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} (start $starter) (func "$kitchen()sinker" (; 1 ;) (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) (local $4 i32) + (local $5 exnref) (block $the-body (result i32) (block $the-nothing (drop @@ -4842,6 +7727,25 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} (f64.const 3.7) (i32.const 2449) ) + (try + (throw $a-event + (i32.const 0) + ) + (catch + (local.set $5 + (exnref.pop) + ) + (drop + (block $try-block (result i32) + (rethrow + (br_on_exn $try-block $a-event + (local.get $5) + ) + ) + ) + ) + ) + ) (push (i32.pop) ) diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index 8b2d3ae8d..661d04ce2 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -206,6 +206,51 @@ void test_core() { temp13 = makeInt32(module, 10), temp14 = makeInt32(module, 11), temp15 = makeInt32(module, 110), temp16 = makeInt64(module, 111); + // Events + BinaryenType eparams[1] = {BinaryenTypeInt32()}; + BinaryenFunctionTypeRef vi = + BinaryenAddFunctionType(module, "vi", BinaryenTypeNone(), eparams, 1); + BinaryenAddEvent(module, "a-event", 0, vi); + + // Exception handling + + // (try + // (throw $a-event (i32.const 0)) + // (catch + // ;; We don't support multi-value yet. Use locals instead. + // (local.set 0 (exnref.pop)) + // (drop + // (block $try-block (result i32) + // (rethrow + // (br_on_exn $try-block $a-event (local.get 5)) + // ) + // ) + // ) + // ) + // ) + BinaryenExpressionRef tryBody = BinaryenThrow( + module, "a-event", (BinaryenExpressionRef[]){makeInt32(module, 0)}, 1); + BinaryenExpressionRef catchBody = BinaryenBlock( + module, + NULL, + (BinaryenExpressionRef[]){ + BinaryenLocalSet(module, 5, BinaryenPop(module, BinaryenTypeExnref())), + BinaryenDrop( + module, + BinaryenBlock(module, + "try-block", + (BinaryenExpressionRef[]){BinaryenRethrow( + module, + BinaryenBrOnExn( + module, + "try-block", + "a-event", + BinaryenLocalGet(module, 5, BinaryenTypeExnref())))}, + 1, + BinaryenTypeInt32()))}, + 2, + BinaryenTypeNone()); + BinaryenExpressionRef valueList[] = { // Unary makeUnary(module, BinaryenClzInt32(), 1), @@ -472,6 +517,8 @@ void test_core() { module, "kitchen()sinker", callOperands4, 4, BinaryenTypeInt32()), BinaryenReturnCallIndirect( module, makeInt32(module, 2449), callOperands4b, 4, "iiIfF"), + // Exception handling + BinaryenTry(module, tryBody, catchBody), // TODO: Host BinaryenNop(module), @@ -488,19 +535,15 @@ void test_core() { BinaryenExpressionRef body = BinaryenBlock(module, "the-body", bodyList, 2, -1); // Create the function - BinaryenType localTypes[] = { BinaryenTypeInt32() }; - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "kitchen()sinker", iiIfF, localTypes, 1, body); + BinaryenType localTypes[] = {BinaryenTypeInt32(), BinaryenTypeExnref()}; + BinaryenFunctionRef sinker = + BinaryenAddFunction(module, "kitchen()sinker", iiIfF, localTypes, 2, body); // Globals BinaryenAddGlobal(module, "a-global", BinaryenTypeInt32(), 0, makeInt32(module, 7)); BinaryenAddGlobal(module, "a-mutable-global", BinaryenTypeFloat32(), 1, makeFloat32(module, 7.5)); - // Events - BinaryenType eparams[1] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", BinaryenTypeNone(), eparams, 1); - BinaryenAddEvent(module, "a-event", 0, vi); - // Imports BinaryenType iparams[2] = { BinaryenTypeInt32(), BinaryenTypeFloat64() }; diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index 14ed2c50e..e135bd98d 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -39,6 +39,7 @@ BinaryenFeatureAll: 255 (start $starter) (func "$kitchen()sinker" (; 1 ;) (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) (local $4 i32) + (local $5 exnref) (block $the-body (result i32) (block $the-nothing (drop @@ -1393,6 +1394,25 @@ BinaryenFeatureAll: 255 (f64.const 3.7) (i32.const 2449) ) + (try + (throw $a-event + (i32.const 0) + ) + (catch + (local.set $5 + (exnref.pop) + ) + (drop + (block $try-block (result i32) + (rethrow + (br_on_exn $try-block $a-event + (local.get $5) + ) + ) + ) + ) + ) + ) (nop) (unreachable) ) @@ -1992,1352 +2012,1372 @@ int main() { expressions[31] = BinaryenConst(the_module, BinaryenLiteralInt32(11)); expressions[32] = BinaryenConst(the_module, BinaryenLiteralInt32(110)); expressions[33] = BinaryenConst(the_module, BinaryenLiteralInt64(111)); - expressions[34] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[35] = BinaryenUnary(the_module, 0, expressions[34]); - expressions[36] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[37] = BinaryenUnary(the_module, 3, expressions[36]); - expressions[38] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[39] = BinaryenUnary(the_module, 4, expressions[38]); - expressions[40] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[41] = BinaryenUnary(the_module, 6, expressions[40]); - expressions[42] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[43] = BinaryenUnary(the_module, 9, expressions[42]); - expressions[44] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[45] = BinaryenUnary(the_module, 10, expressions[44]); - expressions[46] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[47] = BinaryenUnary(the_module, 13, expressions[46]); - expressions[48] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[49] = BinaryenUnary(the_module, 14, expressions[48]); + { + BinaryenType paramTypes[] = { 1 }; + functionTypes[1] = BinaryenAddFunctionType(the_module, "vi", 0, paramTypes, 1); + } + BinaryenAddEvent(the_module, "a-event", 0, functionTypes[1]); + expressions[34] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[34] }; + expressions[35] = BinaryenThrow(the_module, "a-event", operands, 1); + } + expressions[36] = BinaryenPop(the_module, 6); + expressions[37] = BinaryenLocalSet(the_module, 5, expressions[36]); + expressions[38] = BinaryenLocalGet(the_module, 5, 6); + expressions[39] = BinaryenBrOnExn(the_module, "try-block", "a-event", expressions[38]); + expressions[40] = BinaryenRethrow(the_module, expressions[39]); + { + BinaryenExpressionRef children[] = { expressions[40] }; + expressions[41] = BinaryenBlock(the_module, "try-block", children, 1, 1); + } + expressions[42] = BinaryenDrop(the_module, expressions[41]); + { + BinaryenExpressionRef children[] = { expressions[37], expressions[42] }; + expressions[43] = BinaryenBlock(the_module, NULL, children, 2, 0); + } + expressions[44] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[45] = BinaryenUnary(the_module, 0, expressions[44]); + expressions[46] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[47] = BinaryenUnary(the_module, 3, expressions[46]); + expressions[48] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[49] = BinaryenUnary(the_module, 4, expressions[48]); expressions[50] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[51] = BinaryenUnary(the_module, 16, expressions[50]); + expressions[51] = BinaryenUnary(the_module, 6, expressions[50]); expressions[52] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[53] = BinaryenUnary(the_module, 19, expressions[52]); - expressions[54] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[55] = BinaryenUnary(the_module, 20, expressions[54]); - expressions[56] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[57] = BinaryenUnary(the_module, 22, expressions[56]); - expressions[58] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[59] = BinaryenUnary(the_module, 23, expressions[58]); - expressions[60] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[61] = BinaryenUnary(the_module, 24, expressions[60]); - expressions[62] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[63] = BinaryenUnary(the_module, 25, expressions[62]); - expressions[64] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[65] = BinaryenUnary(the_module, 26, expressions[64]); - expressions[66] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[67] = BinaryenUnary(the_module, 27, expressions[66]); - expressions[68] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[69] = BinaryenUnary(the_module, 28, expressions[68]); - expressions[70] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[71] = BinaryenUnary(the_module, 29, expressions[70]); - expressions[72] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[73] = BinaryenUnary(the_module, 30, expressions[72]); - expressions[74] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[75] = BinaryenUnary(the_module, 31, expressions[74]); - expressions[76] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[77] = BinaryenUnary(the_module, 32, expressions[76]); + expressions[53] = BinaryenUnary(the_module, 9, expressions[52]); + expressions[54] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[55] = BinaryenUnary(the_module, 10, expressions[54]); + expressions[56] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[57] = BinaryenUnary(the_module, 13, expressions[56]); + expressions[58] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[59] = BinaryenUnary(the_module, 14, expressions[58]); + expressions[60] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[61] = BinaryenUnary(the_module, 16, expressions[60]); + expressions[62] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[63] = BinaryenUnary(the_module, 19, expressions[62]); + expressions[64] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[65] = BinaryenUnary(the_module, 20, expressions[64]); + expressions[66] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[67] = BinaryenUnary(the_module, 22, expressions[66]); + expressions[68] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[69] = BinaryenUnary(the_module, 23, expressions[68]); + expressions[70] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[71] = BinaryenUnary(the_module, 24, expressions[70]); + expressions[72] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[73] = BinaryenUnary(the_module, 25, expressions[72]); + expressions[74] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[75] = BinaryenUnary(the_module, 26, expressions[74]); + expressions[76] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[77] = BinaryenUnary(the_module, 27, expressions[76]); expressions[78] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[79] = BinaryenUnary(the_module, 52, expressions[78]); - expressions[80] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[81] = BinaryenUnary(the_module, 56, expressions[80]); - expressions[82] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[83] = BinaryenUnary(the_module, 53, expressions[82]); - expressions[84] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[85] = BinaryenUnary(the_module, 57, expressions[84]); + expressions[79] = BinaryenUnary(the_module, 28, expressions[78]); + expressions[80] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[81] = BinaryenUnary(the_module, 29, expressions[80]); + expressions[82] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[83] = BinaryenUnary(the_module, 30, expressions[82]); + expressions[84] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[85] = BinaryenUnary(the_module, 31, expressions[84]); expressions[86] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[87] = BinaryenUnary(the_module, 54, expressions[86]); - expressions[88] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[89] = BinaryenUnary(the_module, 58, expressions[88]); - expressions[90] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[91] = BinaryenUnary(the_module, 55, expressions[90]); - expressions[92] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[93] = BinaryenUnary(the_module, 59, expressions[92]); + expressions[87] = BinaryenUnary(the_module, 32, expressions[86]); + expressions[88] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[89] = BinaryenUnary(the_module, 52, expressions[88]); + expressions[90] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[91] = BinaryenUnary(the_module, 56, expressions[90]); + expressions[92] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[93] = BinaryenUnary(the_module, 53, expressions[92]); expressions[94] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[95] = BinaryenUnary(the_module, 33, expressions[94]); + expressions[95] = BinaryenUnary(the_module, 57, expressions[94]); expressions[96] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[97] = BinaryenUnary(the_module, 34, expressions[96]); - expressions[98] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[99] = BinaryenUnary(the_module, 35, expressions[98]); - expressions[100] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[101] = BinaryenUnary(the_module, 36, expressions[100]); - expressions[102] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[103] = BinaryenUnary(the_module, 37, expressions[102]); - expressions[104] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[105] = BinaryenUnary(the_module, 38, expressions[104]); - expressions[106] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[107] = BinaryenUnary(the_module, 39, expressions[106]); - expressions[108] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[109] = BinaryenUnary(the_module, 40, expressions[108]); - expressions[110] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[111] = BinaryenUnary(the_module, 41, expressions[110]); - expressions[112] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[113] = BinaryenUnary(the_module, 42, expressions[112]); - expressions[114] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[115] = BinaryenUnary(the_module, 43, expressions[114]); - expressions[116] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[117] = BinaryenUnary(the_module, 44, expressions[116]); - expressions[118] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[119] = BinaryenUnary(the_module, 45, expressions[118]); + expressions[97] = BinaryenUnary(the_module, 54, expressions[96]); + expressions[98] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[99] = BinaryenUnary(the_module, 58, expressions[98]); + expressions[100] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[101] = BinaryenUnary(the_module, 55, expressions[100]); + expressions[102] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[103] = BinaryenUnary(the_module, 59, expressions[102]); + expressions[104] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[105] = BinaryenUnary(the_module, 33, expressions[104]); + expressions[106] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[107] = BinaryenUnary(the_module, 34, expressions[106]); + expressions[108] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[109] = BinaryenUnary(the_module, 35, expressions[108]); + expressions[110] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[111] = BinaryenUnary(the_module, 36, expressions[110]); + expressions[112] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[113] = BinaryenUnary(the_module, 37, expressions[112]); + expressions[114] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[115] = BinaryenUnary(the_module, 38, expressions[114]); + expressions[116] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[117] = BinaryenUnary(the_module, 39, expressions[116]); + expressions[118] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[119] = BinaryenUnary(the_module, 40, expressions[118]); expressions[120] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[121] = BinaryenUnary(the_module, 46, expressions[120]); - expressions[122] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[123] = BinaryenUnary(the_module, 60, expressions[122]); - expressions[124] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[125] = BinaryenUnary(the_module, 61, expressions[124]); - expressions[126] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[127] = BinaryenUnary(the_module, 62, expressions[126]); - expressions[128] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[129] = BinaryenUnary(the_module, 63, expressions[128]); - expressions[130] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[131] = BinaryenUnary(the_module, 64, expressions[130]); - expressions[132] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[133] = BinaryenUnary(the_module, 65, expressions[132]); + expressions[121] = BinaryenUnary(the_module, 41, expressions[120]); + expressions[122] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[123] = BinaryenUnary(the_module, 42, expressions[122]); + expressions[124] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[125] = BinaryenUnary(the_module, 43, expressions[124]); + expressions[126] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[127] = BinaryenUnary(the_module, 44, expressions[126]); + expressions[128] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[129] = BinaryenUnary(the_module, 45, expressions[128]); + expressions[130] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[131] = BinaryenUnary(the_module, 46, expressions[130]); + expressions[132] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[133] = BinaryenUnary(the_module, 60, expressions[132]); + expressions[134] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[135] = BinaryenUnary(the_module, 61, expressions[134]); + expressions[136] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[137] = BinaryenUnary(the_module, 62, expressions[136]); + expressions[138] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[139] = BinaryenUnary(the_module, 63, expressions[138]); + expressions[140] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[141] = BinaryenUnary(the_module, 64, expressions[140]); + expressions[142] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[143] = BinaryenUnary(the_module, 65, expressions[142]); { uint8_t t1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[134] = BinaryenConst(the_module, BinaryenLiteralVec128(t1)); + expressions[144] = BinaryenConst(the_module, BinaryenLiteralVec128(t1)); } - expressions[135] = BinaryenUnary(the_module, 66, expressions[134]); + expressions[145] = BinaryenUnary(the_module, 66, expressions[144]); { uint8_t t2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[136] = BinaryenConst(the_module, BinaryenLiteralVec128(t2)); + expressions[146] = BinaryenConst(the_module, BinaryenLiteralVec128(t2)); } - expressions[137] = BinaryenUnary(the_module, 67, expressions[136]); + expressions[147] = BinaryenUnary(the_module, 67, expressions[146]); { uint8_t t3[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[138] = BinaryenConst(the_module, BinaryenLiteralVec128(t3)); + expressions[148] = BinaryenConst(the_module, BinaryenLiteralVec128(t3)); } - expressions[139] = BinaryenUnary(the_module, 68, expressions[138]); + expressions[149] = BinaryenUnary(the_module, 68, expressions[148]); { uint8_t t4[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[140] = BinaryenConst(the_module, BinaryenLiteralVec128(t4)); + expressions[150] = BinaryenConst(the_module, BinaryenLiteralVec128(t4)); } - expressions[141] = BinaryenUnary(the_module, 69, expressions[140]); + expressions[151] = BinaryenUnary(the_module, 69, expressions[150]); { uint8_t t5[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[142] = BinaryenConst(the_module, BinaryenLiteralVec128(t5)); + expressions[152] = BinaryenConst(the_module, BinaryenLiteralVec128(t5)); } - expressions[143] = BinaryenUnary(the_module, 70, expressions[142]); + expressions[153] = BinaryenUnary(the_module, 70, expressions[152]); { uint8_t t6[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[144] = BinaryenConst(the_module, BinaryenLiteralVec128(t6)); + expressions[154] = BinaryenConst(the_module, BinaryenLiteralVec128(t6)); } - expressions[145] = BinaryenUnary(the_module, 71, expressions[144]); + expressions[155] = BinaryenUnary(the_module, 71, expressions[154]); { uint8_t t7[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[146] = BinaryenConst(the_module, BinaryenLiteralVec128(t7)); + expressions[156] = BinaryenConst(the_module, BinaryenLiteralVec128(t7)); } - expressions[147] = BinaryenUnary(the_module, 72, expressions[146]); + expressions[157] = BinaryenUnary(the_module, 72, expressions[156]); { uint8_t t8[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[148] = BinaryenConst(the_module, BinaryenLiteralVec128(t8)); + expressions[158] = BinaryenConst(the_module, BinaryenLiteralVec128(t8)); } - expressions[149] = BinaryenUnary(the_module, 73, expressions[148]); + expressions[159] = BinaryenUnary(the_module, 73, expressions[158]); { uint8_t t9[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[150] = BinaryenConst(the_module, BinaryenLiteralVec128(t9)); + expressions[160] = BinaryenConst(the_module, BinaryenLiteralVec128(t9)); } - expressions[151] = BinaryenUnary(the_module, 74, expressions[150]); + expressions[161] = BinaryenUnary(the_module, 74, expressions[160]); { uint8_t t10[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[152] = BinaryenConst(the_module, BinaryenLiteralVec128(t10)); + expressions[162] = BinaryenConst(the_module, BinaryenLiteralVec128(t10)); } - expressions[153] = BinaryenUnary(the_module, 75, expressions[152]); + expressions[163] = BinaryenUnary(the_module, 75, expressions[162]); { uint8_t t11[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[154] = BinaryenConst(the_module, BinaryenLiteralVec128(t11)); + expressions[164] = BinaryenConst(the_module, BinaryenLiteralVec128(t11)); } - expressions[155] = BinaryenUnary(the_module, 76, expressions[154]); + expressions[165] = BinaryenUnary(the_module, 76, expressions[164]); { uint8_t t12[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[156] = BinaryenConst(the_module, BinaryenLiteralVec128(t12)); + expressions[166] = BinaryenConst(the_module, BinaryenLiteralVec128(t12)); } - expressions[157] = BinaryenUnary(the_module, 77, expressions[156]); + expressions[167] = BinaryenUnary(the_module, 77, expressions[166]); { uint8_t t13[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[158] = BinaryenConst(the_module, BinaryenLiteralVec128(t13)); + expressions[168] = BinaryenConst(the_module, BinaryenLiteralVec128(t13)); } - expressions[159] = BinaryenUnary(the_module, 78, expressions[158]); + expressions[169] = BinaryenUnary(the_module, 78, expressions[168]); { uint8_t t14[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[160] = BinaryenConst(the_module, BinaryenLiteralVec128(t14)); + expressions[170] = BinaryenConst(the_module, BinaryenLiteralVec128(t14)); } - expressions[161] = BinaryenUnary(the_module, 79, expressions[160]); + expressions[171] = BinaryenUnary(the_module, 79, expressions[170]); { uint8_t t15[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[162] = BinaryenConst(the_module, BinaryenLiteralVec128(t15)); + expressions[172] = BinaryenConst(the_module, BinaryenLiteralVec128(t15)); } - expressions[163] = BinaryenUnary(the_module, 80, expressions[162]); + expressions[173] = BinaryenUnary(the_module, 80, expressions[172]); { uint8_t t16[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[164] = BinaryenConst(the_module, BinaryenLiteralVec128(t16)); + expressions[174] = BinaryenConst(the_module, BinaryenLiteralVec128(t16)); } - expressions[165] = BinaryenUnary(the_module, 81, expressions[164]); + expressions[175] = BinaryenUnary(the_module, 81, expressions[174]); { uint8_t t17[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[166] = BinaryenConst(the_module, BinaryenLiteralVec128(t17)); + expressions[176] = BinaryenConst(the_module, BinaryenLiteralVec128(t17)); } - expressions[167] = BinaryenUnary(the_module, 82, expressions[166]); + expressions[177] = BinaryenUnary(the_module, 82, expressions[176]); { uint8_t t18[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[168] = BinaryenConst(the_module, BinaryenLiteralVec128(t18)); + expressions[178] = BinaryenConst(the_module, BinaryenLiteralVec128(t18)); } - expressions[169] = BinaryenUnary(the_module, 83, expressions[168]); + expressions[179] = BinaryenUnary(the_module, 83, expressions[178]); { uint8_t t19[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[170] = BinaryenConst(the_module, BinaryenLiteralVec128(t19)); + expressions[180] = BinaryenConst(the_module, BinaryenLiteralVec128(t19)); } - expressions[171] = BinaryenUnary(the_module, 84, expressions[170]); + expressions[181] = BinaryenUnary(the_module, 84, expressions[180]); { uint8_t t20[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[172] = BinaryenConst(the_module, BinaryenLiteralVec128(t20)); + expressions[182] = BinaryenConst(the_module, BinaryenLiteralVec128(t20)); } - expressions[173] = BinaryenUnary(the_module, 85, expressions[172]); + expressions[183] = BinaryenUnary(the_module, 85, expressions[182]); { uint8_t t21[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[174] = BinaryenConst(the_module, BinaryenLiteralVec128(t21)); + expressions[184] = BinaryenConst(the_module, BinaryenLiteralVec128(t21)); } - expressions[175] = BinaryenUnary(the_module, 86, expressions[174]); + expressions[185] = BinaryenUnary(the_module, 86, expressions[184]); { uint8_t t22[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[176] = BinaryenConst(the_module, BinaryenLiteralVec128(t22)); + expressions[186] = BinaryenConst(the_module, BinaryenLiteralVec128(t22)); } - expressions[177] = BinaryenUnary(the_module, 87, expressions[176]); + expressions[187] = BinaryenUnary(the_module, 87, expressions[186]); { uint8_t t23[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[178] = BinaryenConst(the_module, BinaryenLiteralVec128(t23)); + expressions[188] = BinaryenConst(the_module, BinaryenLiteralVec128(t23)); } - expressions[179] = BinaryenUnary(the_module, 88, expressions[178]); + expressions[189] = BinaryenUnary(the_module, 88, expressions[188]); { uint8_t t24[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[180] = BinaryenConst(the_module, BinaryenLiteralVec128(t24)); + expressions[190] = BinaryenConst(the_module, BinaryenLiteralVec128(t24)); } - expressions[181] = BinaryenUnary(the_module, 89, expressions[180]); + expressions[191] = BinaryenUnary(the_module, 89, expressions[190]); { uint8_t t25[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[182] = BinaryenConst(the_module, BinaryenLiteralVec128(t25)); + expressions[192] = BinaryenConst(the_module, BinaryenLiteralVec128(t25)); } - expressions[183] = BinaryenUnary(the_module, 90, expressions[182]); + expressions[193] = BinaryenUnary(the_module, 90, expressions[192]); { uint8_t t26[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[184] = BinaryenConst(the_module, BinaryenLiteralVec128(t26)); + expressions[194] = BinaryenConst(the_module, BinaryenLiteralVec128(t26)); } - expressions[185] = BinaryenUnary(the_module, 91, expressions[184]); + expressions[195] = BinaryenUnary(the_module, 91, expressions[194]); { uint8_t t27[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[186] = BinaryenConst(the_module, BinaryenLiteralVec128(t27)); - } - expressions[187] = BinaryenUnary(the_module, 92, expressions[186]); - expressions[188] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[189] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[190] = BinaryenBinary(the_module, 0, expressions[189], expressions[188]); - expressions[191] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[192] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[193] = BinaryenBinary(the_module, 64, expressions[192], expressions[191]); - expressions[194] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[195] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[196] = BinaryenBinary(the_module, 3, expressions[195], expressions[194]); - expressions[197] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[198] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[199] = BinaryenBinary(the_module, 29, expressions[198], expressions[197]); - expressions[200] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[201] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[202] = BinaryenBinary(the_module, 30, expressions[201], expressions[200]); - expressions[203] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[204] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[205] = BinaryenBinary(the_module, 6, expressions[204], expressions[203]); - expressions[206] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[207] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[208] = BinaryenBinary(the_module, 7, expressions[207], expressions[206]); - expressions[209] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[210] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[211] = BinaryenBinary(the_module, 33, expressions[210], expressions[209]); - expressions[212] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[213] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[214] = BinaryenBinary(the_module, 9, expressions[213], expressions[212]); - expressions[215] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[216] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[217] = BinaryenBinary(the_module, 35, expressions[216], expressions[215]); - expressions[218] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[219] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[220] = BinaryenBinary(the_module, 36, expressions[219], expressions[218]); - expressions[221] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[222] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[223] = BinaryenBinary(the_module, 12, expressions[222], expressions[221]); - expressions[224] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[225] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[226] = BinaryenBinary(the_module, 13, expressions[225], expressions[224]); - expressions[227] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[228] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[229] = BinaryenBinary(the_module, 39, expressions[228], expressions[227]); - expressions[230] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[231] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[232] = BinaryenBinary(the_module, 53, expressions[231], expressions[230]); - expressions[233] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[234] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[235] = BinaryenBinary(the_module, 67, expressions[234], expressions[233]); - expressions[236] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[237] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[238] = BinaryenBinary(the_module, 55, expressions[237], expressions[236]); - expressions[239] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[240] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[241] = BinaryenBinary(the_module, 69, expressions[240], expressions[239]); - expressions[242] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[243] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[244] = BinaryenBinary(the_module, 15, expressions[243], expressions[242]); - expressions[245] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[246] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[247] = BinaryenBinary(the_module, 58, expressions[246], expressions[245]); - expressions[248] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[249] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[250] = BinaryenBinary(the_module, 17, expressions[249], expressions[248]); - expressions[251] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[252] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[253] = BinaryenBinary(the_module, 43, expressions[252], expressions[251]); - expressions[254] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[255] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[256] = BinaryenBinary(the_module, 44, expressions[255], expressions[254]); - expressions[257] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[258] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[259] = BinaryenBinary(the_module, 20, expressions[258], expressions[257]); - expressions[260] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[261] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[262] = BinaryenBinary(the_module, 46, expressions[261], expressions[260]); - expressions[263] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[264] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[265] = BinaryenBinary(the_module, 22, expressions[264], expressions[263]); - expressions[266] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[267] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[268] = BinaryenBinary(the_module, 23, expressions[267], expressions[266]); - expressions[269] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[270] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[271] = BinaryenBinary(the_module, 49, expressions[270], expressions[269]); - expressions[272] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[273] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[274] = BinaryenBinary(the_module, 59, expressions[273], expressions[272]); - expressions[275] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[276] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[277] = BinaryenBinary(the_module, 73, expressions[276], expressions[275]); - expressions[278] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[279] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[280] = BinaryenBinary(the_module, 74, expressions[279], expressions[278]); - expressions[281] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[282] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[283] = BinaryenBinary(the_module, 62, expressions[282], expressions[281]); + expressions[196] = BinaryenConst(the_module, BinaryenLiteralVec128(t27)); + } + expressions[197] = BinaryenUnary(the_module, 92, expressions[196]); + expressions[198] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[199] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[200] = BinaryenBinary(the_module, 0, expressions[199], expressions[198]); + expressions[201] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[202] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[203] = BinaryenBinary(the_module, 64, expressions[202], expressions[201]); + expressions[204] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[205] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[206] = BinaryenBinary(the_module, 3, expressions[205], expressions[204]); + expressions[207] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[208] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[209] = BinaryenBinary(the_module, 29, expressions[208], expressions[207]); + expressions[210] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[211] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[212] = BinaryenBinary(the_module, 30, expressions[211], expressions[210]); + expressions[213] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[214] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[215] = BinaryenBinary(the_module, 6, expressions[214], expressions[213]); + expressions[216] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[217] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[218] = BinaryenBinary(the_module, 7, expressions[217], expressions[216]); + expressions[219] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[220] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[221] = BinaryenBinary(the_module, 33, expressions[220], expressions[219]); + expressions[222] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[223] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[224] = BinaryenBinary(the_module, 9, expressions[223], expressions[222]); + expressions[225] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[226] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[227] = BinaryenBinary(the_module, 35, expressions[226], expressions[225]); + expressions[228] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[229] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[230] = BinaryenBinary(the_module, 36, expressions[229], expressions[228]); + expressions[231] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[232] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[233] = BinaryenBinary(the_module, 12, expressions[232], expressions[231]); + expressions[234] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[235] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[236] = BinaryenBinary(the_module, 13, expressions[235], expressions[234]); + expressions[237] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[238] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[239] = BinaryenBinary(the_module, 39, expressions[238], expressions[237]); + expressions[240] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[241] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[242] = BinaryenBinary(the_module, 53, expressions[241], expressions[240]); + expressions[243] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[244] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[245] = BinaryenBinary(the_module, 67, expressions[244], expressions[243]); + expressions[246] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[247] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[248] = BinaryenBinary(the_module, 55, expressions[247], expressions[246]); + expressions[249] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[250] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[251] = BinaryenBinary(the_module, 69, expressions[250], expressions[249]); + expressions[252] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[253] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[254] = BinaryenBinary(the_module, 15, expressions[253], expressions[252]); + expressions[255] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[256] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[257] = BinaryenBinary(the_module, 58, expressions[256], expressions[255]); + expressions[258] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[259] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[260] = BinaryenBinary(the_module, 17, expressions[259], expressions[258]); + expressions[261] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[262] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[263] = BinaryenBinary(the_module, 43, expressions[262], expressions[261]); + expressions[264] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[265] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[266] = BinaryenBinary(the_module, 44, expressions[265], expressions[264]); + expressions[267] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[268] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[269] = BinaryenBinary(the_module, 20, expressions[268], expressions[267]); + expressions[270] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[271] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[272] = BinaryenBinary(the_module, 46, expressions[271], expressions[270]); + expressions[273] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[274] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[275] = BinaryenBinary(the_module, 22, expressions[274], expressions[273]); + expressions[276] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[277] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[278] = BinaryenBinary(the_module, 23, expressions[277], expressions[276]); + expressions[279] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[280] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[281] = BinaryenBinary(the_module, 49, expressions[280], expressions[279]); + expressions[282] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[283] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[284] = BinaryenBinary(the_module, 59, expressions[283], expressions[282]); + expressions[285] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[286] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[287] = BinaryenBinary(the_module, 73, expressions[286], expressions[285]); + expressions[288] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[289] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[290] = BinaryenBinary(the_module, 74, expressions[289], expressions[288]); + expressions[291] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[292] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[293] = BinaryenBinary(the_module, 62, expressions[292], expressions[291]); { uint8_t t28[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[284] = BinaryenConst(the_module, BinaryenLiteralVec128(t28)); + expressions[294] = BinaryenConst(the_module, BinaryenLiteralVec128(t28)); } { uint8_t t29[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[285] = BinaryenConst(the_module, BinaryenLiteralVec128(t29)); + expressions[295] = BinaryenConst(the_module, BinaryenLiteralVec128(t29)); } - expressions[286] = BinaryenBinary(the_module, 76, expressions[285], expressions[284]); + expressions[296] = BinaryenBinary(the_module, 76, expressions[295], expressions[294]); { uint8_t t30[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[287] = BinaryenConst(the_module, BinaryenLiteralVec128(t30)); + expressions[297] = BinaryenConst(the_module, BinaryenLiteralVec128(t30)); } { uint8_t t31[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[288] = BinaryenConst(the_module, BinaryenLiteralVec128(t31)); + expressions[298] = BinaryenConst(the_module, BinaryenLiteralVec128(t31)); } - expressions[289] = BinaryenBinary(the_module, 77, expressions[288], expressions[287]); + expressions[299] = BinaryenBinary(the_module, 77, expressions[298], expressions[297]); { uint8_t t32[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[290] = BinaryenConst(the_module, BinaryenLiteralVec128(t32)); + expressions[300] = BinaryenConst(the_module, BinaryenLiteralVec128(t32)); } { uint8_t t33[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[291] = BinaryenConst(the_module, BinaryenLiteralVec128(t33)); + expressions[301] = BinaryenConst(the_module, BinaryenLiteralVec128(t33)); } - expressions[292] = BinaryenBinary(the_module, 78, expressions[291], expressions[290]); + expressions[302] = BinaryenBinary(the_module, 78, expressions[301], expressions[300]); { uint8_t t34[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[293] = BinaryenConst(the_module, BinaryenLiteralVec128(t34)); + expressions[303] = BinaryenConst(the_module, BinaryenLiteralVec128(t34)); } { uint8_t t35[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[294] = BinaryenConst(the_module, BinaryenLiteralVec128(t35)); + expressions[304] = BinaryenConst(the_module, BinaryenLiteralVec128(t35)); } - expressions[295] = BinaryenBinary(the_module, 79, expressions[294], expressions[293]); + expressions[305] = BinaryenBinary(the_module, 79, expressions[304], expressions[303]); { uint8_t t36[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[296] = BinaryenConst(the_module, BinaryenLiteralVec128(t36)); + expressions[306] = BinaryenConst(the_module, BinaryenLiteralVec128(t36)); } { uint8_t t37[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[297] = BinaryenConst(the_module, BinaryenLiteralVec128(t37)); + expressions[307] = BinaryenConst(the_module, BinaryenLiteralVec128(t37)); } - expressions[298] = BinaryenBinary(the_module, 80, expressions[297], expressions[296]); + expressions[308] = BinaryenBinary(the_module, 80, expressions[307], expressions[306]); { uint8_t t38[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[299] = BinaryenConst(the_module, BinaryenLiteralVec128(t38)); + expressions[309] = BinaryenConst(the_module, BinaryenLiteralVec128(t38)); } { uint8_t t39[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[300] = BinaryenConst(the_module, BinaryenLiteralVec128(t39)); + expressions[310] = BinaryenConst(the_module, BinaryenLiteralVec128(t39)); } - expressions[301] = BinaryenBinary(the_module, 81, expressions[300], expressions[299]); + expressions[311] = BinaryenBinary(the_module, 81, expressions[310], expressions[309]); { uint8_t t40[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[302] = BinaryenConst(the_module, BinaryenLiteralVec128(t40)); + expressions[312] = BinaryenConst(the_module, BinaryenLiteralVec128(t40)); } { uint8_t t41[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[303] = BinaryenConst(the_module, BinaryenLiteralVec128(t41)); + expressions[313] = BinaryenConst(the_module, BinaryenLiteralVec128(t41)); } - expressions[304] = BinaryenBinary(the_module, 82, expressions[303], expressions[302]); + expressions[314] = BinaryenBinary(the_module, 82, expressions[313], expressions[312]); { uint8_t t42[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[305] = BinaryenConst(the_module, BinaryenLiteralVec128(t42)); + expressions[315] = BinaryenConst(the_module, BinaryenLiteralVec128(t42)); } { uint8_t t43[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[306] = BinaryenConst(the_module, BinaryenLiteralVec128(t43)); + expressions[316] = BinaryenConst(the_module, BinaryenLiteralVec128(t43)); } - expressions[307] = BinaryenBinary(the_module, 83, expressions[306], expressions[305]); + expressions[317] = BinaryenBinary(the_module, 83, expressions[316], expressions[315]); { uint8_t t44[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[308] = BinaryenConst(the_module, BinaryenLiteralVec128(t44)); + expressions[318] = BinaryenConst(the_module, BinaryenLiteralVec128(t44)); } { uint8_t t45[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[309] = BinaryenConst(the_module, BinaryenLiteralVec128(t45)); + expressions[319] = BinaryenConst(the_module, BinaryenLiteralVec128(t45)); } - expressions[310] = BinaryenBinary(the_module, 84, expressions[309], expressions[308]); + expressions[320] = BinaryenBinary(the_module, 84, expressions[319], expressions[318]); { uint8_t t46[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[311] = BinaryenConst(the_module, BinaryenLiteralVec128(t46)); + expressions[321] = BinaryenConst(the_module, BinaryenLiteralVec128(t46)); } { uint8_t t47[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[312] = BinaryenConst(the_module, BinaryenLiteralVec128(t47)); + expressions[322] = BinaryenConst(the_module, BinaryenLiteralVec128(t47)); } - expressions[313] = BinaryenBinary(the_module, 85, expressions[312], expressions[311]); + expressions[323] = BinaryenBinary(the_module, 85, expressions[322], expressions[321]); { uint8_t t48[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[314] = BinaryenConst(the_module, BinaryenLiteralVec128(t48)); + expressions[324] = BinaryenConst(the_module, BinaryenLiteralVec128(t48)); } { uint8_t t49[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[315] = BinaryenConst(the_module, BinaryenLiteralVec128(t49)); + expressions[325] = BinaryenConst(the_module, BinaryenLiteralVec128(t49)); } - expressions[316] = BinaryenBinary(the_module, 86, expressions[315], expressions[314]); + expressions[326] = BinaryenBinary(the_module, 86, expressions[325], expressions[324]); { uint8_t t50[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[317] = BinaryenConst(the_module, BinaryenLiteralVec128(t50)); + expressions[327] = BinaryenConst(the_module, BinaryenLiteralVec128(t50)); } { uint8_t t51[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[318] = BinaryenConst(the_module, BinaryenLiteralVec128(t51)); + expressions[328] = BinaryenConst(the_module, BinaryenLiteralVec128(t51)); } - expressions[319] = BinaryenBinary(the_module, 87, expressions[318], expressions[317]); + expressions[329] = BinaryenBinary(the_module, 87, expressions[328], expressions[327]); { uint8_t t52[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[320] = BinaryenConst(the_module, BinaryenLiteralVec128(t52)); + expressions[330] = BinaryenConst(the_module, BinaryenLiteralVec128(t52)); } { uint8_t t53[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[321] = BinaryenConst(the_module, BinaryenLiteralVec128(t53)); + expressions[331] = BinaryenConst(the_module, BinaryenLiteralVec128(t53)); } - expressions[322] = BinaryenBinary(the_module, 88, expressions[321], expressions[320]); + expressions[332] = BinaryenBinary(the_module, 88, expressions[331], expressions[330]); { uint8_t t54[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[323] = BinaryenConst(the_module, BinaryenLiteralVec128(t54)); + expressions[333] = BinaryenConst(the_module, BinaryenLiteralVec128(t54)); } { uint8_t t55[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[324] = BinaryenConst(the_module, BinaryenLiteralVec128(t55)); + expressions[334] = BinaryenConst(the_module, BinaryenLiteralVec128(t55)); } - expressions[325] = BinaryenBinary(the_module, 89, expressions[324], expressions[323]); + expressions[335] = BinaryenBinary(the_module, 89, expressions[334], expressions[333]); { uint8_t t56[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[326] = BinaryenConst(the_module, BinaryenLiteralVec128(t56)); + expressions[336] = BinaryenConst(the_module, BinaryenLiteralVec128(t56)); } { uint8_t t57[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[327] = BinaryenConst(the_module, BinaryenLiteralVec128(t57)); + expressions[337] = BinaryenConst(the_module, BinaryenLiteralVec128(t57)); } - expressions[328] = BinaryenBinary(the_module, 90, expressions[327], expressions[326]); + expressions[338] = BinaryenBinary(the_module, 90, expressions[337], expressions[336]); { uint8_t t58[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[329] = BinaryenConst(the_module, BinaryenLiteralVec128(t58)); + expressions[339] = BinaryenConst(the_module, BinaryenLiteralVec128(t58)); } { uint8_t t59[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[330] = BinaryenConst(the_module, BinaryenLiteralVec128(t59)); + expressions[340] = BinaryenConst(the_module, BinaryenLiteralVec128(t59)); } - expressions[331] = BinaryenBinary(the_module, 91, expressions[330], expressions[329]); + expressions[341] = BinaryenBinary(the_module, 91, expressions[340], expressions[339]); { uint8_t t60[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[332] = BinaryenConst(the_module, BinaryenLiteralVec128(t60)); + expressions[342] = BinaryenConst(the_module, BinaryenLiteralVec128(t60)); } { uint8_t t61[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[333] = BinaryenConst(the_module, BinaryenLiteralVec128(t61)); + expressions[343] = BinaryenConst(the_module, BinaryenLiteralVec128(t61)); } - expressions[334] = BinaryenBinary(the_module, 92, expressions[333], expressions[332]); + expressions[344] = BinaryenBinary(the_module, 92, expressions[343], expressions[342]); { uint8_t t62[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[335] = BinaryenConst(the_module, BinaryenLiteralVec128(t62)); + expressions[345] = BinaryenConst(the_module, BinaryenLiteralVec128(t62)); } { uint8_t t63[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[336] = BinaryenConst(the_module, BinaryenLiteralVec128(t63)); + expressions[346] = BinaryenConst(the_module, BinaryenLiteralVec128(t63)); } - expressions[337] = BinaryenBinary(the_module, 93, expressions[336], expressions[335]); + expressions[347] = BinaryenBinary(the_module, 93, expressions[346], expressions[345]); { uint8_t t64[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[338] = BinaryenConst(the_module, BinaryenLiteralVec128(t64)); + expressions[348] = BinaryenConst(the_module, BinaryenLiteralVec128(t64)); } { uint8_t t65[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[339] = BinaryenConst(the_module, BinaryenLiteralVec128(t65)); + expressions[349] = BinaryenConst(the_module, BinaryenLiteralVec128(t65)); } - expressions[340] = BinaryenBinary(the_module, 94, expressions[339], expressions[338]); + expressions[350] = BinaryenBinary(the_module, 94, expressions[349], expressions[348]); { uint8_t t66[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[341] = BinaryenConst(the_module, BinaryenLiteralVec128(t66)); + expressions[351] = BinaryenConst(the_module, BinaryenLiteralVec128(t66)); } { uint8_t t67[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[342] = BinaryenConst(the_module, BinaryenLiteralVec128(t67)); + expressions[352] = BinaryenConst(the_module, BinaryenLiteralVec128(t67)); } - expressions[343] = BinaryenBinary(the_module, 95, expressions[342], expressions[341]); + expressions[353] = BinaryenBinary(the_module, 95, expressions[352], expressions[351]); { uint8_t t68[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[344] = BinaryenConst(the_module, BinaryenLiteralVec128(t68)); + expressions[354] = BinaryenConst(the_module, BinaryenLiteralVec128(t68)); } { uint8_t t69[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[345] = BinaryenConst(the_module, BinaryenLiteralVec128(t69)); + expressions[355] = BinaryenConst(the_module, BinaryenLiteralVec128(t69)); } - expressions[346] = BinaryenBinary(the_module, 96, expressions[345], expressions[344]); + expressions[356] = BinaryenBinary(the_module, 96, expressions[355], expressions[354]); { uint8_t t70[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[347] = BinaryenConst(the_module, BinaryenLiteralVec128(t70)); + expressions[357] = BinaryenConst(the_module, BinaryenLiteralVec128(t70)); } { uint8_t t71[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[348] = BinaryenConst(the_module, BinaryenLiteralVec128(t71)); + expressions[358] = BinaryenConst(the_module, BinaryenLiteralVec128(t71)); } - expressions[349] = BinaryenBinary(the_module, 97, expressions[348], expressions[347]); + expressions[359] = BinaryenBinary(the_module, 97, expressions[358], expressions[357]); { uint8_t t72[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[350] = BinaryenConst(the_module, BinaryenLiteralVec128(t72)); + expressions[360] = BinaryenConst(the_module, BinaryenLiteralVec128(t72)); } { uint8_t t73[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[351] = BinaryenConst(the_module, BinaryenLiteralVec128(t73)); + expressions[361] = BinaryenConst(the_module, BinaryenLiteralVec128(t73)); } - expressions[352] = BinaryenBinary(the_module, 98, expressions[351], expressions[350]); + expressions[362] = BinaryenBinary(the_module, 98, expressions[361], expressions[360]); { uint8_t t74[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[353] = BinaryenConst(the_module, BinaryenLiteralVec128(t74)); + expressions[363] = BinaryenConst(the_module, BinaryenLiteralVec128(t74)); } { uint8_t t75[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[354] = BinaryenConst(the_module, BinaryenLiteralVec128(t75)); + expressions[364] = BinaryenConst(the_module, BinaryenLiteralVec128(t75)); } - expressions[355] = BinaryenBinary(the_module, 99, expressions[354], expressions[353]); + expressions[365] = BinaryenBinary(the_module, 99, expressions[364], expressions[363]); { uint8_t t76[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[356] = BinaryenConst(the_module, BinaryenLiteralVec128(t76)); + expressions[366] = BinaryenConst(the_module, BinaryenLiteralVec128(t76)); } { uint8_t t77[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[357] = BinaryenConst(the_module, BinaryenLiteralVec128(t77)); + expressions[367] = BinaryenConst(the_module, BinaryenLiteralVec128(t77)); } - expressions[358] = BinaryenBinary(the_module, 100, expressions[357], expressions[356]); + expressions[368] = BinaryenBinary(the_module, 100, expressions[367], expressions[366]); { uint8_t t78[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[359] = BinaryenConst(the_module, BinaryenLiteralVec128(t78)); + expressions[369] = BinaryenConst(the_module, BinaryenLiteralVec128(t78)); } { uint8_t t79[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[360] = BinaryenConst(the_module, BinaryenLiteralVec128(t79)); + expressions[370] = BinaryenConst(the_module, BinaryenLiteralVec128(t79)); } - expressions[361] = BinaryenBinary(the_module, 101, expressions[360], expressions[359]); + expressions[371] = BinaryenBinary(the_module, 101, expressions[370], expressions[369]); { uint8_t t80[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[362] = BinaryenConst(the_module, BinaryenLiteralVec128(t80)); + expressions[372] = BinaryenConst(the_module, BinaryenLiteralVec128(t80)); } { uint8_t t81[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[363] = BinaryenConst(the_module, BinaryenLiteralVec128(t81)); + expressions[373] = BinaryenConst(the_module, BinaryenLiteralVec128(t81)); } - expressions[364] = BinaryenBinary(the_module, 102, expressions[363], expressions[362]); + expressions[374] = BinaryenBinary(the_module, 102, expressions[373], expressions[372]); { uint8_t t82[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[365] = BinaryenConst(the_module, BinaryenLiteralVec128(t82)); + expressions[375] = BinaryenConst(the_module, BinaryenLiteralVec128(t82)); } { uint8_t t83[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[366] = BinaryenConst(the_module, BinaryenLiteralVec128(t83)); + expressions[376] = BinaryenConst(the_module, BinaryenLiteralVec128(t83)); } - expressions[367] = BinaryenBinary(the_module, 103, expressions[366], expressions[365]); + expressions[377] = BinaryenBinary(the_module, 103, expressions[376], expressions[375]); { uint8_t t84[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[368] = BinaryenConst(the_module, BinaryenLiteralVec128(t84)); + expressions[378] = BinaryenConst(the_module, BinaryenLiteralVec128(t84)); } { uint8_t t85[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[369] = BinaryenConst(the_module, BinaryenLiteralVec128(t85)); + expressions[379] = BinaryenConst(the_module, BinaryenLiteralVec128(t85)); } - expressions[370] = BinaryenBinary(the_module, 104, expressions[369], expressions[368]); + expressions[380] = BinaryenBinary(the_module, 104, expressions[379], expressions[378]); { uint8_t t86[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[371] = BinaryenConst(the_module, BinaryenLiteralVec128(t86)); + expressions[381] = BinaryenConst(the_module, BinaryenLiteralVec128(t86)); } { uint8_t t87[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[372] = BinaryenConst(the_module, BinaryenLiteralVec128(t87)); + expressions[382] = BinaryenConst(the_module, BinaryenLiteralVec128(t87)); } - expressions[373] = BinaryenBinary(the_module, 105, expressions[372], expressions[371]); + expressions[383] = BinaryenBinary(the_module, 105, expressions[382], expressions[381]); { uint8_t t88[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[374] = BinaryenConst(the_module, BinaryenLiteralVec128(t88)); + expressions[384] = BinaryenConst(the_module, BinaryenLiteralVec128(t88)); } { uint8_t t89[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[375] = BinaryenConst(the_module, BinaryenLiteralVec128(t89)); + expressions[385] = BinaryenConst(the_module, BinaryenLiteralVec128(t89)); } - expressions[376] = BinaryenBinary(the_module, 106, expressions[375], expressions[374]); + expressions[386] = BinaryenBinary(the_module, 106, expressions[385], expressions[384]); { uint8_t t90[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[377] = BinaryenConst(the_module, BinaryenLiteralVec128(t90)); + expressions[387] = BinaryenConst(the_module, BinaryenLiteralVec128(t90)); } { uint8_t t91[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[378] = BinaryenConst(the_module, BinaryenLiteralVec128(t91)); + expressions[388] = BinaryenConst(the_module, BinaryenLiteralVec128(t91)); } - expressions[379] = BinaryenBinary(the_module, 107, expressions[378], expressions[377]); + expressions[389] = BinaryenBinary(the_module, 107, expressions[388], expressions[387]); { uint8_t t92[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[380] = BinaryenConst(the_module, BinaryenLiteralVec128(t92)); + expressions[390] = BinaryenConst(the_module, BinaryenLiteralVec128(t92)); } { uint8_t t93[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[381] = BinaryenConst(the_module, BinaryenLiteralVec128(t93)); + expressions[391] = BinaryenConst(the_module, BinaryenLiteralVec128(t93)); } - expressions[382] = BinaryenBinary(the_module, 108, expressions[381], expressions[380]); + expressions[392] = BinaryenBinary(the_module, 108, expressions[391], expressions[390]); { uint8_t t94[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[383] = BinaryenConst(the_module, BinaryenLiteralVec128(t94)); + expressions[393] = BinaryenConst(the_module, BinaryenLiteralVec128(t94)); } { uint8_t t95[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[384] = BinaryenConst(the_module, BinaryenLiteralVec128(t95)); + expressions[394] = BinaryenConst(the_module, BinaryenLiteralVec128(t95)); } - expressions[385] = BinaryenBinary(the_module, 109, expressions[384], expressions[383]); + expressions[395] = BinaryenBinary(the_module, 109, expressions[394], expressions[393]); { uint8_t t96[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[386] = BinaryenConst(the_module, BinaryenLiteralVec128(t96)); + expressions[396] = BinaryenConst(the_module, BinaryenLiteralVec128(t96)); } { uint8_t t97[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[387] = BinaryenConst(the_module, BinaryenLiteralVec128(t97)); + expressions[397] = BinaryenConst(the_module, BinaryenLiteralVec128(t97)); } - expressions[388] = BinaryenBinary(the_module, 110, expressions[387], expressions[386]); + expressions[398] = BinaryenBinary(the_module, 110, expressions[397], expressions[396]); { uint8_t t98[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[389] = BinaryenConst(the_module, BinaryenLiteralVec128(t98)); + expressions[399] = BinaryenConst(the_module, BinaryenLiteralVec128(t98)); } { uint8_t t99[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[390] = BinaryenConst(the_module, BinaryenLiteralVec128(t99)); + expressions[400] = BinaryenConst(the_module, BinaryenLiteralVec128(t99)); } - expressions[391] = BinaryenBinary(the_module, 111, expressions[390], expressions[389]); + expressions[401] = BinaryenBinary(the_module, 111, expressions[400], expressions[399]); { uint8_t t100[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[392] = BinaryenConst(the_module, BinaryenLiteralVec128(t100)); + expressions[402] = BinaryenConst(the_module, BinaryenLiteralVec128(t100)); } { uint8_t t101[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[393] = BinaryenConst(the_module, BinaryenLiteralVec128(t101)); + expressions[403] = BinaryenConst(the_module, BinaryenLiteralVec128(t101)); } - expressions[394] = BinaryenBinary(the_module, 112, expressions[393], expressions[392]); + expressions[404] = BinaryenBinary(the_module, 112, expressions[403], expressions[402]); { uint8_t t102[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[395] = BinaryenConst(the_module, BinaryenLiteralVec128(t102)); + expressions[405] = BinaryenConst(the_module, BinaryenLiteralVec128(t102)); } { uint8_t t103[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[396] = BinaryenConst(the_module, BinaryenLiteralVec128(t103)); + expressions[406] = BinaryenConst(the_module, BinaryenLiteralVec128(t103)); } - expressions[397] = BinaryenBinary(the_module, 113, expressions[396], expressions[395]); + expressions[407] = BinaryenBinary(the_module, 113, expressions[406], expressions[405]); { uint8_t t104[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[398] = BinaryenConst(the_module, BinaryenLiteralVec128(t104)); + expressions[408] = BinaryenConst(the_module, BinaryenLiteralVec128(t104)); } { uint8_t t105[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[399] = BinaryenConst(the_module, BinaryenLiteralVec128(t105)); + expressions[409] = BinaryenConst(the_module, BinaryenLiteralVec128(t105)); } - expressions[400] = BinaryenBinary(the_module, 114, expressions[399], expressions[398]); + expressions[410] = BinaryenBinary(the_module, 114, expressions[409], expressions[408]); { uint8_t t106[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[401] = BinaryenConst(the_module, BinaryenLiteralVec128(t106)); + expressions[411] = BinaryenConst(the_module, BinaryenLiteralVec128(t106)); } { uint8_t t107[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[402] = BinaryenConst(the_module, BinaryenLiteralVec128(t107)); + expressions[412] = BinaryenConst(the_module, BinaryenLiteralVec128(t107)); } - expressions[403] = BinaryenBinary(the_module, 115, expressions[402], expressions[401]); + expressions[413] = BinaryenBinary(the_module, 115, expressions[412], expressions[411]); { uint8_t t108[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[404] = BinaryenConst(the_module, BinaryenLiteralVec128(t108)); + expressions[414] = BinaryenConst(the_module, BinaryenLiteralVec128(t108)); } { uint8_t t109[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[405] = BinaryenConst(the_module, BinaryenLiteralVec128(t109)); + expressions[415] = BinaryenConst(the_module, BinaryenLiteralVec128(t109)); } - expressions[406] = BinaryenBinary(the_module, 116, expressions[405], expressions[404]); + expressions[416] = BinaryenBinary(the_module, 116, expressions[415], expressions[414]); { uint8_t t110[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[407] = BinaryenConst(the_module, BinaryenLiteralVec128(t110)); + expressions[417] = BinaryenConst(the_module, BinaryenLiteralVec128(t110)); } { uint8_t t111[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[408] = BinaryenConst(the_module, BinaryenLiteralVec128(t111)); + expressions[418] = BinaryenConst(the_module, BinaryenLiteralVec128(t111)); } - expressions[409] = BinaryenBinary(the_module, 117, expressions[408], expressions[407]); + expressions[419] = BinaryenBinary(the_module, 117, expressions[418], expressions[417]); { uint8_t t112[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[410] = BinaryenConst(the_module, BinaryenLiteralVec128(t112)); + expressions[420] = BinaryenConst(the_module, BinaryenLiteralVec128(t112)); } { uint8_t t113[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[411] = BinaryenConst(the_module, BinaryenLiteralVec128(t113)); + expressions[421] = BinaryenConst(the_module, BinaryenLiteralVec128(t113)); } - expressions[412] = BinaryenBinary(the_module, 118, expressions[411], expressions[410]); + expressions[422] = BinaryenBinary(the_module, 118, expressions[421], expressions[420]); { uint8_t t114[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[413] = BinaryenConst(the_module, BinaryenLiteralVec128(t114)); + expressions[423] = BinaryenConst(the_module, BinaryenLiteralVec128(t114)); } { uint8_t t115[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[414] = BinaryenConst(the_module, BinaryenLiteralVec128(t115)); + expressions[424] = BinaryenConst(the_module, BinaryenLiteralVec128(t115)); } - expressions[415] = BinaryenBinary(the_module, 119, expressions[414], expressions[413]); + expressions[425] = BinaryenBinary(the_module, 119, expressions[424], expressions[423]); { uint8_t t116[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[416] = BinaryenConst(the_module, BinaryenLiteralVec128(t116)); + expressions[426] = BinaryenConst(the_module, BinaryenLiteralVec128(t116)); } { uint8_t t117[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[417] = BinaryenConst(the_module, BinaryenLiteralVec128(t117)); + expressions[427] = BinaryenConst(the_module, BinaryenLiteralVec128(t117)); } - expressions[418] = BinaryenBinary(the_module, 120, expressions[417], expressions[416]); + expressions[428] = BinaryenBinary(the_module, 120, expressions[427], expressions[426]); { uint8_t t118[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[419] = BinaryenConst(the_module, BinaryenLiteralVec128(t118)); + expressions[429] = BinaryenConst(the_module, BinaryenLiteralVec128(t118)); } { uint8_t t119[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[420] = BinaryenConst(the_module, BinaryenLiteralVec128(t119)); + expressions[430] = BinaryenConst(the_module, BinaryenLiteralVec128(t119)); } - expressions[421] = BinaryenBinary(the_module, 121, expressions[420], expressions[419]); + expressions[431] = BinaryenBinary(the_module, 121, expressions[430], expressions[429]); { uint8_t t120[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[422] = BinaryenConst(the_module, BinaryenLiteralVec128(t120)); + expressions[432] = BinaryenConst(the_module, BinaryenLiteralVec128(t120)); } { uint8_t t121[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[423] = BinaryenConst(the_module, BinaryenLiteralVec128(t121)); + expressions[433] = BinaryenConst(the_module, BinaryenLiteralVec128(t121)); } - expressions[424] = BinaryenBinary(the_module, 122, expressions[423], expressions[422]); + expressions[434] = BinaryenBinary(the_module, 122, expressions[433], expressions[432]); { uint8_t t122[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[425] = BinaryenConst(the_module, BinaryenLiteralVec128(t122)); + expressions[435] = BinaryenConst(the_module, BinaryenLiteralVec128(t122)); } { uint8_t t123[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[426] = BinaryenConst(the_module, BinaryenLiteralVec128(t123)); + expressions[436] = BinaryenConst(the_module, BinaryenLiteralVec128(t123)); } - expressions[427] = BinaryenBinary(the_module, 123, expressions[426], expressions[425]); + expressions[437] = BinaryenBinary(the_module, 123, expressions[436], expressions[435]); { uint8_t t124[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[428] = BinaryenConst(the_module, BinaryenLiteralVec128(t124)); + expressions[438] = BinaryenConst(the_module, BinaryenLiteralVec128(t124)); } { uint8_t t125[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[429] = BinaryenConst(the_module, BinaryenLiteralVec128(t125)); + expressions[439] = BinaryenConst(the_module, BinaryenLiteralVec128(t125)); } - expressions[430] = BinaryenBinary(the_module, 124, expressions[429], expressions[428]); + expressions[440] = BinaryenBinary(the_module, 124, expressions[439], expressions[438]); { uint8_t t126[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[431] = BinaryenConst(the_module, BinaryenLiteralVec128(t126)); + expressions[441] = BinaryenConst(the_module, BinaryenLiteralVec128(t126)); } { uint8_t t127[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[432] = BinaryenConst(the_module, BinaryenLiteralVec128(t127)); + expressions[442] = BinaryenConst(the_module, BinaryenLiteralVec128(t127)); } - expressions[433] = BinaryenBinary(the_module, 125, expressions[432], expressions[431]); + expressions[443] = BinaryenBinary(the_module, 125, expressions[442], expressions[441]); { uint8_t t128[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[434] = BinaryenConst(the_module, BinaryenLiteralVec128(t128)); + expressions[444] = BinaryenConst(the_module, BinaryenLiteralVec128(t128)); } { uint8_t t129[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[435] = BinaryenConst(the_module, BinaryenLiteralVec128(t129)); + expressions[445] = BinaryenConst(the_module, BinaryenLiteralVec128(t129)); } - expressions[436] = BinaryenBinary(the_module, 126, expressions[435], expressions[434]); + expressions[446] = BinaryenBinary(the_module, 126, expressions[445], expressions[444]); { uint8_t t130[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[437] = BinaryenConst(the_module, BinaryenLiteralVec128(t130)); + expressions[447] = BinaryenConst(the_module, BinaryenLiteralVec128(t130)); } { uint8_t t131[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[438] = BinaryenConst(the_module, BinaryenLiteralVec128(t131)); + expressions[448] = BinaryenConst(the_module, BinaryenLiteralVec128(t131)); } - expressions[439] = BinaryenBinary(the_module, 127, expressions[438], expressions[437]); + expressions[449] = BinaryenBinary(the_module, 127, expressions[448], expressions[447]); { uint8_t t132[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[440] = BinaryenConst(the_module, BinaryenLiteralVec128(t132)); + expressions[450] = BinaryenConst(the_module, BinaryenLiteralVec128(t132)); } { uint8_t t133[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[441] = BinaryenConst(the_module, BinaryenLiteralVec128(t133)); + expressions[451] = BinaryenConst(the_module, BinaryenLiteralVec128(t133)); } - expressions[442] = BinaryenBinary(the_module, 128, expressions[441], expressions[440]); + expressions[452] = BinaryenBinary(the_module, 128, expressions[451], expressions[450]); { uint8_t t134[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[443] = BinaryenConst(the_module, BinaryenLiteralVec128(t134)); + expressions[453] = BinaryenConst(the_module, BinaryenLiteralVec128(t134)); } { uint8_t t135[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[444] = BinaryenConst(the_module, BinaryenLiteralVec128(t135)); + expressions[454] = BinaryenConst(the_module, BinaryenLiteralVec128(t135)); } - expressions[445] = BinaryenBinary(the_module, 129, expressions[444], expressions[443]); + expressions[455] = BinaryenBinary(the_module, 129, expressions[454], expressions[453]); { uint8_t t136[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[446] = BinaryenConst(the_module, BinaryenLiteralVec128(t136)); + expressions[456] = BinaryenConst(the_module, BinaryenLiteralVec128(t136)); } { uint8_t t137[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[447] = BinaryenConst(the_module, BinaryenLiteralVec128(t137)); + expressions[457] = BinaryenConst(the_module, BinaryenLiteralVec128(t137)); } - expressions[448] = BinaryenBinary(the_module, 130, expressions[447], expressions[446]); + expressions[458] = BinaryenBinary(the_module, 130, expressions[457], expressions[456]); { uint8_t t138[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[449] = BinaryenConst(the_module, BinaryenLiteralVec128(t138)); + expressions[459] = BinaryenConst(the_module, BinaryenLiteralVec128(t138)); } { uint8_t t139[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[450] = BinaryenConst(the_module, BinaryenLiteralVec128(t139)); + expressions[460] = BinaryenConst(the_module, BinaryenLiteralVec128(t139)); } - expressions[451] = BinaryenBinary(the_module, 131, expressions[450], expressions[449]); + expressions[461] = BinaryenBinary(the_module, 131, expressions[460], expressions[459]); { uint8_t t140[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[452] = BinaryenConst(the_module, BinaryenLiteralVec128(t140)); + expressions[462] = BinaryenConst(the_module, BinaryenLiteralVec128(t140)); } { uint8_t t141[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[453] = BinaryenConst(the_module, BinaryenLiteralVec128(t141)); + expressions[463] = BinaryenConst(the_module, BinaryenLiteralVec128(t141)); } - expressions[454] = BinaryenBinary(the_module, 132, expressions[453], expressions[452]); + expressions[464] = BinaryenBinary(the_module, 132, expressions[463], expressions[462]); { uint8_t t142[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[455] = BinaryenConst(the_module, BinaryenLiteralVec128(t142)); + expressions[465] = BinaryenConst(the_module, BinaryenLiteralVec128(t142)); } { uint8_t t143[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[456] = BinaryenConst(the_module, BinaryenLiteralVec128(t143)); + expressions[466] = BinaryenConst(the_module, BinaryenLiteralVec128(t143)); } - expressions[457] = BinaryenBinary(the_module, 133, expressions[456], expressions[455]); + expressions[467] = BinaryenBinary(the_module, 133, expressions[466], expressions[465]); { uint8_t t144[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[458] = BinaryenConst(the_module, BinaryenLiteralVec128(t144)); + expressions[468] = BinaryenConst(the_module, BinaryenLiteralVec128(t144)); } { uint8_t t145[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[459] = BinaryenConst(the_module, BinaryenLiteralVec128(t145)); + expressions[469] = BinaryenConst(the_module, BinaryenLiteralVec128(t145)); } - expressions[460] = BinaryenBinary(the_module, 134, expressions[459], expressions[458]); + expressions[470] = BinaryenBinary(the_module, 134, expressions[469], expressions[468]); { uint8_t t146[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[461] = BinaryenConst(the_module, BinaryenLiteralVec128(t146)); + expressions[471] = BinaryenConst(the_module, BinaryenLiteralVec128(t146)); } { uint8_t t147[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[462] = BinaryenConst(the_module, BinaryenLiteralVec128(t147)); + expressions[472] = BinaryenConst(the_module, BinaryenLiteralVec128(t147)); } - expressions[463] = BinaryenBinary(the_module, 135, expressions[462], expressions[461]); + expressions[473] = BinaryenBinary(the_module, 135, expressions[472], expressions[471]); { uint8_t t148[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[464] = BinaryenConst(the_module, BinaryenLiteralVec128(t148)); + expressions[474] = BinaryenConst(the_module, BinaryenLiteralVec128(t148)); } { uint8_t t149[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[465] = BinaryenConst(the_module, BinaryenLiteralVec128(t149)); + expressions[475] = BinaryenConst(the_module, BinaryenLiteralVec128(t149)); } - expressions[466] = BinaryenBinary(the_module, 136, expressions[465], expressions[464]); + expressions[476] = BinaryenBinary(the_module, 136, expressions[475], expressions[474]); { uint8_t t150[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[467] = BinaryenConst(the_module, BinaryenLiteralVec128(t150)); + expressions[477] = BinaryenConst(the_module, BinaryenLiteralVec128(t150)); } { uint8_t t151[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[468] = BinaryenConst(the_module, BinaryenLiteralVec128(t151)); + expressions[478] = BinaryenConst(the_module, BinaryenLiteralVec128(t151)); } - expressions[469] = BinaryenBinary(the_module, 137, expressions[468], expressions[467]); + expressions[479] = BinaryenBinary(the_module, 137, expressions[478], expressions[477]); { uint8_t t152[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[470] = BinaryenConst(the_module, BinaryenLiteralVec128(t152)); + expressions[480] = BinaryenConst(the_module, BinaryenLiteralVec128(t152)); } { uint8_t t153[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[471] = BinaryenConst(the_module, BinaryenLiteralVec128(t153)); + expressions[481] = BinaryenConst(the_module, BinaryenLiteralVec128(t153)); } - expressions[472] = BinaryenBinary(the_module, 138, expressions[471], expressions[470]); + expressions[482] = BinaryenBinary(the_module, 138, expressions[481], expressions[480]); { uint8_t t154[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[473] = BinaryenConst(the_module, BinaryenLiteralVec128(t154)); + expressions[483] = BinaryenConst(the_module, BinaryenLiteralVec128(t154)); } { uint8_t t155[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[474] = BinaryenConst(the_module, BinaryenLiteralVec128(t155)); + expressions[484] = BinaryenConst(the_module, BinaryenLiteralVec128(t155)); } - expressions[475] = BinaryenBinary(the_module, 139, expressions[474], expressions[473]); + expressions[485] = BinaryenBinary(the_module, 139, expressions[484], expressions[483]); { uint8_t t156[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[476] = BinaryenConst(the_module, BinaryenLiteralVec128(t156)); + expressions[486] = BinaryenConst(the_module, BinaryenLiteralVec128(t156)); } { uint8_t t157[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[477] = BinaryenConst(the_module, BinaryenLiteralVec128(t157)); + expressions[487] = BinaryenConst(the_module, BinaryenLiteralVec128(t157)); } - expressions[478] = BinaryenBinary(the_module, 140, expressions[477], expressions[476]); + expressions[488] = BinaryenBinary(the_module, 140, expressions[487], expressions[486]); { uint8_t t158[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[479] = BinaryenConst(the_module, BinaryenLiteralVec128(t158)); + expressions[489] = BinaryenConst(the_module, BinaryenLiteralVec128(t158)); } { uint8_t t159[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[480] = BinaryenConst(the_module, BinaryenLiteralVec128(t159)); + expressions[490] = BinaryenConst(the_module, BinaryenLiteralVec128(t159)); } - expressions[481] = BinaryenBinary(the_module, 141, expressions[480], expressions[479]); + expressions[491] = BinaryenBinary(the_module, 141, expressions[490], expressions[489]); { uint8_t t160[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[482] = BinaryenConst(the_module, BinaryenLiteralVec128(t160)); + expressions[492] = BinaryenConst(the_module, BinaryenLiteralVec128(t160)); } { uint8_t t161[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[483] = BinaryenConst(the_module, BinaryenLiteralVec128(t161)); + expressions[493] = BinaryenConst(the_module, BinaryenLiteralVec128(t161)); } - expressions[484] = BinaryenBinary(the_module, 142, expressions[483], expressions[482]); + expressions[494] = BinaryenBinary(the_module, 142, expressions[493], expressions[492]); { uint8_t t162[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[485] = BinaryenConst(the_module, BinaryenLiteralVec128(t162)); + expressions[495] = BinaryenConst(the_module, BinaryenLiteralVec128(t162)); } { uint8_t t163[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[486] = BinaryenConst(the_module, BinaryenLiteralVec128(t163)); + expressions[496] = BinaryenConst(the_module, BinaryenLiteralVec128(t163)); } - expressions[487] = BinaryenBinary(the_module, 143, expressions[486], expressions[485]); + expressions[497] = BinaryenBinary(the_module, 143, expressions[496], expressions[495]); { uint8_t t164[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[488] = BinaryenConst(the_module, BinaryenLiteralVec128(t164)); + expressions[498] = BinaryenConst(the_module, BinaryenLiteralVec128(t164)); } { uint8_t t165[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[489] = BinaryenConst(the_module, BinaryenLiteralVec128(t165)); + expressions[499] = BinaryenConst(the_module, BinaryenLiteralVec128(t165)); } - expressions[490] = BinaryenBinary(the_module, 144, expressions[489], expressions[488]); + expressions[500] = BinaryenBinary(the_module, 144, expressions[499], expressions[498]); { uint8_t t166[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[491] = BinaryenConst(the_module, BinaryenLiteralVec128(t166)); + expressions[501] = BinaryenConst(the_module, BinaryenLiteralVec128(t166)); } { uint8_t t167[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[492] = BinaryenConst(the_module, BinaryenLiteralVec128(t167)); + expressions[502] = BinaryenConst(the_module, BinaryenLiteralVec128(t167)); } - expressions[493] = BinaryenBinary(the_module, 145, expressions[492], expressions[491]); + expressions[503] = BinaryenBinary(the_module, 145, expressions[502], expressions[501]); { uint8_t t168[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[494] = BinaryenConst(the_module, BinaryenLiteralVec128(t168)); + expressions[504] = BinaryenConst(the_module, BinaryenLiteralVec128(t168)); } { uint8_t t169[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[495] = BinaryenConst(the_module, BinaryenLiteralVec128(t169)); + expressions[505] = BinaryenConst(the_module, BinaryenLiteralVec128(t169)); } - expressions[496] = BinaryenBinary(the_module, 146, expressions[495], expressions[494]); + expressions[506] = BinaryenBinary(the_module, 146, expressions[505], expressions[504]); { uint8_t t170[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[497] = BinaryenConst(the_module, BinaryenLiteralVec128(t170)); + expressions[507] = BinaryenConst(the_module, BinaryenLiteralVec128(t170)); } { uint8_t t171[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[498] = BinaryenConst(the_module, BinaryenLiteralVec128(t171)); + expressions[508] = BinaryenConst(the_module, BinaryenLiteralVec128(t171)); } - expressions[499] = BinaryenBinary(the_module, 147, expressions[498], expressions[497]); + expressions[509] = BinaryenBinary(the_module, 147, expressions[508], expressions[507]); { uint8_t t172[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[500] = BinaryenConst(the_module, BinaryenLiteralVec128(t172)); + expressions[510] = BinaryenConst(the_module, BinaryenLiteralVec128(t172)); } { uint8_t t173[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[501] = BinaryenConst(the_module, BinaryenLiteralVec128(t173)); + expressions[511] = BinaryenConst(the_module, BinaryenLiteralVec128(t173)); } - expressions[502] = BinaryenBinary(the_module, 148, expressions[501], expressions[500]); + expressions[512] = BinaryenBinary(the_module, 148, expressions[511], expressions[510]); { uint8_t t174[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[503] = BinaryenConst(the_module, BinaryenLiteralVec128(t174)); + expressions[513] = BinaryenConst(the_module, BinaryenLiteralVec128(t174)); } { uint8_t t175[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[504] = BinaryenConst(the_module, BinaryenLiteralVec128(t175)); + expressions[514] = BinaryenConst(the_module, BinaryenLiteralVec128(t175)); } - expressions[505] = BinaryenBinary(the_module, 149, expressions[504], expressions[503]); + expressions[515] = BinaryenBinary(the_module, 149, expressions[514], expressions[513]); { uint8_t t176[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[506] = BinaryenConst(the_module, BinaryenLiteralVec128(t176)); + expressions[516] = BinaryenConst(the_module, BinaryenLiteralVec128(t176)); } { uint8_t t177[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[507] = BinaryenConst(the_module, BinaryenLiteralVec128(t177)); + expressions[517] = BinaryenConst(the_module, BinaryenLiteralVec128(t177)); } - expressions[508] = BinaryenBinary(the_module, 150, expressions[507], expressions[506]); + expressions[518] = BinaryenBinary(the_module, 150, expressions[517], expressions[516]); { uint8_t t178[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[509] = BinaryenConst(the_module, BinaryenLiteralVec128(t178)); + expressions[519] = BinaryenConst(the_module, BinaryenLiteralVec128(t178)); } { uint8_t t179[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[510] = BinaryenConst(the_module, BinaryenLiteralVec128(t179)); + expressions[520] = BinaryenConst(the_module, BinaryenLiteralVec128(t179)); } - expressions[511] = BinaryenBinary(the_module, 151, expressions[510], expressions[509]); + expressions[521] = BinaryenBinary(the_module, 151, expressions[520], expressions[519]); { uint8_t t180[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[512] = BinaryenConst(the_module, BinaryenLiteralVec128(t180)); + expressions[522] = BinaryenConst(the_module, BinaryenLiteralVec128(t180)); } - expressions[513] = BinaryenSIMDExtract(the_module, 0, expressions[512], 0); + expressions[523] = BinaryenSIMDExtract(the_module, 0, expressions[522], 0); { uint8_t t181[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[514] = BinaryenConst(the_module, BinaryenLiteralVec128(t181)); + expressions[524] = BinaryenConst(the_module, BinaryenLiteralVec128(t181)); } - expressions[515] = BinaryenSIMDExtract(the_module, 1, expressions[514], 0); + expressions[525] = BinaryenSIMDExtract(the_module, 1, expressions[524], 0); { uint8_t t182[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[516] = BinaryenConst(the_module, BinaryenLiteralVec128(t182)); + expressions[526] = BinaryenConst(the_module, BinaryenLiteralVec128(t182)); } - expressions[517] = BinaryenSIMDExtract(the_module, 2, expressions[516], 0); + expressions[527] = BinaryenSIMDExtract(the_module, 2, expressions[526], 0); { uint8_t t183[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[518] = BinaryenConst(the_module, BinaryenLiteralVec128(t183)); + expressions[528] = BinaryenConst(the_module, BinaryenLiteralVec128(t183)); } - expressions[519] = BinaryenSIMDExtract(the_module, 3, expressions[518], 0); + expressions[529] = BinaryenSIMDExtract(the_module, 3, expressions[528], 0); { uint8_t t184[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[520] = BinaryenConst(the_module, BinaryenLiteralVec128(t184)); + expressions[530] = BinaryenConst(the_module, BinaryenLiteralVec128(t184)); } - expressions[521] = BinaryenSIMDExtract(the_module, 4, expressions[520], 0); + expressions[531] = BinaryenSIMDExtract(the_module, 4, expressions[530], 0); { uint8_t t185[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[522] = BinaryenConst(the_module, BinaryenLiteralVec128(t185)); + expressions[532] = BinaryenConst(the_module, BinaryenLiteralVec128(t185)); } - expressions[523] = BinaryenSIMDExtract(the_module, 5, expressions[522], 0); + expressions[533] = BinaryenSIMDExtract(the_module, 5, expressions[532], 0); { uint8_t t186[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[524] = BinaryenConst(the_module, BinaryenLiteralVec128(t186)); + expressions[534] = BinaryenConst(the_module, BinaryenLiteralVec128(t186)); } - expressions[525] = BinaryenSIMDExtract(the_module, 6, expressions[524], 0); + expressions[535] = BinaryenSIMDExtract(the_module, 6, expressions[534], 0); { uint8_t t187[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[526] = BinaryenConst(the_module, BinaryenLiteralVec128(t187)); + expressions[536] = BinaryenConst(the_module, BinaryenLiteralVec128(t187)); } - expressions[527] = BinaryenSIMDExtract(the_module, 7, expressions[526], 0); - expressions[528] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[537] = BinaryenSIMDExtract(the_module, 7, expressions[536], 0); + expressions[538] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); { uint8_t t188[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[529] = BinaryenConst(the_module, BinaryenLiteralVec128(t188)); + expressions[539] = BinaryenConst(the_module, BinaryenLiteralVec128(t188)); } - expressions[530] = BinaryenSIMDReplace(the_module, 0, expressions[529], 0, expressions[528]); - expressions[531] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[540] = BinaryenSIMDReplace(the_module, 0, expressions[539], 0, expressions[538]); + expressions[541] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); { uint8_t t189[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[532] = BinaryenConst(the_module, BinaryenLiteralVec128(t189)); + expressions[542] = BinaryenConst(the_module, BinaryenLiteralVec128(t189)); } - expressions[533] = BinaryenSIMDReplace(the_module, 1, expressions[532], 0, expressions[531]); - expressions[534] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[543] = BinaryenSIMDReplace(the_module, 1, expressions[542], 0, expressions[541]); + expressions[544] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); { uint8_t t190[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[535] = BinaryenConst(the_module, BinaryenLiteralVec128(t190)); + expressions[545] = BinaryenConst(the_module, BinaryenLiteralVec128(t190)); } - expressions[536] = BinaryenSIMDReplace(the_module, 2, expressions[535], 0, expressions[534]); - expressions[537] = BinaryenConst(the_module, BinaryenLiteralInt64(42)); + expressions[546] = BinaryenSIMDReplace(the_module, 2, expressions[545], 0, expressions[544]); + expressions[547] = BinaryenConst(the_module, BinaryenLiteralInt64(42)); { uint8_t t191[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[538] = BinaryenConst(the_module, BinaryenLiteralVec128(t191)); + expressions[548] = BinaryenConst(the_module, BinaryenLiteralVec128(t191)); } - expressions[539] = BinaryenSIMDReplace(the_module, 3, expressions[538], 0, expressions[537]); - expressions[540] = BinaryenConst(the_module, BinaryenLiteralFloat32(42)); + expressions[549] = BinaryenSIMDReplace(the_module, 3, expressions[548], 0, expressions[547]); + expressions[550] = BinaryenConst(the_module, BinaryenLiteralFloat32(42)); { uint8_t t192[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[541] = BinaryenConst(the_module, BinaryenLiteralVec128(t192)); + expressions[551] = BinaryenConst(the_module, BinaryenLiteralVec128(t192)); } - expressions[542] = BinaryenSIMDReplace(the_module, 4, expressions[541], 0, expressions[540]); - expressions[543] = BinaryenConst(the_module, BinaryenLiteralFloat64(42)); + expressions[552] = BinaryenSIMDReplace(the_module, 4, expressions[551], 0, expressions[550]); + expressions[553] = BinaryenConst(the_module, BinaryenLiteralFloat64(42)); { uint8_t t193[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[544] = BinaryenConst(the_module, BinaryenLiteralVec128(t193)); + expressions[554] = BinaryenConst(the_module, BinaryenLiteralVec128(t193)); } - expressions[545] = BinaryenSIMDReplace(the_module, 5, expressions[544], 0, expressions[543]); + expressions[555] = BinaryenSIMDReplace(the_module, 5, expressions[554], 0, expressions[553]); { uint8_t t194[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[546] = BinaryenConst(the_module, BinaryenLiteralVec128(t194)); + expressions[556] = BinaryenConst(the_module, BinaryenLiteralVec128(t194)); } - expressions[547] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[548] = BinaryenSIMDShift(the_module, 0, expressions[546], expressions[547]); + expressions[557] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[558] = BinaryenSIMDShift(the_module, 0, expressions[556], expressions[557]); { uint8_t t195[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[549] = BinaryenConst(the_module, BinaryenLiteralVec128(t195)); + expressions[559] = BinaryenConst(the_module, BinaryenLiteralVec128(t195)); } - expressions[550] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[551] = BinaryenSIMDShift(the_module, 1, expressions[549], expressions[550]); + expressions[560] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[561] = BinaryenSIMDShift(the_module, 1, expressions[559], expressions[560]); { uint8_t t196[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[552] = BinaryenConst(the_module, BinaryenLiteralVec128(t196)); + expressions[562] = BinaryenConst(the_module, BinaryenLiteralVec128(t196)); } - expressions[553] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[554] = BinaryenSIMDShift(the_module, 2, expressions[552], expressions[553]); + expressions[563] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[564] = BinaryenSIMDShift(the_module, 2, expressions[562], expressions[563]); { uint8_t t197[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[555] = BinaryenConst(the_module, BinaryenLiteralVec128(t197)); + expressions[565] = BinaryenConst(the_module, BinaryenLiteralVec128(t197)); } - expressions[556] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[557] = BinaryenSIMDShift(the_module, 3, expressions[555], expressions[556]); + expressions[566] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[567] = BinaryenSIMDShift(the_module, 3, expressions[565], expressions[566]); { uint8_t t198[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[558] = BinaryenConst(the_module, BinaryenLiteralVec128(t198)); + expressions[568] = BinaryenConst(the_module, BinaryenLiteralVec128(t198)); } - expressions[559] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[560] = BinaryenSIMDShift(the_module, 4, expressions[558], expressions[559]); + expressions[569] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[570] = BinaryenSIMDShift(the_module, 4, expressions[568], expressions[569]); { uint8_t t199[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[561] = BinaryenConst(the_module, BinaryenLiteralVec128(t199)); + expressions[571] = BinaryenConst(the_module, BinaryenLiteralVec128(t199)); } - expressions[562] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[563] = BinaryenSIMDShift(the_module, 5, expressions[561], expressions[562]); + expressions[572] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[573] = BinaryenSIMDShift(the_module, 5, expressions[571], expressions[572]); { uint8_t t200[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[564] = BinaryenConst(the_module, BinaryenLiteralVec128(t200)); + expressions[574] = BinaryenConst(the_module, BinaryenLiteralVec128(t200)); } - expressions[565] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[566] = BinaryenSIMDShift(the_module, 6, expressions[564], expressions[565]); + expressions[575] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[576] = BinaryenSIMDShift(the_module, 6, expressions[574], expressions[575]); { uint8_t t201[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[567] = BinaryenConst(the_module, BinaryenLiteralVec128(t201)); + expressions[577] = BinaryenConst(the_module, BinaryenLiteralVec128(t201)); } - expressions[568] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[569] = BinaryenSIMDShift(the_module, 7, expressions[567], expressions[568]); + expressions[578] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[579] = BinaryenSIMDShift(the_module, 7, expressions[577], expressions[578]); { uint8_t t202[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[570] = BinaryenConst(the_module, BinaryenLiteralVec128(t202)); + expressions[580] = BinaryenConst(the_module, BinaryenLiteralVec128(t202)); } - expressions[571] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[572] = BinaryenSIMDShift(the_module, 8, expressions[570], expressions[571]); + expressions[581] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[582] = BinaryenSIMDShift(the_module, 8, expressions[580], expressions[581]); { uint8_t t203[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[573] = BinaryenConst(the_module, BinaryenLiteralVec128(t203)); + expressions[583] = BinaryenConst(the_module, BinaryenLiteralVec128(t203)); } - expressions[574] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[575] = BinaryenSIMDShift(the_module, 9, expressions[573], expressions[574]); + expressions[584] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[585] = BinaryenSIMDShift(the_module, 9, expressions[583], expressions[584]); { uint8_t t204[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[576] = BinaryenConst(the_module, BinaryenLiteralVec128(t204)); + expressions[586] = BinaryenConst(the_module, BinaryenLiteralVec128(t204)); } - expressions[577] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[578] = BinaryenSIMDShift(the_module, 10, expressions[576], expressions[577]); + expressions[587] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[588] = BinaryenSIMDShift(the_module, 10, expressions[586], expressions[587]); { uint8_t t205[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[579] = BinaryenConst(the_module, BinaryenLiteralVec128(t205)); + expressions[589] = BinaryenConst(the_module, BinaryenLiteralVec128(t205)); } - expressions[580] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[581] = BinaryenSIMDShift(the_module, 11, expressions[579], expressions[580]); + expressions[590] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[591] = BinaryenSIMDShift(the_module, 11, expressions[589], expressions[590]); { uint8_t t206[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[582] = BinaryenConst(the_module, BinaryenLiteralVec128(t206)); + expressions[592] = BinaryenConst(the_module, BinaryenLiteralVec128(t206)); } { uint8_t t207[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[583] = BinaryenConst(the_module, BinaryenLiteralVec128(t207)); + expressions[593] = BinaryenConst(the_module, BinaryenLiteralVec128(t207)); } { uint8_t mask[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - expressions[584] = BinaryenSIMDShuffle(the_module, expressions[582], expressions[583], mask); + expressions[594] = BinaryenSIMDShuffle(the_module, expressions[592], expressions[593], mask); } { uint8_t t208[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[585] = BinaryenConst(the_module, BinaryenLiteralVec128(t208)); + expressions[595] = BinaryenConst(the_module, BinaryenLiteralVec128(t208)); } { uint8_t t209[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[586] = BinaryenConst(the_module, BinaryenLiteralVec128(t209)); + expressions[596] = BinaryenConst(the_module, BinaryenLiteralVec128(t209)); } { uint8_t t210[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[587] = BinaryenConst(the_module, BinaryenLiteralVec128(t210)); - } - expressions[588] = BinaryenSIMDBitselect(the_module, expressions[585], expressions[586], expressions[587]); - expressions[589] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); - expressions[590] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[591] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); - expressions[592] = BinaryenMemoryInit(the_module, 0, expressions[589], expressions[590], expressions[591]); - expressions[593] = BinaryenDataDrop(the_module, 0); - expressions[594] = BinaryenConst(the_module, BinaryenLiteralInt32(2048)); - expressions[595] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); - expressions[596] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); - expressions[597] = BinaryenMemoryCopy(the_module, expressions[594], expressions[595], expressions[596]); - expressions[598] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[599] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - expressions[600] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); - expressions[601] = BinaryenMemoryFill(the_module, expressions[598], expressions[599], expressions[600]); + expressions[597] = BinaryenConst(the_module, BinaryenLiteralVec128(t210)); + } + expressions[598] = BinaryenSIMDBitselect(the_module, expressions[595], expressions[596], expressions[597]); + expressions[599] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); + expressions[600] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[601] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); + expressions[602] = BinaryenMemoryInit(the_module, 0, expressions[599], expressions[600], expressions[601]); + expressions[603] = BinaryenDataDrop(the_module, 0); + expressions[604] = BinaryenConst(the_module, BinaryenLiteralInt32(2048)); + expressions[605] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); + expressions[606] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); + expressions[607] = BinaryenMemoryCopy(the_module, expressions[604], expressions[605], expressions[606]); + expressions[608] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[609] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[610] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); + expressions[611] = BinaryenMemoryFill(the_module, expressions[608], expressions[609], expressions[610]); { BinaryenExpressionRef children[] = { 0 }; - expressions[602] = BinaryenBlock(the_module, NULL, children, 0, BinaryenTypeAuto()); - } - expressions[603] = BinaryenIf(the_module, expressions[18], expressions[19], expressions[20]); - expressions[604] = BinaryenIf(the_module, expressions[21], expressions[22], expressions[0]); - expressions[605] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[606] = BinaryenLoop(the_module, "in", expressions[605]); - expressions[607] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[608] = BinaryenLoop(the_module, NULL, expressions[607]); - expressions[609] = BinaryenBreak(the_module, "the-value", expressions[23], expressions[24]); - expressions[610] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - expressions[611] = BinaryenBreak(the_module, "the-nothing", expressions[610], expressions[0]); - expressions[612] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - expressions[613] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[612]); - expressions[614] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]); + expressions[612] = BinaryenBlock(the_module, NULL, children, 0, BinaryenTypeAuto()); + } + expressions[613] = BinaryenIf(the_module, expressions[18], expressions[19], expressions[20]); + expressions[614] = BinaryenIf(the_module, expressions[21], expressions[22], expressions[0]); + expressions[615] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[616] = BinaryenLoop(the_module, "in", expressions[615]); + expressions[617] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[618] = BinaryenLoop(the_module, NULL, expressions[617]); + expressions[619] = BinaryenBreak(the_module, "the-value", expressions[23], expressions[24]); + expressions[620] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[621] = BinaryenBreak(the_module, "the-nothing", expressions[620], expressions[0]); + expressions[622] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + expressions[623] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[622]); + expressions[624] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]); { const char* names[] = { "the-value" }; - expressions[615] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[25], expressions[26]); + expressions[625] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[25], expressions[26]); } - expressions[616] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[626] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); { const char* names[] = { "the-nothing" }; - expressions[617] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[616], expressions[0]); + expressions[627] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[626], expressions[0]); } { BinaryenExpressionRef operands[] = { expressions[10], expressions[11], expressions[12], expressions[13] }; - expressions[618] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 1); + expressions[628] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 1); } - expressions[619] = BinaryenUnary(the_module, 20, expressions[618]); + expressions[629] = BinaryenUnary(the_module, 20, expressions[628]); { BinaryenExpressionRef operands[] = { expressions[8], expressions[9] }; - expressions[620] = BinaryenCall(the_module, "an-imported", operands, 2, 3); + expressions[630] = BinaryenCall(the_module, "an-imported", operands, 2, 3); } - expressions[621] = BinaryenUnary(the_module, 25, expressions[620]); - expressions[622] = BinaryenUnary(the_module, 20, expressions[621]); - expressions[623] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); + expressions[631] = BinaryenUnary(the_module, 25, expressions[630]); + expressions[632] = BinaryenUnary(the_module, 20, expressions[631]); + expressions[633] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); { BinaryenExpressionRef operands[] = { expressions[14], expressions[15], expressions[16], expressions[17] }; - expressions[624] = BinaryenCallIndirect(the_module, expressions[623], operands, 4, "iiIfF"); - } - expressions[625] = BinaryenUnary(the_module, 20, expressions[624]); - expressions[626] = BinaryenLocalGet(the_module, 0, 1); - expressions[627] = BinaryenDrop(the_module, expressions[626]); - expressions[628] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); - expressions[629] = BinaryenLocalSet(the_module, 0, expressions[628]); - expressions[630] = BinaryenConst(the_module, BinaryenLiteralInt32(102)); - expressions[631] = BinaryenLocalTee(the_module, 0, expressions[630]); - expressions[632] = BinaryenDrop(the_module, expressions[631]); - expressions[633] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[634] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[633]); - expressions[635] = BinaryenConst(the_module, BinaryenLiteralInt32(8)); - expressions[636] = BinaryenLoad(the_module, 2, 1, 2, 1, 2, expressions[635]); - expressions[637] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - expressions[638] = BinaryenLoad(the_module, 4, 0, 0, 0, 3, expressions[637]); - expressions[639] = BinaryenConst(the_module, BinaryenLiteralInt32(9)); - expressions[640] = BinaryenLoad(the_module, 8, 0, 2, 8, 4, expressions[639]); - expressions[641] = BinaryenStore(the_module, 4, 0, 0, expressions[30], expressions[31], 1); - expressions[642] = BinaryenStore(the_module, 8, 2, 4, expressions[32], expressions[33], 2); - expressions[643] = BinaryenSelect(the_module, expressions[27], expressions[28], expressions[29]); - expressions[644] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); - expressions[645] = BinaryenReturn(the_module, expressions[644]); + expressions[634] = BinaryenCallIndirect(the_module, expressions[633], operands, 4, "iiIfF"); + } + expressions[635] = BinaryenUnary(the_module, 20, expressions[634]); + expressions[636] = BinaryenLocalGet(the_module, 0, 1); + expressions[637] = BinaryenDrop(the_module, expressions[636]); + expressions[638] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); + expressions[639] = BinaryenLocalSet(the_module, 0, expressions[638]); + expressions[640] = BinaryenConst(the_module, BinaryenLiteralInt32(102)); + expressions[641] = BinaryenLocalTee(the_module, 0, expressions[640]); + expressions[642] = BinaryenDrop(the_module, expressions[641]); + expressions[643] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[644] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[643]); + expressions[645] = BinaryenConst(the_module, BinaryenLiteralInt32(8)); + expressions[646] = BinaryenLoad(the_module, 2, 1, 2, 1, 2, expressions[645]); + expressions[647] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[648] = BinaryenLoad(the_module, 4, 0, 0, 0, 3, expressions[647]); + expressions[649] = BinaryenConst(the_module, BinaryenLiteralInt32(9)); + expressions[650] = BinaryenLoad(the_module, 8, 0, 2, 8, 4, expressions[649]); + expressions[651] = BinaryenStore(the_module, 4, 0, 0, expressions[30], expressions[31], 1); + expressions[652] = BinaryenStore(the_module, 8, 2, 4, expressions[32], expressions[33], 2); + expressions[653] = BinaryenSelect(the_module, expressions[27], expressions[28], expressions[29]); + expressions[654] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); + expressions[655] = BinaryenReturn(the_module, expressions[654]); { BinaryenExpressionRef operands[] = { expressions[10], expressions[11], expressions[12], expressions[13] }; - expressions[646] = BinaryenReturnCall(the_module, "kitchen()sinker", operands, 4, 1); + expressions[656] = BinaryenReturnCall(the_module, "kitchen()sinker", operands, 4, 1); } - expressions[647] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); + expressions[657] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); { BinaryenExpressionRef operands[] = { expressions[14], expressions[15], expressions[16], expressions[17] }; - expressions[648] = BinaryenReturnCallIndirect(the_module, expressions[647], operands, 4, "iiIfF"); + expressions[658] = BinaryenReturnCallIndirect(the_module, expressions[657], operands, 4, "iiIfF"); } - expressions[649] = BinaryenNop(the_module); - expressions[650] = BinaryenUnreachable(the_module); - BinaryenExpressionPrint(expressions[41]); + expressions[659] = BinaryenTry(the_module, expressions[35], expressions[43]); + expressions[660] = BinaryenNop(the_module); + expressions[661] = BinaryenUnreachable(the_module); + BinaryenExpressionPrint(expressions[51]); (f32.neg (f32.const -33.61199951171875) ) { - BinaryenExpressionRef children[] = { expressions[35], expressions[37], expressions[39], expressions[41], expressions[43], - expressions[45], expressions[47], expressions[49], expressions[51], expressions[53], expressions[55], - expressions[57], expressions[59], expressions[61], expressions[63], expressions[65], expressions[67], - expressions[69], expressions[71], expressions[73], expressions[75], expressions[77], expressions[79], - expressions[81], expressions[83], expressions[85], expressions[87], expressions[89], expressions[91], - expressions[93], expressions[95], expressions[97], expressions[99], expressions[101], expressions[103], - expressions[105], expressions[107], expressions[109], expressions[111], expressions[113], expressions[115], - expressions[117], expressions[119], expressions[121], expressions[123], expressions[125], expressions[127], - expressions[129], expressions[131], expressions[133], expressions[135], expressions[137], expressions[139], - expressions[141], expressions[143], expressions[145], expressions[147], expressions[149], expressions[151], - expressions[153], expressions[155], expressions[157], expressions[159], expressions[161], expressions[163], - expressions[165], expressions[167], expressions[169], expressions[171], expressions[173], expressions[175], - expressions[177], expressions[179], expressions[181], expressions[183], expressions[185], expressions[187], - expressions[190], expressions[193], expressions[196], expressions[199], expressions[202], expressions[205], - expressions[208], expressions[211], expressions[214], expressions[217], expressions[220], expressions[223], - expressions[226], expressions[229], expressions[232], expressions[235], expressions[238], expressions[241], - expressions[244], expressions[247], expressions[250], expressions[253], expressions[256], expressions[259], - expressions[262], expressions[265], expressions[268], expressions[271], expressions[274], expressions[277], - expressions[280], expressions[283], expressions[286], expressions[289], expressions[292], expressions[295], - expressions[298], expressions[301], expressions[304], expressions[307], expressions[310], expressions[313], - expressions[316], expressions[319], expressions[322], expressions[325], expressions[328], expressions[331], - expressions[334], expressions[337], expressions[340], expressions[343], expressions[346], expressions[349], - expressions[352], expressions[355], expressions[358], expressions[361], expressions[364], expressions[367], - expressions[370], expressions[373], expressions[376], expressions[379], expressions[382], expressions[385], - expressions[388], expressions[391], expressions[394], expressions[397], expressions[400], expressions[403], - expressions[406], expressions[409], expressions[412], expressions[415], expressions[418], expressions[421], - expressions[424], expressions[427], expressions[430], expressions[433], expressions[436], expressions[439], - expressions[442], expressions[445], expressions[448], expressions[451], expressions[454], expressions[457], - expressions[460], expressions[463], expressions[466], expressions[469], expressions[472], expressions[475], - expressions[478], expressions[481], expressions[484], expressions[487], expressions[490], expressions[493], - expressions[496], expressions[499], expressions[502], expressions[505], expressions[508], expressions[511], - expressions[513], expressions[515], expressions[517], expressions[519], expressions[521], expressions[523], - expressions[525], expressions[527], expressions[530], expressions[533], expressions[536], expressions[539], - expressions[542], expressions[545], expressions[548], expressions[551], expressions[554], expressions[557], - expressions[560], expressions[563], expressions[566], expressions[569], expressions[572], expressions[575], - expressions[578], expressions[581], expressions[584], expressions[588], expressions[592], expressions[593], - expressions[597], expressions[601], expressions[602], expressions[603], expressions[604], expressions[606], - expressions[608], expressions[609], expressions[611], expressions[613], expressions[614], expressions[615], - expressions[617], expressions[619], expressions[622], expressions[625], expressions[627], expressions[629], - expressions[632], expressions[634], expressions[636], expressions[638], expressions[640], expressions[641], - expressions[642], expressions[643], expressions[645], expressions[646], expressions[648], expressions[649], - expressions[650] }; - expressions[651] = BinaryenBlock(the_module, "the-value", children, 246, BinaryenTypeAuto()); - } - expressions[652] = BinaryenDrop(the_module, expressions[651]); - { - BinaryenExpressionRef children[] = { expressions[652] }; - expressions[653] = BinaryenBlock(the_module, "the-nothing", children, 1, BinaryenTypeAuto()); - } - expressions[654] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - { - BinaryenExpressionRef children[] = { expressions[653], expressions[654] }; - expressions[655] = BinaryenBlock(the_module, "the-body", children, 2, BinaryenTypeAuto()); - } - { - BinaryenType varTypes[] = { 1 }; - functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 1, expressions[655]); - } - expressions[656] = BinaryenConst(the_module, BinaryenLiteralInt32(7)); - globals[0] = BinaryenAddGlobal(the_module, "a-global", 1, 0, expressions[656]); - expressions[657] = BinaryenConst(the_module, BinaryenLiteralFloat32(7.5)); - globals[1] = BinaryenAddGlobal(the_module, "a-mutable-global", 3, 1, expressions[657]); - { - BinaryenType paramTypes[] = { 1 }; - functionTypes[1] = BinaryenAddFunctionType(the_module, "vi", 0, paramTypes, 1); - } - BinaryenAddEvent(the_module, "a-event", 0, functionTypes[1]); + BinaryenExpressionRef children[] = { expressions[45], expressions[47], expressions[49], expressions[51], expressions[53], + expressions[55], expressions[57], expressions[59], expressions[61], expressions[63], expressions[65], + expressions[67], expressions[69], expressions[71], expressions[73], expressions[75], expressions[77], + expressions[79], expressions[81], expressions[83], expressions[85], expressions[87], expressions[89], + expressions[91], expressions[93], expressions[95], expressions[97], expressions[99], expressions[101], + expressions[103], expressions[105], expressions[107], expressions[109], expressions[111], expressions[113], + expressions[115], expressions[117], expressions[119], expressions[121], expressions[123], expressions[125], + expressions[127], expressions[129], expressions[131], expressions[133], expressions[135], expressions[137], + expressions[139], expressions[141], expressions[143], expressions[145], expressions[147], expressions[149], + expressions[151], expressions[153], expressions[155], expressions[157], expressions[159], expressions[161], + expressions[163], expressions[165], expressions[167], expressions[169], expressions[171], expressions[173], + expressions[175], expressions[177], expressions[179], expressions[181], expressions[183], expressions[185], + expressions[187], expressions[189], expressions[191], expressions[193], expressions[195], expressions[197], + expressions[200], expressions[203], expressions[206], expressions[209], expressions[212], expressions[215], + expressions[218], expressions[221], expressions[224], expressions[227], expressions[230], expressions[233], + expressions[236], expressions[239], expressions[242], expressions[245], expressions[248], expressions[251], + expressions[254], expressions[257], expressions[260], expressions[263], expressions[266], expressions[269], + expressions[272], expressions[275], expressions[278], expressions[281], expressions[284], expressions[287], + expressions[290], expressions[293], expressions[296], expressions[299], expressions[302], expressions[305], + expressions[308], expressions[311], expressions[314], expressions[317], expressions[320], expressions[323], + expressions[326], expressions[329], expressions[332], expressions[335], expressions[338], expressions[341], + expressions[344], expressions[347], expressions[350], expressions[353], expressions[356], expressions[359], + expressions[362], expressions[365], expressions[368], expressions[371], expressions[374], expressions[377], + expressions[380], expressions[383], expressions[386], expressions[389], expressions[392], expressions[395], + expressions[398], expressions[401], expressions[404], expressions[407], expressions[410], expressions[413], + expressions[416], expressions[419], expressions[422], expressions[425], expressions[428], expressions[431], + expressions[434], expressions[437], expressions[440], expressions[443], expressions[446], expressions[449], + expressions[452], expressions[455], expressions[458], expressions[461], expressions[464], expressions[467], + expressions[470], expressions[473], expressions[476], expressions[479], expressions[482], expressions[485], + expressions[488], expressions[491], expressions[494], expressions[497], expressions[500], expressions[503], + expressions[506], expressions[509], expressions[512], expressions[515], expressions[518], expressions[521], + expressions[523], expressions[525], expressions[527], expressions[529], expressions[531], expressions[533], + expressions[535], expressions[537], expressions[540], expressions[543], expressions[546], expressions[549], + expressions[552], expressions[555], expressions[558], expressions[561], expressions[564], expressions[567], + expressions[570], expressions[573], expressions[576], expressions[579], expressions[582], expressions[585], + expressions[588], expressions[591], expressions[594], expressions[598], expressions[602], expressions[603], + expressions[607], expressions[611], expressions[612], expressions[613], expressions[614], expressions[616], + expressions[618], expressions[619], expressions[621], expressions[623], expressions[624], expressions[625], + expressions[627], expressions[629], expressions[632], expressions[635], expressions[637], expressions[639], + expressions[642], expressions[644], expressions[646], expressions[648], expressions[650], expressions[651], + expressions[652], expressions[653], expressions[655], expressions[656], expressions[658], expressions[659], + expressions[660], expressions[661] }; + expressions[662] = BinaryenBlock(the_module, "the-value", children, 247, BinaryenTypeAuto()); + } + expressions[663] = BinaryenDrop(the_module, expressions[662]); + { + BinaryenExpressionRef children[] = { expressions[663] }; + expressions[664] = BinaryenBlock(the_module, "the-nothing", children, 1, BinaryenTypeAuto()); + } + expressions[665] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + { + BinaryenExpressionRef children[] = { expressions[664], expressions[665] }; + expressions[666] = BinaryenBlock(the_module, "the-body", children, 2, BinaryenTypeAuto()); + } + { + BinaryenType varTypes[] = { 1, 6 }; + functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 2, expressions[666]); + } + expressions[667] = BinaryenConst(the_module, BinaryenLiteralInt32(7)); + globals[0] = BinaryenAddGlobal(the_module, "a-global", 1, 0, expressions[667]); + expressions[668] = BinaryenConst(the_module, BinaryenLiteralFloat32(7.5)); + globals[1] = BinaryenAddGlobal(the_module, "a-mutable-global", 3, 1, expressions[668]); { BinaryenType paramTypes[] = { 1, 4 }; functionTypes[2] = BinaryenAddFunctionType(the_module, "fiF", 3, paramTypes, 2); @@ -3349,13 +3389,13 @@ int main() { const char* funcNames[] = { "kitchen()sinker" }; BinaryenSetFunctionTable(the_module, 1, 1, funcNames, 1); } - expressions[658] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + expressions[669] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); { const char segment0[] = { 104, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100 }; const char segment1[] = { 73, 32, 97, 109, 32, 112, 97, 115, 115, 105, 118, 101 }; const char* segments[] = { segment0, segment1 }; int8_t segmentPassive[] = { 0, 1 }; - BinaryenExpressionRef segmentOffsets[] = { expressions[658], expressions[0] }; + BinaryenExpressionRef segmentOffsets[] = { expressions[669], expressions[0] }; BinaryenIndex segmentSizes[] = { 12, 12 }; BinaryenSetMemory(the_module, 1, 256, "mem", segments, segmentPassive, segmentOffsets, segmentSizes, 2, 0); } @@ -3363,10 +3403,10 @@ int main() { BinaryenType paramTypes[] = { 0 }; functionTypes[3] = BinaryenAddFunctionType(the_module, "v", 0, paramTypes, 0); } - expressions[659] = BinaryenNop(the_module); + expressions[670] = BinaryenNop(the_module); { BinaryenType varTypes[] = { 0 }; - functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[3], varTypes, 0, expressions[659]); + functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[3], varTypes, 0, expressions[670]); } BinaryenSetStart(the_module, functions[1]); { @@ -3398,6 +3438,7 @@ int main() { (start $starter) (func "$kitchen()sinker" (; 1 ;) (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) (local $4 i32) + (local $5 exnref) (block $the-body (result i32) (block $the-nothing (drop @@ -4752,6 +4793,25 @@ int main() { (f64.const 3.7) (i32.const 2449) ) + (try + (throw $a-event + (i32.const 0) + ) + (catch + (local.set $5 + (exnref.pop) + ) + (drop + (block $try-block (result i32) + (rethrow + (br_on_exn $try-block $a-event + (local.get $5) + ) + ) + ) + ) + ) + ) (nop) (unreachable) ) diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt index fd8ee7e94..181b16718 100644 --- a/test/example/c-api-kitchen-sink.txt.txt +++ b/test/example/c-api-kitchen-sink.txt.txt @@ -21,6 +21,7 @@ (start $starter) (func "$kitchen()sinker" (; 1 ;) (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) (local $4 i32) + (local $5 exnref) (block $the-body (result i32) (block $the-nothing (drop @@ -1375,6 +1376,25 @@ (f64.const 3.7) (i32.const 2449) ) + (try + (throw $a-event + (i32.const 0) + ) + (catch + (local.set $5 + (exnref.pop) + ) + (drop + (block $try-block (result i32) + (rethrow + (br_on_exn $try-block $a-event + (local.get $5) + ) + ) + ) + ) + ) + ) (nop) (unreachable) ) diff --git a/test/exception-handling.wast b/test/exception-handling.wast index 63d2bdc3d..cb3aee0d9 100644 --- a/test/exception-handling.wast +++ b/test/exception-handling.wast @@ -1,6 +1,40 @@ (module - (memory 1 1) - (func $exnref_test (param $0 exnref) (result exnref) - (local.get $0) - ) + (event $e0 (attr 0) (param i32)) + + (func $exnref_test (param $0 exnref) (result exnref) + (local.get $0) + ) + + (func $eh_test (local $exn exnref) + (try + (throw $e0 (i32.const 0)) + (catch + ;; Multi-value is not available yet, so block can't take a value from + ;; stack. So this uses locals for now. + (local.set $exn (exnref.pop)) + (drop + (block $l0 (result i32) + (rethrow + (br_on_exn $l0 $e0 (local.get $exn)) + ) + ) + ) + ) + ) + + ;; Try with a block label + (try $l1 + (br $l1) + (catch + (br $l1) + ) + ) + + ;; Empty try body + (try + (catch + (drop (exnref.pop)) + ) + ) + ) ) diff --git a/test/exception-handling.wast.from-wast b/test/exception-handling.wast.from-wast index cc4d5a1a0..7c431a89f 100644 --- a/test/exception-handling.wast.from-wast +++ b/test/exception-handling.wast.from-wast @@ -1,7 +1,47 @@ (module (type $FUNCSIG$ee (func (param exnref) (result exnref))) - (memory $0 1 1) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (event $e0 (attr 0) (param i32)) (func $exnref_test (; 0 ;) (type $FUNCSIG$ee) (param $0 exnref) (result exnref) (local.get $0) ) + (func $eh_test (; 1 ;) (type $FUNCSIG$v) + (local $exn exnref) + (try + (throw $e0 + (i32.const 0) + ) + (catch + (local.set $exn + (exnref.pop) + ) + (drop + (block $l0 (result i32) + (rethrow + (br_on_exn $l0 $e0 + (local.get $exn) + ) + ) + ) + ) + ) + ) + (block $l1 + (try + (br $l1) + (catch + (br $l1) + ) + ) + ) + (try + (nop) + (catch + (drop + (exnref.pop) + ) + ) + ) + ) ) diff --git a/test/exception-handling.wast.fromBinary b/test/exception-handling.wast.fromBinary index 1cb238708..1cff3d215 100644 --- a/test/exception-handling.wast.fromBinary +++ b/test/exception-handling.wast.fromBinary @@ -1,8 +1,44 @@ (module (type $0 (func (param exnref) (result exnref))) - (memory $0 1 1) + (type $1 (func)) + (type $2 (func (param i32))) + (event $event$0 (attr 0) (param i32)) (func $exnref_test (; 0 ;) (type $0) (param $0 exnref) (result exnref) (local.get $0) ) + (func $eh_test (; 1 ;) (type $1) + (local $0 exnref) + (try + (throw $event$0 + (i32.const 0) + ) + (catch + (local.set $0 + (exnref.pop) + ) + (drop + (block $label$3 (result i32) + (rethrow + (br_on_exn $label$3 $event$0 + (local.get $0) + ) + ) + ) + ) + ) + ) + (block $label$4 + (try + (br $label$4) + (catch + (drop + (exnref.pop) + ) + (br $label$4) + ) + ) + ) + (unreachable) + ) ) diff --git a/test/exception-handling.wast.fromBinary.noDebugInfo b/test/exception-handling.wast.fromBinary.noDebugInfo index 11555cd10..23ba7946c 100644 --- a/test/exception-handling.wast.fromBinary.noDebugInfo +++ b/test/exception-handling.wast.fromBinary.noDebugInfo @@ -1,8 +1,44 @@ (module (type $0 (func (param exnref) (result exnref))) - (memory $0 1 1) + (type $1 (func)) + (type $2 (func (param i32))) + (event $event$0 (attr 0) (param i32)) (func $0 (; 0 ;) (type $0) (param $0 exnref) (result exnref) (local.get $0) ) + (func $1 (; 1 ;) (type $1) + (local $0 exnref) + (try + (throw $event$0 + (i32.const 0) + ) + (catch + (local.set $0 + (exnref.pop) + ) + (drop + (block $label$3 (result i32) + (rethrow + (br_on_exn $label$3 $event$0 + (local.get $0) + ) + ) + ) + ) + ) + ) + (block $label$4 + (try + (br $label$4) + (catch + (drop + (exnref.pop) + ) + (br $label$4) + ) + ) + ) + (unreachable) + ) ) diff --git a/test/extra-unreachable.wast b/test/extra-unreachable.wast index 441498de6..c47d45153 100644 --- a/test/extra-unreachable.wast +++ b/test/extra-unreachable.wast @@ -3,6 +3,7 @@ (memory (shared 1 1)) (table 0 funcref) (global $g (mut f32) (f32.const 0)) + (event $e (attr 0) (param i32)) (func $foo (param i32) (result i32) (i32.const 0)) @@ -39,10 +40,25 @@ (unreachable) ) - ;; If a br_if's type is unreachable, emit an extra unreachable after it + ;; If a try is unreachable, i.e., both the 'try' and 'catch' bodies are + ;; unreachable, we emit an extra unreachable after the try. + (try + (unreachable) + (catch + (unreachable) + ) + ) + + ;; If a br_if/br_on_exn's type is unreachable, emit an extra unreachable + ;; after it (block (br_if 0 (unreachable)) ) + (drop + (block (result i32) + (br_on_exn 0 $e (unreachable)) + ) + ) ;; If a br_table is not reachable, emit an unreachable instead (block $l @@ -174,7 +190,5 @@ (i32.const 0) ) ) - - ;; TODO Add exception handling instructions ) ) diff --git a/test/extra-unreachable.wast.from-wast b/test/extra-unreachable.wast.from-wast index 5d794148e..d889eed20 100644 --- a/test/extra-unreachable.wast.from-wast +++ b/test/extra-unreachable.wast.from-wast @@ -1,9 +1,11 @@ (module (type $ii (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (memory $0 (shared 1 1)) (table $0 0 funcref) (global $g (mut f32) (f32.const 0)) + (event $e (attr 0) (param i32)) (func $foo (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (i32.const 0) ) @@ -29,11 +31,24 @@ (unreachable) (unreachable) ) + (try + (unreachable) + (catch + (unreachable) + ) + ) (block $block1 (br_if $block1 (unreachable) ) ) + (drop + (block $block2 (result i32) + (br_on_exn $block2 $e + (unreachable) + ) + ) + ) (block $l (block $default (br_table $l $default diff --git a/test/extra-unreachable.wast.fromBinary b/test/extra-unreachable.wast.fromBinary index 11c23e009..c921e925e 100644 --- a/test/extra-unreachable.wast.fromBinary +++ b/test/extra-unreachable.wast.fromBinary @@ -1,9 +1,11 @@ (module (type $0 (func)) (type $1 (func (param i32) (result i32))) + (type $2 (func (param i32))) (memory $0 (shared 1 1)) (table $0 0 funcref) (global $global$0 (mut f32) (f32.const 0)) + (event $event$0 (attr 0) (param i32)) (func $foo (; 0 ;) (type $1) (param $0 i32) (result i32) (i32.const 0) ) diff --git a/test/extra-unreachable.wast.fromBinary.noDebugInfo b/test/extra-unreachable.wast.fromBinary.noDebugInfo index 1daf0114c..1cb1e02de 100644 --- a/test/extra-unreachable.wast.fromBinary.noDebugInfo +++ b/test/extra-unreachable.wast.fromBinary.noDebugInfo @@ -1,9 +1,11 @@ (module (type $0 (func)) (type $1 (func (param i32) (result i32))) + (type $2 (func (param i32))) (memory $0 (shared 1 1)) (table $0 0 funcref) (global $global$0 (mut f32) (f32.const 0)) + (event $event$0 (attr 0) (param i32)) (func $0 (; 0 ;) (type $1) (param $0 i32) (result i32) (i32.const 0) ) diff --git a/test/passes/generate-stack-ir_print-stack-ir_enable-exception-handling.txt b/test/passes/generate-stack-ir_print-stack-ir_enable-exception-handling.txt new file mode 100644 index 000000000..2a9cf6be7 --- /dev/null +++ b/test/passes/generate-stack-ir_print-stack-ir_enable-exception-handling.txt @@ -0,0 +1,47 @@ +(module + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (event $e0 (attr 0) (param i32)) + (func $eh (; 0 ;) (type $FUNCSIG$v) + (local $exn exnref) + try + i32.const 0 + throw $e0 + catch + local.set $exn + block $l0 (result i32) + local.get $exn + br_on_exn $l0 $e0 + rethrow + end + drop + end + ) +) +(module + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (event $e0 (attr 0) (param i32)) + (func $eh (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (local $exn exnref) + (try + (throw $e0 + (i32.const 0) + ) + (catch + (local.set $exn + (exnref.pop) + ) + (drop + (block $l0 (result i32) + (rethrow + (br_on_exn $l0 $e0 + (local.get $exn) + ) + ) + ) + ) + ) + ) + ) +) diff --git a/test/passes/generate-stack-ir_print-stack-ir_enable-exception-handling.wast b/test/passes/generate-stack-ir_print-stack-ir_enable-exception-handling.wast new file mode 100644 index 000000000..c355a2bf1 --- /dev/null +++ b/test/passes/generate-stack-ir_print-stack-ir_enable-exception-handling.wast @@ -0,0 +1,19 @@ +(module + (event $e0 (attr 0) (param i32)) + + (func $eh (local $exn exnref) + (try + (throw $e0 (i32.const 0)) + (catch + (local.set $exn (exnref.pop)) + (drop + (block $l0 (result i32) + (rethrow + (br_on_exn $l0 $e0 (local.get $exn)) + ) + ) + ) + ) + ) + ) +) diff --git a/test/spec/events.wast b/test/spec/events.wast index 2f4213927..d3371a782 100644 --- a/test/spec/events.wast +++ b/test/spec/events.wast @@ -16,12 +16,12 @@ (assert_invalid (module (event $e (attr 0) (param i32) (result i32))) - "Event type's result type should be none" + "Event type's result type should be none" ) (assert_invalid (module (event $e (attr 1) (param i32))) - "Currently only attribute 0 is supported" + "Currently only attribute 0 is supported" ) (assert_invalid @@ -33,6 +33,6 @@ (module (type $t (param i32)) (event $e (attr 0) (type $t) (param i32 f32)) - "type and param don't match" ) + "type and param don't match" ) diff --git a/test/spec/exception-handling.wast b/test/spec/exception-handling.wast new file mode 100644 index 000000000..d81bd433c --- /dev/null +++ b/test/spec/exception-handling.wast @@ -0,0 +1,123 @@ +(module + (event $e0 (attr 0) (param i32)) + (event $e1 (attr 0) (param i32 f32)) + + (func $exnref_test (param $0 exnref) (result exnref) + (local.get $0) + ) + + (func $eh_test (local $exn exnref) + (try + (throw $e0 (i32.const 0)) + (catch + ;; Multi-value is not available yet, so block can't take a value from + ;; stack. So this uses locals for now. + (local.set $exn (exnref.pop)) + (drop + (block $l0 (result i32) + (rethrow + (br_on_exn $l0 $e0 (local.get $exn)) + ) + ) + ) + ) + ) + ) +) + +(assert_invalid + (module + (func $f0 + (try + (nop) + (catch (i32.const 0)) + ) + ) + ) + "try's body type must match catch's body type" +) + +(assert_invalid + (module + (func $f0 + (try + (i32.const 0) + (catch (i32.const 0)) + ) + ) + ) + "try's type does not match try body's type" +) + +(assert_invalid + (module + (event $e0 (attr 0) (param i32)) + (func $f0 + (throw $e0 (f32.const 0)) + ) + ) + "event param types must match" +) + +(assert_invalid + (module + (event $e0 (attr 0) (param i32 f32)) + (func $f0 + (throw $e0 (f32.const 0)) + ) + ) + "event's param numbers must match" +) + +(assert_invalid + (module + (func $f0 + (rethrow (i32.const 0)) + ) + ) + "rethrow's argument must be exnref type" +) + +(assert_invalid + (module + (event $e0 (attr 0) (param i32)) + (func $f0 (result i32) + (block $l0 (result i32) + (drop + (br_on_exn $l0 $e0 (i32.const 0)) + ) + (i32.const 0) + ) + ) + ) + "br_on_exn's argument must be unreachable or exnref type" +) + +(assert_invalid + (module + (event $e0 (attr 0) (param i32)) + (func $f0 (result i32) (local $0 exnref) + (block $l0 (result i32) + (i32.eqz + (br_on_exn $l0 $e0 (local.get $0)) + ) + ) + ) + ) + "i32.eqz input must be i32" +) + +(assert_invalid + (module + (event $e0 (attr 0) (param i32)) + (func $f0 (result f32) (local $0 exnref) + (block $l0 (result f32) + (drop + (br_on_exn $l0 $e0 (local.get $0)) + ) + (f32.const 0) + ) + ) + ) + "block+breaks must have right type if breaks return a value" +) diff --git a/test/unit/input/exception_handling_target_feature.wasm b/test/unit/input/exception_handling_target_feature.wasm Binary files differnew file mode 100755 index 000000000..487aaf679 --- /dev/null +++ b/test/unit/input/exception_handling_target_feature.wasm diff --git a/test/unit/test_features.py b/test/unit/test_features.py index 1836aa08a..3fd362aed 100644 --- a/test/unit/test_features.py +++ b/test/unit/test_features.py @@ -145,6 +145,27 @@ class FeatureValidationTest(BinaryenTestCase): ''' self.check_tail_call(module, 'return_call_indirect requires tail calls to be enabled') + def test_exnref_local(self): + module = ''' + (module + (func $foo + (local exnref) + ) + ) + ''' + self.check_exception_handling(module, 'all used types should be allowed') + + def test_event(self): + module = ''' + (module + (event $e (attr 0) (param i32)) + (func $foo + (throw $e (i32.const 0)) + ) + ) + ''' + self.check_exception_handling(module, 'Module has events') + class TargetFeaturesSectionTest(BinaryenTestCase): def test_atomics(self): @@ -190,6 +211,12 @@ class TargetFeaturesSectionTest(BinaryenTestCase): self.check_features(filename, ['tail-call']) self.assertIn('return_call', self.disassemble(filename)) + def test_exception_handling(self): + filename = 'exception_handling_target_feature.wasm' + self.roundtrip(filename) + self.check_features(filename, ['exception-handling']) + self.assertIn('throw', self.disassemble(filename)) + def test_incompatible_features(self): path = self.input_path('signext_target_feature.wasm') p = run_process( |