diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2019-12-11 17:12:37 -0800 |
---|---|---|
committer | Alon Zakai <azakai@google.com> | 2019-12-11 17:12:37 -0800 |
commit | 759c485a9f35bd859d43b86b02e1397a669fa469 (patch) | |
tree | a5c7475002b406e35c6d1e5c2d843000947ef192 | |
parent | acd786dbd1e59f9d105c4ec8603c2ff46f233649 (diff) | |
download | binaryen-759c485a9f35bd859d43b86b02e1397a669fa469.tar.gz binaryen-759c485a9f35bd859d43b86b02e1397a669fa469.tar.bz2 binaryen-759c485a9f35bd859d43b86b02e1397a669fa469.zip |
Remove FunctionType (#2510)
Function signatures were previously redundantly stored on Function
objects as well as on FunctionType objects. These two signature
representations had to always be kept in sync, which was error-prone
and needlessly complex. This PR takes advantage of the new ability of
Type to represent multiple value types by consolidating function
signatures as a pair of Types (params and results) stored on the
Function object.
Since there are no longer module-global named function types,
significant changes had to be made to the printing and emitting of
function types, as well as their parsing and manipulation in various
passes.
The C and JS APIs and their tests also had to be updated to remove
named function types.
528 files changed, 12764 insertions, 13292 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dc5eedf0..c5011f6a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,9 @@ Current Trunk - Replace BinaryenSIMDBitselect* with BinaryenSIMDTernary* in the C API and add qfma/qfms instructions. - Added `offset` parameter to BinaryenSetFunctionTable. +- Add the ability to create multivalue Types in the C and JS APIs. +- Remove named function types. They are replaced by `params` and `results` types + local to each function. v88 --- diff --git a/scripts/clean_c_api_trace.py b/scripts/clean_c_api_trace.py index 006a0ce4f..6fcd5d4ae 100755 --- a/scripts/clean_c_api_trace.py +++ b/scripts/clean_c_api_trace.py @@ -22,8 +22,9 @@ import sys trace = open(sys.argv[1]).read() start = trace.find('// beginning a Binaryen API trace') +end = trace.rfind('// ending a Binaryen API trace') if start >= 0: - trace = trace[start:] + trace = trace[start:end] while 1: start = trace.find('\n(') diff --git a/src/abi/js.h b/src/abi/js.h index 52ca5657f..89e3f0087 100644 --- a/src/abi/js.h +++ b/src/abi/js.h @@ -52,22 +52,20 @@ extern cashew::IString SCRATCH_STORE_F64; inline void ensureScratchMemoryHelpers(Module* wasm, cashew::IString specific = cashew::IString()) { - auto ensureImport = - [&](Name name, const std::vector<Type> params, Type result) { - if (wasm->getFunctionOrNull(name)) { - return; - } - if (specific.is() && name != specific) { - return; - } - auto func = make_unique<Function>(); - func->name = name; - func->params = params; - func->result = result; - func->module = ENV; - func->base = name; - wasm->addFunction(std::move(func)); - }; + auto ensureImport = [&](Name name, Type params, Type results) { + if (wasm->getFunctionOrNull(name)) { + return; + } + if (specific.is() && name != specific) { + return; + } + auto func = make_unique<Function>(); + func->name = name; + func->sig = Signature(params, results); + func->module = ENV; + func->base = name; + wasm->addFunction(std::move(func)); + }; ensureImport(SCRATCH_LOAD_I32, {i32}, i32); ensureImport(SCRATCH_STORE_I32, {i32, i32}, none); diff --git a/src/abi/stack.h b/src/abi/stack.h index 68ac7f08a..265a7af6e 100644 --- a/src/abi/stack.h +++ b/src/abi/stack.h @@ -128,10 +128,10 @@ getStackSpace(Index local, Function* func, Index size, Module& wasm) { // no need to restore the old stack value, we're gone anyhow } else { // save the return value - auto temp = builder.addVar(func, func->result); + auto temp = builder.addVar(func, func->sig.results); block->list.push_back(builder.makeLocalSet(temp, func->body)); block->list.push_back(makeStackRestore()); - block->list.push_back(builder.makeLocalGet(temp, func->result)); + block->list.push_back(builder.makeLocalGet(temp, func->sig.results)); } block->finalize(); func->body = block; diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 048d363ef..fc841e634 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -28,7 +28,6 @@ #include "emscripten-optimizer/optimizer.h" #include "ir/bits.h" #include "ir/branch-utils.h" -#include "ir/function-type-utils.h" #include "ir/literal-utils.h" #include "ir/module-utils.h" #include "ir/trapping.h" @@ -509,47 +508,51 @@ private: // function types. we fill in this information as we see // uses, in the first pass - std::map<IString, std::unique_ptr<FunctionType>> importedFunctionTypes; + std::map<IString, Signature> importedSignatures; void noteImportedFunctionCall(Ref ast, Type resultType, Call* call) { assert(ast[0] == CALL && ast[1]->isString()); IString importName = ast[1]->getIString(); - auto type = make_unique<FunctionType>(); - type->name = IString((std::string("type$") + importName.str).c_str(), - false); // TODO: make a list of such types - type->result = resultType; + std::vector<Type> params; for (auto* operand : call->operands) { - type->params.push_back(operand->type); + params.push_back(operand->type); } + Signature sig = Signature(Type(params), resultType); // if we already saw this signature, verify it's the same (or else handle // that) - if (importedFunctionTypes.find(importName) != importedFunctionTypes.end()) { - FunctionType* previous = importedFunctionTypes[importName].get(); - if (*type != *previous) { + if (importedSignatures.find(importName) != importedSignatures.end()) { + Signature& previous = importedSignatures[importName]; + if (sig != previous) { + std::vector<Type> mergedParams = previous.params.expand(); // merge it in. we'll add on extra 0 parameters for ones not actually // used, and upgrade types to double where there is a conflict (which is // ok since in JS, double can contain everything i32 and f32 can). - for (size_t i = 0; i < type->params.size(); i++) { - if (previous->params.size() > i) { - if (previous->params[i] == none) { - previous->params[i] = type->params[i]; // use a more concrete type - } else if (previous->params[i] != type->params[i]) { - previous->params[i] = f64; // overloaded type, make it a double + for (size_t i = 0; i < params.size(); i++) { + if (mergedParams.size() > i) { + // TODO: Is this dead? + // if (mergedParams[i] == Type::none) { + // mergedParams[i] = params[i]; // use a more concrete type + // } else + if (mergedParams[i] != params[i]) { + mergedParams[i] = f64; // overloaded type, make it a double } } else { - previous->params.push_back(type->params[i]); // add a new param + mergedParams.push_back(params[i]); // add a new param } } + previous.params = Type(mergedParams); // we accept none and a concrete type, but two concrete types mean we // need to use an f64 to contain anything - if (previous->result == none) { - previous->result = type->result; // use a more concrete type - } else if (previous->result != type->result && type->result != none) { - previous->result = f64; // overloaded return type, make it a double + if (previous.results == Type::none) { + previous.results = sig.results; // use a more concrete type + } else if (previous.results != sig.results && + sig.results != Type::none) { + // overloaded return type, make it a double + previous.results = Type::f64; } } } else { - importedFunctionTypes[importName].swap(type); + importedSignatures[importName] = sig; } } @@ -566,10 +569,14 @@ private: return result; } - FunctionType* - getFunctionType(Ref parent, ExpressionList& operands, AsmData* data) { - Type result = getResultTypeOfCallUsingParent(parent, data); - return ensureFunctionType(getSig(result, operands), &wasm); + Signature getSignature(Ref parent, ExpressionList& operands, AsmData* data) { + Type results = getResultTypeOfCallUsingParent(parent, data); + std::vector<Type> paramTypes; + for (auto& op : operands) { + assert(op->type != Type::unreachable); + paramTypes.push_back(op->type); + } + return Signature(Type(paramTypes), results); } public: @@ -790,25 +797,29 @@ private: } } - FunctionType* getBuiltinFunctionType(Name module, - Name base, - ExpressionList* operands = nullptr) { + bool getBuiltinSignature(Signature& sig, + Name module, + Name base, + ExpressionList* operands = nullptr) { if (module == GLOBAL_MATH) { if (base == ABS) { assert(operands && operands->size() == 1); Type type = (*operands)[0]->type; if (type == i32) { - return ensureFunctionType("ii", &wasm); + sig = Signature(Type::i32, Type::i32); + return true; } if (type == f32) { - return ensureFunctionType("ff", &wasm); + sig = Signature(Type::f32, Type::f32); + return true; } if (type == f64) { - return ensureFunctionType("dd", &wasm); + sig = Signature(Type::f64, Type::f64); + return true; } } } - return nullptr; + return false; } // ensure a nameless block @@ -1043,6 +1054,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { import->name = name; import->module = moduleName; import->base = base; + import->sig = Signature(Type::none, Type::none); wasm.addFunction(import); } }; @@ -1377,16 +1389,13 @@ void Asm2WasmBuilder::processAsm(Ref ast) { ModuleUtils::iterImportedFunctions(wasm, [&](Function* import) { IString name = import->name; - if (importedFunctionTypes.find(name) != importedFunctionTypes.end()) { + if (importedSignatures.find(name) != importedSignatures.end()) { // special math builtins - FunctionType* builtin = - getBuiltinFunctionType(import->module, import->base); - if (builtin) { - import->type = builtin->name; + Signature builtin; + if (getBuiltinSignature(builtin, import->module, import->base)) { + import->sig = builtin; } else { - import->type = - ensureFunctionType(getSig(importedFunctionTypes[name].get()), &wasm) - ->name; + import->sig = importedSignatures[name]; } } else if (import->module != ASM2WASM) { // special-case the special module // never actually used, which means we don't know the function type since @@ -1399,12 +1408,6 @@ void Asm2WasmBuilder::processAsm(Ref ast) { wasm.removeFunction(curr); } - // Finalize function imports now that we've seen all the calls - - ModuleUtils::iterImportedFunctions(wasm, [&](Function* func) { - FunctionTypeUtils::fillFunction(func, wasm.getFunctionType(func->type)); - }); - // Finalize calls now that everything is known and generated struct FinalizeCalls : public WalkerPass<PostWalker<FinalizeCalls>> { @@ -1450,9 +1453,9 @@ void Asm2WasmBuilder::processAsm(Ref ast) { if (calledFunc && !calledFunc->imported()) { // The result type of the function being called is now known, and can be // applied. - auto result = calledFunc->result; - if (curr->type != result) { - curr->type = result; + auto results = calledFunc->sig.results; + if (curr->type != results) { + curr->type = results; } // Handle mismatched numbers of arguments. In clang, if a function is // declared one way but called in another, it inserts bitcasts to make @@ -1460,26 +1463,26 @@ void Asm2WasmBuilder::processAsm(Ref ast) { // parameters in native platforms, even though it's undefined behavior. // We warn about it here, but tolerate it, if there is a simple // solution. - if (curr->operands.size() < calledFunc->params.size()) { + const std::vector<Type>& params = calledFunc->sig.params.expand(); + if (curr->operands.size() < params.size()) { notifyAboutWrongOperands("warning: asm2wasm adding operands", calledFunc); - while (curr->operands.size() < calledFunc->params.size()) { + while (curr->operands.size() < params.size()) { // Add params as necessary, with zeros. curr->operands.push_back(LiteralUtils::makeZero( - calledFunc->params[curr->operands.size()], *getModule())); + params[curr->operands.size()], *getModule())); } } - if (curr->operands.size() > calledFunc->params.size()) { + if (curr->operands.size() > params.size()) { notifyAboutWrongOperands("warning: asm2wasm dropping operands", calledFunc); - curr->operands.resize(calledFunc->params.size()); + curr->operands.resize(params.size()); } // If the types are wrong, validation will fail later anyhow, but add a // warning here, it may help people. for (Index i = 0; i < curr->operands.size(); i++) { auto sent = curr->operands[i]->type; - auto expected = calledFunc->params[i]; - if (sent != unreachable && sent != expected) { + if (sent != Type::unreachable && sent != params[i]) { notifyAboutWrongOperands( "error: asm2wasm seeing an invalid argument type at index " + std::to_string(i) + " (this will not validate)", @@ -1490,23 +1493,23 @@ void Asm2WasmBuilder::processAsm(Ref ast) { // A call to an import // fill things out: add extra params as needed, etc. asm tolerates ffi // overloading, wasm does not - auto iter = parent->importedFunctionTypes.find(curr->target); - if (iter == parent->importedFunctionTypes.end()) { + auto iter = parent->importedSignatures.find(curr->target); + if (iter == parent->importedSignatures.end()) { return; // one of our fake imports for callIndirect fixups } - auto type = iter->second.get(); - for (size_t i = 0; i < type->params.size(); i++) { + const std::vector<Type>& params = iter->second.params.expand(); + for (size_t i = 0; i < params.size(); i++) { if (i >= curr->operands.size()) { // add a new param auto val = parent->allocator.alloc<Const>(); - val->type = val->value.type = type->params[i]; + val->type = val->value.type = params[i]; curr->operands.push_back(val); - } else if (curr->operands[i]->type != type->params[i]) { + } else if (curr->operands[i]->type != params[i]) { // if the param is used, then we have overloading here and the // combined type must be f64; if this is an unreachable param, then // it doesn't matter. - assert(type->params[i] == f64 || - curr->operands[i]->type == unreachable); + assert(params[i] == Type::f64 || + curr->operands[i]->type == Type::unreachable); // overloaded, upgrade to f64 switch (curr->operands[i]->type) { case i32: @@ -1522,12 +1525,11 @@ void Asm2WasmBuilder::processAsm(Ref ast) { } } Module* wasm = getModule(); - auto importResult = - wasm->getFunctionType(wasm->getFunction(curr->target)->type)->result; - if (curr->type != importResult) { + Type importResults = wasm->getFunction(curr->target)->sig.results; + if (curr->type != importResults) { auto old = curr->type; - curr->type = importResult; - if (importResult == f64) { + curr->type = importResults; + if (importResults == Type::f64) { // we use a JS f64 value which is the most general, and convert to // it switch (old) { @@ -1743,7 +1745,6 @@ void Asm2WasmBuilder::processAsm(Ref ast) { // if r then *r = x % y // returns x / y auto* func = wasm.getFunction(udivmoddi4); - assert(!func->type.is()); Builder::clearLocals(func); Index xl = Builder::addParam(func, "xl", i32), xh = Builder::addParam(func, "xh", i32), @@ -1786,6 +1787,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { BYN_TRACE("asm2wasming func: " << ast[1]->getIString().str << '\n'); auto function = new Function; + function->sig = Signature(Type::none, Type::none); function->name = name; Ref params = ast[2]; Ref body = ast[3]; @@ -1851,8 +1853,8 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { std::function<Expression*(Ref, unsigned)> processIgnoringShift; std::function<Expression*(Ref)> process = [&](Ref ast) -> Expression* { - AstStackHelper astStackHelper( - ast); // TODO: only create one when we need it? + // TODO: only create one when we need it? + AstStackHelper astStackHelper(ast); if (ast->isString()) { IString name = ast->getIString(); if (functionVariables.has(name)) { @@ -1873,9 +1875,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { import->name = DEBUGGER; import->module = ASM2WASM; import->base = DEBUGGER; - auto* functionType = ensureFunctionType("v", &wasm); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = Signature(Type::none, Type::none); wasm.addFunction(import); } return call; @@ -1989,9 +1989,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { import->name = F64_REM; import->module = ASM2WASM; import->base = F64_REM; - auto* functionType = ensureFunctionType("ddd", &wasm); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = Signature({Type::f64, Type::f64}, Type::f64); wasm.addFunction(import); } return call; @@ -2647,7 +2645,6 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { } break; } - default: {} } } // ftCall_* and mftCall_* represent function table calls, either from @@ -2685,10 +2682,10 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { auto specific = ret->dynCast<CallIndirect>(); // note that we could also get the type from the suffix of the name, // e.g., mftCall_vi - auto* fullType = getFunctionType( + auto sig = getSignature( astStackHelper.getParent(), specific->operands, &asmData); - specific->fullType = fullType->name; - specific->type = fullType->result; + specific->sig = sig; + specific->type = sig.results; } if (callImport) { // apply the detected type from the parent @@ -2719,10 +2716,10 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { for (unsigned i = 0; i < args->size(); i++) { ret->operands.push_back(process(args[i])); } - auto* fullType = - getFunctionType(astStackHelper.getParent(), ret->operands, &asmData); - ret->fullType = fullType->name; - ret->type = fullType->result; + auto sig = + getSignature(astStackHelper.getParent(), ret->operands, &asmData); + ret->sig = sig; + ret->type = sig.results; // we don't know the table offset yet. emit target = target + // callImport(tableName), which we fix up later when we know how asm // function tables are layed out inside the wasm table. @@ -2734,9 +2731,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { } else if (what == RETURN) { Type type = !!ast[1] ? detectWasmType(ast[1], &asmData) : none; if (seenReturn) { - assert(function->result == type); + assert(function->sig.results == type); } else { - function->result = type; + function->sig.results = type; } // wasm has no return, so we just break on the topmost block auto ret = allocator.alloc<Return>(); diff --git a/src/asm_v_wasm.h b/src/asm_v_wasm.h index 95b4cbbca..d7e2e5b24 100644 --- a/src/asm_v_wasm.h +++ b/src/asm_v_wasm.h @@ -28,19 +28,8 @@ Type asmToWasmType(AsmType asmType); AsmType wasmToAsmType(Type type); char getSig(Type type); - -template<typename ListType> -std::string getSig(const ListType& params, Type result) { - std::string ret; - ret += getSig(result); - for (auto param : params) { - ret += getSig(param); - } - return ret; -} - -std::string getSig(const FunctionType* type); std::string getSig(Function* func); +std::string getSig(Type results, Type params); template<typename T, typename std::enable_if<std::is_base_of<Expression, T>::value>::type* = @@ -74,21 +63,6 @@ std::string getSigFromStructs(Type result, const ListType& operands) { return ret; } -Type sigToType(char sig); - -FunctionType sigToFunctionType(const std::string& sig); - -FunctionType* -ensureFunctionType(const std::string& sig, Module* wasm, Name name = Name()); - -template<typename ListType> -FunctionType* ensureFunctionType(const ListType& params, - Type result, - Module* wasm, - Name name = Name()) { - return ensureFunctionType(getSig(params, result), wasm, name); -} - // converts an f32 to an f64 if necessary Expression* ensureDouble(Expression* expr, MixedArena& allocator); diff --git a/src/asmjs/asm_v_wasm.cpp b/src/asmjs/asm_v_wasm.cpp index 2fba0520a..3720ca079 100644 --- a/src/asmjs/asm_v_wasm.cpp +++ b/src/asmjs/asm_v_wasm.cpp @@ -89,62 +89,18 @@ char getSig(Type type) { WASM_UNREACHABLE("invalid type"); } -std::string getSig(const FunctionType* type) { - return getSig(type->params, type->result); -} - std::string getSig(Function* func) { - return getSig(func->params, func->result); -} - -Type sigToType(char sig) { - switch (sig) { - case 'i': - return i32; - case 'j': - return i64; - case 'f': - return f32; - case 'd': - return f64; - case 'V': - return v128; - case 'a': - return anyref; - case 'e': - return exnref; - case 'v': - return none; - default: - abort(); - } + return getSig(func->sig.results, func->sig.params); } -FunctionType sigToFunctionType(const std::string& sig) { - FunctionType ret; - ret.result = sigToType(sig[0]); - for (size_t i = 1; i < sig.size(); i++) { - ret.params.push_back(sigToType(sig[i])); - } - return ret; -} - -FunctionType* -ensureFunctionType(const std::string& sig, Module* wasm, Name name) { - if (!name.is()) { - name = "FUNCSIG$" + sig; - } - if (wasm->getFunctionTypeOrNull(name)) { - return wasm->getFunctionType(name); - } - // add new type - auto type = make_unique<FunctionType>(); - type->name = name; - type->result = sigToType(sig[0]); - for (size_t i = 1; i < sig.size(); i++) { - type->params.push_back(sigToType(sig[i])); +std::string getSig(Type results, Type params) { + assert(!results.isMulti()); + std::string sig; + sig += getSig(results); + for (Type t : params.expand()) { + sig += getSig(t); } - return wasm->addFunctionType(std::move(type)); + return sig; } Expression* ensureDouble(Expression* expr, MixedArena& allocator) { diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 87e1fdb0b..35f394fd1 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -22,7 +22,6 @@ #include "binaryen-c.h" #include "cfg/Relooper.h" -#include "ir/function-type-utils.h" #include "ir/utils.h" #include "pass.h" #include "shell-interface.h" @@ -105,7 +104,6 @@ Literal fromBinaryenLiteral(BinaryenLiteral x) { // module, but likely it doesn't matter) static std::mutex BinaryenFunctionMutex; -static std::mutex BinaryenFunctionTypeMutex; // Optimization options static PassOptions globalPassOptions = @@ -123,7 +121,6 @@ void traceNameOrNULL(const char* name, std::ostream& out = std::cout) { } } -std::map<BinaryenFunctionTypeRef, size_t> functionTypes; std::map<BinaryenExpressionRef, size_t> expressions; std::map<BinaryenFunctionRef, size_t> functions; std::map<BinaryenGlobalRef, size_t> globals; @@ -479,14 +476,12 @@ BinaryenModuleRef BinaryenModuleCreate(void) { void BinaryenModuleDispose(BinaryenModuleRef module) { if (tracing) { std::cout << " BinaryenModuleDispose(the_module);\n"; - std::cout << " functionTypes.clear();\n"; std::cout << " expressions.clear();\n"; std::cout << " functions.clear();\n"; std::cout << " globals.clear();\n"; std::cout << " events.clear();\n"; std::cout << " exports.clear();\n"; std::cout << " relooperBlocks.clear();\n"; - functionTypes.clear(); expressions.clear(); functions.clear(); globals.clear(); @@ -498,70 +493,7 @@ void BinaryenModuleDispose(BinaryenModuleRef module) { delete (Module*)module; } -// Function types - -BinaryenFunctionTypeRef BinaryenAddFunctionType(BinaryenModuleRef module, - const char* name, - BinaryenType result, - BinaryenType* paramTypes, - BinaryenIndex numParams) { - auto* wasm = (Module*)module; - auto ret = make_unique<FunctionType>(); - if (name) { - ret->name = name; - } else { - ret->name = Name::fromInt(wasm->functionTypes.size()); - } - ret->result = Type(result); - for (BinaryenIndex i = 0; i < numParams; i++) { - ret->params.push_back(Type(paramTypes[i])); - } - - if (tracing) { - std::cout << " {\n"; - std::cout << " BinaryenType paramTypes[] = { "; - for (BinaryenIndex i = 0; i < numParams; i++) { - if (i > 0) { - std::cout << ", "; - } - std::cout << paramTypes[i]; - } - if (numParams == 0) { - // ensure the array is not empty, otherwise a compiler error on VS - std::cout << "0"; - } - std::cout << " };\n"; - size_t id = functionTypes.size(); - std::cout << " functionTypes[" << id - << "] = BinaryenAddFunctionType(the_module, "; - functionTypes[ret.get()] = id; - traceNameOrNULL(name); - std::cout << ", " << result << ", paramTypes, " << numParams << ");\n"; - std::cout << " }\n"; - } - - // Lock. This can be called from multiple threads at once, and is a - // point where they all access and modify the module. - std::lock_guard<std::mutex> lock(BinaryenFunctionTypeMutex); - return wasm->addFunctionType(std::move(ret)); -} -void BinaryenRemoveFunctionType(BinaryenModuleRef module, const char* name) { - if (tracing) { - std::cout << " BinaryenRemoveFunctionType(the_module, "; - traceNameOrNULL(name); - std::cout << ");\n"; - } - - auto* wasm = (Module*)module; - assert(name != NULL); - - // Lock. This can be called from multiple threads at once, and is a - // point where they all access and modify the module. - { - std::lock_guard<std::mutex> lock(BinaryenFunctionTypeMutex); - wasm->removeFunctionType(name); - } -} +// Literals BinaryenLiteral BinaryenLiteralInt32(int32_t x) { return toBinaryenLiteral(Literal(x)); @@ -1180,7 +1112,8 @@ makeBinaryenCallIndirect(BinaryenModuleRef module, BinaryenExpressionRef target, BinaryenExpressionRef* operands, BinaryenIndex numOperands, - const char* type, + BinaryenType params, + BinaryenType results, bool isReturn) { auto* wasm = (Module*)module; auto* ret = wasm->allocator.alloc<CallIndirect>(); @@ -1205,7 +1138,8 @@ makeBinaryenCallIndirect(BinaryenModuleRef module, target, "operands", numOperands, - StringLit(type)); + params, + results); std::cout << " }\n"; } @@ -1213,8 +1147,8 @@ makeBinaryenCallIndirect(BinaryenModuleRef module, for (BinaryenIndex i = 0; i < numOperands; i++) { ret->operands.push_back((Expression*)operands[i]); } - ret->fullType = type; - ret->type = wasm->getFunctionType(ret->fullType)->result; + ret->sig = Signature(Type(params), Type(results)); + ret->type = Type(results); ret->isReturn = isReturn; ret->finalize(); return static_cast<Expression*>(ret); @@ -1223,18 +1157,20 @@ BinaryenExpressionRef BinaryenCallIndirect(BinaryenModuleRef module, BinaryenExpressionRef target, BinaryenExpressionRef* operands, BinaryenIndex numOperands, - const char* type) { + BinaryenType params, + BinaryenType results) { return makeBinaryenCallIndirect( - module, target, operands, numOperands, type, false); + module, target, operands, numOperands, params, results, false); } BinaryenExpressionRef BinaryenReturnCallIndirect(BinaryenModuleRef module, BinaryenExpressionRef target, BinaryenExpressionRef* operands, BinaryenIndex numOperands, - const char* type) { + BinaryenType params, + BinaryenType results) { return makeBinaryenCallIndirect( - module, target, operands, numOperands, type, true); + module, target, operands, numOperands, params, results, true); } BinaryenExpressionRef BinaryenLocalGet(BinaryenModuleRef module, BinaryenIndex index, @@ -3126,7 +3062,8 @@ BinaryenExpressionRef BinaryenBrOnExnGetExnref(BinaryenExpressionRef expr) { BinaryenFunctionRef BinaryenAddFunction(BinaryenModuleRef module, const char* name, - BinaryenFunctionTypeRef type, + BinaryenType params, + BinaryenType results, BinaryenType* varTypes, BinaryenIndex numVarTypes, BinaryenExpressionRef body) { @@ -3150,18 +3087,14 @@ BinaryenFunctionRef BinaryenAddFunction(BinaryenModuleRef module, auto id = functions.size(); functions[ret] = id; std::cout << " functions[" << id - << "] = BinaryenAddFunction(the_module, \"" << name - << "\", functionTypes[" << functionTypes[type] << "], varTypes, " - << numVarTypes << ", expressions[" << expressions[body] - << "]);\n"; + << "] = BinaryenAddFunction(the_module, \"" << name << "\", " + << params << ", " << results << ", varTypes, " << numVarTypes + << ", expressions[" << expressions[body] << "]);\n"; std::cout << " }\n"; } ret->name = name; - ret->type = ((FunctionType*)type)->name; - auto* functionType = wasm->getFunctionType(ret->type); - ret->result = functionType->result; - ret->params = functionType->params; + ret->sig = Signature(Type(params), Type(results)); for (BinaryenIndex i = 0; i < numVarTypes; i++) { ret->vars.push_back(Type(varTypes[i])); } @@ -3301,21 +3234,21 @@ void BinaryenAddFunctionImport(BinaryenModuleRef module, const char* internalName, const char* externalModuleName, const char* externalBaseName, - BinaryenFunctionTypeRef functionType) { + BinaryenType params, + BinaryenType results) { auto* wasm = (Module*)module; auto* ret = new Function(); if (tracing) { std::cout << " BinaryenAddFunctionImport(the_module, \"" << internalName << "\", \"" << externalModuleName << "\", \"" << externalBaseName - << "\", functionTypes[" << functionTypes[functionType] << "]);\n"; + << "\", " << params << ", " << results << ");\n"; } ret->name = internalName; ret->module = externalModuleName; ret->base = externalBaseName; - ret->type = ((FunctionType*)functionType)->name; - FunctionTypeUtils::fillFunction(ret, (FunctionType*)functionType); + ret->sig = Signature(Type(params), Type(results)); wasm->addFunction(ret); } void BinaryenAddTableImport(BinaryenModuleRef module, @@ -4082,46 +4015,6 @@ const char* BinaryenModuleGetDebugInfoFileName(BinaryenModuleRef module, } // -// ======== FunctionType Operations ======== -// - -const char* BinaryenFunctionTypeGetName(BinaryenFunctionTypeRef ftype) { - if (tracing) { - std::cout << " BinaryenFunctionTypeGetName(functionsTypes[" - << functionTypes[ftype] << "]);\n"; - } - - return ((FunctionType*)ftype)->name.c_str(); -} -BinaryenIndex BinaryenFunctionTypeGetNumParams(BinaryenFunctionTypeRef ftype) { - if (tracing) { - std::cout << " BinaryenFunctionTypeGetNumParams(functionsTypes[" - << functionTypes[ftype] << "]);\n"; - } - - return ((FunctionType*)ftype)->params.size(); -} -BinaryenType BinaryenFunctionTypeGetParam(BinaryenFunctionTypeRef ftype, - BinaryenIndex index) { - if (tracing) { - std::cout << " BinaryenFunctionTypeGetParam(functionsTypes[" - << functionTypes[ftype] << "], " << index << ");\n"; - } - - auto* ft = (FunctionType*)ftype; - assert(index < ft->params.size()); - return ft->params[index]; -} -BinaryenType BinaryenFunctionTypeGetResult(BinaryenFunctionTypeRef ftype) { - if (tracing) { - std::cout << " BinaryenFunctionTypeGetResult(functionsTypes[" - << functionTypes[ftype] << "]);\n"; - } - - return ((FunctionType*)ftype)->result; -} - -// // ========== Function Operations ========== // @@ -4133,40 +4026,21 @@ const char* BinaryenFunctionGetName(BinaryenFunctionRef func) { return ((Function*)func)->name.c_str(); } -const char* BinaryenFunctionGetType(BinaryenFunctionRef func) { - if (tracing) { - std::cout << " BinaryenFunctionGetType(functions[" << functions[func] - << "]);\n"; - } - - return ((Function*)func)->type.c_str(); -} -BinaryenIndex BinaryenFunctionGetNumParams(BinaryenFunctionRef func) { +BinaryenType BinaryenFunctionGetParams(BinaryenFunctionRef func) { if (tracing) { - std::cout << " BinaryenFunctionGetNumParams(functions[" << functions[func] + std::cout << " BinaryenFunctionGetParams(functions[" << functions[func] << "]);\n"; } - return ((Function*)func)->params.size(); + return ((Function*)func)->sig.params; } -BinaryenType BinaryenFunctionGetParam(BinaryenFunctionRef func, - BinaryenIndex index) { +BinaryenType BinaryenFunctionGetResults(BinaryenFunctionRef func) { if (tracing) { - std::cout << " BinaryenFunctionGetParam(functions[" << functions[func] - << "], " << index << ");\n"; - } - - auto* fn = (Function*)func; - assert(index < fn->params.size()); - return fn->params[index]; -} -BinaryenType BinaryenFunctionGetResult(BinaryenFunctionRef func) { - if (tracing) { - std::cout << " BinaryenFunctionGetResult(functions[" << functions[func] + std::cout << " BinaryenFunctionGetResults(functions[" << functions[func] << "]);\n"; } - return ((Function*)func)->result; + return ((Function*)func)->sig.results; } BinaryenIndex BinaryenFunctionGetNumVars(BinaryenFunctionRef func) { if (tracing) { @@ -4625,7 +4499,6 @@ void BinaryenSetAPITracing(int on) { "#include <map>\n" "#include \"binaryen-c.h\"\n" "int main() {\n" - " std::map<size_t, BinaryenFunctionTypeRef> functionTypes;\n" " std::map<size_t, BinaryenExpressionRef> expressions;\n" " std::map<size_t, BinaryenFunctionRef> functions;\n" " std::map<size_t, BinaryenGlobalRef> globals;\n" @@ -4637,6 +4510,7 @@ void BinaryenSetAPITracing(int on) { } else { std::cout << " return 0;\n"; std::cout << "}\n"; + std::cout << "// ending a Binaryen API trace\n"; } } @@ -4644,36 +4518,6 @@ void BinaryenSetAPITracing(int on) { // ========= Utilities ========= // -BinaryenFunctionTypeRef -BinaryenGetFunctionTypeBySignature(BinaryenModuleRef module, - BinaryenType result, - BinaryenType* paramTypes, - BinaryenIndex numParams) { - if (tracing) { - std::cout << " // BinaryenGetFunctionTypeBySignature\n"; - } - - auto* wasm = (Module*)module; - FunctionType test; - test.result = Type(result); - for (BinaryenIndex i = 0; i < numParams; i++) { - test.params.push_back(Type(paramTypes[i])); - } - - // Lock. Guard against reading the list while types are being added. - { - std::lock_guard<std::mutex> lock(BinaryenFunctionTypeMutex); - for (BinaryenIndex i = 0; i < wasm->functionTypes.size(); i++) { - FunctionType* curr = wasm->functionTypes[i].get(); - if (curr->structuralComparison(test)) { - return curr; - } - } - } - - return NULL; -} - void BinaryenSetColorsEnabled(int enabled) { Colors::setEnabled(enabled); } int BinaryenAreColorsEnabled() { return Colors::isEnabled(); } diff --git a/src/binaryen-c.h b/src/binaryen-c.h index 046a56363..ab3210644 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -30,11 +30,10 @@ // --------------- // // Thread safety: You can create Expressions in parallel, as they do not -// refer to global state. BinaryenAddFunction and -// BinaryenAddFunctionType are also thread-safe, which means -// that you can create functions and their contents in multiple -// threads. This is important since functions are where the -// majority of the work is done. +// refer to global state. BinaryenAddFunction is also +// thread-safe, which means that you can create functions and +// their contents in multiple threads. This is important since +// functions are where the majority of the work is done. // Other methods - creating imports, exports, etc. - are // not currently thread-safe (as there is typically no need // to parallelize them). @@ -213,22 +212,6 @@ BINARYEN_REF(Module); BINARYEN_API BinaryenModuleRef BinaryenModuleCreate(void); BINARYEN_API void BinaryenModuleDispose(BinaryenModuleRef module); -// Function types - -BINARYEN_REF(FunctionType); - -// Add a new function type. This is thread-safe. -// Note: name can be NULL, in which case we auto-generate a name -BINARYEN_API BinaryenFunctionTypeRef -BinaryenAddFunctionType(BinaryenModuleRef module, - const char* name, - BinaryenType result, - BinaryenType* paramTypes, - BinaryenIndex numParams); -// Removes a function type. -BINARYEN_API void BinaryenRemoveFunctionType(BinaryenModuleRef module, - const char* name); - // Literals. These are passed by value. struct BinaryenLiteral { @@ -632,7 +615,8 @@ BinaryenCallIndirect(BinaryenModuleRef module, BinaryenExpressionRef target, BinaryenExpressionRef* operands, BinaryenIndex numOperands, - const char* type); + BinaryenType params, + BinaryenType results); BINARYEN_API BinaryenExpressionRef BinaryenReturnCall(BinaryenModuleRef module, const char* target, @@ -644,7 +628,8 @@ BinaryenReturnCallIndirect(BinaryenModuleRef module, BinaryenExpressionRef target, BinaryenExpressionRef* operands, BinaryenIndex numOperands, - const char* type); + BinaryenType params, + BinaryenType results); // LocalGet: Note the 'type' parameter. It might seem redundant, since the // local at that index must have a type. However, this API lets you @@ -1083,7 +1068,8 @@ BINARYEN_REF(Function); BINARYEN_API BinaryenFunctionRef BinaryenAddFunction(BinaryenModuleRef module, const char* name, - BinaryenFunctionTypeRef type, + BinaryenType params, + BinaryenType results, BinaryenType* varTypes, BinaryenIndex numVarTypes, BinaryenExpressionRef body); @@ -1102,12 +1088,12 @@ BinaryenGetFunctionByIndex(BinaryenModuleRef module, BinaryenIndex id); // Imports -BINARYEN_API void -BinaryenAddFunctionImport(BinaryenModuleRef module, - const char* internalName, - const char* externalModuleName, - const char* externalBaseName, - BinaryenFunctionTypeRef functionType); +BINARYEN_API void BinaryenAddFunctionImport(BinaryenModuleRef module, + const char* internalName, + const char* externalModuleName, + const char* externalBaseName, + BinaryenType params, + BinaryenType results); BINARYEN_API void BinaryenAddTableImport(BinaryenModuleRef module, const char* internalName, const char* externalModuleName, @@ -1361,41 +1347,16 @@ BinaryenModuleGetDebugInfoFileName(BinaryenModuleRef module, BinaryenIndex index); // -// ======== FunctionType Operations ======== -// - -// Gets the name of the specified `FunctionType`. -BINARYEN_API const char* -BinaryenFunctionTypeGetName(BinaryenFunctionTypeRef ftype); -// Gets the number of parameters of the specified `FunctionType`. -BINARYEN_API BinaryenIndex -BinaryenFunctionTypeGetNumParams(BinaryenFunctionTypeRef ftype); -// Gets the type of the parameter at the specified index of the specified -// `FunctionType`. -BINARYEN_API BinaryenType BinaryenFunctionTypeGetParam( - BinaryenFunctionTypeRef ftype, BinaryenIndex index); -// Gets the result type of the specified `FunctionType`. -BINARYEN_API BinaryenType -BinaryenFunctionTypeGetResult(BinaryenFunctionTypeRef ftype); - -// // ========== Function Operations ========== // // Gets the name of the specified `Function`. BINARYEN_API const char* BinaryenFunctionGetName(BinaryenFunctionRef func); -// Gets the name of the `FunctionType` associated with the specified `Function`. -// May be `NULL` if the signature is implicit. -BINARYEN_API const char* BinaryenFunctionGetType(BinaryenFunctionRef func); -// Gets the number of parameters of the specified `Function`. -BINARYEN_API BinaryenIndex -BinaryenFunctionGetNumParams(BinaryenFunctionRef func); // Gets the type of the parameter at the specified index of the specified // `Function`. -BINARYEN_API BinaryenType BinaryenFunctionGetParam(BinaryenFunctionRef func, - BinaryenIndex index); +BINARYEN_API BinaryenType BinaryenFunctionGetParams(BinaryenFunctionRef func); // Gets the result type of the specified `Function`. -BINARYEN_API BinaryenType BinaryenFunctionGetResult(BinaryenFunctionRef func); +BINARYEN_API BinaryenType BinaryenFunctionGetResults(BinaryenFunctionRef func); // Gets the number of additional locals within the specified `Function`. BINARYEN_API BinaryenIndex BinaryenFunctionGetNumVars(BinaryenFunctionRef func); // Gets the type of the additional local at the specified index within the @@ -1574,17 +1535,6 @@ BINARYEN_API void BinaryenSetAPITracing(int on); // ========= Utilities ========= // -// Note that this function has been added because there is no better alternative -// currently and is scheduled for removal once there is one. It takes the same -// set of parameters as BinaryenAddFunctionType but instead of adding a new -// function signature, it returns a pointer to the existing signature or NULL if -// there is no such signature yet. -BINARYEN_API BinaryenFunctionTypeRef -BinaryenGetFunctionTypeBySignature(BinaryenModuleRef module, - BinaryenType result, - BinaryenType* paramTypes, - BinaryenIndex numParams); - // Enable or disable coloring for the WASM printer BINARYEN_API void BinaryenSetColorsEnabled(int enabled); diff --git a/src/ir/ExpressionAnalyzer.cpp b/src/ir/ExpressionAnalyzer.cpp index f7b7b636e..5128f525b 100644 --- a/src/ir/ExpressionAnalyzer.cpp +++ b/src/ir/ExpressionAnalyzer.cpp @@ -59,7 +59,7 @@ bool ExpressionAnalyzer::isResultUsed(ExpressionStack& stack, Function* func) { } } // The value might be used, so it depends on if the function returns - return func->result != none; + return func->sig.results != Type::none; } // Checks if a value is dropped. @@ -137,7 +137,8 @@ template<typename T> void visitImmediates(Expression* curr, T& visitor) { visitor.visitInt(curr->isReturn); } void visitCallIndirect(CallIndirect* curr) { - visitor.visitNonScopeName(curr->fullType); + visitor.visitInt(curr->sig.params); + visitor.visitInt(curr->sig.results); visitor.visitInt(curr->isReturn); } void visitLocalGet(LocalGet* curr) { visitor.visitIndex(curr->index); } diff --git a/src/ir/ExpressionManipulator.cpp b/src/ir/ExpressionManipulator.cpp index 2542e5743..fd0e6fd75 100644 --- a/src/ir/ExpressionManipulator.cpp +++ b/src/ir/ExpressionManipulator.cpp @@ -79,12 +79,12 @@ flexibleCopy(Expression* original, Module& wasm, CustomCopier custom) { return ret; } Expression* visitCallIndirect(CallIndirect* curr) { - auto* ret = builder.makeCallIndirect( - curr->fullType, copy(curr->target), {}, curr->type, curr->isReturn); - for (Index i = 0; i < curr->operands.size(); i++) { - ret->operands.push_back(copy(curr->operands[i])); + std::vector<Expression*> copiedOps; + for (auto op : curr->operands) { + copiedOps.push_back(copy(op)); } - return ret; + return builder.makeCallIndirect( + copy(curr->target), copiedOps, curr->sig, curr->isReturn); } Expression* visitLocalGet(LocalGet* curr) { return builder.makeLocalGet(curr->index, curr->type); diff --git a/src/ir/ReFinalize.cpp b/src/ir/ReFinalize.cpp index a8054d261..be0a8604b 100644 --- a/src/ir/ReFinalize.cpp +++ b/src/ir/ReFinalize.cpp @@ -145,15 +145,12 @@ void ReFinalize::visitPop(Pop* curr) { curr->finalize(); } void ReFinalize::visitFunction(Function* curr) { // we may have changed the body from unreachable to none, which might be bad // if the function has a return value - if (curr->result != none && curr->body->type == none) { + if (curr->sig.results != Type::none && curr->body->type == Type::none) { Builder builder(*getModule()); curr->body = builder.blockify(curr->body, builder.makeUnreachable()); } } -void ReFinalize::visitFunctionType(FunctionType* curr) { - WASM_UNREACHABLE("unimp"); -} void ReFinalize::visitExport(Export* curr) { WASM_UNREACHABLE("unimp"); } void ReFinalize::visitGlobal(Global* curr) { WASM_UNREACHABLE("unimp"); } void ReFinalize::visitTable(Table* curr) { WASM_UNREACHABLE("unimp"); } diff --git a/src/ir/function-type-utils.h b/src/ir/function-type-utils.h deleted file mode 100644 index ee1e95f70..000000000 --- a/src/ir/function-type-utils.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2018 WebAssembly Community Group participants - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef wasm_ir_function_type_utils_h -#define wasm_ir_function_type_utils_h - -namespace wasm { - -namespace FunctionTypeUtils { - -// Fills in function info from a function type -inline void fillFunction(Function* func, FunctionType* type) { - func->params = type->params; - func->result = type->result; -} - -} // namespace FunctionTypeUtils - -} // namespace wasm - -#endif // wasm_ir_function_type_utils_h diff --git a/src/ir/function-utils.h b/src/ir/function-utils.h index 61af153a0..f172240e2 100644 --- a/src/ir/function-utils.h +++ b/src/ir/function-utils.h @@ -28,23 +28,17 @@ namespace FunctionUtils { // everything but their name (which can't be the same, in the same // module!) - same params, vars, body, result, etc. inline bool equal(Function* left, Function* right) { - if (left->getNumParams() != right->getNumParams()) { + if (left->sig != right->sig) { return false; } if (left->getNumVars() != right->getNumVars()) { return false; } - for (Index i = 0; i < left->getNumLocals(); i++) { + for (Index i = left->sig.params.size(); i < left->getNumLocals(); i++) { if (left->getLocalType(i) != right->getLocalType(i)) { return false; } } - if (left->result != right->result) { - return false; - } - if (left->type != right->type) { - return false; - } if (!left->imported() && !right->imported()) { return ExpressionAnalyzer::equal(left->body, right->body); } diff --git a/src/ir/hashed.h b/src/ir/hashed.h index a3d285cf5..9e9717cda 100644 --- a/src/ir/hashed.h +++ b/src/ir/hashed.h @@ -82,18 +82,11 @@ struct FunctionHasher : public WalkerPass<PostWalker<FunctionHasher>> { static HashType hashFunction(Function* func) { HashType ret = 0; - ret = rehash(ret, (HashType)func->getNumParams()); - for (auto type : func->params) { - ret = rehash(ret, (HashType)type); - } - ret = rehash(ret, (HashType)func->getNumVars()); + ret = rehash(ret, (HashType)func->sig.params); + ret = rehash(ret, (HashType)func->sig.results); for (auto type : func->vars) { ret = rehash(ret, (HashType)type); } - ret = rehash(ret, (HashType)func->result); - ret = rehash(ret, - HashType(func->type.is() ? std::hash<wasm::Name>{}(func->type) - : HashType(0))); ret = rehash(ret, (HashType)ExpressionAnalyzer::hash(func->body)); return ret; } diff --git a/src/ir/module-utils.h b/src/ir/module-utils.h index e212ae8dc..d84648dfd 100644 --- a/src/ir/module-utils.h +++ b/src/ir/module-utils.h @@ -63,11 +63,8 @@ struct BinaryIndexes { inline Function* copyFunction(Function* func, Module& out) { auto* ret = new Function(); ret->name = func->name; - ret->result = func->result; - ret->params = func->params; + ret->sig = func->sig; ret->vars = func->vars; - // start with no named type; the names in the other module may differ - ret->type = Name(); ret->localNames = func->localNames; ret->localIndices = func->localIndices; ret->debugLocations = func->debugLocations; @@ -108,9 +105,6 @@ inline Event* copyEvent(Event* event, Module& out) { inline void copyModule(const Module& in, Module& out) { // we use names throughout, not raw pointers, so simple copying is fine // for everything *but* expressions - for (auto& curr : in.functionTypes) { - out.addFunctionType(make_unique<FunctionType>(*curr)); - } for (auto& curr : in.exports) { out.addExport(new Export(*curr)); } @@ -137,7 +131,6 @@ inline void copyModule(const Module& in, Module& out) { } inline void clearModule(Module& wasm) { - wasm.functionTypes.clear(); wasm.exports.clear(); wasm.functions.clear(); wasm.globals.clear(); @@ -413,6 +406,64 @@ template<typename T> struct CallGraphPropertyAnalysis { } }; +// Helper function for collecting the type signature used in a module +// +// Used when emitting or printing a module to give signatures canonical +// indices. Signatures are sorted in order of decreasing frequency to minize the +// size of their collective encoding. Both a vector mapping indices to +// signatures and a map mapping signatures to indices are produced. +inline void +collectSignatures(Module& wasm, + std::vector<Signature>& signatures, + std::unordered_map<Signature, Index>& sigIndices) { + using Counts = std::unordered_map<Signature, size_t>; + + // Collect the signature use counts for a single function + auto updateCounts = [&](Function* func, Counts& counts) { + if (func->imported()) { + return; + } + struct TypeCounter : PostWalker<TypeCounter> { + Counts& counts; + + TypeCounter(Counts& counts) : counts(counts) {} + + void visitCallIndirect(CallIndirect* curr) { counts[curr->sig]++; } + }; + TypeCounter(counts).walk(func->body); + }; + + ModuleUtils::ParallelFunctionAnalysis<Counts> analysis(wasm, updateCounts); + + // Collect all the counts. + Counts counts; + for (auto& curr : wasm.functions) { + counts[curr->sig]++; + } + for (auto& curr : wasm.events) { + counts[curr->sig]++; + } + for (auto& pair : analysis.map) { + Counts& functionCounts = pair.second; + for (auto& innerPair : functionCounts) { + counts[innerPair.first] += innerPair.second; + } + } + std::vector<std::pair<Signature, size_t>> sorted(counts.begin(), + counts.end()); + std::sort(sorted.begin(), sorted.end(), [&](auto a, auto b) { + // order by frequency then simplicity + if (a.second != b.second) { + return a.second > b.second; + } + return a.first < b.first; + }); + for (Index i = 0; i < sorted.size(); ++i) { + sigIndices[sorted[i].first] = i; + signatures.push_back(sorted[i].first); + } +} + } // namespace ModuleUtils } // namespace wasm diff --git a/src/ir/utils.h b/src/ir/utils.h index 722277bc3..cad7bc885 100644 --- a/src/ir/utils.h +++ b/src/ir/utils.h @@ -157,7 +157,6 @@ struct ReFinalize void visitFunction(Function* curr); - void visitFunctionType(FunctionType* curr); void visitExport(Export* curr); void visitGlobal(Global* curr); void visitTable(Table* curr); @@ -220,7 +219,6 @@ struct ReFinalizeNode : public OverriddenVisitor<ReFinalizeNode> { void visitPush(Push* curr) { curr->finalize(); } void visitPop(Pop* curr) { curr->finalize(); } - void visitFunctionType(FunctionType* curr) { WASM_UNREACHABLE("unimp"); } void visitExport(Export* curr) { WASM_UNREACHABLE("unimp"); } void visitGlobal(Global* curr) { WASM_UNREACHABLE("unimp"); } void visitTable(Table* curr) { WASM_UNREACHABLE("unimp"); } @@ -300,7 +298,7 @@ struct AutoDrop : public WalkerPass<ExpressionStackWalker<AutoDrop>> { void doWalkFunction(Function* curr) { ReFinalize().walkFunctionInModule(curr, getModule()); walk(curr->body); - if (curr->result == none && curr->body->type.isConcrete()) { + if (curr->sig.results == Type::none && curr->body->type.isConcrete()) { curr->body = Builder(*getModule()).makeDrop(curr->body); } ReFinalize().walkFunctionInModule(curr, getModule()); diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index 3d732c1fc..65a4e15dc 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -1,5 +1,4 @@ // export friendly API methods - function preserveStack(func) { try { var stack = stackSave(); @@ -518,9 +517,9 @@ function wrapModule(module, self) { return Module['_BinaryenCall'](module, strToStack(name), i32sToStack(operands), operands.length, type); }); }; - self['callIndirect'] = self['call_indirect'] = function(target, operands, type) { + self['callIndirect'] = self['call_indirect'] = function(target, operands, params, results) { return preserveStack(function() { - return Module['_BinaryenCallIndirect'](module, target, i32sToStack(operands), operands.length, strToStack(type)); + return Module['_BinaryenCallIndirect'](module, target, i32sToStack(operands), operands.length, params, results); }); }; self['returnCall'] = function(name, operands, type) { @@ -528,9 +527,9 @@ function wrapModule(module, self) { return Module['_BinaryenReturnCall'](module, strToStack(name), i32sToStack(operands), operands.length, type); }); }; - self['returnCallIndirect'] = function(target, operands, type) { + self['returnCallIndirect'] = function(target, operands, params, results) { return preserveStack(function() { - return Module['_BinaryenReturnCallIndirect'](module, target, i32sToStack(operands), operands.length, strToStack(type)); + return Module['_BinaryenReturnCallIndirect'](module, target, i32sToStack(operands), operands.length, params, results); }); }; @@ -2008,28 +2007,9 @@ function wrapModule(module, self) { }; // 'Module' operations - self['addFunctionType'] = function(name, result, paramTypes) { - if (!paramTypes) paramTypes = []; - return preserveStack(function() { - return Module['_BinaryenAddFunctionType'](module, strToStack(name), result, - i32sToStack(paramTypes), paramTypes.length); - }); - }; - self['getFunctionTypeBySignature'] = function(result, paramTypes) { - if (!paramTypes) paramTypes = []; - return preserveStack(function() { - return Module['_BinaryenGetFunctionTypeBySignature'](module, result, - i32sToStack(paramTypes), paramTypes.length); - }); - }; - self['removeFunctionType'] = function(name) { + self['addFunction'] = function(name, params, results, varTypes, body) { return preserveStack(function() { - return Module['_BinaryenRemoveFunctionType'](module, strToStack(name)); - }); - }; - self['addFunction'] = function(name, functionType, varTypes, body) { - return preserveStack(function() { - return Module['_BinaryenAddFunction'](module, strToStack(name), functionType, i32sToStack(varTypes), varTypes.length, body); + return Module['_BinaryenAddFunction'](module, strToStack(name), params, results, i32sToStack(varTypes), varTypes.length, body); }); }; self['getFunction'] = function(name) { @@ -2072,9 +2052,9 @@ function wrapModule(module, self) { return Module['_BinaryenRemoveEvent'](module, strToStack(name)); }); }; - self['addFunctionImport'] = function(internalName, externalModuleName, externalBaseName, functionType) { + self['addFunctionImport'] = function(internalName, externalModuleName, externalBaseName, params, results) { return preserveStack(function() { - return Module['_BinaryenAddFunctionImport'](module, strToStack(internalName), strToStack(externalModuleName), strToStack(externalBaseName), functionType); + return Module['_BinaryenAddFunctionImport'](module, strToStack(internalName), strToStack(externalModuleName), strToStack(externalBaseName), params, results); }); }; self['addTableImport'] = function(internalName, externalModuleName, externalBaseName) { @@ -2698,24 +2678,14 @@ Module['getExpressionInfo'] = function(expr) { } }; -// Obtains information about a 'FunctionType' -Module['getFunctionTypeInfo'] = function(func) { - return { - 'name': UTF8ToString(Module['_BinaryenFunctionTypeGetName'](func)), - 'params': getAllNested(func, Module['_BinaryenFunctionTypeGetNumParams'], Module['_BinaryenFunctionTypeGetParam']), - 'result': Module['_BinaryenFunctionTypeGetResult'](func) - }; -}; - // Obtains information about a 'Function' Module['getFunctionInfo'] = function(func) { return { 'name': UTF8ToString(Module['_BinaryenFunctionGetName'](func)), 'module': UTF8ToString(Module['_BinaryenFunctionImportGetModule'](func)), 'base': UTF8ToString(Module['_BinaryenFunctionImportGetBase'](func)), - 'type': UTF8ToString(Module['_BinaryenFunctionGetType'](func)), - 'params': getAllNested(func, Module['_BinaryenFunctionGetNumParams'], Module['_BinaryenFunctionGetParam']), - 'result': Module['_BinaryenFunctionGetResult'](func), + 'params': Module['_BinaryenFunctionGetParams'](func), + 'results': Module['_BinaryenFunctionGetResults'](func), 'vars': getAllNested(func, Module['_BinaryenFunctionGetNumVars'], Module['_BinaryenFunctionGetVar']), 'body': Module['_BinaryenFunctionGetBody'](func) }; diff --git a/src/passes/Asyncify.cpp b/src/passes/Asyncify.cpp index d92181639..8e583863c 100644 --- a/src/passes/Asyncify.cpp +++ b/src/passes/Asyncify.cpp @@ -706,7 +706,7 @@ struct AsyncifyFlow : public Pass { State::Rewinding), // TODO: such checks can be !normal makeCallIndexPop()), process(func->body)}); - if (func->result != none) { + if (func->sig.results != Type::none) { // Rewriting control flow may alter things; make sure the function ends in // something valid (which the optimizer can remove later). block->list.push_back(builder->makeUnreachable()); @@ -1045,7 +1045,7 @@ struct AsyncifyLocals : public WalkerPass<PostWalker<AsyncifyLocals>> { walk(func->body); // After the normal function body, emit a barrier before the postamble. Expression* barrier; - if (func->result == none) { + if (func->sig.results == Type::none) { // The function may have ended without a return; ensure one. barrier = builder->makeReturn(); } else { @@ -1063,12 +1063,12 @@ struct AsyncifyLocals : public WalkerPass<PostWalker<AsyncifyLocals>> { builder->makeSequence(func->body, barrier))), makeCallIndexPush(unwindIndex), makeLocalSaving()}); - if (func->result != none) { + if (func->sig.results != Type::none) { // If we unwind, we must still "return" a value, even if it will be // ignored on the outside. newBody->list.push_back( - LiteralUtils::makeZero(func->result, *getModule())); - newBody->finalize(func->result); + LiteralUtils::makeZero(func->sig.results, *getModule())); + newBody->finalize(func->sig.results); } func->body = newBody; // Making things like returns conditional may alter types. @@ -1324,7 +1324,7 @@ private: builder.makeUnreachable())); body->finalize(); auto* func = builder.makeFunction( - name, std::move(params), none, std::vector<Type>{}, body); + name, Signature(Type(params), Type::none), {}, body); module->addFunction(func); module->addExport(builder.makeExport(name, name, ExternalKind::Function)); }; diff --git a/src/passes/CMakeLists.txt b/src/passes/CMakeLists.txt index 7ec9054d7..8eb3c7e88 100644 --- a/src/passes/CMakeLists.txt +++ b/src/passes/CMakeLists.txt @@ -53,7 +53,6 @@ set(passes_SOURCES StripTargetFeatures.cpp RedundantSetElimination.cpp RelooperJumpThreading.cpp - ReReloop.cpp RemoveImports.cpp RemoveMemory.cpp RemoveNonJSOps.cpp @@ -62,6 +61,7 @@ set(passes_SOURCES RemoveUnusedModuleElements.cpp ReorderLocals.cpp ReorderFunctions.cpp + ReReloop.cpp TrapMode.cpp SafeHeap.cpp SimplifyGlobals.cpp diff --git a/src/passes/CodeFolding.cpp b/src/passes/CodeFolding.cpp index 818bb33b8..947e64715 100644 --- a/src/passes/CodeFolding.cpp +++ b/src/passes/CodeFolding.cpp @@ -718,7 +718,7 @@ private: mergeable.pop_back(); } // ensure the replacement has the same type, so the outside is not surprised - outer->finalize(getFunction()->result); + outer->finalize(getFunction()->sig.results); getFunction()->body = outer; return true; } diff --git a/src/passes/DataFlowOpts.cpp b/src/passes/DataFlowOpts.cpp index d4a3cc087..cf0092d37 100644 --- a/src/passes/DataFlowOpts.cpp +++ b/src/passes/DataFlowOpts.cpp @@ -138,7 +138,7 @@ struct DataFlowOpts : public WalkerPass<PostWalker<DataFlowOpts>> { // XXX we should copy expr here, in principle, and definitely will need to // when we do arbitrarily regenerated expressions auto* func = Builder(temp).makeFunction( - "temp", std::vector<Type>{}, none, std::vector<Type>{}, expr); + "temp", Signature(Type::none, Type::none), {}, expr); PassRunner runner(&temp); runner.setIsNested(true); runner.add("precompute"); diff --git a/src/passes/DeadArgumentElimination.cpp b/src/passes/DeadArgumentElimination.cpp index 8e1da3ac5..4395fc780 100644 --- a/src/passes/DeadArgumentElimination.cpp +++ b/src/passes/DeadArgumentElimination.cpp @@ -362,7 +362,7 @@ struct DAE : public Pass { // once to remove a param, once to drop the return value). if (changed.empty()) { for (auto& func : module->functions) { - if (func->result == none) { + if (func->sig.results == Type::none) { continue; } auto name = func->name; @@ -403,15 +403,15 @@ private: std::unordered_map<Call*, Expression**> allDroppedCalls; void removeParameter(Function* func, Index i, std::vector<Call*>& calls) { - // Clear the type, which is no longer accurate. - func->type = Name(); // It's cumbersome to adjust local names - TODO don't clear them? Builder::clearLocalNames(func); // Remove the parameter from the function. We must add a new local // for uses of the parameter, but cannot make it use the same index // (in general). - auto type = func->getLocalType(i); - func->params.erase(func->params.begin() + i); + std::vector<Type> params = func->sig.params.expand(); + auto type = params[i]; + params.erase(params.begin() + i); + func->sig.params = Type(params); Index newIndex = Builder::addVar(func, type); // Update local operations. struct LocalUpdater : public PostWalker<LocalUpdater> { @@ -439,9 +439,7 @@ private: void removeReturnValue(Function* func, std::vector<Call*>& calls, Module* module) { - // Clear the type, which is no longer accurate. - func->type = Name(); - func->result = none; + func->sig.results = Type::none; Builder builder(*module); // Remove any return values. struct ReturnUpdater : public PostWalker<ReturnUpdater> { diff --git a/src/passes/Directize.cpp b/src/passes/Directize.cpp index 663b8257b..52aa7e087 100644 --- a/src/passes/Directize.cpp +++ b/src/passes/Directize.cpp @@ -58,8 +58,7 @@ struct FunctionDirectizer : public WalkerPass<PostWalker<FunctionDirectizer>> { return; } auto* func = getModule()->getFunction(name); - if (getSig(getModule()->getFunctionType(curr->fullType)) != - getSig(func)) { + if (curr->sig != func->sig) { replaceWithUnreachable(curr); return; } diff --git a/src/passes/DuplicateImportElimination.cpp b/src/passes/DuplicateImportElimination.cpp index 39b126b6c..87126b139 100644 --- a/src/passes/DuplicateImportElimination.cpp +++ b/src/passes/DuplicateImportElimination.cpp @@ -42,7 +42,7 @@ struct DuplicateImportElimination : public Pass { auto previousFunc = module->getFunction(previousName); // It is ok to import the same thing with multiple types; we can only // merge if the types match, of course. - if (getSig(previousFunc) == getSig(func)) { + if (previousFunc->sig == func->sig) { replacements[func->name] = previousName; toRemove.push_back(func->name); continue; diff --git a/src/passes/FuncCastEmulation.cpp b/src/passes/FuncCastEmulation.cpp index f36e1e909..729a4a6c3 100644 --- a/src/passes/FuncCastEmulation.cpp +++ b/src/passes/FuncCastEmulation.cpp @@ -131,7 +131,7 @@ struct ParallelFuncCastEmulation Pass* create() override { return new ParallelFuncCastEmulation(ABIType); } - ParallelFuncCastEmulation(Name ABIType) : ABIType(ABIType) {} + ParallelFuncCastEmulation(Signature ABIType) : ABIType(ABIType) {} void visitCallIndirect(CallIndirect* curr) { if (curr->operands.size() > NUM_PARAMS) { @@ -146,7 +146,7 @@ struct ParallelFuncCastEmulation curr->operands.push_back(LiteralUtils::makeZero(i64, *getModule())); } // Set the new types - curr->fullType = ABIType; + curr->sig = ABIType; auto oldType = curr->type; curr->type = i64; curr->finalize(); // may be unreachable @@ -155,18 +155,15 @@ struct ParallelFuncCastEmulation } private: - // the name of a type for a call with the right params and return - Name ABIType; + // The signature of a call with the right params and return + Signature ABIType; }; struct FuncCastEmulation : public Pass { void run(PassRunner* runner, Module* module) override { // we just need the one ABI function type for all indirect calls - std::string sig = "j"; - for (Index i = 0; i < NUM_PARAMS; i++) { - sig += 'j'; - } - ABIType = ensureFunctionType(sig, module)->name; + Signature ABIType(Type(std::vector<Type>(NUM_PARAMS, Type::i64)), + Type::i64); // Add a way for JS to call into the table (as our i64 ABI means an i64 // is returned when there is a return value, which JS engines will fail on), // using dynCalls @@ -191,9 +188,6 @@ struct FuncCastEmulation : public Pass { } private: - // the name of a type for a call with the right params and return - Name ABIType; - // Creates a thunk for a function, casting args and return value as needed. Name makeThunk(Name name, Module* module) { Name thunk = std::string("byn$fpcast-emu$") + name.str; @@ -203,8 +197,8 @@ private: } // The item in the table may be a function or a function import. auto* func = module->getFunction(name); - std::vector<Type>& params = func->params; - Type type = func->result; + const std::vector<Type>& params = func->sig.params.expand(); + Type type = func->sig.results; Builder builder(*module); std::vector<Expression*> callOperands; for (Index i = 0; i < params.size(); i++) { @@ -216,12 +210,11 @@ private: for (Index i = 0; i < NUM_PARAMS; i++) { thunkParams.push_back(i64); } - auto* thunkFunc = builder.makeFunction(thunk, - std::move(thunkParams), - i64, - {}, // no vars - toABI(call, module)); - thunkFunc->type = ABIType; + auto* thunkFunc = + builder.makeFunction(thunk, + Signature(Type(thunkParams), Type::i64), + {}, // no vars + toABI(call, module)); module->addFunction(thunkFunc); return thunk; } diff --git a/src/passes/I64ToI32Lowering.cpp b/src/passes/I64ToI32Lowering.cpp index e2f744957..c9a4f46ea 100644 --- a/src/passes/I64ToI32Lowering.cpp +++ b/src/passes/I64ToI32Lowering.cpp @@ -147,22 +147,6 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> { PostWalker<I64ToI32Lowering>::doWalkModule(module); } - void visitFunctionType(FunctionType* curr) { - std::vector<Type> params; - for (auto t : curr->params) { - if (t == i64) { - params.push_back(i32); - params.push_back(i32); - } else { - params.push_back(t); - } - } - std::swap(params, curr->params); - if (curr->result == i64) { - curr->result = i32; - } - } - void doWalkFunction(Function* func) { Flat::verifyFlatness(func); // create builder here if this is first entry to module for this object @@ -174,7 +158,7 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> { freeTemps.clear(); Module temp; auto* oldFunc = ModuleUtils::copyFunction(func, temp); - func->params.clear(); + func->sig.params = Type::none; func->vars.clear(); func->localNames.clear(); func->localIndices.clear(); @@ -190,8 +174,8 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> { ? Builder::addParam : static_cast<Index (*)(Function*, Name, Type)>(Builder::addVar); if (paramType == i64) { - builderFunc(func, lowName, i32); - builderFunc(func, highName, i32); + builderFunc(func, lowName, Type::i32); + builderFunc(func, highName, Type::i32); indexMap[i] = newIdx; newIdx += 2; } else { @@ -207,8 +191,8 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> { if (func->imported()) { return; } - if (func->result == i64) { - func->result = i32; + if (func->sig.results == Type::i64) { + func->sig.results = Type::i32; // body may not have out param if it ends with control flow if (hasOutParam(func->body)) { TempVar highBits = fetchOutParam(func->body); @@ -244,14 +228,14 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> { fixed = true; } } - if (curr->type != i64) { + if (curr->type != Type::i64) { auto* ret = callBuilder(args, curr->type); replaceCurrent(ret); return fixed ? ret : nullptr; } TempVar lowBits = getTemp(); TempVar highBits = getTemp(); - auto* call = callBuilder(args, i32); + auto* call = callBuilder(args, Type::i32); LocalSet* doCall = builder->makeLocalSet(lowBits, call); LocalSet* setHigh = builder->makeLocalSet( highBits, builder->makeGlobalGet(INT64_TO_32_HIGH_BITS, i32)); @@ -263,13 +247,13 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> { } void visitCall(Call* curr) { if (curr->isReturn && - getModule()->getFunction(curr->target)->result == i64) { + getModule()->getFunction(curr->target)->sig.results == Type::i64) { Fatal() << "i64 to i32 lowering of return_call values not yet implemented"; } auto* fixedCall = visitGenericCall<Call>( - curr, [&](std::vector<Expression*>& args, Type ty) { - return builder->makeCall(curr->target, args, ty, curr->isReturn); + curr, [&](std::vector<Expression*>& args, Type results) { + return builder->makeCall(curr->target, args, results, curr->isReturn); }); // If this was to an import, we need to call the legal version. This assumes // that legalize-js-interface has been run before. @@ -280,15 +264,23 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> { } void visitCallIndirect(CallIndirect* curr) { - if (curr->isReturn && - getModule()->getFunctionType(curr->fullType)->result == i64) { + if (curr->isReturn && curr->sig.results == Type::i64) { Fatal() << "i64 to i32 lowering of return_call values not yet implemented"; } visitGenericCall<CallIndirect>( - curr, [&](std::vector<Expression*>& args, Type ty) { + curr, [&](std::vector<Expression*>& args, Type results) { + std::vector<Type> params; + for (auto param : curr->sig.params.expand()) { + if (param == Type::i64) { + params.push_back(Type::i32); + params.push_back(Type::i32); + } else { + params.push_back(param); + } + } return builder->makeCallIndirect( - curr->fullType, curr->target, args, ty, curr->isReturn); + curr->target, args, Signature(Type(params), results), curr->isReturn); }); } diff --git a/src/passes/Inlining.cpp b/src/passes/Inlining.cpp index 96c4531c8..db1db5971 100644 --- a/src/passes/Inlining.cpp +++ b/src/passes/Inlining.cpp @@ -198,12 +198,12 @@ struct Updater : public PostWalker<Updater> { } void visitCall(Call* curr) { if (curr->isReturn) { - handleReturnCall(curr, module->getFunction(curr->target)->result); + handleReturnCall(curr, module->getFunction(curr->target)->sig.results); } } void visitCallIndirect(CallIndirect* curr) { if (curr->isReturn) { - handleReturnCall(curr, module->getFunctionType(curr->fullType)->result); + handleReturnCall(curr, curr->sig.results); } } void visitLocalGet(LocalGet* curr) { @@ -221,7 +221,7 @@ doInlining(Module* module, Function* into, const InliningAction& action) { Function* from = action.contents; auto* call = (*action.callSite)->cast<Call>(); // Works for return_call, too - Type retType = module->getFunction(call->target)->result; + Type retType = module->getFunction(call->target)->sig.results; Builder builder(*module); auto* block = builder.makeBlock(); block->name = Name(std::string("__inlined_func$") + from->name.str); @@ -244,7 +244,7 @@ doInlining(Module* module, Function* into, const InliningAction& action) { updater.localMapping[i] = builder.addVar(into, from->getLocalType(i)); } // Assign the operands into the params - for (Index i = 0; i < from->params.size(); i++) { + for (Index i = 0; i < from->sig.params.size(); i++) { block->list.push_back( builder.makeLocalSet(updater.localMapping[i], call->operands[i])); } diff --git a/src/passes/InstrumentLocals.cpp b/src/passes/InstrumentLocals.cpp index 0b21c5000..407903219 100644 --- a/src/passes/InstrumentLocals.cpp +++ b/src/passes/InstrumentLocals.cpp @@ -45,7 +45,6 @@ #include "asm_v_wasm.h" #include "asmjs/shared-constants.h" -#include "ir/function-type-utils.h" #include "shared-constants.h" #include <pass.h> #include <wasm-builder.h> @@ -147,36 +146,38 @@ struct InstrumentLocals : public WalkerPass<PostWalker<InstrumentLocals>> { } void visitModule(Module* curr) { - addImport(curr, get_i32, "iiii"); - addImport(curr, get_i64, "jiij"); - addImport(curr, get_f32, "fiif"); - addImport(curr, get_f64, "diid"); - addImport(curr, set_i32, "iiii"); - addImport(curr, set_i64, "jiij"); - addImport(curr, set_f32, "fiif"); - addImport(curr, set_f64, "diid"); + addImport(curr, get_i32, {Type::i32, Type::i32, Type::i32}, Type::i32); + addImport(curr, get_i64, {Type::i32, Type::i32, Type::i64}, Type::i64); + addImport(curr, get_f32, {Type::i32, Type::i32, Type::f32}, Type::f32); + addImport(curr, get_f64, {Type::i32, Type::i32, Type::f64}, Type::f64); + addImport(curr, set_i32, {Type::i32, Type::i32, Type::i32}, Type::i32); + addImport(curr, set_i64, {Type::i32, Type::i32, Type::i64}, Type::i64); + addImport(curr, set_f32, {Type::i32, Type::i32, Type::f32}, Type::f32); + addImport(curr, set_f64, {Type::i32, Type::i32, Type::f64}, Type::f64); if (curr->features.hasReferenceTypes()) { - addImport(curr, get_anyref, "aiia"); - addImport(curr, set_anyref, "aiia"); + addImport( + curr, get_anyref, {Type::i32, Type::i32, Type::anyref}, Type::anyref); + addImport( + curr, set_anyref, {Type::i32, Type::i32, Type::anyref}, Type::anyref); } if (curr->features.hasExceptionHandling()) { - addImport(curr, get_exnref, "eiie"); - addImport(curr, set_exnref, "eiie"); + addImport( + curr, get_exnref, {Type::i32, Type::i32, Type::exnref}, Type::exnref); + addImport( + curr, set_exnref, {Type::i32, Type::i32, Type::exnref}, Type::exnref); } } private: Index id = 0; - void addImport(Module* wasm, Name name, std::string sig) { + void addImport(Module* wasm, Name name, Type params, Type results) { auto import = new Function; import->name = name; import->module = ENV; import->base = name; - auto* functionType = ensureFunctionType(sig, wasm); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = Signature(params, results); wasm->addFunction(import); } }; diff --git a/src/passes/InstrumentMemory.cpp b/src/passes/InstrumentMemory.cpp index 4a479db34..9a805b19b 100644 --- a/src/passes/InstrumentMemory.cpp +++ b/src/passes/InstrumentMemory.cpp @@ -54,7 +54,6 @@ #include "asm_v_wasm.h" #include "asmjs/shared-constants.h" -#include "ir/function-type-utils.h" #include "shared-constants.h" #include <pass.h> #include <wasm-builder.h> @@ -141,29 +140,29 @@ struct InstrumentMemory : public WalkerPass<PostWalker<InstrumentMemory>> { } void visitModule(Module* curr) { - addImport(curr, load_ptr, "iiiii"); - addImport(curr, load_val_i32, "iii"); - addImport(curr, load_val_i64, "jij"); - addImport(curr, load_val_f32, "fif"); - addImport(curr, load_val_f64, "did"); - addImport(curr, store_ptr, "iiiii"); - addImport(curr, store_val_i32, "iii"); - addImport(curr, store_val_i64, "jij"); - addImport(curr, store_val_f32, "fif"); - addImport(curr, store_val_f64, "did"); + addImport( + curr, load_ptr, {Type::i32, Type::i32, Type::i32, Type::i32}, Type::i32); + addImport(curr, load_val_i32, {Type::i32, Type::i32}, Type::i32); + addImport(curr, load_val_i64, {Type::i32, Type::i64}, Type::i64); + addImport(curr, load_val_f32, {Type::i32, Type::f32}, Type::f32); + addImport(curr, load_val_f64, {Type::i32, Type::f64}, Type::f64); + addImport( + curr, store_ptr, {Type::i32, Type::i32, Type::i32, Type::i32}, Type::i32); + addImport(curr, store_val_i32, {Type::i32, Type::i32}, Type::i32); + addImport(curr, store_val_i64, {Type::i32, Type::i64}, Type::i64); + addImport(curr, store_val_f32, {Type::i32, Type::f32}, Type::f32); + addImport(curr, store_val_f64, {Type::i32, Type::f64}, Type::f64); } private: Index id; - void addImport(Module* curr, Name name, std::string sig) { + void addImport(Module* curr, Name name, Type params, Type results) { auto import = new Function; import->name = name; import->module = ENV; import->base = name; - auto* functionType = ensureFunctionType(sig, curr); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = Signature(params, results); curr->addFunction(import); } }; diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp index 4dc680972..8c7bc4414 100644 --- a/src/passes/LegalizeJSInterface.cpp +++ b/src/passes/LegalizeJSInterface.cpp @@ -32,7 +32,6 @@ #include "asm_v_wasm.h" #include "asmjs/shared-constants.h" -#include "ir/function-type-utils.h" #include "ir/import-utils.h" #include "ir/literal-utils.h" #include "ir/utils.h" @@ -153,12 +152,12 @@ private: std::map<Name, Name> illegalImportsToLegal; template<typename T> bool isIllegal(T* t) { - for (auto param : t->params) { - if (param == i64) { + for (auto param : t->sig.params.expand()) { + if (param == Type::i64) { return true; } } - return t->result == i64; + return t->sig.results == Type::i64; } bool isDynCall(Name name) { return name.startsWith("dynCall_"); } @@ -190,25 +189,29 @@ private: auto* call = module->allocator.alloc<Call>(); call->target = func->name; - call->type = func->result; + call->type = func->sig.results; - for (auto param : func->params) { - if (param == i64) { + const std::vector<Type>& params = func->sig.params.expand(); + std::vector<Type> legalParams; + for (auto param : params) { + if (param == Type::i64) { call->operands.push_back(I64Utilities::recreateI64( - builder, legal->params.size(), legal->params.size() + 1)); - legal->params.push_back(i32); - legal->params.push_back(i32); + builder, legalParams.size(), legalParams.size() + 1)); + legalParams.push_back(Type::i32); + legalParams.push_back(Type::i32); } else { call->operands.push_back( - builder.makeLocalGet(legal->params.size(), param)); - legal->params.push_back(param); + builder.makeLocalGet(legalParams.size(), param)); + legalParams.push_back(param); } } + legal->sig.params = Type(legalParams); - if (func->result == i64) { - Function* f = getFunctionOrImport(module, SET_TEMP_RET0, "vi"); - legal->result = i32; - auto index = Builder::addVar(legal, Name(), i64); + if (func->sig.results == Type::i64) { + Function* f = + getFunctionOrImport(module, SET_TEMP_RET0, Type::i32, Type::none); + legal->sig.results = Type::i32; + auto index = Builder::addVar(legal, Name(), Type::i64); auto* block = builder.makeBlock(); block->list.push_back(builder.makeLocalSet(index, call)); block->list.push_back(builder.makeCall( @@ -217,7 +220,7 @@ private: block->finalize(); legal->body = block; } else { - legal->result = func->result; + legal->sig.results = func->sig.results; legal->body = call; } @@ -232,66 +235,55 @@ private: // JS import Name makeLegalStubForCalledImport(Function* im, Module* module) { Builder builder(*module); - auto type = make_unique<FunctionType>(); - type->name = Name(std::string("legaltype$") + im->name.str); - auto legal = make_unique<Function>(); - legal->name = Name(std::string("legalimport$") + im->name.str); - legal->module = im->module; - legal->base = im->base; - legal->type = type->name; - auto func = make_unique<Function>(); - func->name = Name(std::string("legalfunc$") + im->name.str); + auto legalIm = make_unique<Function>(); + legalIm->name = Name(std::string("legalimport$") + im->name.str); + legalIm->module = im->module; + legalIm->base = im->base; + auto stub = make_unique<Function>(); + stub->name = Name(std::string("legalfunc$") + im->name.str); + stub->sig = im->sig; auto* call = module->allocator.alloc<Call>(); - call->target = legal->name; - - auto* imFunctionType = ensureFunctionType(getSig(im), module); - - for (auto param : imFunctionType->params) { - if (param == i64) { - call->operands.push_back( - I64Utilities::getI64Low(builder, func->params.size())); - call->operands.push_back( - I64Utilities::getI64High(builder, func->params.size())); - type->params.push_back(i32); - type->params.push_back(i32); + call->target = legalIm->name; + + const std::vector<Type>& imParams = im->sig.params.expand(); + std::vector<Type> params; + for (size_t i = 0; i < imParams.size(); ++i) { + if (imParams[i] == Type::i64) { + call->operands.push_back(I64Utilities::getI64Low(builder, i)); + call->operands.push_back(I64Utilities::getI64High(builder, i)); + params.push_back(i32); + params.push_back(i32); } else { - call->operands.push_back( - builder.makeLocalGet(func->params.size(), param)); - type->params.push_back(param); + call->operands.push_back(builder.makeLocalGet(i, imParams[i])); + params.push_back(imParams[i]); } - func->params.push_back(param); } - if (imFunctionType->result == i64) { - Function* f = getFunctionOrImport(module, GET_TEMP_RET0, "i"); - call->type = i32; + if (im->sig.results == Type::i64) { + Function* f = + getFunctionOrImport(module, GET_TEMP_RET0, Type::none, Type::i32); + call->type = Type::i32; Expression* get = builder.makeCall(f->name, {}, call->type); - func->body = I64Utilities::recreateI64(builder, call, get); - type->result = i32; + stub->body = I64Utilities::recreateI64(builder, call, get); } else { - call->type = imFunctionType->result; - func->body = call; - type->result = imFunctionType->result; + call->type = im->sig.results; + stub->body = call; } - func->result = imFunctionType->result; - FunctionTypeUtils::fillFunction(legal.get(), type.get()); + legalIm->sig = Signature(Type(params), call->type); - const auto& funcName = func->name; - if (!module->getFunctionOrNull(funcName)) { - module->addFunction(std::move(func)); - } - if (!module->getFunctionTypeOrNull(type->name)) { - module->addFunctionType(std::move(type)); + const auto& stubName = stub->name; + if (!module->getFunctionOrNull(stubName)) { + module->addFunction(std::move(stub)); } - if (!module->getFunctionOrNull(legal->name)) { - module->addFunction(std::move(legal)); + if (!module->getFunctionOrNull(legalIm->name)) { + module->addFunction(std::move(legalIm)); } - return funcName; + return stubName; } static Function* - getFunctionOrImport(Module* module, Name name, std::string sig) { + getFunctionOrImport(Module* module, Name name, Type params, Type results) { // First look for the function by name if (Function* f = module->getFunctionOrNull(name)) { return f; @@ -306,9 +298,7 @@ private: import->name = name; import->module = ENV; import->base = name; - auto* functionType = ensureFunctionType(std::move(sig), module); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = Signature(params, results); module->addFunction(import); return import; } diff --git a/src/passes/LogExecution.cpp b/src/passes/LogExecution.cpp index 7bfee7c24..611f79dfd 100644 --- a/src/passes/LogExecution.cpp +++ b/src/passes/LogExecution.cpp @@ -30,7 +30,6 @@ #include "asm_v_wasm.h" #include "asmjs/shared-constants.h" -#include "ir/function-type-utils.h" #include "shared-constants.h" #include <pass.h> #include <wasm-builder.h> @@ -63,9 +62,7 @@ struct LogExecution : public WalkerPass<PostWalker<LogExecution>> { import->name = LOGGER; import->module = ENV; import->base = LOGGER; - auto* functionType = ensureFunctionType("vi", curr); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = Signature(Type::i32, Type::none); curr->addFunction(import); } diff --git a/src/passes/Metrics.cpp b/src/passes/Metrics.cpp index a408ccf95..56d04802a 100644 --- a/src/passes/Metrics.cpp +++ b/src/passes/Metrics.cpp @@ -50,10 +50,6 @@ struct Metrics ImportInfo imports(*module); // global things - - for (auto& curr : module->functionTypes) { - visitFunctionType(curr.get()); - } for (auto& curr : module->exports) { visitExport(curr.get()); } diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 2ec92a086..f8e913079 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -27,14 +27,16 @@ namespace wasm { -static bool isFullForced() { +namespace { + +bool isFullForced() { if (getenv("BINARYEN_PRINT_FULL")) { return std::stoi(getenv("BINARYEN_PRINT_FULL")) != 0; } return false; } -static std::ostream& printName(Name name, std::ostream& o) { +std::ostream& printName(Name name, std::ostream& o) { // we need to quote names if they have tricky chars if (!name.str || !strpbrk(name.str, "()")) { o << '$' << name.str; @@ -55,6 +57,36 @@ static std::ostream& printLocal(Index index, Function* func, std::ostream& o) { return printName(name, o); } +// Wrapper for printing signature names +struct SigName { + Signature sig; + SigName(Signature sig) : sig(sig) {} +}; + +std::ostream& operator<<(std::ostream& os, SigName sigName) { + auto printType = [&](Type type) { + if (type == Type::none) { + os << "none"; + } else { + const std::vector<Type>& types = type.expand(); + for (size_t i = 0; i < types.size(); ++i) { + if (i != 0) { + os << '_'; + } + os << types[i]; + } + } + }; + + os << '$'; + printType(sigName.sig.params); + os << "_=>_"; + printType(sigName.sig.results); + return os; +} + +} // anonymous namespace + // Printing "unreachable" as a instruction prefix type is not valid in wasm text // format. Print something else to make it pass. static Type forceConcrete(Type type) { return type.isConcrete() ? type : i32; } @@ -126,7 +158,7 @@ struct PrintExpressionContents } else { printMedium(o, "call_indirect (type "); } - printName(curr->fullType, o) << ')'; + o << SigName(curr->sig) << ')'; } void visitLocalGet(LocalGet* curr) { printMedium(o, "local.get "); @@ -1869,19 +1901,18 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> { o << ')'; } // Module-level visitors - void visitFunctionType(FunctionType* curr, Name* internalName = nullptr) { + void handleSignature(Signature curr, Name* funcName = nullptr) { o << "(func"; - if (internalName) { - o << ' '; - printName(*internalName, o); + if (funcName) { + o << " $" << *funcName; } - if (curr->params.size() > 0) { + if (curr.params.size() > 0) { o << maybeSpace; - o << ParamType(Type(curr->params)); + o << ParamType(curr.params); } - if (curr->result != none) { + if (curr.results.size() > 0) { o << maybeSpace; - o << ResultType(curr->result); + o << ResultType(curr.results); } o << ")"; } @@ -1963,12 +1994,7 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> { lastPrintedLocation = {0, 0, 0}; o << '('; emitImportHeader(curr); - if (curr->type.is()) { - visitFunctionType(currModule->getFunctionType(curr->type), &curr->name); - } else { - auto functionType = sigToFunctionType(getSig(curr)); - visitFunctionType(&functionType, &curr->name); - } + handleSignature(curr->sig, &curr->name); o << ')'; o << maybeNewLine; } @@ -1993,21 +2019,19 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> { if (!printStackIR && curr->stackIR && !minify) { o << " (; has Stack IR ;)"; } - if (curr->type.is()) { - o << maybeSpace << "(type "; - printName(curr->type, o) << ')'; - } - if (curr->params.size() > 0) { - for (size_t i = 0; i < curr->params.size(); i++) { + const std::vector<Type>& params = curr->sig.params.expand(); + if (params.size() > 0) { + for (size_t i = 0; i < params.size(); i++) { o << maybeSpace; o << '('; printMinor(o, "param "); - printLocal(i, currFunction, o) << ' ' << curr->getLocalType(i) << ')'; + printLocal(i, currFunction, o); + o << ' ' << params[i] << ')'; } } - if (curr->result != none) { + if (curr->sig.results != Type::none) { o << maybeSpace; - o << ResultType(curr->result); + o << ResultType(curr->sig.results); } incIndent(); for (size_t i = curr->getVarIndexBase(); i < curr->getNumLocals(); i++) { @@ -2204,12 +2228,15 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> { o << '('; printMajor(o, "module"); incIndent(); - for (auto& child : curr->functionTypes) { + std::vector<Signature> signatures; + std::unordered_map<Signature, Index> indices; + ModuleUtils::collectSignatures(*curr, signatures, indices); + for (auto sig : signatures) { doIndent(o, indent); o << '('; printMedium(o, "type") << ' '; - printName(child->name, o) << ' '; - visitFunctionType(child.get()); + o << SigName(sig) << ' '; + handleSignature(sig); o << ")" << maybeNewLine; } ModuleUtils::iterImportedMemories( diff --git a/src/passes/ReReloop.cpp b/src/passes/ReReloop.cpp index 5d4190d18..53a232dc1 100644 --- a/src/passes/ReReloop.cpp +++ b/src/passes/ReReloop.cpp @@ -321,7 +321,7 @@ struct ReReloop final : public Pass { for (auto* cfgBlock : relooper->Blocks) { auto* block = cfgBlock->Code->cast<Block>(); if (cfgBlock->BranchesOut.empty() && block->type != unreachable) { - block->list.push_back(function->result == none + block->list.push_back(function->sig.results == Type::none ? (Expression*)builder->makeReturn() : (Expression*)builder->makeUnreachable()); block->finalize(); @@ -354,7 +354,8 @@ struct ReReloop final : public Pass { // because of the relooper's boilerplate switch-handling // code, for example, which could be optimized out later // but isn't yet), then make sure it has a proper type - if (function->result != none && function->body->type == none) { + if (function->sig.results != Type::none && + function->body->type == Type::none) { function->body = builder.makeSequence(function->body, builder.makeUnreachable()); } diff --git a/src/passes/RemoveImports.cpp b/src/passes/RemoveImports.cpp index 50f7cfa3d..b3b81de3b 100644 --- a/src/passes/RemoveImports.cpp +++ b/src/passes/RemoveImports.cpp @@ -34,8 +34,8 @@ struct RemoveImports : public WalkerPass<PostWalker<RemoveImports>> { if (!func->imported()) { return; } - Type type = getModule()->getFunctionType(func->type)->result; - if (type == none) { + Type type = func->sig.results; + if (type == Type::none) { replaceCurrent(getModule()->allocator.alloc<Nop>()); } else { Literal nopLiteral; diff --git a/src/passes/RemoveUnusedModuleElements.cpp b/src/passes/RemoveUnusedModuleElements.cpp index cd69894f3..f5000e3a4 100644 --- a/src/passes/RemoveUnusedModuleElements.cpp +++ b/src/passes/RemoveUnusedModuleElements.cpp @@ -130,24 +130,6 @@ struct ReachabilityAnalyzer : public PostWalker<ReachabilityAnalyzer> { } }; -// Finds function type usage - -struct FunctionTypeAnalyzer : public PostWalker<FunctionTypeAnalyzer> { - std::vector<Function*> functions; - std::vector<CallIndirect*> indirectCalls; - std::vector<Event*> events; - - void visitFunction(Function* curr) { - if (curr->type.is()) { - functions.push_back(curr); - } - } - - void visitEvent(Event* curr) { events.push_back(curr); } - - void visitCallIndirect(CallIndirect* curr) { indirectCalls.push_back(curr); } -}; - struct RemoveUnusedModuleElements : public Pass { bool rootAllFunctions; @@ -155,11 +137,6 @@ struct RemoveUnusedModuleElements : public Pass { : rootAllFunctions(rootAllFunctions) {} void run(PassRunner* runner, Module* module) override { - optimizeGlobalsAndFunctionsAndEvents(module); - optimizeFunctionTypes(module); - } - - void optimizeGlobalsAndFunctionsAndEvents(Module* module) { std::vector<ModuleElement> roots; // Module start is a root. if (module->start.is()) { @@ -250,39 +227,6 @@ struct RemoveUnusedModuleElements : public Pass { } } } - - void optimizeFunctionTypes(Module* module) { - FunctionTypeAnalyzer analyzer; - analyzer.walkModule(module); - // maps each string signature to a single canonical function type - std::unordered_map<std::string, FunctionType*> canonicals; - std::unordered_set<FunctionType*> needed; - auto canonicalize = [&](Name name) { - if (!name.is()) { - return name; - } - FunctionType* type = module->getFunctionType(name); - auto sig = getSig(type); - auto iter = canonicals.find(sig); - if (iter == canonicals.end()) { - needed.insert(type); - canonicals[sig] = type; - return type->name; - } else { - return iter->second->name; - } - }; - // canonicalize all uses of function types - for (auto* func : analyzer.functions) { - func->type = canonicalize(func->type); - } - for (auto* call : analyzer.indirectCalls) { - call->fullType = canonicalize(call->fullType); - } - // remove no-longer used types - module->removeFunctionTypes( - [&](FunctionType* type) { return needed.count(type) == 0; }); - } }; Pass* createRemoveUnusedModuleElementsPass() { diff --git a/src/passes/ReorderLocals.cpp b/src/passes/ReorderLocals.cpp index 3315d0e02..f5736930a 100644 --- a/src/passes/ReorderLocals.cpp +++ b/src/passes/ReorderLocals.cpp @@ -65,15 +65,16 @@ struct ReorderLocals : public WalkerPass<PostWalker<ReorderLocals>> { return counts[a] > counts[b]; }); // sorting left params in front, perhaps slightly reordered. verify and fix. - for (size_t i = 0; i < curr->params.size(); i++) { - assert(newToOld[i] < curr->params.size()); + size_t numParams = curr->sig.params.size(); + for (size_t i = 0; i < numParams; i++) { + assert(newToOld[i] < numParams); } - for (size_t i = 0; i < curr->params.size(); i++) { + for (size_t i = 0; i < numParams; i++) { newToOld[i] = i; } // sort vars, and drop unused ones - auto oldVars = curr->vars; - curr->vars.clear(); + std::vector<Type> oldVars; + std::swap(oldVars, curr->vars); for (size_t i = curr->getVarIndexBase(); i < newToOld.size(); i++) { Index index = newToOld[i]; if (counts[index] > 0) { @@ -102,15 +103,11 @@ struct ReorderLocals : public WalkerPass<PostWalker<ReorderLocals>> { : func(func), oldToNew(oldToNew) {} void visitLocalGet(LocalGet* curr) { - if (func->isVar(curr->index)) { - curr->index = oldToNew[curr->index]; - } + curr->index = oldToNew[curr->index]; } void visitLocalSet(LocalSet* curr) { - if (func->isVar(curr->index)) { - curr->index = oldToNew[curr->index]; - } + curr->index = oldToNew[curr->index]; } }; ReIndexer reIndexer(curr, oldToNew); diff --git a/src/passes/SafeHeap.cpp b/src/passes/SafeHeap.cpp index f29a1cf66..37610a90b 100644 --- a/src/passes/SafeHeap.cpp +++ b/src/passes/SafeHeap.cpp @@ -23,7 +23,6 @@ #include "asm_v_wasm.h" #include "asmjs/shared-constants.h" #include "ir/bits.h" -#include "ir/function-type-utils.h" #include "ir/import-utils.h" #include "ir/load-utils.h" #include "pass.h" @@ -137,9 +136,7 @@ struct SafeHeap : public Pass { import->name = getSbrkPtr = GET_SBRK_PTR_IMPORT; import->module = ENV; import->base = GET_SBRK_PTR_IMPORT; - auto* functionType = ensureFunctionType("i", module); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = Signature(Type::none, Type::i32); module->addFunction(import); } if (auto* existing = info.getImportedFunction(ENV, SEGFAULT_IMPORT)) { @@ -149,9 +146,7 @@ struct SafeHeap : public Pass { import->name = segfault = SEGFAULT_IMPORT; import->module = ENV; import->base = SEGFAULT_IMPORT; - auto* functionType = ensureFunctionType("v", module); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = Signature(Type::none, Type::none); module->addFunction(import); } if (auto* existing = info.getImportedFunction(ENV, ALIGNFAULT_IMPORT)) { @@ -161,9 +156,7 @@ struct SafeHeap : public Pass { import->name = alignfault = ALIGNFAULT_IMPORT; import->module = ENV; import->base = ALIGNFAULT_IMPORT; - auto* functionType = ensureFunctionType("v", module); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = Signature(Type::none, Type::none); module->addFunction(import); } } @@ -251,10 +244,9 @@ struct SafeHeap : public Pass { } auto* func = new Function; func->name = name; - func->params.push_back(i32); // pointer - func->params.push_back(i32); // offset + // pointer, offset + func->sig = Signature({Type::i32, Type::i32}, style.type); func->vars.push_back(i32); // pointer + offset - func->result = style.type; Builder builder(*module); auto* block = builder.makeBlock(); block->list.push_back(builder.makeLocalSet( @@ -291,11 +283,9 @@ struct SafeHeap : public Pass { } auto* func = new Function; func->name = name; - func->params.push_back(i32); // pointer - func->params.push_back(i32); // offset - func->params.push_back(style.valueType); // value + // pointer, offset, value + func->sig = Signature({Type::i32, Type::i32, style.valueType}, Type::none); func->vars.push_back(i32); // pointer + offset - func->result = none; Builder builder(*module); auto* block = builder.makeBlock(); block->list.push_back(builder.makeLocalSet( diff --git a/src/passes/TrapMode.cpp b/src/passes/TrapMode.cpp index c00c34eca..9c855d8c1 100644 --- a/src/passes/TrapMode.cpp +++ b/src/passes/TrapMode.cpp @@ -22,7 +22,6 @@ #include "asm_v_wasm.h" #include "asmjs/shared-constants.h" -#include "ir/function-type-utils.h" #include "ir/trapping.h" #include "mixed_arena.h" #include "pass.h" @@ -125,9 +124,7 @@ Function* generateBinaryFunc(Module& wasm, Binary* curr) { } auto func = new Function; func->name = getBinaryFuncName(curr); - func->params.push_back(type); - func->params.push_back(type); - func->result = type; + func->sig = Signature({type, type}, type); func->body = builder.makeIf(builder.makeUnary(eqZOp, builder.makeLocalGet(1, type)), builder.makeConst(zeroLit), @@ -188,8 +185,7 @@ Function* generateUnaryFunc(Module& wasm, Unary* curr) { auto func = new Function; func->name = getUnaryFuncName(curr); - func->params.push_back(type); - func->result = retType; + func->sig = Signature(type, retType); func->body = builder.makeUnary(truncOp, builder.makeLocalGet(0, type)); // too small XXX this is different than asm.js, which does frem. here we // clamp, which is much simpler/faster, and similar to native builds @@ -240,14 +236,12 @@ void ensureF64ToI64JSImport(TrappingFunctionContainer& trappingFunctions) { return; } - Module& wasm = trappingFunctions.getModule(); - auto import = new Function; // f64-to-int = asm2wasm.f64-to-int; + // f64-to-int = asm2wasm.f64-to-int; + auto import = new Function; import->name = F64_TO_INT; import->module = ASM2WASM; import->base = F64_TO_INT; - auto* functionType = ensureFunctionType("id", &wasm); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = Signature(Type::f64, Type::i32); trappingFunctions.addImport(import); } diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index c2911f2b2..26fd2bd0e 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -410,13 +410,14 @@ struct Vacuum : public WalkerPass<ExpressionStackWalker<Vacuum>> { } void visitFunction(Function* curr) { - auto* optimized = optimize(curr->body, curr->result != none, true); + auto* optimized = + optimize(curr->body, curr->sig.results != Type::none, true); if (optimized) { curr->body = optimized; } else { ExpressionManipulator::nop(curr->body); } - if (curr->result == none && + if (curr->sig.results == Type::none && !EffectAnalyzer(getPassOptions(), curr->body).hasSideEffects()) { ExpressionManipulator::nop(curr->body); } diff --git a/src/shell-interface.h b/src/shell-interface.h index 63cbd9807..52533f37c 100644 --- a/src/shell-interface.h +++ b/src/shell-interface.h @@ -149,7 +149,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { Literal callTable(Index index, LiteralList& arguments, - Type result, + Type results, ModuleInstance& instance) override { if (index >= table.size()) { trap("callTable overflow"); @@ -158,15 +158,16 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { if (!func) { trap("uninitialized table element"); } - if (func->params.size() != arguments.size()) { + const std::vector<Type>& params = func->sig.params.expand(); + if (params.size() != arguments.size()) { trap("callIndirect: bad # of arguments"); } - for (size_t i = 0; i < func->params.size(); i++) { - if (func->params[i] != arguments[i].type) { + for (size_t i = 0; i < params.size(); i++) { + if (params[i] != arguments[i].type) { trap("callIndirect: bad argument type"); } } - if (func->result != result) { + if (func->sig.results != results) { trap("callIndirect: bad result type"); } if (func->imported()) { diff --git a/src/tools/execution-results.h b/src/tools/execution-results.h index 9ef3d2e1e..c0c7428cc 100644 --- a/src/tools/execution-results.h +++ b/src/tools/execution-results.h @@ -67,7 +67,7 @@ struct ExecutionResults { } std::cout << "[fuzz-exec] calling " << exp->name << "\n"; auto* func = wasm.getFunction(exp->value); - if (func->result != none) { + if (func->sig.results != Type::none) { // this has a result results[exp->name] = run(func, wasm, instance); // ignore the result if we hit an unreachable and returned no value @@ -136,7 +136,7 @@ struct ExecutionResults { instance.callFunction(ex->value, arguments); } // call the method - for (Type param : func->params) { + for (Type param : func->sig.params.expand()) { // zeros in arguments TODO: more? arguments.push_back(Literal(param)); } diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h index 8de47900c..3dcb5c665 100644 --- a/src/tools/fuzzing.h +++ b/src/tools/fuzzing.h @@ -370,8 +370,7 @@ private: contents.push_back(builder.makeLocalGet(0, i32)); auto* body = builder.makeBlock(contents); auto* hasher = wasm.addFunction(builder.makeFunction( - "hashMemory", std::vector<Type>{}, i32, {i32}, body)); - hasher->type = ensureFunctionType(getSig(hasher), &wasm)->name; + "hashMemory", Signature(Type::none, Type::i32), {i32}, body)); wasm.addExport( builder.makeExport(hasher->name, hasher->name, ExternalKind::Function)); // Export memory so JS fuzzing can use it @@ -435,7 +434,7 @@ private: auto* func = new Function; func->name = "hangLimitInitializer"; - func->result = none; + func->sig = Signature(Type::none, Type::none); func->body = builder.makeGlobalSet( glob->name, builder.makeConst(Literal(int32_t(HANG_LIMIT)))); wasm.addFunction(func); @@ -454,9 +453,7 @@ private: func->name = name; func->module = "fuzzing-support"; func->base = name; - func->params.push_back(type); - func->result = none; - func->type = ensureFunctionType(getSig(func), &wasm)->name; + func->sig = Signature(type, Type::none); wasm.addFunction(func); } } @@ -478,8 +475,7 @@ private: auto add = [&](Name name, Type type, Literal literal, BinaryOp op) { auto* func = new Function; func->name = name; - func->params.push_back(type); - func->result = type; + func->sig = Signature(type, type); func->body = builder.makeIf( builder.makeBinary( op, builder.makeLocalGet(0, type), builder.makeLocalGet(0, type)), @@ -521,25 +517,27 @@ private: Index num = wasm.functions.size(); func = new Function; func->name = std::string("func_") + std::to_string(num); - func->result = getReachableType(); assert(typeLocals.empty()); Index numParams = upToSquared(MAX_PARAMS); + std::vector<Type> params; + params.reserve(numParams); for (Index i = 0; i < numParams; i++) { auto type = getConcreteType(); - typeLocals[type].push_back(func->params.size()); - func->params.push_back(type); + typeLocals[type].push_back(params.size()); + params.push_back(type); } + func->sig = Signature(Type(params), getReachableType()); Index numVars = upToSquared(MAX_VARS); for (Index i = 0; i < numVars; i++) { auto type = getConcreteType(); - typeLocals[type].push_back(func->params.size() + func->vars.size()); + typeLocals[type].push_back(params.size() + func->vars.size()); func->vars.push_back(type); } labelIndex = 0; assert(breakableStack.empty()); assert(hangStack.empty()); // with small chance, make the body unreachable - auto bodyType = func->result; + auto bodyType = func->sig.results; if (oneIn(10)) { bodyType = unreachable; } @@ -568,7 +566,6 @@ private: // export some, but not all (to allow inlining etc.). make sure to // export at least one, though, to keep each testcase interesting if (num == 0 || oneIn(2)) { - func->type = ensureFunctionType(getSig(func), &wasm)->name; auto* export_ = new Export; export_->name = func->name; export_->value = func->name; @@ -779,11 +776,12 @@ private: std::vector<Expression*> invocations; while (oneIn(2) && !finishedInput) { std::vector<Expression*> args; - for (auto type : func->params) { + for (auto type : func->sig.params.expand()) { args.push_back(makeConst(type)); } - Expression* invoke = builder.makeCall(func->name, args, func->result); - if (func->result.isConcrete()) { + Expression* invoke = + builder.makeCall(func->name, args, func->sig.results); + if (func->sig.results.isConcrete()) { invoke = builder.makeDrop(invoke); } invocations.push_back(invoke); @@ -797,10 +795,9 @@ private: } auto* invoker = new Function; invoker->name = func->name.str + std::string("_invoker"); - invoker->result = none; + invoker->sig = Signature(Type::none, Type::none); invoker->body = builder.makeBlock(invocations); wasm.addFunction(invoker); - invoker->type = ensureFunctionType(getSig(invoker), &wasm)->name; auto* export_ = new Export; export_->name = invoker->name; export_->value = invoker->name; @@ -1000,8 +997,8 @@ private: } assert(type == unreachable); Expression* ret = nullptr; - if (func->result.isConcrete()) { - ret = makeTrivial(func->result); + if (func->sig.results.isConcrete()) { + ret = makeTrivial(func->sig.results); } return builder.makeReturn(ret); } @@ -1201,14 +1198,14 @@ private: if (!wasm.functions.empty() && !oneIn(wasm.functions.size())) { target = pick(wasm.functions).get(); } - isReturn = type == unreachable && wasm.features.hasTailCall() && - func->result == target->result; - if (target->result != type && !isReturn) { + isReturn = type == Type::unreachable && wasm.features.hasTailCall() && + func->sig.results == target->sig.results; + if (target->sig.results != type && !isReturn) { continue; } // we found one! std::vector<Expression*> args; - for (auto argType : target->params) { + for (auto argType : target->sig.params.expand()) { args.push_back(make(argType)); } return builder.makeCall(target->name, args, type, isReturn); @@ -1231,8 +1228,8 @@ private: // TODO: handle unreachable targetFn = wasm.getFunction(data[i]); isReturn = type == unreachable && wasm.features.hasTailCall() && - func->result == targetFn->result; - if (targetFn->result == type || isReturn) { + func->sig.results == targetFn->sig.results; + if (targetFn->sig.results == type || isReturn) { break; } i++; @@ -1252,12 +1249,10 @@ private: target = make(i32); } std::vector<Expression*> args; - for (auto type : targetFn->params) { + for (auto type : targetFn->sig.params.expand()) { args.push_back(make(type)); } - targetFn->type = ensureFunctionType(getSig(targetFn), &wasm)->name; - return builder.makeCallIndirect( - targetFn->type, target, args, targetFn->result, isReturn); + return builder.makeCallIndirect(target, args, targetFn->sig, isReturn); } Expression* makeLocalGet(Type type) { @@ -2241,8 +2236,8 @@ private: } Expression* makeReturn(Type type) { - return builder.makeReturn(func->result.isConcrete() ? make(func->result) - : nullptr); + return builder.makeReturn( + func->sig.results.isConcrete() ? make(func->sig.results) : nullptr); } Expression* makeNop(Type type) { diff --git a/src/tools/js-wrapper.h b/src/tools/js-wrapper.h index 34a823e97..a2d481f42 100644 --- a/src/tools/js-wrapper.h +++ b/src/tools/js-wrapper.h @@ -91,7 +91,7 @@ static std::string generateJSWrapper(Module& wasm) { ret += "try {\n"; ret += std::string(" console.log('[fuzz-exec] calling $") + exp->name.str + "');\n"; - if (func->result != none) { + if (func->sig.results != Type::none) { ret += std::string(" console.log('[fuzz-exec] note result: $") + exp->name.str + " => ' + literal("; } else { @@ -99,7 +99,7 @@ static std::string generateJSWrapper(Module& wasm) { } ret += std::string("instance.exports.") + exp->name.str + "("; bool first = true; - for (Type param : func->params) { + for (Type param : func->sig.params.expand()) { // zeros in arguments TODO more? if (first) { first = false; @@ -112,8 +112,8 @@ static std::string generateJSWrapper(Module& wasm) { } } ret += ")"; - if (func->result != none) { - ret += ", '" + func->result.toString() + "'))"; + if (func->sig.results != Type::none) { + ret += ", '" + func->sig.results.toString() + "'))"; // TODO: getTempRet } ret += ";\n"; diff --git a/src/tools/spec-wrapper.h b/src/tools/spec-wrapper.h index bcdf2e113..beada1b4b 100644 --- a/src/tools/spec-wrapper.h +++ b/src/tools/spec-wrapper.h @@ -30,7 +30,7 @@ static std::string generateSpecWrapper(Module& wasm) { } ret += std::string("(invoke \"hangLimitInitializer\") (invoke \"") + exp->name.str + "\" "; - for (Type param : func->params) { + for (Type param : func->sig.params.expand()) { // zeros in arguments TODO more? switch (param) { case i32: diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index 3e1e464f8..274b6de29 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -866,8 +866,7 @@ struct Reducer auto* func = module->functions[0].get(); // We can't remove something that might have breaks to it. if (!func->imported() && !Properties::isNamedControlFlow(func->body)) { - auto funcType = func->type; - auto funcResult = func->result; + auto funcSig = func->sig; auto* funcBody = func->body; for (auto* child : ChildIterator(func->body)) { if (!(child->type.isConcrete() || child->type == none)) { @@ -875,8 +874,7 @@ struct Reducer } // Try to replace the body with the child, fixing up the function // to accept it. - func->type = Name(); - func->result = child->type; + func->sig.results = child->type; func->body = child; if (writeAndTestReduction()) { // great, we succeeded! @@ -885,8 +883,7 @@ struct Reducer break; } // Undo. - func->type = funcType; - func->result = funcResult; + func->sig = funcSig; func->body = funcBody; } } diff --git a/src/tools/wasm-shell.cpp b/src/tools/wasm-shell.cpp index 53436c9d3..d5ee60d8a 100644 --- a/src/tools/wasm-shell.cpp +++ b/src/tools/wasm-shell.cpp @@ -111,7 +111,7 @@ static void run_asserts(Name moduleName, std::cerr << "Unknown entry " << entry << std::endl; } else { LiteralList arguments; - for (Type param : function->params) { + for (Type param : function->sig.params.expand()) { arguments.push_back(Literal(param)); } try { diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 34919cc79..c453ad1f5 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1023,7 +1023,7 @@ private: Module* wasm; BufferWithRandomAccess& o; ModuleUtils::BinaryIndexes indexes; - std::unordered_map<Signature, Index> typeIndexes; + std::unordered_map<Signature, Index> typeIndices; std::vector<Signature> types; bool debugInfo = true; @@ -1058,6 +1058,9 @@ class WasmBinaryBuilder { std::set<BinaryConsts::Section> seenSections; + // All signatures present in the type section + std::vector<Signature> signatures; + public: WasmBinaryBuilder(Module& wasm, const std::vector<char>& input) : wasm(wasm), allocator(wasm.allocator), input(input), sourceMap(nullptr), @@ -1106,7 +1109,8 @@ public: Address defaultIfNoMax); void readImports(); - std::vector<FunctionType*> functionTypes; // types of defined functions + // The signatures of each function, given in the function section + std::vector<Signature> functionSignatures; void readFunctionSignatures(); size_t nextLabel; @@ -1133,7 +1137,7 @@ public: void readFunctions(); - std::map<Export*, Index> exportIndexes; + std::map<Export*, Index> exportIndices; std::vector<Export*> exportOrder; void readExports(); diff --git a/src/wasm-builder.h b/src/wasm-builder.h index 533f83d94..22fa0e642 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -43,15 +43,13 @@ public: // make* functions, other globals Function* makeFunction(Name name, - std::vector<Type>&& params, - Type resultType, + Signature sig, std::vector<Type>&& vars, Expression* body = nullptr) { auto* func = new Function; func->name = name; - func->result = resultType; + func->sig = sig; func->body = body; - func->params.swap(params); func->vars.swap(vars); return func; } @@ -63,14 +61,15 @@ public: Expression* body = nullptr) { auto* func = new Function; func->name = name; - func->result = resultType; func->body = body; + std::vector<Type> paramVec; for (auto& param : params) { - func->params.push_back(param.type); + paramVec.push_back(param.type); Index index = func->localNames.size(); func->localIndices[param.name] = index; func->localNames[index] = param.name; } + func->sig = Signature(Type(paramVec), resultType); for (auto& var : vars) { func->vars.push_back(var.type); Index index = func->localNames.size(); @@ -210,27 +209,19 @@ public: call->finalize(); return call; } - CallIndirect* makeCallIndirect(FunctionType* type, - Expression* target, + CallIndirect* makeCallIndirect(Expression* target, const std::vector<Expression*>& args, - bool isReturn = false) { - return makeCallIndirect(type->name, target, args, type->result, isReturn); - } - CallIndirect* makeCallIndirect(Name fullType, - Expression* target, - const std::vector<Expression*>& args, - Type type, + Signature sig, bool isReturn = false) { auto* call = allocator.alloc<CallIndirect>(); - call->fullType = fullType; - call->type = type; + call->sig = sig; + call->type = sig.results; call->target = target; call->operands.set(args); call->isReturn = isReturn; call->finalize(); return call; } - // FunctionType LocalGet* makeLocalGet(Index index, Type type) { auto* ret = allocator.alloc<LocalGet>(); ret->index = index; @@ -582,9 +573,11 @@ public: static Index addParam(Function* func, Name name, Type type) { // only ok to add a param if no vars, otherwise indices are invalidated - assert(func->localIndices.size() == func->params.size()); + assert(func->localIndices.size() == func->sig.params.size()); assert(name.is()); - func->params.push_back(type); + std::vector<Type> params = func->sig.params.expand(); + params.push_back(type); + func->sig.params = Type(params); Index index = func->localNames.size(); func->localIndices[name] = index; func->localNames[index] = name; @@ -613,7 +606,7 @@ public: } static void clearLocals(Function* func) { - func->params.clear(); + func->sig.params = Type::none; func->vars.clear(); clearLocalNames(func); } diff --git a/src/wasm-emscripten.h b/src/wasm-emscripten.h index 9dc82bc1a..8aa911ef9 100644 --- a/src/wasm-emscripten.h +++ b/src/wasm-emscripten.h @@ -71,12 +71,12 @@ private: bool useStackPointerGlobal; // Used by generateDynCallThunk to track all the dynCall functions created // so far. - std::unordered_set<std::string> sigs; + std::unordered_set<Signature> sigs; Global* getStackPointerGlobal(); Expression* generateLoadStackPointer(); Expression* generateStoreStackPointer(Function* func, Expression* value); - void generateDynCallThunk(std::string sig); + void generateDynCallThunk(Signature sig); void generateStackSaveFunction(); void generateStackAllocFunction(); void generateStackRestoreFunction(); diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 1a90fdf71..caf8a9a3d 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -1449,20 +1449,21 @@ private: FunctionScope(Function* function, const LiteralList& arguments) : function(function) { - if (function->params.size() != arguments.size()) { + if (function->sig.params.size() != arguments.size()) { std::cerr << "Function `" << function->name << "` expects " - << function->params.size() << " parameters, got " + << function->sig.params.size() << " parameters, got " << arguments.size() << " arguments." << std::endl; WASM_UNREACHABLE("invalid param count"); } locals.resize(function->getNumLocals()); + const std::vector<Type>& params = function->sig.params.expand(); for (size_t i = 0; i < function->getNumLocals(); i++) { if (i < arguments.size()) { - assert(function->isParam(i)); - if (function->params[i] != arguments[i].type) { + assert(i < params.size()); + if (params[i] != arguments[i].type) { std::cerr << "Function `" << function->name << "` expects type " - << function->params[i] << " for parameter " << i - << ", got " << arguments[i].type << "." << std::endl; + << params[i] << " for parameter " << i << ", got " + << arguments[i].type << "." << std::endl; WASM_UNREACHABLE("invalid param count"); } locals[i] = arguments[i]; @@ -1544,7 +1545,7 @@ private: return target; } Index index = target.value.geti32(); - Type type = curr->isReturn ? scope.function->result : curr->type; + Type type = curr->isReturn ? scope.function->sig.results : curr->type; Flow ret = instance.externalInterface->callTable( index, arguments, type, *instance.self()); // TODO: make this a proper tail call (return first) @@ -2053,9 +2054,10 @@ public: // cannot still be breaking, it means we missed our stop assert(!flow.breaking() || flow.breakTo == RETURN_FLOW); Literal ret = flow.value; - if (function->result != ret.type) { + if (function->sig.results != ret.type) { std::cerr << "calling " << function->name << " resulted in " << ret - << " but the function type is " << function->result << '\n'; + << " but the function type is " << function->sig.results + << '\n'; WASM_UNREACHABLE("unexpect result type"); } // may decrease more than one, if we jumped up the stack diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 924c1d968..d7324d756 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -111,6 +111,8 @@ private: class SExpressionWasmBuilder { Module& wasm; MixedArena& allocator; + std::vector<Signature> signatures; + std::unordered_map<std::string, size_t> signatureIndices; std::vector<Name> functionNames; std::vector<Name> globalNames; std::vector<Name> eventNames; @@ -141,8 +143,8 @@ private: UniqueNameMapper nameMapper; + Signature getFunctionSignature(Element& s); Name getFunctionName(Element& s); - Name getFunctionTypeName(Element& s); Name getGlobalName(Element& s); Name getEventName(Element& s); void parseStart(Element& s) { wasm.addStart(getFunctionName(*s[1])); } @@ -234,19 +236,14 @@ private: Index parseMemoryLimits(Element& s, Index i); std::vector<Type> parseParamOrLocal(Element& s); std::vector<NameType> parseParamOrLocal(Element& s, size_t& localIndex); - Type parseResult(Element& s); - FunctionType* parseTypeRef(Element& s); + Type parseResults(Element& s); + Signature parseTypeRef(Element& s); size_t parseTypeUse(Element& s, size_t startPos, - FunctionType*& functionType, - std::vector<NameType>& namedParams, - Type& result); - size_t parseTypeUse(Element& s, - size_t startPos, - FunctionType*& functionType, - std::vector<Type>& params, - Type& result); - size_t parseTypeUse(Element& s, size_t startPos, FunctionType*& functionType); + Signature& functionSignature, + std::vector<NameType>& namedParams); + size_t + parseTypeUse(Element& s, size_t startPos, Signature& functionSignature); void stringToBinary(const char* input, size_t size, std::vector<char>& data); void parseMemory(Element& s, bool preParseImport = false); diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h index 85b7ca415..9c6e78360 100644 --- a/src/wasm-traversal.h +++ b/src/wasm-traversal.h @@ -81,7 +81,6 @@ template<typename SubType, typename ReturnType = void> struct Visitor { ReturnType visitPush(Push* curr) { return ReturnType(); } ReturnType visitPop(Pop* curr) { return ReturnType(); } // Module-level visitors - ReturnType visitFunctionType(FunctionType* curr) { return ReturnType(); } ReturnType visitExport(Export* curr) { return ReturnType(); } ReturnType visitGlobal(Global* curr) { return ReturnType(); } ReturnType visitFunction(Function* curr) { return ReturnType(); } @@ -250,7 +249,6 @@ struct OverriddenVisitor { UNIMPLEMENTED(Unreachable); UNIMPLEMENTED(Push); UNIMPLEMENTED(Pop); - UNIMPLEMENTED(FunctionType); UNIMPLEMENTED(Export); UNIMPLEMENTED(Global); UNIMPLEMENTED(Function); @@ -603,9 +601,6 @@ struct Walker : public VisitorType { void doWalkModule(Module* module) { // Dispatch statically through the SubType. SubType* self = static_cast<SubType*>(this); - for (auto& curr : module->functionTypes) { - self->visitFunctionType(curr.get()); - } for (auto& curr : module->exports) { self->visitExport(curr.get()); } diff --git a/src/wasm-type.h b/src/wasm-type.h index ddfb7c9a1..c4d719a35 100644 --- a/src/wasm-type.h +++ b/src/wasm-type.h @@ -99,7 +99,7 @@ struct ResultType { struct Signature { Type params; Type results; - Signature() = default; + Signature() : params(Type::none), results(Type::none) {} Signature(Type params, Type results) : params(params), results(results) {} bool operator==(const Signature& other) const { return params == other.params && results == other.results; diff --git a/src/wasm.h b/src/wasm.h index d9efe446a..fba962bdb 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -680,27 +680,11 @@ public: void finalize(); }; -class FunctionType { -public: - Name name; - Type result = none; - std::vector<Type> params; - - FunctionType() = default; - - bool structuralComparison(FunctionType& b); - bool structuralComparison(const std::vector<Type>& params, Type result); - - bool operator==(FunctionType& b); - bool operator!=(FunctionType& b); -}; - class CallIndirect : public SpecificExpression<Expression::CallIndirectId> { public: CallIndirect(MixedArena& allocator) : operands(allocator) {} - + Signature sig; ExpressionList operands; - Name fullType; Expression* target; bool isReturn = false; @@ -1147,10 +1131,8 @@ typedef std::vector<StackInst*> StackIR; class Function : public Importable { public: Name name; - Type result = none; - std::vector<Type> params; // function locals are + Signature sig; std::vector<Type> vars; // params plus vars - Name type; // if null, it is implicit in params and result // The body of the function Expression* body = nullptr; @@ -1334,7 +1316,6 @@ class Module { public: // wasm contents (generally you shouldn't access these from outside, except // maybe for iterating; use add*() and the get() functions) - std::vector<std::unique_ptr<FunctionType>> functionTypes; std::vector<std::unique_ptr<Export>> exports; std::vector<std::unique_ptr<Function>> functions; std::vector<std::unique_ptr<Global>> globals; @@ -1359,7 +1340,6 @@ public: private: // TODO: add a build option where Names are just indices, and then these // methods are not needed - std::map<Name, FunctionType*> functionTypesMap; // exports map is by the *exported* name, which is unique std::map<Name, Export*> exportsMap; std::map<Name, Function*> functionsMap; @@ -1369,19 +1349,16 @@ private: public: Module() = default; - FunctionType* getFunctionType(Name name); Export* getExport(Name name); Function* getFunction(Name name); Global* getGlobal(Name name); Event* getEvent(Name name); - FunctionType* getFunctionTypeOrNull(Name name); Export* getExportOrNull(Name name); Function* getFunctionOrNull(Name name); Global* getGlobalOrNull(Name name); Event* getEventOrNull(Name name); - FunctionType* addFunctionType(std::unique_ptr<FunctionType> curr); Export* addExport(Export* curr); Function* addFunction(Function* curr); Function* addFunction(std::unique_ptr<Function> curr); @@ -1390,13 +1367,11 @@ public: void addStart(const Name& s); - void removeFunctionType(Name name); void removeExport(Name name); void removeFunction(Name name); void removeGlobal(Name name); void removeEvent(Name name); - void removeFunctionTypes(std::function<bool(FunctionType*)> pred); void removeExports(std::function<bool(Export*)> pred); void removeFunctions(std::function<bool(Function*)> pred); void removeGlobals(std::function<bool(Global*)> pred); diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index b8b001927..d86eea8f5 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -30,56 +30,7 @@ namespace wasm { void WasmBinaryWriter::prepare() { // Collect function types and their frequencies. Collect information in each // function in parallel, then merge. - typedef std::unordered_map<Signature, size_t> Counts; - ModuleUtils::ParallelFunctionAnalysis<Counts> analysis( - *wasm, [&](Function* func, Counts& counts) { - if (func->imported()) { - return; - } - struct TypeCounter : PostWalker<TypeCounter> { - Module& wasm; - Counts& counts; - - TypeCounter(Module& wasm, Counts& counts) - : wasm(wasm), counts(counts) {} - - void visitCallIndirect(CallIndirect* curr) { - auto* type = wasm.getFunctionType(curr->fullType); - Signature sig(Type(type->params), type->result); - counts[sig]++; - } - }; - TypeCounter(*wasm, counts).walk(func->body); - }); - // Collect all the counts. - Counts counts; - for (auto& curr : wasm->functions) { - counts[Signature(Type(curr->params), curr->result)]++; - } - for (auto& curr : wasm->events) { - counts[curr->sig]++; - } - for (auto& pair : analysis.map) { - Counts& functionCounts = pair.second; - for (auto& innerPair : functionCounts) { - counts[innerPair.first] += innerPair.second; - } - } - std::vector<std::pair<Signature, size_t>> sorted(counts.begin(), - counts.end()); - std::sort(sorted.begin(), sorted.end(), [&](auto a, auto b) { - // order by frequency then simplicity - if (a.second != b.second) { - return a.second > b.second; - } else { - return a.first < b.first; - } - }); - for (Index i = 0; i < sorted.size(); ++i) { - typeIndexes[sorted[i].first] = i; - types.push_back(sorted[i].first); - } - + ModuleUtils::collectSignatures(*wasm, types, typeIndices); importInfo = wasm::make_unique<ImportInfo>(*wasm); } @@ -250,7 +201,7 @@ void WasmBinaryWriter::writeImports() { BYN_TRACE("write one function\n"); writeImportHeader(func); o << U32LEB(int32_t(ExternalKind::Function)); - o << U32LEB(getTypeIndex(Signature(Type(func->params), func->result))); + o << U32LEB(getTypeIndex(func->sig)); }); ModuleUtils::iterImportedGlobals(*wasm, [&](Global* global) { BYN_TRACE("write one global\n"); @@ -297,7 +248,7 @@ void WasmBinaryWriter::writeFunctionSignatures() { o << U32LEB(importInfo->getNumDefinedFunctions()); ModuleUtils::iterDefinedFunctions(*wasm, [&](Function* func) { BYN_TRACE("write one\n"); - o << U32LEB(getTypeIndex(Signature(Type(func->params), func->result))); + o << U32LEB(getTypeIndex(func->sig)); }); finishSection(start); } @@ -458,8 +409,8 @@ uint32_t WasmBinaryWriter::getEventIndex(Name name) const { } uint32_t WasmBinaryWriter::getTypeIndex(Signature sig) const { - auto it = typeIndexes.find(sig); - assert(it != typeIndexes.end()); + auto it = typeIndices.find(sig); + assert(it != typeIndices.end()); return it->second; } @@ -1124,7 +1075,8 @@ void WasmBinaryBuilder::readSignatures() { BYN_TRACE("num: " << numTypes << std::endl); for (size_t i = 0; i < numTypes; i++) { BYN_TRACE("read one\n"); - auto curr = make_unique<FunctionType>(); + std::vector<Type> params; + std::vector<Type> results; auto form = getS32LEB(); if (form != BinaryConsts::EncodedType::Func) { throwError("bad signature form " + std::to_string(form)); @@ -1132,19 +1084,14 @@ void WasmBinaryBuilder::readSignatures() { size_t numParams = getU32LEB(); BYN_TRACE("num params: " << numParams << std::endl); for (size_t j = 0; j < numParams; j++) { - curr->params.push_back(getConcreteType()); + params.push_back(getConcreteType()); } auto numResults = getU32LEB(); - if (numResults == 0) { - curr->result = none; - } else { - if (numResults != 1) { - throwError("signature must have 1 result"); - } - curr->result = getType(); + BYN_TRACE("num results: " << numResults << std::endl); + for (size_t j = 0; j < numResults; j++) { + results.push_back(getConcreteType()); } - curr->name = Name::fromInt(wasm.functionTypes.size()); - wasm.addFunctionType(std::move(curr)); + signatures.emplace_back(Type(params), Type(results)); } } @@ -1205,17 +1152,13 @@ void WasmBinaryBuilder::readImports() { case ExternalKind::Function: { auto name = Name(std::string("fimport$") + std::to_string(i)); auto index = getU32LEB(); - if (index >= wasm.functionTypes.size()) { + if (index > signatures.size()) { throwError("invalid function index " + std::to_string(index) + " / " + - std::to_string(wasm.functionTypes.size())); + std::to_string(signatures.size())); } - auto* functionType = wasm.functionTypes[index].get(); - auto params = functionType->params; - auto result = functionType->result; - auto* curr = builder.makeFunction(name, std::move(params), result, {}); + auto* curr = builder.makeFunction(name, signatures[index], {}); curr->module = module; curr->base = base; - curr->type = functionType->name; wasm.addFunction(curr); functionImports.push_back(curr); break; @@ -1267,13 +1210,11 @@ void WasmBinaryBuilder::readImports() { auto name = Name(std::string("eimport$") + std::to_string(i)); auto attribute = getU32LEB(); auto index = getU32LEB(); - if (index >= wasm.functionTypes.size()) { + if (index >= signatures.size()) { throwError("invalid event index " + std::to_string(index) + " / " + - std::to_string(wasm.functionTypes.size())); + std::to_string(signatures.size())); } - Type params = Type(wasm.functionTypes[index]->params); - auto* curr = - builder.makeEvent(name, attribute, Signature(params, Type::none)); + auto* curr = builder.makeEvent(name, attribute, signatures[index]); curr->module = module; curr->base = base; wasm.addEvent(curr); @@ -1302,17 +1243,17 @@ void WasmBinaryBuilder::readFunctionSignatures() { for (size_t i = 0; i < num; i++) { BYN_TRACE("read one\n"); auto index = getU32LEB(); - if (index >= wasm.functionTypes.size()) { + if (index >= signatures.size()) { throwError("invalid function type index for function"); } - functionTypes.push_back(wasm.functionTypes[index].get()); + functionSignatures.push_back(signatures[index]); } } void WasmBinaryBuilder::readFunctions() { BYN_TRACE("== readFunctions\n"); size_t total = getU32LEB(); - if (total != functionTypes.size()) { + if (total != functionSignatures.size()) { throwError("invalid function section size, must equal types"); } for (size_t i = 0; i < total; i++) { @@ -1325,17 +1266,12 @@ void WasmBinaryBuilder::readFunctions() { Function* func = new Function; func->name = Name::fromInt(i); + func->sig = functionSignatures[i]; currFunction = func; readNextDebugLocation(); - auto type = functionTypes[i]; BYN_TRACE("reading " << i << std::endl); - func->type = type->name; - func->result = type->result; - for (size_t j = 0; j < type->params.size(); j++) { - func->params.emplace_back(type->params[j]); - } size_t numLocalTypes = getU32LEB(); for (size_t t = 0; t < numLocalTypes; t++) { auto num = getU32LEB(); @@ -1357,7 +1293,7 @@ void WasmBinaryBuilder::readFunctions() { assert(breakStack.empty()); assert(expressionStack.empty()); assert(depth == 0); - func->body = getBlockOrSingleton(func->result); + func->body = getBlockOrSingleton(func->sig.results); assert(depth == 0); assert(breakStack.size() == 0); assert(breakTargetNames.size() == 0); @@ -1391,7 +1327,7 @@ void WasmBinaryBuilder::readExports() { names.insert(curr->name); curr->kind = (ExternalKind)getU32LEB(); auto index = getU32LEB(); - exportIndexes[curr] = index; + exportIndices[curr] = index; exportOrder.push_back(curr); } } @@ -1753,7 +1689,7 @@ void WasmBinaryBuilder::processFunctions() { } for (auto* curr : exportOrder) { - auto index = exportIndexes[curr]; + auto index = exportIndices[curr]; switch (curr->kind) { case ExternalKind::Function: { curr->value = getFunctionName(index); @@ -1787,8 +1723,8 @@ void WasmBinaryBuilder::processFunctions() { for (auto& pair : functionTable) { auto i = pair.first; - auto& indexes = pair.second; - for (auto j : indexes) { + auto& indices = pair.second; + for (auto j : indices) { wasm.table.segments[i].data.push_back(getFunctionName(j)); } } @@ -1884,13 +1820,12 @@ void WasmBinaryBuilder::readEvents() { BYN_TRACE("read one\n"); auto attribute = getU32LEB(); auto typeIndex = getU32LEB(); - if (typeIndex >= wasm.functionTypes.size()) { + if (typeIndex >= signatures.size()) { throwError("invalid event index " + std::to_string(typeIndex) + " / " + - std::to_string(wasm.functionTypes.size())); + std::to_string(signatures.size())); } - Type params = Type(wasm.functionTypes[typeIndex]->params); wasm.addEvent(Builder::makeEvent( - "event$" + std::to_string(i), attribute, Signature(params, Type::none))); + "event$" + std::to_string(i), attribute, signatures[typeIndex])); } } @@ -2463,24 +2398,23 @@ void WasmBinaryBuilder::visitSwitch(Switch* curr) { void WasmBinaryBuilder::visitCall(Call* curr) { BYN_TRACE("zz node: Call\n"); auto index = getU32LEB(); - FunctionType* type; + Signature sig; if (index < functionImports.size()) { auto* import = functionImports[index]; - type = wasm.getFunctionType(import->type); + sig = import->sig; } else { Index adjustedIndex = index - functionImports.size(); - if (adjustedIndex >= functionTypes.size()) { + if (adjustedIndex >= functionSignatures.size()) { throwError("invalid call index"); } - type = functionTypes[adjustedIndex]; + sig = functionSignatures[adjustedIndex]; } - assert(type); - auto num = type->params.size(); + auto num = sig.params.size(); curr->operands.resize(num); for (size_t i = 0; i < num; i++) { curr->operands[num - i - 1] = popNonVoidExpression(); } - curr->type = type->result; + curr->type = sig.results; functionCalls[index].push_back(curr); // we don't know function names yet curr->finalize(); } @@ -2488,22 +2422,20 @@ void WasmBinaryBuilder::visitCall(Call* curr) { void WasmBinaryBuilder::visitCallIndirect(CallIndirect* curr) { BYN_TRACE("zz node: CallIndirect\n"); auto index = getU32LEB(); - if (index >= wasm.functionTypes.size()) { + if (index >= signatures.size()) { throwError("bad call_indirect function index"); } - auto* fullType = wasm.functionTypes[index].get(); + curr->sig = signatures[index]; auto reserved = getU32LEB(); if (reserved != 0) { throwError("Invalid flags field in call_indirect"); } - curr->fullType = fullType->name; - auto num = fullType->params.size(); + auto num = curr->sig.params.size(); curr->operands.resize(num); curr->target = popNonVoidExpression(); for (size_t i = 0; i < num; i++) { curr->operands[num - i - 1] = popNonVoidExpression(); } - curr->type = fullType->result; curr->finalize(); } @@ -4299,7 +4231,7 @@ void WasmBinaryBuilder::visitSelect(Select* curr) { void WasmBinaryBuilder::visitReturn(Return* curr) { BYN_TRACE("zz node: Return\n"); requireFunctionContext("return"); - if (currFunction->result != none) { + if (currFunction->sig.results != Type::none) { curr->value = popNonVoidExpression(); } curr->finalize(); diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp index 695561f68..9a0b145da 100644 --- a/src/wasm/wasm-emscripten.cpp +++ b/src/wasm/wasm-emscripten.cpp @@ -20,7 +20,6 @@ #include "asm_v_wasm.h" #include "asmjs/shared-constants.h" -#include "ir/function-type-utils.h" #include "ir/import-utils.h" #include "ir/literal-utils.h" #include "ir/module-utils.h" @@ -207,7 +206,7 @@ void EmscriptenGlueGenerator::generateRuntimeFunctions() { } static Function* -ensureFunctionImport(Module* module, Name name, std::string sig) { +ensureFunctionImport(Module* module, Name name, Signature sig) { // Then see if its already imported ImportInfo info(*module); if (Function* f = info.getImportedFunction(ENV, name)) { @@ -218,9 +217,7 @@ ensureFunctionImport(Module* module, Name name, std::string sig) { import->name = name; import->module = ENV; import->base = name; - auto* functionType = ensureFunctionType(sig, module); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = sig; module->addFunction(import); return import; } @@ -267,7 +264,7 @@ Function* EmscriptenGlueGenerator::generateAssignGOTEntriesFunction() { for (Global* g : gotMemEntries) { Name getter(std::string("g$") + g->base.c_str()); - ensureFunctionImport(&wasm, getter, "i"); + ensureFunctionImport(&wasm, getter, Signature(Type::none, Type::i32)); Expression* call = builder.makeCall(getter, {}, i32); GlobalSet* globalSet = builder.makeGlobalSet(g->name, call); block->list.push_back(globalSet); @@ -293,7 +290,7 @@ Function* EmscriptenGlueGenerator::generateAssignGOTEntriesFunction() { Name getter( (std::string("fp$") + g->base.c_str() + std::string("$") + getSig(f)) .c_str()); - ensureFunctionImport(&wasm, getter, "i"); + ensureFunctionImport(&wasm, getter, Signature(Type::none, Type::i32)); Expression* call = builder.makeCall(getter, {}, i32); GlobalSet* globalSet = builder.makeGlobalSet(g->name, call); block->list.push_back(globalSet); @@ -371,29 +368,28 @@ inline void exportFunction(Module& wasm, Name name, bool must_export) { wasm.addExport(exp); } -void EmscriptenGlueGenerator::generateDynCallThunk(std::string sig) { - auto* funcType = ensureFunctionType(sig, &wasm); +void EmscriptenGlueGenerator::generateDynCallThunk(Signature sig) { if (!sigs.insert(sig).second) { return; // sig is already in the set } - Name name = std::string("dynCall_") + sig; + Name name = std::string("dynCall_") + getSig(sig.results, sig.params); if (wasm.getFunctionOrNull(name) || wasm.getExportOrNull(name)) { return; // module already contains this dyncall } std::vector<NameType> params; params.emplace_back("fptr", i32); // function pointer param int p = 0; - for (const auto& ty : funcType->params) { + const std::vector<Type>& paramTypes = sig.params.expand(); + for (const auto& ty : paramTypes) { params.emplace_back(std::to_string(p++), ty); } - Function* f = - builder.makeFunction(name, std::move(params), funcType->result, {}); + Function* f = builder.makeFunction(name, std::move(params), sig.results, {}); Expression* fptr = builder.makeLocalGet(0, i32); std::vector<Expression*> args; - for (unsigned i = 0; i < funcType->params.size(); ++i) { - args.push_back(builder.makeLocalGet(i + 1, funcType->params[i])); + for (unsigned i = 0; i < paramTypes.size(); ++i) { + args.push_back(builder.makeLocalGet(i + 1, paramTypes[i])); } - Expression* call = builder.makeCallIndirect(funcType, fptr, args); + Expression* call = builder.makeCallIndirect(fptr, args, sig); f->body = call; wasm.addFunction(f); @@ -407,8 +403,7 @@ void EmscriptenGlueGenerator::generateDynCallThunks() { tableSegmentData = wasm.table.segments[0].data; } for (const auto& indirectFunc : tableSegmentData) { - std::string sig = getSig(wasm.getFunction(indirectFunc)); - generateDynCallThunk(sig); + generateDynCallThunk(wasm.getFunction(indirectFunc)->sig); } } @@ -479,10 +474,11 @@ void EmscriptenGlueGenerator::replaceStackPointerGlobal() { RemoveStackPointer walker(stackPointer); walker.walkModule(&wasm); if (walker.needStackSave) { - ensureFunctionImport(&wasm, STACK_SAVE, "i"); + ensureFunctionImport(&wasm, STACK_SAVE, Signature(Type::none, Type::i32)); } if (walker.needStackRestore) { - ensureFunctionImport(&wasm, STACK_RESTORE, "vi"); + ensureFunctionImport( + &wasm, STACK_RESTORE, Signature(Type::i32, Type::none)); } // Finally remove the stack pointer global itself. This avoids importing @@ -545,7 +541,7 @@ void EmscriptenGlueGenerator::enforceStackLimit() { void EmscriptenGlueGenerator::generateSetStackLimitFunction() { Function* function = - builder.makeFunction(SET_STACK_LIMIT, std::vector<Type>({i32}), none, {}); + builder.makeFunction(SET_STACK_LIMIT, Signature(Type::i32, Type::none), {}); LocalGet* getArg = builder.makeLocalGet(0, i32); Expression* store = builder.makeGlobalSet(STACK_LIMIT, getArg); function->body = store; @@ -562,9 +558,7 @@ Name EmscriptenGlueGenerator::importStackOverflowHandler() { import->name = STACK_OVERFLOW_IMPORT; import->module = ENV; import->base = STACK_OVERFLOW_IMPORT; - auto* functionType = ensureFunctionType("v", &wasm); - import->type = functionType->name; - FunctionTypeUtils::fillFunction(import, functionType); + import->sig = Signature(Type::none, Type::none); wasm.addFunction(import); return STACK_OVERFLOW_IMPORT; } @@ -696,14 +690,14 @@ struct AsmConstWalker : public LinearExecutionWalker<AsmConstWalker> { std::vector<Address> segmentOffsets; // segment index => address offset struct AsmConst { - std::set<std::string> sigs; + std::set<Signature> sigs; Address id; std::string code; Proxying proxy; }; std::vector<AsmConst> asmConsts; - std::set<std::pair<std::string, Proxying>> allSigs; + std::set<std::pair<Signature, Proxying>> allSigs; // last sets in the current basic block, per index std::map<Index, LocalSet*> sets; @@ -719,12 +713,12 @@ struct AsmConstWalker : public LinearExecutionWalker<AsmConstWalker> { void process(); private: - std::string fixupName(Name& name, std::string baseSig, Proxying proxy); + Signature fixupName(Name& name, Signature baseSig, Proxying proxy); AsmConst& - createAsmConst(uint32_t id, std::string code, std::string sig, Name name); - std::string asmConstSig(std::string baseSig); - Name nameForImportWithSig(std::string sig, Proxying proxy); - void queueImport(Name importName, std::string baseSig); + createAsmConst(uint32_t id, std::string code, Signature sig, Name name); + Signature asmConstSig(Signature baseSig); + Name nameForImportWithSig(Signature sig, Proxying proxy); + void queueImport(Name importName, Signature baseSig); void addImports(); Proxying proxyType(Name name); @@ -750,7 +744,7 @@ void AsmConstWalker::visitCall(Call* curr) { return; } - auto baseSig = getSig(curr); + auto baseSig = wasm.getFunction(curr->target)->sig; auto sig = asmConstSig(baseSig); auto* arg = curr->operands[0]; while (!arg->dynCast<Const>()) { @@ -816,9 +810,8 @@ void AsmConstWalker::visitTable(Table* curr) { for (auto& name : segment.data) { auto* func = wasm.getFunction(name); if (func->imported() && func->base.hasSubstring(EM_ASM_PREFIX)) { - std::string baseSig = getSig(func); auto proxy = proxyType(func->base); - fixupName(name, baseSig, proxy); + fixupName(name, func->sig, proxy); } } } @@ -832,8 +825,8 @@ void AsmConstWalker::process() { addImports(); } -std::string -AsmConstWalker::fixupName(Name& name, std::string baseSig, Proxying proxy) { +Signature +AsmConstWalker::fixupName(Name& name, Signature baseSig, Proxying proxy) { auto sig = asmConstSig(baseSig); auto importName = nameForImportWithSig(sig, proxy); name = importName; @@ -848,7 +841,7 @@ AsmConstWalker::fixupName(Name& name, std::string baseSig, Proxying proxy) { AsmConstWalker::AsmConst& AsmConstWalker::createAsmConst(uint32_t id, std::string code, - std::string sig, + Signature sig, Name name) { AsmConst asmConst; asmConst.id = id; @@ -859,31 +852,27 @@ AsmConstWalker::AsmConst& AsmConstWalker::createAsmConst(uint32_t id, return asmConsts.back(); } -std::string AsmConstWalker::asmConstSig(std::string baseSig) { - std::string sig = ""; - for (size_t i = 0; i < baseSig.size(); ++i) { - // Omit the signature of the "code" parameter, taken as a string, as the - // first argument - if (i != 1) { - sig += baseSig[i]; - } - } - return sig; +Signature AsmConstWalker::asmConstSig(Signature baseSig) { + std::vector<Type> params = baseSig.params.expand(); + assert(params.size() >= 1); + // Omit the signature of the "code" parameter, taken as a string, as the + // first argument + params.erase(params.begin()); + return Signature(Type(params), baseSig.results); } -Name AsmConstWalker::nameForImportWithSig(std::string sig, Proxying proxy) { - std::string fixedTarget = - EM_ASM_PREFIX.str + std::string("_") + proxyingSuffix(proxy) + sig; +Name AsmConstWalker::nameForImportWithSig(Signature sig, Proxying proxy) { + std::string fixedTarget = EM_ASM_PREFIX.str + std::string("_") + + proxyingSuffix(proxy) + + getSig(sig.results, sig.params); return Name(fixedTarget.c_str()); } -void AsmConstWalker::queueImport(Name importName, std::string baseSig) { +void AsmConstWalker::queueImport(Name importName, Signature baseSig) { auto import = new Function; import->name = import->base = importName; import->module = ENV; - auto* funcType = ensureFunctionType(baseSig, &wasm); - import->type = funcType->name; - FunctionTypeUtils::fillFunction(import, funcType); + import->sig = baseSig; queuedImports.push_back(std::unique_ptr<Function>(import)); } @@ -994,7 +983,7 @@ struct FixInvokeFunctionNamesWalker std::map<Name, Name> importRenames; std::vector<Name> toRemove; std::set<Name> newImports; - std::set<std::string> invokeSigs; + std::set<Signature> invokeSigs; FixInvokeFunctionNamesWalker(Module& _wasm) : wasm(_wasm) {} @@ -1017,7 +1006,7 @@ struct FixInvokeFunctionNamesWalker // This function converts the names of invoke wrappers based on their lowered // argument types and a return type. In the example above, the resulting new // wrapper name becomes "invoke_vii". - Name fixEmExceptionInvoke(const Name& name, const std::string& sig) { + Name fixEmExceptionInvoke(const Name& name, Signature sig) { std::string nameStr = name.c_str(); if (nameStr.front() == '"' && nameStr.back() == '"') { nameStr = nameStr.substr(1, nameStr.size() - 2); @@ -1025,12 +1014,16 @@ struct FixInvokeFunctionNamesWalker if (nameStr.find("__invoke_") != 0) { return name; } - std::string sigWoOrigFunc = sig.front() + sig.substr(2, sig.size() - 2); + + const std::vector<Type>& params = sig.params.expand(); + std::vector<Type> newParams(params.begin() + 1, params.end()); + Signature sigWoOrigFunc = Signature(Type(newParams), sig.results); invokeSigs.insert(sigWoOrigFunc); - return Name("invoke_" + sigWoOrigFunc); + return Name("invoke_" + + getSig(sigWoOrigFunc.results, sigWoOrigFunc.params)); } - Name fixEmEHSjLjNames(const Name& name, const std::string& sig) { + Name fixEmEHSjLjNames(const Name& name, Signature sig) { if (name == "emscripten_longjmp_jmpbuf") { return "emscripten_longjmp"; } @@ -1042,8 +1035,7 @@ struct FixInvokeFunctionNamesWalker return; } - FunctionType* func = wasm.getFunctionType(curr->type); - Name newname = fixEmEHSjLjNames(curr->base, getSig(func)); + Name newname = fixEmEHSjLjNames(curr->base, curr->sig); if (newname == curr->base) { return; } @@ -1085,16 +1077,16 @@ void EmscriptenGlueGenerator::fixInvokeFunctionNames() { } } -template<class C> void printSet(std::ostream& o, C& c) { +void printSignatures(std::ostream& o, const std::set<Signature>& c) { o << "["; bool first = true; - for (auto& item : c) { + for (auto& sig : c) { if (first) { first = false; } else { o << ","; } - o << '"' << item << '"'; + o << '"' << getSig(sig.results, sig.params) << '"'; } o << "]"; } @@ -1123,7 +1115,7 @@ std::string EmscriptenGlueGenerator::generateEmscriptenMetadata( for (auto& asmConst : emAsmWalker.asmConsts) { meta << nextElement(); meta << '"' << asmConst.id << "\": [\"" << asmConst.code << "\", "; - printSet(meta, asmConst.sigs); + printSignatures(meta, asmConst.sigs); meta << ", [\"" << proxyingSuffix(asmConst.proxy) << "\"]"; meta << "]"; @@ -1303,7 +1295,7 @@ void EmscriptenGlueGenerator::exportWasiStart() { {LiteralUtils::makeZero(i32, wasm), LiteralUtils::makeZero(i32, wasm)}, i32)); auto* func = - builder.makeFunction(_start, std::vector<wasm::Type>{}, none, {}, body); + builder.makeFunction(_start, Signature(Type::none, Type::none), {}, body); wasm.addFunction(func); wasm.addExport(builder.makeExport(_start, _start, ExternalKind::Function)); } diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 24a4fcb35..10b6aead7 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -23,7 +23,6 @@ #include "asm_v_wasm.h" #include "asmjs/shared-constants.h" #include "ir/branch-utils.h" -#include "ir/function-type-utils.h" #include "shared-constants.h" #include "wasm-binary.h" @@ -452,16 +451,20 @@ Name SExpressionWasmBuilder::getFunctionName(Element& s) { } } -Name SExpressionWasmBuilder::getFunctionTypeName(Element& s) { +Signature SExpressionWasmBuilder::getFunctionSignature(Element& s) { if (s.dollared()) { - return s.str(); + auto it = signatureIndices.find(s.str().str); + if (it == signatureIndices.end()) { + throw ParseException("unknown function type in getFunctionSignature"); + } + return signatures[it->second]; } else { // index size_t offset = atoi(s.str().c_str()); - if (offset >= wasm.functionTypes.size()) { - throw ParseException("unknown function type in getFunctionTypeName"); + if (offset >= signatures.size()) { + throw ParseException("unknown function type in getFunctionSignature"); } - return wasm.functionTypes[offset]->name; + return signatures[offset]; } } @@ -539,7 +542,7 @@ SExpressionWasmBuilder::parseParamOrLocal(Element& s, size_t& localIndex) { } // Parses (result type) element. (e.g. (result i32)) -Type SExpressionWasmBuilder::parseResult(Element& s) { +Type SExpressionWasmBuilder::parseResults(Element& s) { assert(elementStartsWith(s, RESULT)); if (s.size() != 2) { throw ParseException("invalid result arity", s.line, s.col); @@ -550,131 +553,95 @@ Type SExpressionWasmBuilder::parseResult(Element& s) { // Parses an element that references an entry in the type section. The element // should be in the form of (type name) or (type index). // (e.g. (type $a), (type 0)) -FunctionType* SExpressionWasmBuilder::parseTypeRef(Element& s) { +Signature SExpressionWasmBuilder::parseTypeRef(Element& s) { assert(elementStartsWith(s, TYPE)); if (s.size() != 2) { throw ParseException("invalid type reference", s.line, s.col); } - IString name = getFunctionTypeName(*s[1]); - FunctionType* functionType = wasm.getFunctionTypeOrNull(name); - if (!functionType) { - throw ParseException("bad function type for import", s[1]->line, s[1]->col); - } - return functionType; + return getFunctionSignature(*s[1]); } // Prases typeuse, a reference to a type definition. It is in the form of either // (type index) or (type name), possibly augmented by inlined (param) and -// (result) nodes. (type) node can be omitted as well, in which case we get an -// existing type if there's one with the same structure or create one. -// Outputs are returned by parameter references. +// (result) nodes. (type) node can be omitted as well. Outputs are returned by +// parameter references. // typeuse ::= (type index|name)+ | // (type index|name)+ (param ..)* (result ..)* | // (param ..)* (result ..)* -// TODO Remove FunctionType* parameter and the related logic to create -// FunctionType once we remove FunctionType class. -size_t SExpressionWasmBuilder::parseTypeUse(Element& s, - size_t startPos, - FunctionType*& functionType, - std::vector<NameType>& namedParams, - Type& result) { +size_t +SExpressionWasmBuilder::parseTypeUse(Element& s, + size_t startPos, + Signature& functionSignature, + std::vector<NameType>& namedParams) { + std::vector<Type> params, results; size_t i = startPos; - bool typeExists = false, paramOrResultExists = false; + + bool typeExists = false, paramsOrResultsExist = false; if (i < s.size() && elementStartsWith(*s[i], TYPE)) { typeExists = true; - functionType = parseTypeRef(*s[i++]); + functionSignature = parseTypeRef(*s[i++]); } - size_t paramPos = i; + size_t paramPos = i; size_t localIndex = 0; + while (i < s.size() && elementStartsWith(*s[i], PARAM)) { - paramOrResultExists = true; + paramsOrResultsExist = true; auto newParams = parseParamOrLocal(*s[i++], localIndex); namedParams.insert(namedParams.end(), newParams.begin(), newParams.end()); + for (auto p : newParams) { + params.push_back(p.type); + } } - result = none; - if (i < s.size() && elementStartsWith(*s[i], RESULT)) { - paramOrResultExists = true; - result = parseResult(*s[i++]); + + while (i < s.size() && elementStartsWith(*s[i], RESULT)) { + paramsOrResultsExist = true; + // TODO: make parseResults return a vector + results.push_back(parseResults(*s[i++])); } + + auto inlineSig = Signature(Type(params), Type(results)); + // If none of type/param/result exists, this is equivalent to a type that does // not have parameters and returns nothing. - if (!typeExists && !paramOrResultExists) { - paramOrResultExists = true; + if (!typeExists && !paramsOrResultsExist) { + paramsOrResultsExist = true; } - // verify if (type) and (params)/(result) match, if both are specified - if (typeExists && paramOrResultExists) { - size_t line = s[paramPos]->line, col = s[paramPos]->col; - const char* msg = "type and param/result don't match"; - if (functionType->result != result) { - throw ParseException(msg, line, col); - } - if (functionType->params.size() != namedParams.size()) { - throw ParseException(msg, line, col); - } - for (size_t i = 0, n = namedParams.size(); i < n; i++) { - if (functionType->params[i] != namedParams[i].type) { - throw ParseException(msg, line, col); - } + if (!typeExists) { + functionSignature = inlineSig; + } else if (paramsOrResultsExist) { + // verify that (type) and (params)/(result) match + if (inlineSig != functionSignature) { + throw ParseException("type and param/result don't match", + s[paramPos]->line, + s[paramPos]->col); } } - // If only (param)/(result) is specified, check if there's a matching type, - // and if there isn't, create one. - if (!typeExists) { - bool need = true; - std::vector<Type> params; - for (auto& p : namedParams) { - params.push_back(p.type); - } - for (auto& existing : wasm.functionTypes) { - if (existing->structuralComparison(params, result)) { - functionType = existing.get(); - need = false; - break; - } - } - if (need) { - functionType = ensureFunctionType(params, result, &wasm); - } + // Add implicitly defined type to global list so it has an index + if (std::find(signatures.begin(), signatures.end(), functionSignature) == + signatures.end()) { + signatures.push_back(functionSignature); } - // If only (type) is specified, populate params and result. - if (!paramOrResultExists) { - assert(functionType); - result = functionType->result; - for (size_t index = 0, e = functionType->params.size(); index < e; - index++) { - Type type = functionType->params[index]; - namedParams.emplace_back(Name::fromInt(index), type); + // If only (type) is specified, populate `namedParams` + if (!paramsOrResultsExist) { + const std::vector<Type>& funcParams = functionSignature.params.expand(); + for (size_t index = 0, e = funcParams.size(); index < e; index++) { + namedParams.emplace_back(Name::fromInt(index), funcParams[index]); } } return i; } -// Parses a typeuse. Ignores all parameter names. -size_t SExpressionWasmBuilder::parseTypeUse(Element& s, - size_t startPos, - FunctionType*& functionType, - std::vector<Type>& params, - Type& result) { - std::vector<NameType> namedParams; - size_t nextPos = parseTypeUse(s, startPos, functionType, namedParams, result); - for (auto& p : namedParams) { - params.push_back(p.type); - } - return nextPos; -} - // Parses a typeuse. Use this when only FunctionType* is needed. size_t SExpressionWasmBuilder::parseTypeUse(Element& s, size_t startPos, - FunctionType*& functionType) { - std::vector<Type> params; - Type result; - return parseTypeUse(s, startPos, functionType, params, result); + Signature& functionSignature) { + std::vector<NameType> params; + return parseTypeUse(s, startPos, functionSignature, params); } void SExpressionWasmBuilder::preParseFunctionType(Element& s) { @@ -694,11 +661,9 @@ void SExpressionWasmBuilder::preParseFunctionType(Element& s) { } functionNames.push_back(name); functionCounter++; - FunctionType* type = nullptr; - std::vector<Type> params; - parseTypeUse(s, i, type); - assert(type && "type should've been set by parseTypeUse"); - functionTypes[name] = type->result; + Signature sig; + parseTypeUse(s, i, sig); + functionTypes[name] = sig.results; } size_t SExpressionWasmBuilder::parseFunctionNames(Element& s, @@ -771,11 +736,9 @@ void SExpressionWasmBuilder::parseFunction(Element& s, bool preParseImport) { } // parse typeuse: type/param/result - FunctionType* functionType = nullptr; + Signature sig; std::vector<NameType> params; - Type result = none; - i = parseTypeUse(s, i, functionType, params, result); - assert(functionType && "functionType should've been set by parseTypeUse"); + i = parseTypeUse(s, i, sig, params); // when (import) is inside a (func) element, this is not a function definition // but an import. @@ -790,9 +753,8 @@ void SExpressionWasmBuilder::parseFunction(Element& s, bool preParseImport) { im->name = name; im->module = importModule; im->base = importBase; - im->type = functionType->name; - FunctionTypeUtils::fillFunction(im.get(), functionType); - functionTypes[name] = im->result; + im->sig = sig; + functionTypes[name] = sig.results; if (wasm.getFunctionOrNull(im->name)) { throw ParseException("duplicate import", s.line, s.col); } @@ -808,7 +770,6 @@ void SExpressionWasmBuilder::parseFunction(Element& s, bool preParseImport) { throw ParseException("preParseImport in func"); } - result = functionType->result; size_t localIndex = params.size(); // local index for params and locals // parse locals @@ -820,8 +781,7 @@ void SExpressionWasmBuilder::parseFunction(Element& s, bool preParseImport) { // make a new function currFunction = std::unique_ptr<Function>(Builder(wasm).makeFunction( - name, std::move(params), result, std::move(vars))); - currFunction->type = functionType->name; + name, std::move(params), sig.results, std::move(vars))); // parse body Block* autoBlock = nullptr; // may need to add a block for the very top level @@ -847,14 +807,11 @@ void SExpressionWasmBuilder::parseFunction(Element& s, bool preParseImport) { autoBlock->name = FAKE_RETURN; } if (autoBlock) { - autoBlock->finalize(result); + autoBlock->finalize(sig.results); } if (!currFunction->body) { currFunction->body = allocator.alloc<Nop>(); } - if (currFunction->result != result) { - throw ParseException("bad func declaration", s.line, s.col); - } if (s.startLoc) { currFunction->prologLocation.insert(getDebugLocation(*s.startLoc)); } @@ -1677,13 +1634,9 @@ Expression* SExpressionWasmBuilder::makeCallIndirect(Element& s, if (!wasm.table.exists) { throw ParseException("no table"); } - auto ret = allocator.alloc<CallIndirect>(); Index i = 1; - FunctionType* functionType = nullptr; - i = parseTypeUse(s, i, functionType); - assert(functionType && "functionType should've been set by parseTypeUse"); - ret->fullType = functionType->name; - ret->type = functionType->result; + auto ret = allocator.alloc<CallIndirect>(); + i = parseTypeUse(s, i, ret->sig); parseCallOperands(s, i, s.size() - 1, ret); ret->target = parseExpression(s[s.size() - 1]); ret->isReturn = isReturn; @@ -2135,14 +2088,13 @@ void SExpressionWasmBuilder::parseImport(Element& s) { Element& inner = newStyle ? *s[3] : s; Index j = newStyle ? newStyleInner : i; if (kind == ExternalKind::Function) { - FunctionType* functionType = nullptr; auto func = make_unique<Function>(); - j = parseTypeUse(inner, j, functionType, func->params, func->result); + + j = parseTypeUse(inner, j, func->sig); func->name = name; func->module = module; func->base = base; - func->type = functionType->name; - functionTypes[name] = func->result; + functionTypes[name] = func->sig.results; wasm.addFunction(func.release()); } else if (kind == ExternalKind::Global) { Type type; @@ -2202,14 +2154,10 @@ void SExpressionWasmBuilder::parseImport(Element& s) { throw ParseException("invalid attribute", attrElem.line, attrElem.col); } event->attribute = atoi(attrElem[1]->c_str()); - std::vector<Type> paramTypes; - FunctionType* fakeFunctionType; // just to call parseTypeUse - Type results; - j = parseTypeUse(inner, j, fakeFunctionType, paramTypes, results); + j = parseTypeUse(inner, j, event->sig); event->name = name; event->module = module; event->base = base; - event->sig = Signature(Type(paramTypes), results); wasm.addEvent(event.release()); } // If there are more elements, they are invalid @@ -2406,10 +2354,15 @@ void SExpressionWasmBuilder::parseInnerElem(Element& s, } void SExpressionWasmBuilder::parseType(Element& s) { - std::unique_ptr<FunctionType> type = make_unique<FunctionType>(); + std::vector<Type> params; + std::vector<Type> results; size_t i = 1; if (s[i]->isStr()) { - type->name = s[i]->str(); + std::string name = s[i]->str().str; + if (signatureIndices.find(name) != signatureIndices.end()) { + throw ParseException("duplicate function type", s.line, s.col); + } + signatureIndices[name] = signatures.size(); i++; } Element& func = *s[i]; @@ -2417,25 +2370,13 @@ void SExpressionWasmBuilder::parseType(Element& s) { Element& curr = *func[k]; if (elementStartsWith(curr, PARAM)) { auto newParams = parseParamOrLocal(curr); - type->params.insert( - type->params.end(), newParams.begin(), newParams.end()); + params.insert(params.end(), newParams.begin(), newParams.end()); } else if (elementStartsWith(curr, RESULT)) { - type->result = parseResult(curr); + // TODO: Parse multiple results at once + results.push_back(parseResults(curr)); } } - while (type->name.is() && wasm.getFunctionTypeOrNull(type->name)) { - throw ParseException("duplicate function type", s.line, s.col); - } - // We allow duplicate types in the type section, i.e., we can have - // (func (param i32) (result i32)) many times. For unnamed types, find a name - // that does not clash with existing ones. - if (!type->name.is()) { - type->name = "FUNCSIG$" + getSig(type.get()); - } - while (wasm.getFunctionTypeOrNull(type->name)) { - type->name = Name(std::string(type->name.c_str()) + "_"); - } - wasm.addFunctionType(std::move(type)); + signatures.emplace_back(Type(params), Type(results)); } void SExpressionWasmBuilder::parseEvent(Element& s, bool preParseImport) { @@ -2515,11 +2456,7 @@ void SExpressionWasmBuilder::parseEvent(Element& s, bool preParseImport) { event->attribute = atoi(attrElem[1]->c_str()); // Parse typeuse - std::vector<Type> paramTypes; - Type results; - FunctionType* fakeFunctionType; // just co call parseTypeUse - i = parseTypeUse(s, i, fakeFunctionType, paramTypes, results); - event->sig = Signature(Type(paramTypes), results); + i = parseTypeUse(s, i, event->sig); // If there are more elements, they are invalid if (i < s.size()) { diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index 0f12a2f2b..abaf17e05 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -68,9 +68,7 @@ void BinaryInstWriter::visitCall(Call* curr) { void BinaryInstWriter::visitCallIndirect(CallIndirect* curr) { int8_t op = curr->isReturn ? BinaryConsts::RetCallIndirect : BinaryConsts::CallIndirect; - auto* type = parent.getModule()->getFunctionType(curr->fullType); - Signature sig(Type(type->params), type->result); - o << op << U32LEB(parent.getTypeIndex(sig)) + o << op << U32LEB(parent.getTypeIndex(curr->sig)) << U32LEB(0); // Reserved flags field } diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp index bc17e2193..7d29b0dcd 100644 --- a/src/wasm/wasm-type.cpp +++ b/src/wasm/wasm-type.cpp @@ -254,16 +254,23 @@ unsigned getTypeSize(Type type) { } FeatureSet getFeatures(Type type) { - switch (type) { - case v128: - return FeatureSet::SIMD; - case anyref: - return FeatureSet::ReferenceTypes; - case exnref: - return FeatureSet::ExceptionHandling; - default: - return FeatureSet(); + FeatureSet feats = FeatureSet::MVP; + for (Type t : type.expand()) { + switch (t) { + case v128: + feats |= FeatureSet::SIMD; + break; + case anyref: + feats |= FeatureSet::ReferenceTypes; + break; + case exnref: + feats |= FeatureSet::ExceptionHandling; + break; + default: + break; + } } + return feats; } Type getType(unsigned size, bool float_) { diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 75121d4f4..c6de444c1 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -593,14 +593,15 @@ void FunctionValidator::visitCall(Call* curr) { if (!shouldBeTrue(!!target, curr, "call target must exist")) { return; } - if (!shouldBeTrue(curr->operands.size() == target->params.size(), + const std::vector<Type> params = target->sig.params.expand(); + if (!shouldBeTrue(curr->operands.size() == params.size(), curr, "call param number must match")) { return; } for (size_t i = 0; i < curr->operands.size(); i++) { if (!shouldBeEqualOrFirstIsUnreachable(curr->operands[i]->type, - target->params[i], + params[i], curr, "call param types must match") && !info.quiet) { @@ -613,8 +614,8 @@ void FunctionValidator::visitCall(Call* curr) { curr, "return_call should have unreachable type"); shouldBeEqual( - getFunction()->result, - target->result, + getFunction()->sig.results, + target->sig.results, curr, "return_call callee return type must match caller return type"); } else { @@ -629,7 +630,7 @@ void FunctionValidator::visitCall(Call* curr) { "calls may only be unreachable if they have unreachable operands"); } else { shouldBeEqual(curr->type, - target->result, + target->sig.results, curr, "call type must match callee return type"); } @@ -643,20 +644,17 @@ void FunctionValidator::visitCallIndirect(CallIndirect* curr) { if (!info.validateGlobally) { return; } - auto* type = getModule()->getFunctionTypeOrNull(curr->fullType); - if (!shouldBeTrue(!!type, curr, "call_indirect type must exist")) { - return; - } + const std::vector<Type>& params = curr->sig.params.expand(); shouldBeEqualOrFirstIsUnreachable( curr->target->type, i32, curr, "indirect call target must be an i32"); - if (!shouldBeTrue(curr->operands.size() == type->params.size(), + if (!shouldBeTrue(curr->operands.size() == params.size(), curr, "call param number must match")) { return; } for (size_t i = 0; i < curr->operands.size(); i++) { if (!shouldBeEqualOrFirstIsUnreachable(curr->operands[i]->type, - type->params[i], + params[i], curr, "call param types must match") && !info.quiet) { @@ -669,8 +667,8 @@ void FunctionValidator::visitCallIndirect(CallIndirect* curr) { curr, "return_call_indirect should have unreachable type"); shouldBeEqual( - getFunction()->result, - type->result, + getFunction()->sig.results, + curr->sig.results, curr, "return_call_indirect callee return type must match caller return type"); } else { @@ -687,7 +685,7 @@ void FunctionValidator::visitCallIndirect(CallIndirect* curr) { } } else { shouldBeEqual(curr->type, - type->result, + curr->sig.results, curr, "call_indirect type must match callee return type"); } @@ -701,31 +699,35 @@ void FunctionValidator::visitConst(Const* curr) { } void FunctionValidator::visitLocalGet(LocalGet* curr) { - shouldBeTrue(curr->index < getFunction()->getNumLocals(), - curr, - "local.get index must be small enough"); shouldBeTrue(curr->type.isConcrete(), curr, "local.get must have a valid type - check what you provided " "when you constructed the node"); - shouldBeTrue(curr->type == getFunction()->getLocalType(curr->index), - curr, - "local.get must have proper type"); + if (shouldBeTrue(curr->index < getFunction()->getNumLocals(), + curr, + "local.get index must be small enough")) { + shouldBeTrue(curr->type == getFunction()->getLocalType(curr->index), + curr, + "local.get must have proper type"); + } } void FunctionValidator::visitLocalSet(LocalSet* curr) { - shouldBeTrue(curr->index < getFunction()->getNumLocals(), - curr, - "local.set index must be small enough"); - if (curr->value->type != unreachable) { - if (curr->type != none) { // tee is ok anyhow - shouldBeEqualOrFirstIsUnreachable( - curr->value->type, curr->type, curr, "local.set type must be correct"); + if (shouldBeTrue(curr->index < getFunction()->getNumLocals(), + curr, + "local.set index must be small enough")) { + if (curr->value->type != unreachable) { + if (curr->type != none) { // tee is ok anyhow + shouldBeEqualOrFirstIsUnreachable(curr->value->type, + curr->type, + curr, + "local.set type must be correct"); + } + shouldBeEqual(getFunction()->getLocalType(curr->index), + curr->value->type, + curr, + "local.set type must match function"); } - shouldBeEqual(getFunction()->getLocalType(curr->index), - curr->value->type, - curr, - "local.set type must match function"); } } @@ -1754,28 +1756,35 @@ void FunctionValidator::visitBrOnExn(BrOnExn* curr) { } void FunctionValidator::visitFunction(Function* curr) { - FeatureSet typeFeatures = getFeatures(curr->result); - for (auto type : curr->params) { - typeFeatures |= getFeatures(type); + shouldBeTrue(!curr->sig.results.isMulti(), + curr->body, + "Multivalue functions not allowed yet"); + FeatureSet features; + for (auto type : curr->sig.params.expand()) { + features |= getFeatures(type); shouldBeTrue(type.isConcrete(), curr, "params must be concretely typed"); } + for (auto type : curr->sig.results.expand()) { + features |= getFeatures(type); + shouldBeTrue(type.isConcrete(), curr, "results must be concretely typed"); + } for (auto type : curr->vars) { - typeFeatures |= getFeatures(type); + features |= getFeatures(type); shouldBeTrue(type.isConcrete(), curr, "vars must be concretely typed"); } - shouldBeTrue(typeFeatures <= getModule()->features, + shouldBeTrue(features <= getModule()->features, curr, "all used types should be allowed"); // if function has no result, it is ignored // if body is unreachable, it might be e.g. a return if (curr->body->type != unreachable) { - shouldBeEqual(curr->result, + shouldBeEqual(curr->sig.results, curr->body->type, curr->body, "function body type must match, if function returns"); } if (returnType != unreachable) { - shouldBeEqual(curr->result, + shouldBeEqual(curr->sig.results, returnType, curr->body, "function result must match, if function has returns"); @@ -1784,22 +1793,6 @@ void FunctionValidator::visitFunction(Function* curr) { breakInfos.empty(), curr->body, "all named break targets must exist"); returnType = unreachable; labelNames.clear(); - // if function has a named type, it must match up with the function's params - // and result - if (info.validateGlobally && curr->type.is()) { - auto* ft = getModule()->getFunctionType(curr->type); - shouldBeTrue(ft->params == curr->params, - curr->name, - "function params must match its declared type"); - shouldBeTrue(ft->result == curr->result, - curr->name, - "function result must match its declared type"); - } - if (curr->imported()) { - shouldBeTrue(curr->type.is(), - curr->name, - "imported functions must have a function type"); - } // validate optional local names std::set<Name> seen; for (auto& pair : curr->localNames) { @@ -1925,17 +1918,18 @@ static void validateBinaryenIR(Module& wasm, ValidationInfo& info) { static void validateImports(Module& module, ValidationInfo& info) { ModuleUtils::iterImportedFunctions(module, [&](Function* curr) { if (info.validateWeb) { - auto* functionType = module.getFunctionType(curr->type); - info.shouldBeUnequal(functionType->result, - i64, - curr->name, - "Imported function must not have i64 return type"); - for (Type param : functionType->params) { + for (Type param : curr->sig.params.expand()) { info.shouldBeUnequal(param, i64, curr->name, "Imported function must not have i64 parameters"); } + for (Type result : curr->sig.results.expand()) { + info.shouldBeUnequal(result, + i64, + curr->name, + "Imported function must not have i64 results"); + } } }); if (!module.features.hasMutableGlobals()) { @@ -1951,17 +1945,19 @@ static void validateExports(Module& module, ValidationInfo& info) { if (curr->kind == ExternalKind::Function) { if (info.validateWeb) { Function* f = module.getFunction(curr->value); - info.shouldBeUnequal(f->result, - i64, - f->name, - "Exported function must not have i64 return type"); - for (auto param : f->params) { + for (auto param : f->sig.params.expand()) { info.shouldBeUnequal( param, i64, f->name, "Exported function must not have i64 parameters"); } + for (auto result : f->sig.results.expand()) { + info.shouldBeUnequal(result, + i64, + f->name, + "Exported function must not have i64 results"); + } } } else if (curr->kind == ExternalKind::Global && !module.features.hasMutableGlobals()) { @@ -2133,10 +2129,12 @@ static void validateModule(Module& module, ValidationInfo& info) { auto func = module.getFunctionOrNull(module.start); if (info.shouldBeTrue( func != nullptr, module.start, "start must be found")) { - info.shouldBeTrue( - func->params.size() == 0, module.start, "start must have 0 params"); - info.shouldBeTrue( - func->result == none, module.start, "start must not return a value"); + info.shouldBeTrue(func->sig.params == Type::none, + module.start, + "start must have 0 params"); + info.shouldBeTrue(func->sig.results == Type::none, + module.start, + "start must not return a value"); } } } diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 5a722e600..83829418e 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -432,6 +432,7 @@ void Call::finalize() { } void CallIndirect::finalize() { + type = sig.results; handleUnreachableOperands(this); if (isReturn) { type = unreachable; @@ -441,34 +442,6 @@ void CallIndirect::finalize() { } } -bool FunctionType::structuralComparison(FunctionType& b) { - return structuralComparison(b.params, b.result); -} - -bool FunctionType::structuralComparison(const std::vector<Type>& otherParams, - Type otherResult) { - if (result != otherResult) { - return false; - } - if (params.size() != otherParams.size()) { - return false; - } - for (size_t i = 0; i < params.size(); i++) { - if (params[i] != otherParams[i]) { - return false; - } - } - return true; -} - -bool FunctionType::operator==(FunctionType& b) { - if (name != b.name) { - return false; - } - return structuralComparison(b); -} -bool FunctionType::operator!=(FunctionType& b) { return !(*this == b); } - bool LocalSet::isTee() { return type != none; } void LocalSet::setTee(bool is) { @@ -932,15 +905,23 @@ void Push::finalize() { } } -size_t Function::getNumParams() { return params.size(); } +size_t Function::getNumParams() { return sig.params.size(); } size_t Function::getNumVars() { return vars.size(); } -size_t Function::getNumLocals() { return params.size() + vars.size(); } +size_t Function::getNumLocals() { return sig.params.size() + vars.size(); } -bool Function::isParam(Index index) { return index < params.size(); } +bool Function::isParam(Index index) { + size_t size = sig.params.size(); + assert(index < size + vars.size()); + return index < size; +} -bool Function::isVar(Index index) { return index >= params.size(); } +bool Function::isVar(Index index) { + auto base = getVarIndexBase(); + assert(index < base + vars.size()); + return index >= base; +} bool Function::hasLocalName(Index index) const { return localNames.find(index) != localNames.end(); @@ -973,13 +954,14 @@ Index Function::getLocalIndex(Name name) { return iter->second; } -Index Function::getVarIndexBase() { return params.size(); } +Index Function::getVarIndexBase() { return sig.params.size(); } Type Function::getLocalType(Index index) { - if (isParam(index)) { + const std::vector<Type>& params = sig.params.expand(); + if (index < params.size()) { return params[index]; } else if (isVar(index)) { - return vars[index - getVarIndexBase()]; + return vars[index - params.size()]; } else { WASM_UNREACHABLE("invalid local index"); } @@ -994,14 +976,6 @@ void Function::clearDebugInfo() { epilogLocation.clear(); } -FunctionType* Module::getFunctionType(Name name) { - auto iter = functionTypesMap.find(name); - if (iter == functionTypesMap.end()) { - Fatal() << "Module::getFunctionType: " << name << " does not exist"; - } - return iter->second; -} - Export* Module::getExport(Name name) { auto iter = exportsMap.find(name); if (iter == exportsMap.end()) { @@ -1035,14 +1009,6 @@ Event* Module::getEvent(Name name) { return iter->second; } -FunctionType* Module::getFunctionTypeOrNull(Name name) { - auto iter = functionTypesMap.find(name); - if (iter == functionTypesMap.end()) { - return nullptr; - } - return iter->second; -} - Export* Module::getExportOrNull(Name name) { auto iter = exportsMap.find(name); if (iter == exportsMap.end()) { @@ -1075,19 +1041,6 @@ Event* Module::getEventOrNull(Name name) { return iter->second; } -FunctionType* Module::addFunctionType(std::unique_ptr<FunctionType> curr) { - if (!curr->name.is()) { - Fatal() << "Module::addFunctionType: empty name"; - } - if (getFunctionTypeOrNull(curr->name)) { - Fatal() << "Module::addFunctionType: " << curr->name << " already exists"; - } - auto* p = curr.get(); - functionTypes.emplace_back(std::move(curr)); - functionTypesMap[p->name] = p; - return p; -} - Export* Module::addExport(Export* curr) { if (!curr->name.is()) { Fatal() << "Module::addExport: empty name"; @@ -1166,9 +1119,6 @@ void removeModuleElement(Vector& v, Map& m, Name name) { } } -void Module::removeFunctionType(Name name) { - removeModuleElement(functionTypes, functionTypesMap, name); -} void Module::removeExport(Name name) { removeModuleElement(exports, exportsMap, name); } @@ -1198,9 +1148,6 @@ void removeModuleElements(Vector& v, v.end()); } -void Module::removeFunctionTypes(std::function<bool(FunctionType*)> pred) { - removeModuleElements(functionTypes, functionTypesMap, pred); -} void Module::removeExports(std::function<bool(Export*)> pred) { removeModuleElements(exports, exportsMap, pred); } @@ -1219,10 +1166,6 @@ void Module::updateMaps() { for (auto& curr : functions) { functionsMap[curr->name] = curr.get(); } - functionTypesMap.clear(); - for (auto& curr : functionTypes) { - functionTypesMap[curr->name] = curr.get(); - } exportsMap.clear(); for (auto& curr : exports) { exportsMap[curr->name] = curr.get(); diff --git a/src/wasm2js.h b/src/wasm2js.h index 906a4b9dc..2cacbe8e5 100644 --- a/src/wasm2js.h +++ b/src/wasm2js.h @@ -406,14 +406,11 @@ Ref Wasm2JSBuilder::processWasm(Module* wasm, Name funcName) { }); if (generateFetchHighBits) { Builder builder(allocator); - std::vector<Type> params; - std::vector<Type> vars; asmFunc[3]->push_back(processFunction( wasm, builder.makeFunction(WASM_FETCH_HIGH_BITS, - std::move(params), - i32, - std::move(vars), + Signature(Type::none, Type::i32), + {}, builder.makeReturn(builder.makeGlobalGet( INT64_TO_32_HIGH_BITS, i32))))); auto e = new Export(); diff --git a/test/anyref.wast.from-wast b/test/anyref.wast.from-wast index 117695077..121a4616a 100644 --- a/test/anyref.wast.from-wast +++ b/test/anyref.wast.from-wast @@ -1,11 +1,11 @@ (module - (type $FUNCSIG$aa (func (param anyref) (result anyref))) + (type $anyref_=>_anyref (func (param anyref) (result anyref))) (import "env" "test2" (global $test2 anyref)) (import "env" "test1" (func $test1 (param anyref) (result anyref))) (memory $0 1 1) (export "test1" (func $test1)) (export "test2" (global $test2)) - (func $anyref_test (; 1 ;) (type $FUNCSIG$aa) (param $0 anyref) (result anyref) + (func $anyref_test (; 1 ;) (param $0 anyref) (result anyref) (local $1 anyref) (local.set $1 (call $test1 diff --git a/test/anyref.wast.fromBinary b/test/anyref.wast.fromBinary index 3d9b223b6..374a308e7 100644 --- a/test/anyref.wast.fromBinary +++ b/test/anyref.wast.fromBinary @@ -1,11 +1,11 @@ (module - (type $0 (func (param anyref) (result anyref))) + (type $anyref_=>_anyref (func (param anyref) (result anyref))) (import "env" "test2" (global $gimport$1 anyref)) (import "env" "test1" (func $test1 (param anyref) (result anyref))) (memory $0 1 1) (export "test1" (func $test1)) (export "test2" (global $gimport$1)) - (func $anyref_test (; 1 ;) (type $0) (param $0 anyref) (result anyref) + (func $anyref_test (; 1 ;) (param $0 anyref) (result anyref) (local $1 anyref) (local.set $1 (call $test1 diff --git a/test/anyref.wast.fromBinary.noDebugInfo b/test/anyref.wast.fromBinary.noDebugInfo index d397cd3f9..2f532e6f1 100644 --- a/test/anyref.wast.fromBinary.noDebugInfo +++ b/test/anyref.wast.fromBinary.noDebugInfo @@ -1,11 +1,11 @@ (module - (type $0 (func (param anyref) (result anyref))) + (type $anyref_=>_anyref (func (param anyref) (result anyref))) (import "env" "test2" (global $gimport$1 anyref)) (import "env" "test1" (func $fimport$0 (param anyref) (result anyref))) (memory $0 1 1) (export "test1" (func $fimport$0)) (export "test2" (global $gimport$1)) - (func $0 (; 1 ;) (type $0) (param $0 anyref) (result anyref) + (func $0 (; 1 ;) (param $0 anyref) (result anyref) (local $1 anyref) (local.set $1 (call $fimport$0 diff --git a/test/atomics.wast.from-wast b/test/atomics.wast.from-wast index c3fdd375d..6e59febc5 100644 --- a/test/atomics.wast.from-wast +++ b/test/atomics.wast.from-wast @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 (shared 23 256)) - (func $atomic-loadstore (; 0 ;) (type $0) + (func $atomic-loadstore (; 0 ;) (local $0 i32) (local $1 i64) (drop @@ -68,7 +68,7 @@ (local.get $1) ) ) - (func $atomic-rmw (; 1 ;) (type $0) + (func $atomic-rmw (; 1 ;) (local $0 i32) (local $1 i64) (drop @@ -102,7 +102,7 @@ ) ) ) - (func $atomic-cmpxchg (; 2 ;) (type $0) + (func $atomic-cmpxchg (; 2 ;) (local $0 i32) (local $1 i64) (drop @@ -134,7 +134,7 @@ ) ) ) - (func $atomic-wait-notify (; 3 ;) (type $0) + (func $atomic-wait-notify (; 3 ;) (local $0 i32) (local $1 i64) (drop @@ -158,7 +158,7 @@ ) ) ) - (func $atomic-fence (; 4 ;) (type $0) + (func $atomic-fence (; 4 ;) (atomic.fence) ) ) diff --git a/test/atomics.wast.fromBinary b/test/atomics.wast.fromBinary index 78d086a0c..a8c6b65b8 100644 --- a/test/atomics.wast.fromBinary +++ b/test/atomics.wast.fromBinary @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 (shared 23 256)) - (func $atomic-loadstore (; 0 ;) (type $0) + (func $atomic-loadstore (; 0 ;) (local $0 i32) (local $1 i64) (drop @@ -68,7 +68,7 @@ (local.get $1) ) ) - (func $atomic-rmw (; 1 ;) (type $0) + (func $atomic-rmw (; 1 ;) (local $0 i32) (local $1 i64) (drop @@ -102,7 +102,7 @@ ) ) ) - (func $atomic-cmpxchg (; 2 ;) (type $0) + (func $atomic-cmpxchg (; 2 ;) (local $0 i32) (local $1 i64) (drop @@ -134,7 +134,7 @@ ) ) ) - (func $atomic-wait-notify (; 3 ;) (type $0) + (func $atomic-wait-notify (; 3 ;) (local $0 i32) (local $1 i64) (drop @@ -158,7 +158,7 @@ ) ) ) - (func $atomic-fence (; 4 ;) (type $0) + (func $atomic-fence (; 4 ;) (atomic.fence) ) ) diff --git a/test/atomics.wast.fromBinary.noDebugInfo b/test/atomics.wast.fromBinary.noDebugInfo index 86860c907..b5b91729d 100644 --- a/test/atomics.wast.fromBinary.noDebugInfo +++ b/test/atomics.wast.fromBinary.noDebugInfo @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 (shared 23 256)) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (local $0 i32) (local $1 i64) (drop @@ -68,7 +68,7 @@ (local.get $1) ) ) - (func $1 (; 1 ;) (type $0) + (func $1 (; 1 ;) (local $0 i32) (local $1 i64) (drop @@ -102,7 +102,7 @@ ) ) ) - (func $2 (; 2 ;) (type $0) + (func $2 (; 2 ;) (local $0 i32) (local $1 i64) (drop @@ -134,7 +134,7 @@ ) ) ) - (func $3 (; 3 ;) (type $0) + (func $3 (; 3 ;) (local $0 i32) (local $1 i64) (drop @@ -158,7 +158,7 @@ ) ) ) - (func $4 (; 4 ;) (type $0) + (func $4 (; 4 ;) (atomic.fence) ) ) diff --git a/test/bad_params.fromasm b/test/bad_params.fromasm index 5e85182fc..55741d33c 100644 --- a/test/bad_params.fromasm +++ b/test/bad_params.fromasm @@ -1,4 +1,5 @@ (module + (type $none_=>_none (func)) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "bad_params.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/bad_params.fromasm.clamp b/test/bad_params.fromasm.clamp index 5e85182fc..55741d33c 100644 --- a/test/bad_params.fromasm.clamp +++ b/test/bad_params.fromasm.clamp @@ -1,4 +1,5 @@ (module + (type $none_=>_none (func)) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "bad_params.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/bad_params.fromasm.clamp.no-opts b/test/bad_params.fromasm.clamp.no-opts index 53268a527..203a3cad5 100644 --- a/test/bad_params.fromasm.clamp.no-opts +++ b/test/bad_params.fromasm.clamp.no-opts @@ -1,4 +1,7 @@ (module + (type $i32_f64_=>_none (func (param i32 f64))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/bad_params.fromasm.imprecise b/test/bad_params.fromasm.imprecise index d174d5614..6e059233c 100644 --- a/test/bad_params.fromasm.imprecise +++ b/test/bad_params.fromasm.imprecise @@ -1,4 +1,5 @@ (module + (type $none_=>_none (func)) (export "ex" (func $ex)) (func $ex (; 0 ;) (; has Stack IR ;) (nop) diff --git a/test/bad_params.fromasm.imprecise.no-opts b/test/bad_params.fromasm.imprecise.no-opts index 53268a527..203a3cad5 100644 --- a/test/bad_params.fromasm.imprecise.no-opts +++ b/test/bad_params.fromasm.imprecise.no-opts @@ -1,4 +1,7 @@ (module + (type $i32_f64_=>_none (func (param i32 f64))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/bad_params.fromasm.no-opts b/test/bad_params.fromasm.no-opts index 53268a527..203a3cad5 100644 --- a/test/bad_params.fromasm.no-opts +++ b/test/bad_params.fromasm.no-opts @@ -1,4 +1,7 @@ (module + (type $i32_f64_=>_none (func (param i32 f64))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/binaryen.js/atomics.js b/test/binaryen.js/atomics.js index 40c3ea0ab..d19a8e89d 100644 --- a/test/binaryen.js/atomics.js +++ b/test/binaryen.js/atomics.js @@ -8,10 +8,8 @@ var module = Binaryen.parseText(` ) `); -var signature = module.addFunctionType("v", Binaryen.none, []); - // i32/i64.atomic.load/store -module.addFunction("main", signature, [], module.block("", [ +module.addFunction("main", Binaryen.none, Binaryen.none, [], module.block("", [ // i32 module.i32.atomic.store(0, module.i32.const(0), diff --git a/test/binaryen.js/atomics.js.txt b/test/binaryen.js/atomics.js.txt index 0a8659acf..be62678e2 100644 --- a/test/binaryen.js/atomics.js.txt +++ b/test/binaryen.js/atomics.js.txt @@ -1,7 +1,7 @@ (module - (type $v (func)) + (type $none_=>_none (func)) (memory $0 (shared 1 1)) - (func $main (; 0 ;) (type $v) + (func $main (; 0 ;) (i32.atomic.store (i32.const 0) (i32.atomic.load diff --git a/test/binaryen.js/custom-section.js.txt b/test/binaryen.js/custom-section.js.txt index 7ac835fdf..e4e8e85d6 100644 --- a/test/binaryen.js/custom-section.js.txt +++ b/test/binaryen.js/custom-section.js.txt @@ -3,7 +3,6 @@ #include <map> #include "binaryen-c.h" int main() { - std::map<size_t, BinaryenFunctionTypeRef> functionTypes; std::map<size_t, BinaryenExpressionRef> expressions; std::map<size_t, BinaryenFunctionRef> functions; std::map<size_t, BinaryenGlobalRef> globals; diff --git a/test/binaryen.js/debug-info.js.txt b/test/binaryen.js/debug-info.js.txt index 8825b135f..3d83e46e5 100644 --- a/test/binaryen.js/debug-info.js.txt +++ b/test/binaryen.js/debug-info.js.txt @@ -1,10 +1,10 @@ === default === debugInfo=false (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) (export "test" (func $0)) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (nop) ) ) @@ -12,10 +12,10 @@ debugInfo=false === with debug info === debugInfo=true (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) (export "test" (func $test)) - (func $test (; 0 ;) (type $0) + (func $test (; 0 ;) (nop) ) ) @@ -23,10 +23,10 @@ debugInfo=true === without debug info === debugInfo=false (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) (export "test" (func $0)) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (nop) ) ) diff --git a/test/binaryen.js/emit_asmjs.js b/test/binaryen.js/emit_asmjs.js index 19b2f7b2c..9d5a3966d 100644 --- a/test/binaryen.js/emit_asmjs.js +++ b/test/binaryen.js/emit_asmjs.js @@ -4,9 +4,7 @@ function assert(x) { var module = new Binaryen.Module(); -var signature = module.addFunctionType("ii", Binaryen.i32, [ Binaryen.i32 ]); - -module.addFunction("main", signature, [], module.local.get(0, Binaryen.i32)); +module.addFunction("main", Binaryen.i32, Binaryen.i32, [], module.local.get(0, Binaryen.i32)); module.addFunctionExport("main", "main"); diff --git a/test/binaryen.js/event.js.txt b/test/binaryen.js/event.js.txt index 51e35dc4c..94e1b1a7a 100644 --- a/test/binaryen.js/event.js.txt +++ b/test/binaryen.js/event.js.txt @@ -1,12 +1,15 @@ GetEvent is equal: true getEventInfo={"name":"a-event","module":"","base":"","attribute":0,"params":2,"results":0} (module + (type $i32_=>_none (func (param i32))) + (type $i32_f32_=>_none (func (param i32 f32))) (import "module" "base" (event $a-event-imp (attr 0) (param i32 f32))) (event $a-event (attr 0) (param i32)) (export "a-event-exp" (event $a-event)) ) (module + (type $i32_f32_=>_none (func (param i32 f32))) (import "module" "base" (event $a-event-imp (attr 0) (param i32 f32))) ) diff --git a/test/binaryen.js/exception-handling.js b/test/binaryen.js/exception-handling.js index 00faf8f26..5d84c1365 100644 --- a/test/binaryen.js/exception-handling.js +++ b/test/binaryen.js/exception-handling.js @@ -19,7 +19,6 @@ function stringify(expr) { var module = new Binaryen.Module(); module.setFeatures(Binaryen.Features.ExceptionHandling); -var v = module.addFunctionType("v", Binaryen.none, []); var event_ = module.addEvent("e", 0, Binaryen.i32, Binaryen.none); // (try @@ -49,7 +48,7 @@ var try_ = module.try( ] ) ); -var func = module.addFunction("test", v, [Binaryen.exnref], try_); +var func = module.addFunction("test", Binaryen.none, Binaryen.none, [Binaryen.exnref], try_); console.log(module.emitText()); assert(module.validate()); diff --git a/test/binaryen.js/exception-handling.js.txt b/test/binaryen.js/exception-handling.js.txt index 04887dc31..55f6422af 100644 --- a/test/binaryen.js/exception-handling.js.txt +++ b/test/binaryen.js/exception-handling.js.txt @@ -1,7 +1,8 @@ (module - (type $v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (event $e (attr 0) (param i32)) - (func $test (; 0 ;) (type $v) + (func $test (; 0 ;) (local $0 exnref) (try (throw $e diff --git a/test/binaryen.js/fatal.js b/test/binaryen.js/fatal.js deleted file mode 100644 index 5e8071daa..000000000 --- a/test/binaryen.js/fatal.js +++ /dev/null @@ -1,4 +0,0 @@ -var wasm = new Binaryen.Module() -wasm.addFunctionType("vI", Binaryen.i32, []); -// It will cause a fatal error to try to add the same name a second time -wasm.addFunctionType("vI", Binaryen.i32, []); diff --git a/test/binaryen.js/fatal.js.txt b/test/binaryen.js/fatal.js.txt deleted file mode 100644 index afd3ca587..000000000 --- a/test/binaryen.js/fatal.js.txt +++ /dev/null @@ -1 +0,0 @@ -Fatal: Module::addFunctionType: vI already exists diff --git a/test/binaryen.js/functions.js b/test/binaryen.js/functions.js index cd821dc96..b2172d005 100644 --- a/test/binaryen.js/functions.js +++ b/test/binaryen.js/functions.js @@ -14,9 +14,7 @@ function cleanInfo(info) { var module = new Binaryen.Module(); -var signature = module.addFunctionType("i", Binaryen.i32, []); - -var func = module.addFunction("a-function", signature, [], +var func = module.addFunction("a-function", Binaryen.none, Binaryen.i32, [], module.i32.add( module.i32.const(1), module.i32.const(2) @@ -27,8 +25,6 @@ console.log("GetFunction is equal: " + (func === module.getFunction("a-function" module.runPassesOnFunction(func, ["precompute"]); -var sigInfo = Binaryen.getFunctionTypeInfo(signature); -console.log("getFunctionTypeInfo=" + JSON.stringify(cleanInfo(sigInfo))); var funcInfo = Binaryen.getFunctionInfo(func); console.log("getFunctionInfo=" + JSON.stringify(cleanInfo(funcInfo))); var expInfo = Binaryen.getExpressionInfo(funcInfo.body); diff --git a/test/binaryen.js/functions.js.txt b/test/binaryen.js/functions.js.txt index 2491671da..8dd90b3a8 100644 --- a/test/binaryen.js/functions.js.txt +++ b/test/binaryen.js/functions.js.txt @@ -1,10 +1,8 @@ GetFunction is equal: true -getFunctionTypeInfo={"params":[],"result":2} -getFunctionInfo={"module":"","base":"","params":[],"result":2,"vars":[]} +getFunctionInfo={"module":"","base":"","params":0,"results":2,"vars":[]} getExpressionInfo(body)={"id":14,"value":3} (i32.const 3) (module - (type $i (func (result i32))) ) diff --git a/test/binaryen.js/hello-world.js b/test/binaryen.js/hello-world.js index 82867f53c..414e5bfd1 100644 --- a/test/binaryen.js/hello-world.js +++ b/test/binaryen.js/hello-world.js @@ -8,10 +8,6 @@ function assert(x) { // Create a module to work on var module = new Binaryen.Module(); -// Create a function type for i32 (i32, i32) (i.e., return i32, pass two -// i32 params) -var iii = module.addFunctionType('iii', Binaryen.i32, [Binaryen.i32, Binaryen.i32]); - // Start to create the function, starting with the contents: Get the 0 and // 1 arguments, and add them, then return them var left = module.local.get(0, Binaryen.i32); @@ -21,7 +17,8 @@ var ret = module.return(add); // Create the add function // Note: no additional local variables (that's the []) -module.addFunction('adder', iii, [], ret); +var ii = Binaryen.createType([Binaryen.i32, Binaryen.i32]) +module.addFunction('adder', ii, Binaryen.i32, [], ret); // Export the function, so we can call it later (for simplicity we // export it as the same name as it has internally) @@ -54,4 +51,3 @@ console.log(); // Call the code! console.log('an addition: ' + wasm.exports.adder(40, 2)); - diff --git a/test/binaryen.js/hello-world.js.txt b/test/binaryen.js/hello-world.js.txt index a6372be5f..3ce5163ea 100644 --- a/test/binaryen.js/hello-world.js.txt +++ b/test/binaryen.js/hello-world.js.txt @@ -1,7 +1,7 @@ (module - (type $iii (func (param i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (export "adder" (func $adder)) - (func $adder (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $adder (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (return (i32.add (local.get $0) @@ -14,9 +14,9 @@ optimized: (module - (type $iii (func (param i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (export "adder" (func $adder)) - (func $adder (; 0 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $adder (; 0 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) (i32.add (local.get $0) (local.get $1) diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js index 8c2ebc783..83e3d4a44 100644 --- a/test/binaryen.js/kitchen-sink.js +++ b/test/binaryen.js/kitchen-sink.js @@ -168,7 +168,7 @@ function test_core() { constF32Bits = module.f32.const_bits(0xffff1234), constF64Bits = module.f64.const_bits(0x5678abcd, 0xffff1234); - var iiIfF = module.addFunctionType("iiIfF", Binaryen.i32, [ Binaryen.i32, Binaryen.i64, Binaryen.f32, Binaryen.f64 ]); + var iIfF = Binaryen.createType([Binaryen.i32, Binaryen.i64, Binaryen.f32, Binaryen.f64]) var temp1 = makeInt32(1), temp2 = makeInt32(2), temp3 = makeInt32(3), temp4 = makeInt32(4), temp5 = makeInt32(5), @@ -465,7 +465,7 @@ function test_core() { ) ), module.i32.eqz( // check the output type of the call node - module.callIndirect(makeInt32(2449), [ makeInt32(13), makeInt64(37, 0), makeFloat32(1.3), makeFloat64(3.7) ], "iiIfF") + module.callIndirect(makeInt32(2449), [ makeInt32(13), makeInt64(37, 0), makeFloat32(1.3), makeFloat64(3.7) ], iIfF, Binaryen.i32) ), module.drop(module.local.get(0, Binaryen.i32)), module.local.set(0, makeInt32(101)), @@ -480,7 +480,7 @@ function test_core() { module.return(makeInt32(1337)), // 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"), + module.returnCallIndirect(makeInt32(2449), [ makeInt32(13), makeInt64(37, 0), makeFloat32(1.3), makeFloat64(3.7) ], iIfF, Binaryen.i32), // Exception handling module.try( @@ -550,7 +550,7 @@ function test_core() { var body = module.block("the-body", [ nothing, makeInt32(42) ]); // Create the function - var sinker = module.addFunction("kitchen()sinker", iiIfF, [ Binaryen.i32, Binaryen.exnref ], body); + var sinker = module.addFunction("kitchen()sinker", iIfF, Binaryen.i32, [ Binaryen.i32, Binaryen.exnref ], body); // Create a global var initExpr = module.i32.const(1); @@ -558,8 +558,8 @@ function test_core() { // Imports - var fiF = module.addFunctionType("fiF", Binaryen.f32, [ Binaryen.i32, Binaryen.f64 ]); - module.addFunctionImport("an-imported", "module", "base", fiF); + var iF = Binaryen.createType([Binaryen.i32, Binaryen.f64]); + module.addFunctionImport("an-imported", "module", "base", iF, Binaryen.f32); module.addGlobalImport("a-global-imp", "module", "base", Binaryen.i32, false); module.addGlobalImport("a-mut-global-imp", "module", "base", Binaryen.i32, true); module.addEventImport("a-event-imp", "module", "base", 0, Binaryen.i32, Binaryen.none); @@ -590,15 +590,9 @@ function test_core() { ], true); // Start function. One per module - - var v = module.addFunctionType("v", Binaryen.None, []); - var starter = module.addFunction("starter", v, [], module.nop()); + var starter = module.addFunction("starter", Binaryen.none, Binaryen.none, [], module.nop()); module.setStart(starter); - // Unnamed function type - - var noname = module.addFunctionType(null, Binaryen.None, []); - // A bunch of our code needs drop, auto-add it module.autoDrop(); @@ -623,19 +617,15 @@ function makeCallCheck(x) { function test_relooper() { module = new Binaryen.Module(); - var v = module.addFunctionType("v", Binaryen.None, []); var localTypes = [ Binaryen.i32 ]; - { - var vi = module.addFunctionType("vi", Binaryen.None, [ Binaryen.i32 ]); - module.addFunctionImport("check", "module", "check", vi); - } + module.addFunctionImport("check", "module", "check", Binaryen.i32, Binaryen.none); { // trivial: just one block var relooper = new Binaryen.Relooper(module); var block = relooper.addBlock(makeCallCheck(1337)); var body = relooper.renderAndDispose(block, 0, module); - module.addFunction("just-one-block", v, localTypes, body); + module.addFunction("just-one-block", Binaryen.none, Binaryen.none, localTypes, body); } { // two blocks var relooper = new Binaryen.Relooper(module); @@ -643,7 +633,7 @@ function test_relooper() { var block1 = relooper.addBlock(makeCallCheck(1)); relooper.addBranch(block0, block1); // no condition, no code on branch var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("two-blocks", v, localTypes, body); + module.addFunction("two-blocks", Binaryen.none, Binaryen.none, localTypes, body); } { // two blocks with code between them var relooper = new Binaryen.Relooper(module); @@ -651,7 +641,7 @@ function test_relooper() { var block1 = relooper.addBlock(makeCallCheck(1)); relooper.addBranch(block0, block1, null, makeDroppedInt32(77)); // code on branch var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("two-blocks-plus-code", v, localTypes, body); + module.addFunction("two-blocks-plus-code", Binaryen.none, Binaryen.none, localTypes, body); } { // two blocks in a loop var relooper = new Binaryen.Relooper(module); @@ -660,7 +650,7 @@ function test_relooper() { relooper.addBranch(block0, block1, null, null); relooper.addBranch(block1, block0, null, null); var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("loop", v, localTypes, body); + module.addFunction("loop", Binaryen.none, Binaryen.none, localTypes, body); } { // two blocks in a loop with codes var relooper = new Binaryen.Relooper(module); @@ -669,7 +659,7 @@ function test_relooper() { relooper.addBranch(block0, block1, null, makeDroppedInt32(33)); relooper.addBranch(block1, block0, null, makeDroppedInt32(-66)); var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("loop-plus-code", v, localTypes, body); + module.addFunction("loop-plus-code", Binaryen.none, Binaryen.none, localTypes, body); } { // split var relooper = new Binaryen.Relooper(module); @@ -679,7 +669,7 @@ function test_relooper() { relooper.addBranch(block0, block1, makeInt32(55), null); relooper.addBranch(block0, block2, null, null); var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("split", v, localTypes, body); + module.addFunction("split", Binaryen.none, Binaryen.none, localTypes, body); } { // split + code var relooper = new Binaryen.Relooper(module); @@ -690,7 +680,7 @@ function test_relooper() { relooper.addBranch(block0, block1, makeInt32(55), temp); relooper.addBranch(block0, block2, null, makeDroppedInt32(20)); var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("split-plus-code", v, localTypes, body); + module.addFunction("split-plus-code", Binaryen.none, Binaryen.none, localTypes, body); } { // if var relooper = new Binaryen.Relooper(module); @@ -701,7 +691,7 @@ function test_relooper() { relooper.addBranch(block0, block2, null, null); relooper.addBranch(block1, block2, null, null); var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("if", v, localTypes, body); + module.addFunction("if", Binaryen.none, Binaryen.none, localTypes, body); } { // if + code var relooper = new Binaryen.Relooper(module); @@ -713,7 +703,7 @@ function test_relooper() { relooper.addBranch(block0, block2, null, makeDroppedInt32(-2)); relooper.addBranch(block1, block2, null, makeDroppedInt32(-3)); var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("if-plus-code", v, localTypes, body); + module.addFunction("if-plus-code", Binaryen.none, Binaryen.none, localTypes, body); } { // if-else var relooper = new Binaryen.Relooper(module); @@ -726,7 +716,7 @@ function test_relooper() { relooper.addBranch(block1, block3, null, null); relooper.addBranch(block2, block3, null, null); var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("if-else", v, localTypes, body); + module.addFunction("if-else", Binaryen.none, Binaryen.none, localTypes, body); } { // loop+tail var relooper = new Binaryen.Relooper(module); @@ -737,7 +727,7 @@ function test_relooper() { relooper.addBranch(block1, block0, makeInt32(10), null); relooper.addBranch(block1, block2, null, null); var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("loop-tail", v, localTypes, body); + module.addFunction("loop-tail", Binaryen.none, Binaryen.none, localTypes, body); } { // nontrivial loop + phi to head var relooper = new Binaryen.Relooper(module); @@ -758,7 +748,7 @@ function test_relooper() { relooper.addBranch(block4, block5, null, null); relooper.addBranch(block5, block6, null, makeDroppedInt32(40)); var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("nontrivial-loop-plus-phi-to-head", v, localTypes, body); + module.addFunction("nontrivial-loop-plus-phi-to-head", Binaryen.none, Binaryen.none, localTypes, body); } { // switch var relooper = new Binaryen.Relooper(module); @@ -771,7 +761,7 @@ function test_relooper() { relooper.addBranchForSwitch(block0, block2, [4], makeDroppedInt32(55)); relooper.addBranchForSwitch(block0, block3, [], null); var body = relooper.renderAndDispose(block0, 0, module); - module.addFunction("switch", v, localTypes, body); + module.addFunction("switch", Binaryen.none, Binaryen.none, localTypes, body); } { // duff's device var relooper = new Binaryen.Relooper(module); @@ -783,17 +773,15 @@ function test_relooper() { relooper.addBranch(block1, block2, null, null); relooper.addBranch(block2, block1, null, null); var body = relooper.renderAndDispose(block0, 3, module); // use $3 as the helper var - module.addFunction("duffs-device", v, [ Binaryen.i32, Binaryen.i32, Binaryen.i64, Binaryen.i32, Binaryen.f32, Binaryen.f64, Binaryen.i32 ], body); + module.addFunction("duffs-device", Binaryen.none, Binaryen.none, [ Binaryen.i32, Binaryen.i32, Binaryen.i64, Binaryen.i32, Binaryen.f32, Binaryen.f64, Binaryen.i32 ], body); } - var i = module.addFunctionType("i", Binaryen.i32, []); - { // return in a block var relooper = new Binaryen.Relooper(module); var list = module.block("the-list", [ makeCallCheck(42), module.return(makeInt32(1337)) ]); var block = relooper.addBlock(list); var body = relooper.renderAndDispose(block, 0, module); - module.addFunction("return", i, localTypes, body); + module.addFunction("return", Binaryen.none, Binaryen.i32, localTypes, body); } console.log("raw:"); @@ -821,11 +809,11 @@ function test_binaries() { { // create a module and write it to binary module = new Binaryen.Module(); module.setFeatures(Binaryen.Features.All); - var iii = module.addFunctionType("iii", Binaryen.i32, [ Binaryen.i32, Binaryen.i32 ]); + var ii = Binaryen.createType([Binaryen.i32, Binaryen.i32]); var x = module.local.get(0, Binaryen.i32), y = module.local.get(1, Binaryen.i32); var add = module.i32.add(x, y); - var adder = module.addFunction("adder", iii, [], add); + var adder = module.addFunction("adder", ii, Binaryen.i32, [], add); var initExpr = module.i32.const(3); var global = module.addGlobal("a-global", Binaryen.i32, false, initExpr) var event_ = module.addEvent("a-event", 0, Binaryen.createType([Binaryen.i32, Binaryen.i32]), Binaryen.none); @@ -854,12 +842,9 @@ function test_interpret() { // create a simple module with a start method that prints a number, and interpret it, printing that number. module = new Binaryen.Module(); - var vi = module.addFunctionType("vi", Binaryen.None, [ Binaryen.i32 ]); - module.addFunctionImport("print-i32", "spectest", "print", vi); - - var v = module.addFunctionType("v", Binaryen.None, []); + module.addFunctionImport("print-i32", "spectest", "print", Binaryen.i32, Binaryen.none); call = module.call("print-i32", [ makeInt32(1234) ], Binaryen.None); - var starter = module.addFunction("starter", v, [], call); + var starter = module.addFunction("starter", Binaryen.none, Binaryen.none, [], call); module.setStart(starter); console.log(module.emitText()); @@ -872,8 +857,7 @@ function test_nonvalid() { // create a module that fails to validate module = new Binaryen.Module(); - var v = module.addFunctionType("v", Binaryen.None, []); - var func = module.addFunction("func", v, [ Binaryen.i32 ], + var func = module.addFunction("func", Binaryen.none, Binaryen.none, [ Binaryen.i32 ], module.local.set(0, makeInt64(1234, 0)) // wrong type! ); @@ -898,11 +882,11 @@ function test_parsing() { module = new Binaryen.Module(); module.setFeatures(Binaryen.Features.All); - var iii = module.addFunctionType("iii", Binaryen.i32, [ Binaryen.i32, Binaryen.i32 ]); + var ii = Binaryen.createType([Binaryen.i32, Binaryen.i32]); var x = module.local.get(0, Binaryen.i32), y = module.local.get(1, Binaryen.i32); var add = module.i32.add(x, y); - var adder = module.addFunction("adder", iii, [], add); + var adder = module.addFunction("adder", ii, Binaryen.i32, [], add); var initExpr = module.i32.const(3); var global = module.addGlobal("a-global", Binaryen.i32, false, initExpr) var event_ = module.addEvent("a-event", 0, Binaryen.i32, Binaryen.none); @@ -928,12 +912,10 @@ function test_internals() { function test_for_each() { module = new Binaryen.Module(); - var v = module.addFunctionType("v", Binaryen.None, []); - var fns = [ - module.addFunction("fn0", v, [], module.nop()), - module.addFunction("fn1", v, [], module.nop()), - module.addFunction("fn2", v, [], module.nop()) + module.addFunction("fn0", Binaryen.none, Binaryen.none, [], module.nop()), + module.addFunction("fn1", Binaryen.none, Binaryen.none, [], module.nop()), + module.addFunction("fn2", Binaryen.none, Binaryen.none, [], module.nop()) ]; var i; @@ -992,6 +974,8 @@ function test_expression_info() { } function main() { + // Tracing must be first so it starts with a fresh set of interned types + test_tracing(); test_types(); test_features(); test_ids(); @@ -1000,7 +984,6 @@ function main() { test_binaries(); test_interpret(); test_nonvalid(); - test_tracing(); test_parsing(); test_internals(); test_for_each(); diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt index 966735f12..a740bd42c 100644 --- a/test/binaryen.js/kitchen-sink.js.txt +++ b/test/binaryen.js/kitchen-sink.js.txt @@ -1,93 +1,1818 @@ - // BinaryenTypeNone: 0 - // [] - // BinaryenTypeUnreachable: 1 - // [ 1 ] - // BinaryenTypeInt32: 2 - // [ 2 ] - // BinaryenTypeInt64: 3 - // [ 3 ] - // BinaryenTypeFloat32: 4 - // [ 4 ] - // BinaryenTypeFloat64: 5 - // [ 5 ] - // BinaryenTypeVec128: 6 - // [ 6 ] - // BinaryenTypeAnyref: 7 - // [ 7 ] - // BinaryenTypeExnref: 8 - // [ 8 ] - // BinaryenTypeAuto: -1 - // 9 [ 2, 2 ] - // 9 [ 2, 2 ] - // 10 [ 4, 4 ] -Binaryen.Features.MVP: 0 -Binaryen.Features.Atomics: 1 -Binaryen.Features.BulkMemory: 16 -Binaryen.Features.MutableGlobals: 2 -Binaryen.Features.NontrappingFPToInt: 4 -Binaryen.Features.SignExt: 32 -Binaryen.Features.SIMD128: 8 -Binaryen.Features.ExceptionHandling: 64 -Binaryen.Features.TailCall: 128 -Binaryen.Features.ReferenceTypes: 256 -Binaryen.Features.All: 511 -BinaryenInvalidId: 0 -BinaryenBlockId: 1 -BinaryenIfId: 2 -BinaryenLoopId: 3 -BinaryenBreakId: 4 -BinaryenSwitchId: 5 -BinaryenCallId: 6 -BinaryenCallIndirectId: 7 -BinaryenLocalGetId: 8 -BinaryenLocalSetId: 9 -BinaryenGlobalGetId: 10 -BinaryenGlobalSetId: 11 -BinaryenLoadId: 12 -BinaryenStoreId: 13 -BinaryenConstId: 14 -BinaryenUnaryId: 15 -BinaryenBinaryId: 16 -BinaryenSelectId: 17 -BinaryenDropId: 18 -BinaryenReturnId: 19 -BinaryenHostId: 20 -BinaryenNopId: 21 -BinaryenUnreachableId: 22 -BinaryenAtomicCmpxchgId: 24 -BinaryenAtomicRMWId: 23 -BinaryenAtomicWaitId: 25 -BinaryenAtomicNotifyId: 26 -BinaryenSIMDExtractId: 28 -BinaryenSIMDReplaceId: 29 -BinaryenSIMDShuffleId: 30 -BinaryenSIMDTernaryId: 31 -BinaryenSIMDShiftId: 32 -BinaryenSIMDLoadId: 33 -MemoryInitId: 34 -DataDropId: 35 -MemoryCopyId: 36 -MemoryFillId: 37 -TryId: 40 -ThrowId: 41 -RethrowId: 42 -BrOnExnId: 43 -PushId: 38 -PopId: 39 +// beginning a Binaryen API trace +#include <math.h> +#include <map> +#include "binaryen-c.h" +int main() { + std::map<size_t, BinaryenExpressionRef> expressions; + std::map<size_t, BinaryenFunctionRef> functions; + std::map<size_t, BinaryenGlobalRef> globals; + std::map<size_t, BinaryenEventRef> events; + std::map<size_t, BinaryenExportRef> exports; + std::map<size_t, RelooperBlockRef> relooperBlocks; + BinaryenModuleRef the_module = NULL; + RelooperRef the_relooper = NULL; + the_module = BinaryenModuleCreate(); + expressions[size_t(NULL)] = BinaryenExpressionRef(NULL); + BinaryenAddEvent(the_module, "a-event", 0, 2, 0); + expressions[1] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[2] = BinaryenConst(the_module, BinaryenLiteralInt64(2)); + expressions[3] = BinaryenConst(the_module, BinaryenLiteralFloat32(3.14)); + expressions[4] = BinaryenConst(the_module, BinaryenLiteralFloat64(2.1828)); + expressions[5] = BinaryenConst(the_module, BinaryenLiteralFloat32(NAN)); + expressions[6] = BinaryenConst(the_module, BinaryenLiteralFloat64(NAN)); + { + BinaryenType t0[] = {2, 3, 4, 5}; + BinaryenTypeCreate(t0, 4); // 9 + } + expressions[7] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[8] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[9] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + expressions[10] = BinaryenConst(the_module, BinaryenLiteralInt32(4)); + expressions[11] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); + expressions[12] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[13] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[14] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[15] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[16] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[17] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + expressions[18] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); + expressions[19] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + expressions[20] = BinaryenConst(the_module, BinaryenLiteralInt32(11)); + expressions[21] = BinaryenConst(the_module, BinaryenLiteralInt32(110)); + expressions[22] = BinaryenConst(the_module, BinaryenLiteralInt64(111)); + expressions[23] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[24] = BinaryenUnary(the_module, 0, expressions[23]); + expressions[25] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[26] = BinaryenUnary(the_module, 3, expressions[25]); + expressions[27] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[28] = BinaryenUnary(the_module, 4, expressions[27]); + expressions[29] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[30] = BinaryenUnary(the_module, 6, expressions[29]); + expressions[31] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[32] = BinaryenUnary(the_module, 9, expressions[31]); + expressions[33] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[34] = BinaryenUnary(the_module, 10, expressions[33]); + expressions[35] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[36] = BinaryenUnary(the_module, 13, expressions[35]); + expressions[37] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[38] = BinaryenUnary(the_module, 14, expressions[37]); + expressions[39] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[40] = BinaryenUnary(the_module, 16, expressions[39]); + expressions[41] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[42] = BinaryenUnary(the_module, 19, expressions[41]); + expressions[43] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[44] = BinaryenUnary(the_module, 20, expressions[43]); + expressions[45] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[46] = BinaryenUnary(the_module, 22, expressions[45]); + expressions[47] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[48] = BinaryenUnary(the_module, 23, expressions[47]); + expressions[49] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[50] = BinaryenUnary(the_module, 24, expressions[49]); + expressions[51] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[52] = BinaryenUnary(the_module, 25, expressions[51]); + expressions[53] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[54] = BinaryenUnary(the_module, 26, expressions[53]); + expressions[55] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[56] = BinaryenUnary(the_module, 27, expressions[55]); + expressions[57] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[58] = BinaryenUnary(the_module, 28, expressions[57]); + expressions[59] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[60] = BinaryenUnary(the_module, 29, expressions[59]); + expressions[61] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[62] = BinaryenUnary(the_module, 30, expressions[61]); + expressions[63] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[64] = BinaryenUnary(the_module, 31, expressions[63]); + expressions[65] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[66] = BinaryenUnary(the_module, 32, expressions[65]); + expressions[67] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[68] = BinaryenUnary(the_module, 52, expressions[67]); + expressions[69] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[70] = BinaryenUnary(the_module, 56, expressions[69]); + expressions[71] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[72] = BinaryenUnary(the_module, 53, expressions[71]); + expressions[73] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[74] = BinaryenUnary(the_module, 57, expressions[73]); + expressions[75] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[76] = BinaryenUnary(the_module, 54, expressions[75]); + expressions[77] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[78] = BinaryenUnary(the_module, 58, expressions[77]); + expressions[79] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[80] = BinaryenUnary(the_module, 55, expressions[79]); + expressions[81] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[82] = BinaryenUnary(the_module, 59, expressions[81]); + expressions[83] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[84] = BinaryenUnary(the_module, 33, expressions[83]); + expressions[85] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[86] = BinaryenUnary(the_module, 34, expressions[85]); + expressions[87] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[88] = BinaryenUnary(the_module, 35, expressions[87]); + expressions[89] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[90] = BinaryenUnary(the_module, 36, expressions[89]); + expressions[91] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[92] = BinaryenUnary(the_module, 37, expressions[91]); + expressions[93] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[94] = BinaryenUnary(the_module, 38, expressions[93]); + expressions[95] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[96] = BinaryenUnary(the_module, 39, expressions[95]); + expressions[97] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[98] = BinaryenUnary(the_module, 40, expressions[97]); + expressions[99] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[100] = BinaryenUnary(the_module, 41, expressions[99]); + expressions[101] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[102] = BinaryenUnary(the_module, 42, expressions[101]); + expressions[103] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[104] = BinaryenUnary(the_module, 43, expressions[103]); + expressions[105] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[106] = BinaryenUnary(the_module, 44, expressions[105]); + expressions[107] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[108] = BinaryenUnary(the_module, 45, expressions[107]); + expressions[109] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[110] = BinaryenUnary(the_module, 46, expressions[109]); + expressions[111] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[112] = BinaryenUnary(the_module, 60, expressions[111]); + expressions[113] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[114] = BinaryenUnary(the_module, 61, expressions[113]); + expressions[115] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[116] = BinaryenUnary(the_module, 62, expressions[115]); + expressions[117] = BinaryenConst(the_module, BinaryenLiteralInt64(1958505087099)); + expressions[118] = BinaryenUnary(the_module, 63, expressions[117]); + expressions[119] = BinaryenConst(the_module, BinaryenLiteralFloat32(42)); + expressions[120] = BinaryenUnary(the_module, 64, expressions[119]); + expressions[121] = BinaryenConst(the_module, BinaryenLiteralFloat64(42)); + expressions[122] = BinaryenUnary(the_module, 65, expressions[121]); + { + uint8_t t1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[123] = BinaryenConst(the_module, BinaryenLiteralVec128(t1)); + } + expressions[124] = BinaryenUnary(the_module, 66, expressions[123]); + { + uint8_t t2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[125] = BinaryenConst(the_module, BinaryenLiteralVec128(t2)); + } + expressions[126] = BinaryenUnary(the_module, 67, expressions[125]); + { + uint8_t t3[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[127] = BinaryenConst(the_module, BinaryenLiteralVec128(t3)); + } + expressions[128] = BinaryenUnary(the_module, 68, expressions[127]); + { + uint8_t t4[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[129] = BinaryenConst(the_module, BinaryenLiteralVec128(t4)); + } + expressions[130] = BinaryenUnary(the_module, 69, expressions[129]); + { + uint8_t t5[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[131] = BinaryenConst(the_module, BinaryenLiteralVec128(t5)); + } + expressions[132] = BinaryenUnary(the_module, 70, expressions[131]); + { + uint8_t t6[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[133] = BinaryenConst(the_module, BinaryenLiteralVec128(t6)); + } + expressions[134] = BinaryenUnary(the_module, 71, expressions[133]); + { + uint8_t t7[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[135] = BinaryenConst(the_module, BinaryenLiteralVec128(t7)); + } + expressions[136] = BinaryenUnary(the_module, 72, expressions[135]); + { + uint8_t t8[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[137] = BinaryenConst(the_module, BinaryenLiteralVec128(t8)); + } + expressions[138] = BinaryenUnary(the_module, 73, expressions[137]); + { + uint8_t t9[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[139] = BinaryenConst(the_module, BinaryenLiteralVec128(t9)); + } + expressions[140] = BinaryenUnary(the_module, 74, expressions[139]); + { + uint8_t t10[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[141] = BinaryenConst(the_module, BinaryenLiteralVec128(t10)); + } + expressions[142] = BinaryenUnary(the_module, 75, expressions[141]); + { + uint8_t t11[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[143] = BinaryenConst(the_module, BinaryenLiteralVec128(t11)); + } + expressions[144] = BinaryenUnary(the_module, 76, expressions[143]); + { + uint8_t t12[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[145] = BinaryenConst(the_module, BinaryenLiteralVec128(t12)); + } + expressions[146] = BinaryenUnary(the_module, 77, expressions[145]); + { + uint8_t t13[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[147] = BinaryenConst(the_module, BinaryenLiteralVec128(t13)); + } + expressions[148] = BinaryenUnary(the_module, 78, expressions[147]); + { + uint8_t t14[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[149] = BinaryenConst(the_module, BinaryenLiteralVec128(t14)); + } + expressions[150] = BinaryenUnary(the_module, 79, expressions[149]); + { + uint8_t t15[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[151] = BinaryenConst(the_module, BinaryenLiteralVec128(t15)); + } + expressions[152] = BinaryenUnary(the_module, 80, expressions[151]); + { + uint8_t t16[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[153] = BinaryenConst(the_module, BinaryenLiteralVec128(t16)); + } + expressions[154] = BinaryenUnary(the_module, 81, expressions[153]); + { + uint8_t t17[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[155] = BinaryenConst(the_module, BinaryenLiteralVec128(t17)); + } + expressions[156] = BinaryenUnary(the_module, 82, expressions[155]); + { + uint8_t t18[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[157] = BinaryenConst(the_module, BinaryenLiteralVec128(t18)); + } + expressions[158] = BinaryenUnary(the_module, 83, expressions[157]); + { + uint8_t t19[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[159] = BinaryenConst(the_module, BinaryenLiteralVec128(t19)); + } + expressions[160] = BinaryenUnary(the_module, 84, expressions[159]); + { + uint8_t t20[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[161] = BinaryenConst(the_module, BinaryenLiteralVec128(t20)); + } + expressions[162] = BinaryenUnary(the_module, 85, expressions[161]); + { + uint8_t t21[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[163] = BinaryenConst(the_module, BinaryenLiteralVec128(t21)); + } + expressions[164] = BinaryenUnary(the_module, 86, expressions[163]); + { + uint8_t t22[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[165] = BinaryenConst(the_module, BinaryenLiteralVec128(t22)); + } + expressions[166] = BinaryenUnary(the_module, 87, expressions[165]); + { + uint8_t t23[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[167] = BinaryenConst(the_module, BinaryenLiteralVec128(t23)); + } + expressions[168] = BinaryenUnary(the_module, 88, expressions[167]); + { + uint8_t t24[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[169] = BinaryenConst(the_module, BinaryenLiteralVec128(t24)); + } + expressions[170] = BinaryenUnary(the_module, 89, expressions[169]); + { + uint8_t t25[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[171] = BinaryenConst(the_module, BinaryenLiteralVec128(t25)); + } + expressions[172] = BinaryenUnary(the_module, 90, expressions[171]); + { + uint8_t t26[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[173] = BinaryenConst(the_module, BinaryenLiteralVec128(t26)); + } + expressions[174] = BinaryenUnary(the_module, 91, expressions[173]); + { + uint8_t t27[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[175] = BinaryenConst(the_module, BinaryenLiteralVec128(t27)); + } + expressions[176] = BinaryenUnary(the_module, 92, expressions[175]); + { + uint8_t t28[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[177] = BinaryenConst(the_module, BinaryenLiteralVec128(t28)); + } + expressions[178] = BinaryenUnary(the_module, 93, expressions[177]); + { + uint8_t t29[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[179] = BinaryenConst(the_module, BinaryenLiteralVec128(t29)); + } + expressions[180] = BinaryenUnary(the_module, 94, expressions[179]); + { + uint8_t t30[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[181] = BinaryenConst(the_module, BinaryenLiteralVec128(t30)); + } + expressions[182] = BinaryenUnary(the_module, 95, expressions[181]); + { + uint8_t t31[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[183] = BinaryenConst(the_module, BinaryenLiteralVec128(t31)); + } + expressions[184] = BinaryenUnary(the_module, 96, expressions[183]); + { + uint8_t t32[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[185] = BinaryenConst(the_module, BinaryenLiteralVec128(t32)); + } + expressions[186] = BinaryenUnary(the_module, 97, expressions[185]); + { + uint8_t t33[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[187] = BinaryenConst(the_module, BinaryenLiteralVec128(t33)); + } + expressions[188] = BinaryenUnary(the_module, 98, expressions[187]); + { + uint8_t t34[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[189] = BinaryenConst(the_module, BinaryenLiteralVec128(t34)); + } + expressions[190] = BinaryenUnary(the_module, 99, expressions[189]); + { + uint8_t t35[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[191] = BinaryenConst(the_module, BinaryenLiteralVec128(t35)); + } + expressions[192] = BinaryenUnary(the_module, 100, expressions[191]); + expressions[193] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[194] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[195] = BinaryenBinary(the_module, 0, expressions[193], expressions[194]); + expressions[196] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[197] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[198] = BinaryenBinary(the_module, 64, expressions[196], expressions[197]); + expressions[199] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[200] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[201] = BinaryenBinary(the_module, 3, expressions[199], expressions[200]); + expressions[202] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); + expressions[203] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); + expressions[204] = BinaryenBinary(the_module, 29, expressions[202], expressions[203]); + expressions[205] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); + expressions[206] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); + expressions[207] = BinaryenBinary(the_module, 30, expressions[205], expressions[206]); + expressions[208] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[209] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[210] = BinaryenBinary(the_module, 6, expressions[208], expressions[209]); + expressions[211] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[212] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[213] = BinaryenBinary(the_module, 7, expressions[211], expressions[212]); + expressions[214] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); + expressions[215] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); + expressions[216] = BinaryenBinary(the_module, 33, expressions[214], expressions[215]); + expressions[217] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[218] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[219] = BinaryenBinary(the_module, 9, expressions[217], expressions[218]); + expressions[220] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); + expressions[221] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); + expressions[222] = BinaryenBinary(the_module, 35, expressions[220], expressions[221]); + expressions[223] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); + expressions[224] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); + expressions[225] = BinaryenBinary(the_module, 36, expressions[223], expressions[224]); + expressions[226] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[227] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[228] = BinaryenBinary(the_module, 12, expressions[226], expressions[227]); + expressions[229] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[230] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[231] = BinaryenBinary(the_module, 13, expressions[229], expressions[230]); + expressions[232] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); + expressions[233] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); + expressions[234] = BinaryenBinary(the_module, 39, expressions[232], expressions[233]); + expressions[235] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[236] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[237] = BinaryenBinary(the_module, 53, expressions[235], expressions[236]); + expressions[238] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[239] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[240] = BinaryenBinary(the_module, 67, expressions[238], expressions[239]); + expressions[241] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[242] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[243] = BinaryenBinary(the_module, 55, expressions[241], expressions[242]); + expressions[244] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[245] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[246] = BinaryenBinary(the_module, 69, expressions[244], expressions[245]); + expressions[247] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[248] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[249] = BinaryenBinary(the_module, 15, expressions[247], expressions[248]); + expressions[250] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[251] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[252] = BinaryenBinary(the_module, 58, expressions[250], expressions[251]); + expressions[253] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[254] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[255] = BinaryenBinary(the_module, 17, expressions[253], expressions[254]); + expressions[256] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); + expressions[257] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); + expressions[258] = BinaryenBinary(the_module, 43, expressions[256], expressions[257]); + expressions[259] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); + expressions[260] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); + expressions[261] = BinaryenBinary(the_module, 44, expressions[259], expressions[260]); + expressions[262] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[263] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[264] = BinaryenBinary(the_module, 20, expressions[262], expressions[263]); + expressions[265] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); + expressions[266] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); + expressions[267] = BinaryenBinary(the_module, 46, expressions[265], expressions[266]); + expressions[268] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[269] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[270] = BinaryenBinary(the_module, 22, expressions[268], expressions[269]); + expressions[271] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[272] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[273] = BinaryenBinary(the_module, 23, expressions[271], expressions[272]); + expressions[274] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); + expressions[275] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); + expressions[276] = BinaryenBinary(the_module, 49, expressions[274], expressions[275]); + expressions[277] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[278] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[279] = BinaryenBinary(the_module, 59, expressions[277], expressions[278]); + expressions[280] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[281] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[282] = BinaryenBinary(the_module, 73, expressions[280], expressions[281]); + expressions[283] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[284] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[285] = BinaryenBinary(the_module, 74, expressions[283], expressions[284]); + expressions[286] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[287] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[288] = BinaryenBinary(the_module, 62, expressions[286], expressions[287]); + { + uint8_t t36[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[289] = 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[290] = BinaryenConst(the_module, BinaryenLiteralVec128(t37)); + } + expressions[291] = BinaryenBinary(the_module, 76, expressions[289], expressions[290]); + { + uint8_t t38[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[292] = 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[293] = BinaryenConst(the_module, BinaryenLiteralVec128(t39)); + } + expressions[294] = BinaryenBinary(the_module, 77, expressions[292], expressions[293]); + { + uint8_t t40[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[295] = 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[296] = BinaryenConst(the_module, BinaryenLiteralVec128(t41)); + } + expressions[297] = BinaryenBinary(the_module, 78, expressions[295], expressions[296]); + { + uint8_t t42[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[298] = 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[299] = BinaryenConst(the_module, BinaryenLiteralVec128(t43)); + } + expressions[300] = BinaryenBinary(the_module, 79, expressions[298], expressions[299]); + { + uint8_t t44[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[301] = 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[302] = BinaryenConst(the_module, BinaryenLiteralVec128(t45)); + } + expressions[303] = BinaryenBinary(the_module, 80, expressions[301], expressions[302]); + { + uint8_t t46[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[304] = 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[305] = BinaryenConst(the_module, BinaryenLiteralVec128(t47)); + } + expressions[306] = BinaryenBinary(the_module, 81, expressions[304], expressions[305]); + { + uint8_t t48[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[307] = 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[308] = BinaryenConst(the_module, BinaryenLiteralVec128(t49)); + } + expressions[309] = BinaryenBinary(the_module, 82, expressions[307], expressions[308]); + { + uint8_t t50[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[310] = 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[311] = BinaryenConst(the_module, BinaryenLiteralVec128(t51)); + } + expressions[312] = BinaryenBinary(the_module, 83, expressions[310], expressions[311]); + { + uint8_t t52[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[313] = 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[314] = BinaryenConst(the_module, BinaryenLiteralVec128(t53)); + } + expressions[315] = BinaryenBinary(the_module, 84, expressions[313], expressions[314]); + { + uint8_t t54[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[316] = 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[317] = BinaryenConst(the_module, BinaryenLiteralVec128(t55)); + } + expressions[318] = BinaryenBinary(the_module, 85, expressions[316], expressions[317]); + { + uint8_t t56[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[319] = 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[320] = BinaryenConst(the_module, BinaryenLiteralVec128(t57)); + } + expressions[321] = BinaryenBinary(the_module, 86, expressions[319], expressions[320]); + { + uint8_t t58[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[322] = 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[323] = BinaryenConst(the_module, BinaryenLiteralVec128(t59)); + } + expressions[324] = BinaryenBinary(the_module, 87, expressions[322], expressions[323]); + { + uint8_t t60[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[325] = 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[326] = BinaryenConst(the_module, BinaryenLiteralVec128(t61)); + } + expressions[327] = BinaryenBinary(the_module, 88, expressions[325], expressions[326]); + { + uint8_t t62[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[328] = 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[329] = BinaryenConst(the_module, BinaryenLiteralVec128(t63)); + } + expressions[330] = BinaryenBinary(the_module, 89, expressions[328], expressions[329]); + { + uint8_t t64[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[331] = 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[332] = BinaryenConst(the_module, BinaryenLiteralVec128(t65)); + } + expressions[333] = BinaryenBinary(the_module, 90, expressions[331], expressions[332]); + { + uint8_t t66[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[334] = 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[335] = BinaryenConst(the_module, BinaryenLiteralVec128(t67)); + } + expressions[336] = BinaryenBinary(the_module, 91, expressions[334], expressions[335]); + { + uint8_t t68[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[337] = 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[338] = BinaryenConst(the_module, BinaryenLiteralVec128(t69)); + } + expressions[339] = BinaryenBinary(the_module, 92, expressions[337], expressions[338]); + { + uint8_t t70[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[340] = 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[341] = BinaryenConst(the_module, BinaryenLiteralVec128(t71)); + } + expressions[342] = BinaryenBinary(the_module, 93, expressions[340], expressions[341]); + { + uint8_t t72[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[343] = 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[344] = BinaryenConst(the_module, BinaryenLiteralVec128(t73)); + } + expressions[345] = BinaryenBinary(the_module, 94, expressions[343], expressions[344]); + { + uint8_t t74[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[346] = 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[347] = BinaryenConst(the_module, BinaryenLiteralVec128(t75)); + } + expressions[348] = BinaryenBinary(the_module, 95, expressions[346], expressions[347]); + { + uint8_t t76[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[349] = 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[350] = BinaryenConst(the_module, BinaryenLiteralVec128(t77)); + } + expressions[351] = BinaryenBinary(the_module, 96, expressions[349], expressions[350]); + { + uint8_t t78[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[352] = 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[353] = BinaryenConst(the_module, BinaryenLiteralVec128(t79)); + } + expressions[354] = BinaryenBinary(the_module, 97, expressions[352], expressions[353]); + { + uint8_t t80[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[355] = 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[356] = BinaryenConst(the_module, BinaryenLiteralVec128(t81)); + } + expressions[357] = BinaryenBinary(the_module, 98, expressions[355], expressions[356]); + { + uint8_t t82[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[358] = 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[359] = BinaryenConst(the_module, BinaryenLiteralVec128(t83)); + } + expressions[360] = BinaryenBinary(the_module, 99, expressions[358], expressions[359]); + { + uint8_t t84[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[361] = 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[362] = BinaryenConst(the_module, BinaryenLiteralVec128(t85)); + } + expressions[363] = BinaryenBinary(the_module, 100, expressions[361], expressions[362]); + { + uint8_t t86[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[364] = 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[365] = BinaryenConst(the_module, BinaryenLiteralVec128(t87)); + } + expressions[366] = BinaryenBinary(the_module, 101, expressions[364], expressions[365]); + { + uint8_t t88[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[367] = 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[368] = BinaryenConst(the_module, BinaryenLiteralVec128(t89)); + } + expressions[369] = BinaryenBinary(the_module, 102, expressions[367], expressions[368]); + { + uint8_t t90[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[370] = 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[371] = BinaryenConst(the_module, BinaryenLiteralVec128(t91)); + } + expressions[372] = BinaryenBinary(the_module, 103, expressions[370], expressions[371]); + { + uint8_t t92[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[373] = 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[374] = BinaryenConst(the_module, BinaryenLiteralVec128(t93)); + } + expressions[375] = BinaryenBinary(the_module, 104, expressions[373], expressions[374]); + { + uint8_t t94[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[376] = 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[377] = BinaryenConst(the_module, BinaryenLiteralVec128(t95)); + } + expressions[378] = BinaryenBinary(the_module, 105, expressions[376], expressions[377]); + { + uint8_t t96[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[379] = 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[380] = BinaryenConst(the_module, BinaryenLiteralVec128(t97)); + } + expressions[381] = BinaryenBinary(the_module, 106, expressions[379], expressions[380]); + { + uint8_t t98[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[382] = 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[383] = BinaryenConst(the_module, BinaryenLiteralVec128(t99)); + } + expressions[384] = BinaryenBinary(the_module, 107, expressions[382], expressions[383]); + { + uint8_t t100[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[385] = 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[386] = BinaryenConst(the_module, BinaryenLiteralVec128(t101)); + } + expressions[387] = BinaryenBinary(the_module, 108, expressions[385], expressions[386]); + { + uint8_t t102[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[388] = 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[389] = BinaryenConst(the_module, BinaryenLiteralVec128(t103)); + } + expressions[390] = BinaryenBinary(the_module, 109, expressions[388], expressions[389]); + { + uint8_t t104[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[391] = 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[392] = BinaryenConst(the_module, BinaryenLiteralVec128(t105)); + } + expressions[393] = BinaryenBinary(the_module, 110, expressions[391], expressions[392]); + { + uint8_t t106[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[394] = 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[395] = BinaryenConst(the_module, BinaryenLiteralVec128(t107)); + } + expressions[396] = BinaryenBinary(the_module, 111, expressions[394], expressions[395]); + { + uint8_t t108[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[397] = 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[398] = BinaryenConst(the_module, BinaryenLiteralVec128(t109)); + } + expressions[399] = BinaryenBinary(the_module, 111, expressions[397], expressions[398]); + { + uint8_t t110[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[400] = 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[401] = BinaryenConst(the_module, BinaryenLiteralVec128(t111)); + } + expressions[402] = BinaryenBinary(the_module, 113, expressions[400], expressions[401]); + { + uint8_t t112[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[403] = 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[404] = BinaryenConst(the_module, BinaryenLiteralVec128(t113)); + } + expressions[405] = BinaryenBinary(the_module, 114, expressions[403], expressions[404]); + { + uint8_t t114[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[406] = 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[407] = BinaryenConst(the_module, BinaryenLiteralVec128(t115)); + } + expressions[408] = BinaryenBinary(the_module, 115, expressions[406], expressions[407]); + { + uint8_t t116[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[409] = 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[410] = BinaryenConst(the_module, BinaryenLiteralVec128(t117)); + } + expressions[411] = BinaryenBinary(the_module, 116, expressions[409], expressions[410]); + { + uint8_t t118[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[412] = 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[413] = BinaryenConst(the_module, BinaryenLiteralVec128(t119)); + } + expressions[414] = BinaryenBinary(the_module, 117, expressions[412], expressions[413]); + { + uint8_t t120[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[415] = 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[416] = BinaryenConst(the_module, BinaryenLiteralVec128(t121)); + } + expressions[417] = BinaryenBinary(the_module, 118, expressions[415], expressions[416]); + { + uint8_t t122[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[418] = 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[419] = BinaryenConst(the_module, BinaryenLiteralVec128(t123)); + } + expressions[420] = BinaryenBinary(the_module, 119, expressions[418], expressions[419]); + { + uint8_t t124[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[421] = 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[422] = BinaryenConst(the_module, BinaryenLiteralVec128(t125)); + } + expressions[423] = BinaryenBinary(the_module, 120, expressions[421], expressions[422]); + { + uint8_t t126[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[424] = 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[425] = BinaryenConst(the_module, BinaryenLiteralVec128(t127)); + } + expressions[426] = BinaryenBinary(the_module, 121, expressions[424], expressions[425]); + { + uint8_t t128[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[427] = 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[428] = BinaryenConst(the_module, BinaryenLiteralVec128(t129)); + } + expressions[429] = BinaryenBinary(the_module, 122, expressions[427], expressions[428]); + { + uint8_t t130[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[430] = 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[431] = BinaryenConst(the_module, BinaryenLiteralVec128(t131)); + } + expressions[432] = BinaryenBinary(the_module, 123, expressions[430], expressions[431]); + { + uint8_t t132[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[433] = 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[434] = BinaryenConst(the_module, BinaryenLiteralVec128(t133)); + } + expressions[435] = BinaryenBinary(the_module, 124, expressions[433], expressions[434]); + { + uint8_t t134[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[436] = 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[437] = BinaryenConst(the_module, BinaryenLiteralVec128(t135)); + } + expressions[438] = BinaryenBinary(the_module, 125, expressions[436], expressions[437]); + { + uint8_t t136[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[439] = 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[440] = BinaryenConst(the_module, BinaryenLiteralVec128(t137)); + } + expressions[441] = BinaryenBinary(the_module, 126, expressions[439], expressions[440]); + { + uint8_t t138[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[442] = 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[443] = BinaryenConst(the_module, BinaryenLiteralVec128(t139)); + } + expressions[444] = BinaryenBinary(the_module, 127, expressions[442], expressions[443]); + { + uint8_t t140[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[445] = 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[446] = BinaryenConst(the_module, BinaryenLiteralVec128(t141)); + } + expressions[447] = BinaryenBinary(the_module, 128, expressions[445], expressions[446]); + { + uint8_t t142[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[448] = 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[449] = BinaryenConst(the_module, BinaryenLiteralVec128(t143)); + } + expressions[450] = BinaryenBinary(the_module, 129, expressions[448], expressions[449]); + { + uint8_t t144[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[451] = 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[452] = BinaryenConst(the_module, BinaryenLiteralVec128(t145)); + } + expressions[453] = BinaryenBinary(the_module, 130, expressions[451], expressions[452]); + { + uint8_t t146[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[454] = 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[455] = BinaryenConst(the_module, BinaryenLiteralVec128(t147)); + } + expressions[456] = BinaryenBinary(the_module, 131, expressions[454], expressions[455]); + { + uint8_t t148[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[457] = 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[458] = BinaryenConst(the_module, BinaryenLiteralVec128(t149)); + } + expressions[459] = BinaryenBinary(the_module, 132, expressions[457], expressions[458]); + { + uint8_t t150[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[460] = 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[461] = BinaryenConst(the_module, BinaryenLiteralVec128(t151)); + } + expressions[462] = BinaryenBinary(the_module, 133, expressions[460], expressions[461]); + { + uint8_t t152[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[463] = 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[464] = BinaryenConst(the_module, BinaryenLiteralVec128(t153)); + } + expressions[465] = BinaryenBinary(the_module, 134, expressions[463], expressions[464]); + { + uint8_t t154[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[466] = 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[467] = BinaryenConst(the_module, BinaryenLiteralVec128(t155)); + } + expressions[468] = BinaryenBinary(the_module, 135, expressions[466], expressions[467]); + { + uint8_t t156[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[469] = 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[470] = BinaryenConst(the_module, BinaryenLiteralVec128(t157)); + } + expressions[471] = BinaryenBinary(the_module, 136, expressions[469], expressions[470]); + { + uint8_t t158[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[472] = 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[473] = BinaryenConst(the_module, BinaryenLiteralVec128(t159)); + } + expressions[474] = BinaryenBinary(the_module, 137, expressions[472], expressions[473]); + { + uint8_t t160[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[475] = 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[476] = BinaryenConst(the_module, BinaryenLiteralVec128(t161)); + } + expressions[477] = BinaryenBinary(the_module, 138, expressions[475], expressions[476]); + { + uint8_t t162[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[478] = 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[479] = BinaryenConst(the_module, BinaryenLiteralVec128(t163)); + } + expressions[480] = BinaryenBinary(the_module, 139, expressions[478], expressions[479]); + { + uint8_t t164[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[481] = 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[482] = BinaryenConst(the_module, BinaryenLiteralVec128(t165)); + } + expressions[483] = BinaryenBinary(the_module, 140, expressions[481], expressions[482]); + { + uint8_t t166[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[484] = 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[485] = BinaryenConst(the_module, BinaryenLiteralVec128(t167)); + } + expressions[486] = BinaryenBinary(the_module, 141, expressions[484], expressions[485]); + { + uint8_t t168[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[487] = 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[488] = BinaryenConst(the_module, BinaryenLiteralVec128(t169)); + } + expressions[489] = BinaryenBinary(the_module, 142, expressions[487], expressions[488]); + { + uint8_t t170[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[490] = 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[491] = BinaryenConst(the_module, BinaryenLiteralVec128(t171)); + } + expressions[492] = BinaryenBinary(the_module, 143, expressions[490], expressions[491]); + { + uint8_t t172[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[493] = 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[494] = BinaryenConst(the_module, BinaryenLiteralVec128(t173)); + } + expressions[495] = BinaryenBinary(the_module, 144, expressions[493], expressions[494]); + { + uint8_t t174[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[496] = 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[497] = BinaryenConst(the_module, BinaryenLiteralVec128(t175)); + } + expressions[498] = BinaryenBinary(the_module, 145, expressions[496], expressions[497]); + { + uint8_t t176[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[499] = 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[500] = BinaryenConst(the_module, BinaryenLiteralVec128(t177)); + } + expressions[501] = BinaryenBinary(the_module, 146, expressions[499], expressions[500]); + { + uint8_t t178[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[502] = 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[503] = BinaryenConst(the_module, BinaryenLiteralVec128(t179)); + } + expressions[504] = BinaryenBinary(the_module, 147, expressions[502], expressions[503]); + { + uint8_t t180[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[505] = BinaryenConst(the_module, BinaryenLiteralVec128(t180)); + } + { + uint8_t t181[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[506] = BinaryenConst(the_module, BinaryenLiteralVec128(t181)); + } + expressions[507] = BinaryenBinary(the_module, 148, expressions[505], expressions[506]); + { + uint8_t t182[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[508] = BinaryenConst(the_module, BinaryenLiteralVec128(t182)); + } + { + uint8_t t183[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[509] = BinaryenConst(the_module, BinaryenLiteralVec128(t183)); + } + expressions[510] = BinaryenBinary(the_module, 149, expressions[508], expressions[509]); + { + uint8_t t184[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[511] = BinaryenConst(the_module, BinaryenLiteralVec128(t184)); + } + { + uint8_t t185[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[512] = BinaryenConst(the_module, BinaryenLiteralVec128(t185)); + } + expressions[513] = BinaryenBinary(the_module, 150, expressions[511], expressions[512]); + { + uint8_t t186[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[514] = BinaryenConst(the_module, BinaryenLiteralVec128(t186)); + } + { + uint8_t t187[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[515] = BinaryenConst(the_module, BinaryenLiteralVec128(t187)); + } + expressions[516] = BinaryenBinary(the_module, 151, expressions[514], expressions[515]); + { + uint8_t t188[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[517] = BinaryenConst(the_module, BinaryenLiteralVec128(t188)); + } + { + uint8_t t189[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[518] = BinaryenConst(the_module, BinaryenLiteralVec128(t189)); + } + expressions[519] = BinaryenBinary(the_module, 152, expressions[517], expressions[518]); + { + uint8_t t190[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[520] = BinaryenConst(the_module, BinaryenLiteralVec128(t190)); + } + { + uint8_t t191[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[521] = BinaryenConst(the_module, BinaryenLiteralVec128(t191)); + } + expressions[522] = BinaryenBinary(the_module, 153, expressions[520], expressions[521]); + { + uint8_t t192[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[523] = BinaryenConst(the_module, BinaryenLiteralVec128(t192)); + } + { + uint8_t t193[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[524] = BinaryenConst(the_module, BinaryenLiteralVec128(t193)); + } + expressions[525] = BinaryenBinary(the_module, 154, expressions[523], expressions[524]); + { + uint8_t t194[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[526] = BinaryenConst(the_module, BinaryenLiteralVec128(t194)); + } + { + uint8_t t195[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[527] = BinaryenConst(the_module, BinaryenLiteralVec128(t195)); + } + expressions[528] = BinaryenBinary(the_module, 155, expressions[526], expressions[527]); + { + uint8_t t196[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[529] = BinaryenConst(the_module, BinaryenLiteralVec128(t196)); + } + { + uint8_t t197[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[530] = BinaryenConst(the_module, BinaryenLiteralVec128(t197)); + } + expressions[531] = BinaryenBinary(the_module, 156, expressions[529], expressions[530]); + { + uint8_t t198[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[532] = BinaryenConst(the_module, BinaryenLiteralVec128(t198)); + } + { + uint8_t t199[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[533] = BinaryenConst(the_module, BinaryenLiteralVec128(t199)); + } + expressions[534] = BinaryenBinary(the_module, 157, expressions[532], expressions[533]); + { + uint8_t t200[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[535] = BinaryenConst(the_module, BinaryenLiteralVec128(t200)); + } + { + uint8_t t201[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[536] = BinaryenConst(the_module, BinaryenLiteralVec128(t201)); + } + expressions[537] = BinaryenBinary(the_module, 158, expressions[535], expressions[536]); + { + uint8_t t202[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[538] = BinaryenConst(the_module, BinaryenLiteralVec128(t202)); + } + { + uint8_t t203[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[539] = BinaryenConst(the_module, BinaryenLiteralVec128(t203)); + } + expressions[540] = BinaryenBinary(the_module, 159, expressions[538], expressions[539]); + { + uint8_t t204[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[541] = BinaryenConst(the_module, BinaryenLiteralVec128(t204)); + } + { + uint8_t t205[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[542] = BinaryenConst(the_module, BinaryenLiteralVec128(t205)); + } + expressions[543] = BinaryenBinary(the_module, 160, expressions[541], expressions[542]); + { + uint8_t t206[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[544] = 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[545] = BinaryenConst(the_module, BinaryenLiteralVec128(t207)); + } + expressions[546] = BinaryenBinary(the_module, 161, expressions[544], expressions[545]); + { + uint8_t t208[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[547] = 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[548] = BinaryenConst(the_module, BinaryenLiteralVec128(t209)); + } + expressions[549] = BinaryenBinary(the_module, 162, expressions[547], expressions[548]); + { + uint8_t t210[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[550] = BinaryenConst(the_module, BinaryenLiteralVec128(t210)); + } + { + uint8_t t211[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[551] = BinaryenConst(the_module, BinaryenLiteralVec128(t211)); + } + expressions[552] = BinaryenBinary(the_module, 163, expressions[550], expressions[551]); + { + uint8_t t212[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[553] = BinaryenConst(the_module, BinaryenLiteralVec128(t212)); + } + { + uint8_t t213[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[554] = BinaryenConst(the_module, BinaryenLiteralVec128(t213)); + } + expressions[555] = BinaryenBinary(the_module, 164, expressions[553], expressions[554]); + { + uint8_t t214[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[556] = BinaryenConst(the_module, BinaryenLiteralVec128(t214)); + } + { + uint8_t t215[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[557] = BinaryenConst(the_module, BinaryenLiteralVec128(t215)); + } + expressions[558] = BinaryenBinary(the_module, 165, expressions[556], expressions[557]); + { + uint8_t t216[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[559] = BinaryenConst(the_module, BinaryenLiteralVec128(t216)); + } + { + uint8_t t217[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[560] = BinaryenConst(the_module, BinaryenLiteralVec128(t217)); + } + expressions[561] = BinaryenBinary(the_module, 166, expressions[559], expressions[560]); + { + uint8_t t218[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[562] = BinaryenConst(the_module, BinaryenLiteralVec128(t218)); + } + { + uint8_t t219[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[563] = BinaryenConst(the_module, BinaryenLiteralVec128(t219)); + } + expressions[564] = BinaryenBinary(the_module, 167, expressions[562], expressions[563]); + { + uint8_t t220[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[565] = BinaryenConst(the_module, BinaryenLiteralVec128(t220)); + } + { + uint8_t t221[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[566] = BinaryenConst(the_module, BinaryenLiteralVec128(t221)); + } + expressions[567] = BinaryenBinary(the_module, 168, expressions[565], expressions[566]); + { + uint8_t t222[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[568] = BinaryenConst(the_module, BinaryenLiteralVec128(t222)); + } + { + uint8_t t223[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[569] = BinaryenConst(the_module, BinaryenLiteralVec128(t223)); + } + expressions[570] = BinaryenBinary(the_module, 169, expressions[568], expressions[569]); + { + uint8_t t224[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[571] = BinaryenConst(the_module, BinaryenLiteralVec128(t224)); + } + { + uint8_t t225[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[572] = BinaryenConst(the_module, BinaryenLiteralVec128(t225)); + } + expressions[573] = BinaryenBinary(the_module, 170, expressions[571], expressions[572]); + { + uint8_t t226[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[574] = BinaryenConst(the_module, BinaryenLiteralVec128(t226)); + } + expressions[575] = BinaryenSIMDExtract(the_module, 0, expressions[574], 1); + { + uint8_t t227[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[576] = BinaryenConst(the_module, BinaryenLiteralVec128(t227)); + } + expressions[577] = BinaryenSIMDExtract(the_module, 1, expressions[576], 1); + { + uint8_t t228[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[578] = BinaryenConst(the_module, BinaryenLiteralVec128(t228)); + } + expressions[579] = BinaryenSIMDExtract(the_module, 2, expressions[578], 1); + { + uint8_t t229[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[580] = BinaryenConst(the_module, BinaryenLiteralVec128(t229)); + } + expressions[581] = BinaryenSIMDExtract(the_module, 3, expressions[580], 1); + { + uint8_t t230[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[582] = BinaryenConst(the_module, BinaryenLiteralVec128(t230)); + } + expressions[583] = BinaryenSIMDExtract(the_module, 4, expressions[582], 1); + { + uint8_t t231[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[584] = BinaryenConst(the_module, BinaryenLiteralVec128(t231)); + } + expressions[585] = BinaryenSIMDExtract(the_module, 5, expressions[584], 1); + { + uint8_t t232[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[586] = BinaryenConst(the_module, BinaryenLiteralVec128(t232)); + } + expressions[587] = BinaryenSIMDExtract(the_module, 6, expressions[586], 1); + { + uint8_t t233[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[588] = BinaryenConst(the_module, BinaryenLiteralVec128(t233)); + } + expressions[589] = BinaryenSIMDExtract(the_module, 7, expressions[588], 1); + { + uint8_t t234[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[590] = BinaryenConst(the_module, BinaryenLiteralVec128(t234)); + } + expressions[591] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[592] = BinaryenSIMDReplace(the_module, 1, expressions[590], 1, expressions[591]); + { + uint8_t t235[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[593] = BinaryenConst(the_module, BinaryenLiteralVec128(t235)); + } + expressions[594] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[595] = BinaryenSIMDReplace(the_module, 0, expressions[593], 1, expressions[594]); + { + uint8_t t236[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[596] = BinaryenConst(the_module, BinaryenLiteralVec128(t236)); + } + expressions[597] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[598] = BinaryenSIMDReplace(the_module, 2, expressions[596], 1, expressions[597]); + { + uint8_t t237[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[599] = BinaryenConst(the_module, BinaryenLiteralVec128(t237)); + } + expressions[600] = BinaryenConst(the_module, BinaryenLiteralInt64(184683593770)); + expressions[601] = BinaryenSIMDReplace(the_module, 3, expressions[599], 1, expressions[600]); + { + uint8_t t238[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[602] = BinaryenConst(the_module, BinaryenLiteralVec128(t238)); + } + expressions[603] = BinaryenConst(the_module, BinaryenLiteralFloat32(42)); + expressions[604] = BinaryenSIMDReplace(the_module, 4, expressions[602], 1, expressions[603]); + { + uint8_t t239[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[605] = BinaryenConst(the_module, BinaryenLiteralVec128(t239)); + } + expressions[606] = BinaryenConst(the_module, BinaryenLiteralFloat64(42)); + expressions[607] = BinaryenSIMDReplace(the_module, 5, expressions[605], 1, expressions[606]); + { + uint8_t t240[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[608] = BinaryenConst(the_module, BinaryenLiteralVec128(t240)); + } + expressions[609] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[610] = BinaryenSIMDShift(the_module, 0, expressions[608], expressions[609]); + { + uint8_t t241[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[611] = BinaryenConst(the_module, BinaryenLiteralVec128(t241)); + } + expressions[612] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[613] = BinaryenSIMDShift(the_module, 1, expressions[611], expressions[612]); + { + uint8_t t242[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[614] = BinaryenConst(the_module, BinaryenLiteralVec128(t242)); + } + expressions[615] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[616] = BinaryenSIMDShift(the_module, 2, expressions[614], expressions[615]); + { + uint8_t t243[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[617] = BinaryenConst(the_module, BinaryenLiteralVec128(t243)); + } + expressions[618] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[619] = BinaryenSIMDShift(the_module, 3, expressions[617], expressions[618]); + { + uint8_t t244[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[620] = BinaryenConst(the_module, BinaryenLiteralVec128(t244)); + } + expressions[621] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[622] = BinaryenSIMDShift(the_module, 4, expressions[620], expressions[621]); + { + uint8_t t245[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[623] = BinaryenConst(the_module, BinaryenLiteralVec128(t245)); + } + expressions[624] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[625] = BinaryenSIMDShift(the_module, 5, expressions[623], expressions[624]); + { + uint8_t t246[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[626] = BinaryenConst(the_module, BinaryenLiteralVec128(t246)); + } + expressions[627] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[628] = BinaryenSIMDShift(the_module, 6, expressions[626], expressions[627]); + { + uint8_t t247[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[629] = BinaryenConst(the_module, BinaryenLiteralVec128(t247)); + } + expressions[630] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[631] = BinaryenSIMDShift(the_module, 7, expressions[629], expressions[630]); + { + uint8_t t248[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[632] = BinaryenConst(the_module, BinaryenLiteralVec128(t248)); + } + expressions[633] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[634] = BinaryenSIMDShift(the_module, 8, expressions[632], expressions[633]); + { + uint8_t t249[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[635] = BinaryenConst(the_module, BinaryenLiteralVec128(t249)); + } + expressions[636] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[637] = BinaryenSIMDShift(the_module, 9, expressions[635], expressions[636]); + { + uint8_t t250[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[638] = BinaryenConst(the_module, BinaryenLiteralVec128(t250)); + } + expressions[639] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[640] = BinaryenSIMDShift(the_module, 10, expressions[638], expressions[639]); + { + uint8_t t251[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[641] = BinaryenConst(the_module, BinaryenLiteralVec128(t251)); + } + expressions[642] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[643] = BinaryenSIMDShift(the_module, 11, expressions[641], expressions[642]); + expressions[644] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[645] = BinaryenSIMDLoad(the_module, 0, 0, 1, expressions[644]); + expressions[646] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[647] = BinaryenSIMDLoad(the_module, 1, 16, 1, expressions[646]); + expressions[648] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[649] = BinaryenSIMDLoad(the_module, 2, 16, 4, expressions[648]); + expressions[650] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[651] = BinaryenSIMDLoad(the_module, 3, 0, 4, expressions[650]); + expressions[652] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[653] = BinaryenSIMDLoad(the_module, 4, 0, 8, expressions[652]); + expressions[654] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[655] = BinaryenSIMDLoad(the_module, 5, 0, 8, expressions[654]); + expressions[656] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[657] = BinaryenSIMDLoad(the_module, 6, 0, 8, expressions[656]); + expressions[658] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[659] = BinaryenSIMDLoad(the_module, 7, 0, 8, expressions[658]); + expressions[660] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[661] = BinaryenSIMDLoad(the_module, 8, 0, 8, expressions[660]); + expressions[662] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[663] = BinaryenSIMDLoad(the_module, 9, 0, 8, expressions[662]); + { + uint8_t t252[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[664] = BinaryenConst(the_module, BinaryenLiteralVec128(t252)); + } + { + uint8_t t253[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[665] = BinaryenConst(the_module, BinaryenLiteralVec128(t253)); + } + { + uint8_t mask[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[666] = BinaryenSIMDShuffle(the_module, expressions[664], expressions[665], mask); + } + { + uint8_t t254[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[667] = BinaryenConst(the_module, BinaryenLiteralVec128(t254)); + } + { + uint8_t t255[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[668] = BinaryenConst(the_module, BinaryenLiteralVec128(t255)); + } + { + uint8_t t256[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[669] = BinaryenConst(the_module, BinaryenLiteralVec128(t256)); + } + expressions[670] = BinaryenSIMDTernary(the_module, 0, expressions[667], expressions[668], expressions[669]); + { + uint8_t t257[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[671] = BinaryenConst(the_module, BinaryenLiteralVec128(t257)); + } + { + uint8_t t258[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[672] = BinaryenConst(the_module, BinaryenLiteralVec128(t258)); + } + { + uint8_t t259[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[673] = BinaryenConst(the_module, BinaryenLiteralVec128(t259)); + } + expressions[674] = BinaryenSIMDTernary(the_module, 1, expressions[671], expressions[672], expressions[673]); + { + uint8_t t260[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[675] = BinaryenConst(the_module, BinaryenLiteralVec128(t260)); + } + { + uint8_t t261[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[676] = BinaryenConst(the_module, BinaryenLiteralVec128(t261)); + } + { + uint8_t t262[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[677] = BinaryenConst(the_module, BinaryenLiteralVec128(t262)); + } + expressions[678] = BinaryenSIMDTernary(the_module, 2, expressions[675], expressions[676], expressions[677]); + { + uint8_t t263[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[679] = BinaryenConst(the_module, BinaryenLiteralVec128(t263)); + } + { + uint8_t t264[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[680] = BinaryenConst(the_module, BinaryenLiteralVec128(t264)); + } + { + uint8_t t265[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[681] = BinaryenConst(the_module, BinaryenLiteralVec128(t265)); + } + expressions[682] = BinaryenSIMDTernary(the_module, 3, expressions[679], expressions[680], expressions[681]); + { + uint8_t t266[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[683] = BinaryenConst(the_module, BinaryenLiteralVec128(t266)); + } + { + uint8_t t267[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[684] = BinaryenConst(the_module, BinaryenLiteralVec128(t267)); + } + { + uint8_t t268[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[685] = BinaryenConst(the_module, BinaryenLiteralVec128(t268)); + } + expressions[686] = BinaryenSIMDTernary(the_module, 4, expressions[683], expressions[684], expressions[685]); + expressions[687] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); + expressions[688] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[689] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); + expressions[690] = BinaryenMemoryInit(the_module, 0, expressions[687], expressions[688], expressions[689]); + expressions[691] = BinaryenDataDrop(the_module, 0); + expressions[692] = BinaryenConst(the_module, BinaryenLiteralInt32(2048)); + expressions[693] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); + expressions[694] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); + expressions[695] = BinaryenMemoryCopy(the_module, expressions[692], expressions[693], expressions[694]); + expressions[696] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[697] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[698] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); + expressions[699] = BinaryenMemoryFill(the_module, expressions[696], expressions[697], expressions[698]); + { + BinaryenExpressionRef children[] = { 0 }; + expressions[700] = BinaryenBlock(the_module, NULL, children, 0, 0); + } + expressions[701] = BinaryenIf(the_module, expressions[7], expressions[8], expressions[9]); + expressions[702] = BinaryenIf(the_module, expressions[10], expressions[11], expressions[0]); + expressions[703] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[704] = BinaryenLoop(the_module, "in", expressions[703]); + expressions[705] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[706] = BinaryenLoop(the_module, NULL, expressions[705]); + expressions[707] = BinaryenBreak(the_module, "the-value", expressions[12], expressions[13]); + expressions[708] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[709] = BinaryenBreak(the_module, "the-nothing", expressions[708], expressions[0]); + expressions[710] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + expressions[711] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[710]); + expressions[712] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]); + { + const char* names[] = { "the-value" }; + expressions[713] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[14], expressions[15]); + } + expressions[714] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + const char* names[] = { "the-nothing" }; + expressions[715] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[714], expressions[0]); + } + expressions[716] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); + expressions[717] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); + expressions[718] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); + expressions[719] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); + { + BinaryenExpressionRef operands[] = { expressions[716], expressions[717], expressions[718], expressions[719] }; + expressions[720] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 2); + } + expressions[721] = BinaryenUnary(the_module, 20, expressions[720]); + expressions[722] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); + expressions[723] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); + { + BinaryenExpressionRef operands[] = { expressions[722], expressions[723] }; + expressions[724] = BinaryenCall(the_module, "an-imported", operands, 2, 4); + } + expressions[725] = BinaryenUnary(the_module, 25, expressions[724]); + expressions[726] = BinaryenUnary(the_module, 20, expressions[725]); + expressions[727] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); + expressions[728] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); + expressions[729] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); + expressions[730] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); + expressions[731] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); + { + BinaryenExpressionRef operands[] = { expressions[728], expressions[729], expressions[730], expressions[731] }; + expressions[732] = BinaryenCallIndirect(the_module, expressions[727], operands, 4, 9, 2); + } + expressions[733] = BinaryenUnary(the_module, 20, expressions[732]); + expressions[734] = BinaryenLocalGet(the_module, 0, 2); + expressions[735] = BinaryenDrop(the_module, expressions[734]); + expressions[736] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); + expressions[737] = BinaryenLocalSet(the_module, 0, expressions[736]); + expressions[738] = BinaryenConst(the_module, BinaryenLiteralInt32(102)); + expressions[739] = BinaryenLocalTee(the_module, 0, expressions[738]); + expressions[740] = BinaryenDrop(the_module, expressions[739]); + expressions[741] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[742] = BinaryenLoad(the_module, 4, 1, 0, 0, 2, expressions[741]); + expressions[743] = BinaryenConst(the_module, BinaryenLiteralInt32(8)); + expressions[744] = BinaryenLoad(the_module, 2, 1, 2, 1, 3, expressions[743]); + expressions[745] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[746] = BinaryenLoad(the_module, 4, 1, 0, 0, 4, expressions[745]); + expressions[747] = BinaryenConst(the_module, BinaryenLiteralInt32(9)); + expressions[748] = BinaryenLoad(the_module, 8, 1, 2, 8, 5, expressions[747]); + expressions[749] = BinaryenStore(the_module, 4, 0, 0, expressions[19], expressions[20], 2); + expressions[750] = BinaryenStore(the_module, 8, 2, 4, expressions[21], expressions[22], 3); + expressions[751] = BinaryenSelect(the_module, expressions[16], expressions[17], expressions[18]); + expressions[752] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); + expressions[753] = BinaryenReturn(the_module, expressions[752]); + expressions[754] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); + expressions[755] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); + expressions[756] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); + expressions[757] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); + { + BinaryenExpressionRef operands[] = { expressions[754], expressions[755], expressions[756], expressions[757] }; + expressions[758] = BinaryenReturnCall(the_module, "kitchen()sinker", operands, 4, 2); + } + expressions[759] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); + expressions[760] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); + expressions[761] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); + expressions[762] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); + expressions[763] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); + { + BinaryenExpressionRef operands[] = { expressions[760], expressions[761], expressions[762], expressions[763] }; + expressions[764] = BinaryenReturnCallIndirect(the_module, expressions[759], operands, 4, 9, 2); + } + expressions[765] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[765] }; + expressions[766] = BinaryenThrow(the_module, "a-event", operands, 1); + } + expressions[767] = BinaryenPop(the_module, 8); + expressions[768] = BinaryenLocalSet(the_module, 5, expressions[767]); + expressions[769] = BinaryenLocalGet(the_module, 5, 8); + expressions[770] = BinaryenBrOnExn(the_module, "try-block", "a-event", expressions[769]); + expressions[771] = BinaryenRethrow(the_module, expressions[770]); + { + BinaryenExpressionRef children[] = { expressions[771] }; + expressions[772] = BinaryenBlock(the_module, "try-block", children, 1, 2); + } + expressions[773] = BinaryenDrop(the_module, expressions[772]); + { + BinaryenExpressionRef children[] = { expressions[768], expressions[773] }; + expressions[774] = BinaryenBlock(the_module, NULL, children, 2, 0); + } + expressions[775] = BinaryenTry(the_module, expressions[766], expressions[774]); + expressions[776] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[777] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[778] = BinaryenAtomicLoad(the_module, 4, 0, 2, expressions[777]); + expressions[779] = BinaryenAtomicStore(the_module, 4, 0, expressions[776], expressions[778], 2); + expressions[780] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[781] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[782] = BinaryenConst(the_module, BinaryenLiteralInt64(0)); + expressions[783] = BinaryenAtomicWait(the_module, expressions[780], expressions[781], expressions[782], 2); + expressions[784] = BinaryenDrop(the_module, expressions[783]); + expressions[785] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[786] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[787] = BinaryenAtomicNotify(the_module, expressions[785], expressions[786]); + expressions[788] = BinaryenDrop(the_module, expressions[787]); + expressions[789] = BinaryenAtomicFence(the_module); + expressions[790] = BinaryenPop(the_module, 2); + expressions[791] = BinaryenPush(the_module, expressions[790]); + expressions[792] = BinaryenPop(the_module, 3); + expressions[793] = BinaryenPush(the_module, expressions[792]); + expressions[794] = BinaryenPop(the_module, 4); + expressions[795] = BinaryenPush(the_module, expressions[794]); + expressions[796] = BinaryenPop(the_module, 5); + expressions[797] = BinaryenPush(the_module, expressions[796]); + expressions[798] = BinaryenPop(the_module, 6); + expressions[799] = BinaryenPush(the_module, expressions[798]); + expressions[800] = BinaryenPop(the_module, 7); + expressions[801] = BinaryenPush(the_module, expressions[800]); + expressions[802] = BinaryenPop(the_module, 8); + expressions[803] = BinaryenPush(the_module, expressions[802]); + expressions[804] = BinaryenNop(the_module); + expressions[805] = BinaryenUnreachable(the_module); + BinaryenExpressionGetId(expressions[30]); + BinaryenExpressionGetType(expressions[30]); + BinaryenUnaryGetOp(expressions[30]); + BinaryenUnaryGetValue(expressions[30]); getExpressionInfo={"id":15,"type":4,"op":6} + BinaryenExpressionPrint(expressions[30]); (f32.neg (f32.const -33.61199951171875) ) + expressions[806] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); + BinaryenExpressionGetId(expressions[806]); + BinaryenExpressionGetType(expressions[806]); + BinaryenConstGetValueI32(expressions[806]); getExpressionInfo(i32.const)={"id":14,"type":2,"value":5} + expressions[807] = BinaryenConst(the_module, BinaryenLiteralInt64(30064771078)); + BinaryenExpressionGetId(expressions[807]); + BinaryenExpressionGetType(expressions[807]); + BinaryenConstGetValueI64Low(expressions[807]); + BinaryenConstGetValueI64High(expressions[807]); getExpressionInfo(i64.const)={"id":14,"type":3,"value":{"low":6,"high":7}} + expressions[808] = BinaryenConst(the_module, BinaryenLiteralFloat32(8.5)); + BinaryenExpressionGetId(expressions[808]); + BinaryenExpressionGetType(expressions[808]); + BinaryenConstGetValueF32(expressions[808]); getExpressionInfo(f32.const)={"id":14,"type":4,"value":8.5} + expressions[809] = BinaryenConst(the_module, BinaryenLiteralFloat64(9.5)); + BinaryenExpressionGetId(expressions[809]); + BinaryenExpressionGetType(expressions[809]); + BinaryenConstGetValueF64(expressions[809]); getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} + { + BinaryenExpressionRef children[] = { expressions[24], expressions[26], expressions[28], expressions[30], expressions[32], + expressions[34], expressions[36], expressions[38], expressions[40], expressions[42], expressions[44], + expressions[46], expressions[48], expressions[50], expressions[52], expressions[54], expressions[56], + expressions[58], expressions[60], expressions[62], expressions[64], expressions[66], expressions[68], + expressions[70], expressions[72], expressions[74], expressions[76], expressions[78], expressions[80], + expressions[82], expressions[84], expressions[86], expressions[88], expressions[90], expressions[92], + expressions[94], expressions[96], expressions[98], expressions[100], expressions[102], expressions[104], + expressions[106], expressions[108], expressions[110], expressions[112], expressions[114], expressions[116], + expressions[118], expressions[120], expressions[122], expressions[124], expressions[126], expressions[128], + expressions[130], expressions[132], expressions[134], expressions[136], expressions[138], expressions[140], + expressions[142], expressions[144], expressions[146], expressions[148], expressions[150], expressions[152], + expressions[154], expressions[156], expressions[158], expressions[160], expressions[162], expressions[164], + expressions[166], expressions[168], expressions[170], expressions[172], expressions[174], expressions[176], + expressions[178], expressions[180], expressions[182], expressions[184], expressions[186], expressions[188], + expressions[190], expressions[192], expressions[195], expressions[198], expressions[201], expressions[204], + expressions[207], expressions[210], expressions[213], expressions[216], expressions[219], expressions[222], + expressions[225], expressions[228], expressions[231], expressions[234], expressions[237], expressions[240], + expressions[243], expressions[246], expressions[249], expressions[252], expressions[255], expressions[258], + expressions[261], expressions[264], expressions[267], expressions[270], expressions[273], expressions[276], + expressions[279], expressions[282], expressions[285], expressions[288], expressions[291], expressions[294], + expressions[297], expressions[300], expressions[303], expressions[306], expressions[309], expressions[312], + expressions[315], expressions[318], expressions[321], expressions[324], expressions[327], expressions[330], + expressions[333], expressions[336], expressions[339], expressions[342], expressions[345], expressions[348], + expressions[351], expressions[354], expressions[357], expressions[360], expressions[363], expressions[366], + expressions[369], expressions[372], expressions[375], expressions[378], expressions[381], expressions[384], + expressions[387], expressions[390], expressions[393], expressions[396], expressions[399], expressions[402], + expressions[405], expressions[408], expressions[411], expressions[414], expressions[417], expressions[420], + expressions[423], expressions[426], expressions[429], expressions[432], expressions[435], expressions[438], + expressions[441], expressions[444], expressions[447], expressions[450], expressions[453], expressions[456], + expressions[459], expressions[462], expressions[465], expressions[468], expressions[471], expressions[474], + expressions[477], expressions[480], expressions[483], expressions[486], expressions[489], expressions[492], + expressions[495], expressions[498], expressions[501], expressions[504], expressions[507], expressions[510], + expressions[513], expressions[516], expressions[519], expressions[522], expressions[525], expressions[528], + expressions[531], expressions[534], 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[575], expressions[577], expressions[579], + expressions[581], expressions[583], expressions[585], expressions[587], expressions[589], expressions[592], + expressions[595], expressions[598], expressions[601], expressions[604], expressions[607], expressions[610], + expressions[613], expressions[616], expressions[619], expressions[622], expressions[625], expressions[628], + expressions[631], expressions[634], expressions[637], expressions[640], expressions[643], expressions[645], + expressions[647], expressions[649], expressions[651], expressions[653], expressions[655], expressions[657], + expressions[659], expressions[661], expressions[663], expressions[666], expressions[670], expressions[674], + expressions[678], expressions[682], expressions[686], expressions[690], expressions[691], expressions[695], + expressions[699], expressions[700], expressions[701], expressions[702], expressions[704], expressions[706], + expressions[707], expressions[709], expressions[711], expressions[712], expressions[713], expressions[715], + expressions[721], expressions[726], expressions[733], expressions[735], expressions[737], expressions[740], + expressions[742], expressions[744], expressions[746], expressions[748], expressions[749], expressions[750], + expressions[751], expressions[753], expressions[758], expressions[764], expressions[775], expressions[779], + expressions[784], expressions[788], expressions[789], expressions[791], expressions[793], expressions[795], + expressions[797], expressions[799], expressions[801], expressions[803], expressions[804], expressions[805] }; + expressions[810] = BinaryenBlock(the_module, "the-value", children, 299, 0); + } + expressions[811] = BinaryenDrop(the_module, expressions[810]); + { + BinaryenExpressionRef children[] = { expressions[811] }; + expressions[812] = BinaryenBlock(the_module, "the-nothing", children, 1, 0); + } + expressions[813] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + { + BinaryenExpressionRef children[] = { expressions[812], expressions[813] }; + expressions[814] = BinaryenBlock(the_module, "the-body", children, 2, 0); + } + { + BinaryenType varTypes[] = { 2, 8 }; + functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", 9, 2, varTypes, 2, expressions[814]); + } + expressions[815] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + globals[0] = BinaryenAddGlobal(the_module, "a-global", 2, 0, expressions[815]); + { + BinaryenType t269[] = {2, 5}; + BinaryenTypeCreate(t269, 2); // 10 + } + BinaryenAddFunctionImport(the_module, "an-imported", "module", "base", 10, 4); + BinaryenAddGlobalImport(the_module, "a-global-imp", "module", "base", 2, 0); + BinaryenAddGlobalImport(the_module, "a-mut-global-imp", "module", "base", 2, 1); + BinaryenAddEventImport(the_module, "a-event-imp", "module", "base", 0, 2, 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"); + BinaryenFunctionGetName(functions[0]); + BinaryenFunctionImportGetModule(functions[0]); + BinaryenFunctionImportGetBase(functions[0]); + BinaryenFunctionGetParams(functions[0]); + BinaryenFunctionGetResults(functions[0]); + BinaryenFunctionGetNumVars(functions[0]); + BinaryenFunctionGetVar(functions[0], 0); + BinaryenFunctionGetVar(functions[0], 1); + BinaryenFunctionGetBody(functions[0]); + expressions[816] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + const char* funcNames[] = { "kitchen()sinker" }; + BinaryenSetFunctionTable(the_module, 1, 4294967295, funcNames, 1, expressions[816]); + } + expressions[817] = 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[817], expressions[0] }; + BinaryenIndex segmentSizes[] = { 12, 12 }; + BinaryenSetMemory(the_module, 1, 256, "mem", segments, segmentPassive, segmentOffsets, segmentSizes, 2, 1); + } + expressions[818] = BinaryenNop(the_module); + { + BinaryenType varTypes[] = { 0 }; + functions[1] = BinaryenAddFunction(the_module, "starter", 0, 0, varTypes, 0, expressions[818]); + } + BinaryenSetStart(the_module, functions[1]); + BinaryenModuleAutoDrop(the_module); + BinaryenModuleSetFeatures(the_module, 511); + BinaryenModuleGetFeatures(the_module); + BinaryenModulePrint(the_module); (module - (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) - (type $fiF (func (param i32 f64) (result f32))) - (type $v (func)) - (type $3 (func)) + (type $i32_i64_f32_f64_=>_i32 (func (param i32 i64 f32 f64) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) + (type $i32_f64_=>_f32 (func (param i32 f64) (result f32))) (import "module" "base" (global $a-global-imp i32)) (import "module" "base" (global $a-mut-global-imp (mut i32))) (import "module" "base" (func $an-imported (param i32 f64) (result f32))) @@ -104,7 +1829,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (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) + (func "$kitchen()sinker" (; 1 ;) (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) @@ -1622,7 +3347,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} ) (drop (i32.eqz - (call_indirect (type $iiIfF) + (call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -1686,7 +3411,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (f32.const 1.2999999523162842) (f64.const 3.7) ) - (return_call_indirect (type $iiIfF) + (return_call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -1761,16 +3486,18 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (i32.const 42) ) ) - (func $starter (; 2 ;) (type $v) + (func $starter (; 2 ;) (nop) ) ) + BinaryenModuleValidate(the_module); + BinaryenModulePrint(the_module); (module - (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) - (type $fiF (func (param i32 f64) (result f32))) - (type $v (func)) - (type $3 (func)) + (type $i32_i64_f32_f64_=>_i32 (func (param i32 i64 f32 f64) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) + (type $i32_f64_=>_f32 (func (param i32 f64) (result f32))) (import "module" "base" (global $a-global-imp i32)) (import "module" "base" (global $a-mut-global-imp (mut i32))) (import "module" "base" (func $an-imported (param i32 f64) (result f32))) @@ -1787,7 +3514,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (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) + (func "$kitchen()sinker" (; 1 ;) (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) @@ -3305,7 +5032,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} ) (drop (i32.eqz - (call_indirect (type $iiIfF) + (call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -3369,7 +5096,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (f32.const 1.2999999523162842) (f64.const 3.7) ) - (return_call_indirect (type $iiIfF) + (return_call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -3444,24 +5171,474 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (i32.const 42) ) ) - (func $starter (; 2 ;) (type $v) + (func $starter (; 2 ;) (nop) ) ) + BinaryenModuleDispose(the_module); + expressions.clear(); + functions.clear(); + globals.clear(); + events.clear(); + exports.clear(); + relooperBlocks.clear(); + the_module = BinaryenModuleCreate(); + expressions[size_t(NULL)] = BinaryenExpressionRef(NULL); + BinaryenAddFunctionImport(the_module, "check", "module", "check", 2, 0); + the_relooper = RelooperCreate(the_module); + expressions[1] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); + { + BinaryenExpressionRef operands[] = { expressions[1] }; + expressions[2] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[2]); + expressions[3] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[0] = BinaryenAddFunction(the_module, "just-one-block", 0, 0, varTypes, 1, expressions[3]); + } + the_relooper = RelooperCreate(the_module); + expressions[4] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[4] }; + expressions[5] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[5]); + expressions[6] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[6] }; + expressions[7] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[7]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); + expressions[8] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[1] = BinaryenAddFunction(the_module, "two-blocks", 0, 0, varTypes, 1, expressions[8]); + } + the_relooper = RelooperCreate(the_module); + expressions[9] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[9] }; + expressions[10] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[10]); + expressions[11] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[11] }; + expressions[12] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[12]); + expressions[13] = BinaryenConst(the_module, BinaryenLiteralInt32(77)); + expressions[14] = BinaryenDrop(the_module, expressions[13]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[14]); + expressions[15] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[2] = BinaryenAddFunction(the_module, "two-blocks-plus-code", 0, 0, varTypes, 1, expressions[15]); + } + the_relooper = RelooperCreate(the_module); + expressions[16] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[16] }; + expressions[17] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[17]); + expressions[18] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[18] }; + expressions[19] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[19]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); + expressions[20] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[3] = BinaryenAddFunction(the_module, "loop", 0, 0, varTypes, 1, expressions[20]); + } + the_relooper = RelooperCreate(the_module); + expressions[21] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[21] }; + expressions[22] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[22]); + expressions[23] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[23] }; + expressions[24] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[24]); + expressions[25] = BinaryenConst(the_module, BinaryenLiteralInt32(33)); + expressions[26] = BinaryenDrop(the_module, expressions[25]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[26]); + expressions[27] = BinaryenConst(the_module, BinaryenLiteralInt32(-66)); + expressions[28] = BinaryenDrop(the_module, expressions[27]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[28]); + expressions[29] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[4] = BinaryenAddFunction(the_module, "loop-plus-code", 0, 0, varTypes, 1, expressions[29]); + } + the_relooper = RelooperCreate(the_module); + expressions[30] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[30] }; + expressions[31] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[31]); + expressions[32] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[32] }; + expressions[33] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[33]); + expressions[34] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[34] }; + expressions[35] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[35]); + expressions[36] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[36], expressions[0]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); + expressions[37] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[5] = BinaryenAddFunction(the_module, "split", 0, 0, varTypes, 1, expressions[37]); + } + the_relooper = RelooperCreate(the_module); + expressions[38] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[38] }; + expressions[39] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[39]); + expressions[40] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[40] }; + expressions[41] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[41]); + expressions[42] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[42] }; + expressions[43] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[43]); + expressions[44] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + expressions[45] = BinaryenDrop(the_module, expressions[44]); + expressions[46] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[46], expressions[45]); + expressions[47] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); + expressions[48] = BinaryenDrop(the_module, expressions[47]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[48]); + expressions[49] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[6] = BinaryenAddFunction(the_module, "split-plus-code", 0, 0, varTypes, 1, expressions[49]); + } + the_relooper = RelooperCreate(the_module); + expressions[50] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[50] }; + expressions[51] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[51]); + expressions[52] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[52] }; + expressions[53] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[53]); + expressions[54] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[54] }; + expressions[55] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[55]); + expressions[56] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[56], expressions[0]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); + expressions[57] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[7] = BinaryenAddFunction(the_module, "if", 0, 0, varTypes, 1, expressions[57]); + } + the_relooper = RelooperCreate(the_module); + expressions[58] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[58] }; + expressions[59] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[59]); + expressions[60] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[60] }; + expressions[61] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[61]); + expressions[62] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[62] }; + expressions[63] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[63]); + expressions[64] = BinaryenConst(the_module, BinaryenLiteralInt32(-1)); + expressions[65] = BinaryenDrop(the_module, expressions[64]); + expressions[66] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[66], expressions[65]); + expressions[67] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); + expressions[68] = BinaryenDrop(the_module, expressions[67]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[68]); + expressions[69] = BinaryenConst(the_module, BinaryenLiteralInt32(-3)); + expressions[70] = BinaryenDrop(the_module, expressions[69]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[70]); + expressions[71] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[8] = BinaryenAddFunction(the_module, "if-plus-code", 0, 0, varTypes, 1, expressions[71]); + } + the_relooper = RelooperCreate(the_module); + expressions[72] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[72] }; + expressions[73] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[73]); + expressions[74] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[74] }; + expressions[75] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[75]); + expressions[76] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[76] }; + expressions[77] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[77]); + expressions[78] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + { + BinaryenExpressionRef operands[] = { expressions[78] }; + expressions[79] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[79]); + expressions[80] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[80], expressions[0]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[3], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[0], expressions[0]); + expressions[81] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[9] = BinaryenAddFunction(the_module, "if-else", 0, 0, varTypes, 1, expressions[81]); + } + the_relooper = RelooperCreate(the_module); + expressions[82] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[82] }; + expressions[83] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[83]); + expressions[84] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[84] }; + expressions[85] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[85]); + expressions[86] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[86] }; + expressions[87] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[87]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); + expressions[88] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[88], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); + expressions[89] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[10] = BinaryenAddFunction(the_module, "loop-tail", 0, 0, varTypes, 1, expressions[89]); + } + the_relooper = RelooperCreate(the_module); + expressions[90] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[90] }; + expressions[91] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[91]); + expressions[92] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[92] }; + expressions[93] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[93]); + expressions[94] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[94] }; + expressions[95] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[95]); + expressions[96] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + { + BinaryenExpressionRef operands[] = { expressions[96] }; + expressions[97] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[97]); + expressions[98] = BinaryenConst(the_module, BinaryenLiteralInt32(4)); + { + BinaryenExpressionRef operands[] = { expressions[98] }; + expressions[99] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[4] = RelooperAddBlock(the_relooper, expressions[99]); + expressions[100] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); + { + BinaryenExpressionRef operands[] = { expressions[100] }; + expressions[101] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[5] = RelooperAddBlock(the_relooper, expressions[101]); + expressions[102] = BinaryenConst(the_module, BinaryenLiteralInt32(6)); + { + BinaryenExpressionRef operands[] = { expressions[102] }; + expressions[103] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[6] = RelooperAddBlock(the_relooper, expressions[103]); + expressions[104] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + expressions[105] = BinaryenDrop(the_module, expressions[104]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[105]); + expressions[106] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[106], expressions[0]); + expressions[107] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); + expressions[108] = BinaryenDrop(the_module, expressions[107]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[6], expressions[0], expressions[108]); + expressions[109] = BinaryenConst(the_module, BinaryenLiteralInt32(-6)); + RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[109], expressions[0]); + expressions[110] = BinaryenConst(the_module, BinaryenLiteralInt32(30)); + expressions[111] = BinaryenDrop(the_module, expressions[110]); + RelooperAddBranch(relooperBlocks[2], relooperBlocks[1], expressions[0], expressions[111]); + expressions[112] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + RelooperAddBranch(relooperBlocks[3], relooperBlocks[4], expressions[112], expressions[0]); + RelooperAddBranch(relooperBlocks[3], relooperBlocks[5], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[4], relooperBlocks[5], expressions[0], expressions[0]); + expressions[113] = BinaryenConst(the_module, BinaryenLiteralInt32(40)); + expressions[114] = BinaryenDrop(the_module, expressions[113]); + RelooperAddBranch(relooperBlocks[5], relooperBlocks[6], expressions[0], expressions[114]); + expressions[115] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[11] = BinaryenAddFunction(the_module, "nontrivial-loop-plus-phi-to-head", 0, 0, varTypes, 1, expressions[115]); + } + the_relooper = RelooperCreate(the_module); + expressions[116] = BinaryenConst(the_module, BinaryenLiteralInt32(-99)); + expressions[117] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[117] }; + expressions[118] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlockWithSwitch(the_relooper, expressions[118], expressions[116]); + expressions[119] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[119] }; + expressions[120] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[120]); + expressions[121] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[121] }; + expressions[122] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[122]); + expressions[123] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + { + BinaryenExpressionRef operands[] = { expressions[123] }; + expressions[124] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[124]); + { + BinaryenIndex indexes[] = { 2, 5 }; + RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[1], indexes, 2, expressions[0]); + } + expressions[125] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + expressions[126] = BinaryenDrop(the_module, expressions[125]); + { + BinaryenIndex indexes[] = { 4 }; + RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[2], indexes, 1, expressions[126]); + } + { + BinaryenIndex indexes[] = { 0 }; + RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[3], indexes, 0, expressions[0]); + } + expressions[127] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[12] = BinaryenAddFunction(the_module, "switch", 0, 0, varTypes, 1, expressions[127]); + } + the_relooper = RelooperCreate(the_module); + expressions[128] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[128] }; + expressions[129] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[129]); + expressions[130] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[130] }; + expressions[131] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[131]); + expressions[132] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[132] }; + expressions[133] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[133]); + expressions[134] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[134], expressions[0]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[2], relooperBlocks[1], expressions[0], expressions[0]); + expressions[135] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 3); + { + BinaryenType varTypes[] = { 2, 2, 3, 2, 4, 5, 2 }; + functions[13] = BinaryenAddFunction(the_module, "duffs-device", 0, 0, varTypes, 7, expressions[135]); + } + the_relooper = RelooperCreate(the_module); + expressions[136] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + { + BinaryenExpressionRef operands[] = { expressions[136] }; + expressions[137] = BinaryenCall(the_module, "check", operands, 1, 0); + } + expressions[138] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); + expressions[139] = BinaryenReturn(the_module, expressions[138]); + { + BinaryenExpressionRef children[] = { expressions[137], expressions[139] }; + expressions[140] = BinaryenBlock(the_module, "the-list", children, 2, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[140]); + expressions[141] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[14] = BinaryenAddFunction(the_module, "return", 0, 2, varTypes, 1, expressions[141]); + } raw: + BinaryenModulePrint(the_module); (module - (type $v (func)) - (type $vi (func (param i32))) - (type $i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "module" "check" (func $check (param i32))) - (func $just-one-block (; 1 ;) (type $v) + (func $just-one-block (; 1 ;) (local $0 i32) (call $check (i32.const 1337) ) ) - (func $two-blocks (; 2 ;) (type $v) + (func $two-blocks (; 2 ;) (local $0 i32) (block (call $check @@ -3472,7 +5649,7 @@ raw: ) ) ) - (func $two-blocks-plus-code (; 3 ;) (type $v) + (func $two-blocks-plus-code (; 3 ;) (local $0 i32) (block (block @@ -3488,7 +5665,7 @@ raw: ) ) ) - (func $loop (; 4 ;) (type $v) + (func $loop (; 4 ;) (local $0 i32) (loop $shape$0$continue (block @@ -3504,7 +5681,7 @@ raw: ) ) ) - (func $loop-plus-code (; 5 ;) (type $v) + (func $loop-plus-code (; 5 ;) (local $0 i32) (loop $shape$0$continue (block @@ -3528,7 +5705,7 @@ raw: ) ) ) - (func $split (; 6 ;) (type $v) + (func $split (; 6 ;) (local $0 i32) (call $check (i32.const 0) @@ -3547,7 +5724,7 @@ raw: ) ) ) - (func $split-plus-code (; 7 ;) (type $v) + (func $split-plus-code (; 7 ;) (local $0 i32) (call $check (i32.const 0) @@ -3576,7 +5753,7 @@ raw: ) ) ) - (func $if (; 8 ;) (type $v) + (func $if (; 8 ;) (local $0 i32) (block $block$3$break (call $check @@ -3601,7 +5778,7 @@ raw: ) ) ) - (func $if-plus-code (; 9 ;) (type $v) + (func $if-plus-code (; 9 ;) (local $0 i32) (block $block$3$break (call $check @@ -3639,7 +5816,7 @@ raw: ) ) ) - (func $if-else (; 10 ;) (type $v) + (func $if-else (; 10 ;) (local $0 i32) (block $block$4$break (call $check @@ -3671,7 +5848,7 @@ raw: ) ) ) - (func $loop-tail (; 11 ;) (type $v) + (func $loop-tail (; 11 ;) (local $0 i32) (block $block$3$break (loop $shape$0$continue @@ -3696,7 +5873,7 @@ raw: ) ) ) - (func $nontrivial-loop-plus-phi-to-head (; 12 ;) (type $v) + (func $nontrivial-loop-plus-phi-to-head (; 12 ;) (local $0 i32) (block $block$2$break (call $check @@ -3783,7 +5960,7 @@ raw: ) ) ) - (func $switch (; 13 ;) (type $v) + (func $switch (; 13 ;) (local $0 i32) (call $check (i32.const 0) @@ -3827,7 +6004,7 @@ raw: (br $switch$1$leave) ) ) - (func $duffs-device (; 14 ;) (type $v) + (func $duffs-device (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i64) @@ -3902,7 +6079,7 @@ raw: ) ) ) - (func $return (; 15 ;) (type $i) (result i32) + (func $return (; 15 ;) (result i32) (local $0 i32) (block (call $check @@ -3915,1881 +6092,153 @@ raw: ) ) + BinaryenModuleValidate(the_module); + { + const char* passes[] = { "precompute" }; + BinaryenModuleRunPasses(the_module, passes, 1); + } + BinaryenModuleValidate(the_module); + BinaryenModuleOptimize(the_module); + BinaryenModuleValidate(the_module); optimized: + BinaryenModulePrint(the_module); (module ) -module loaded from binary form: -(module - (type $0 (func (param i32 i32))) - (type $1 (func (param i32 i32) (result i32))) - (global $global$0 i32 (i32.const 3)) - (event $event$0 (attr 0) (param i32 i32)) - (func $adder (; 0 ;) (type $1) (param $0 i32) (param $1 i32) (result i32) - (i32.add - (local.get $0) - (local.get $1) - ) - ) -) - -(module - (type $vi (func (param i32))) - (type $v (func)) - (import "spectest" "print" (func $print-i32 (param i32))) - (start $starter) - (func $starter (; 1 ;) (type $v) - (call $print-i32 - (i32.const 1234) - ) - ) -) - -1234 : i32 -(module - (type $v (func)) - (func $func (; 0 ;) (type $v) - (local $0 i32) - (local.set $0 - (i64.const 1234) - ) - ) -) - -[wasm-validator error in function func] i32 != i64: local.set type must match function, on -[none] (local.set $0 - [i64] (i64.const 1234) -) -validation: 0 -// beginning a Binaryen API trace -#include <math.h> -#include <map> -#include "binaryen-c.h" -int main() { - std::map<size_t, BinaryenFunctionTypeRef> functionTypes; - std::map<size_t, BinaryenExpressionRef> expressions; - std::map<size_t, BinaryenFunctionRef> functions; - std::map<size_t, BinaryenGlobalRef> globals; - std::map<size_t, BinaryenEventRef> events; - std::map<size_t, BinaryenExportRef> exports; - std::map<size_t, RelooperBlockRef> relooperBlocks; - BinaryenModuleRef the_module = NULL; - RelooperRef the_relooper = NULL; - the_module = BinaryenModuleCreate(); - expressions[size_t(NULL)] = BinaryenExpressionRef(NULL); - BinaryenAddEvent(the_module, "a-event", 0, 2, 0); - expressions[1] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[2] = BinaryenConst(the_module, BinaryenLiteralInt64(2)); - expressions[3] = BinaryenConst(the_module, BinaryenLiteralFloat32(3.14)); - expressions[4] = BinaryenConst(the_module, BinaryenLiteralFloat64(2.1828)); - expressions[5] = BinaryenConst(the_module, BinaryenLiteralFloat32(NAN)); - expressions[6] = BinaryenConst(the_module, BinaryenLiteralFloat64(NAN)); - { - BinaryenType paramTypes[] = { 2, 3, 4, 5 }; - functionTypes[0] = BinaryenAddFunctionType(the_module, "iiIfF", 2, paramTypes, 4); - } - expressions[7] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[8] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - expressions[9] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - expressions[10] = BinaryenConst(the_module, BinaryenLiteralInt32(4)); - expressions[11] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); - expressions[12] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[13] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[14] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[15] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[16] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[17] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - expressions[18] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); - expressions[19] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - expressions[20] = BinaryenConst(the_module, BinaryenLiteralInt32(11)); - expressions[21] = BinaryenConst(the_module, BinaryenLiteralInt32(110)); - expressions[22] = BinaryenConst(the_module, BinaryenLiteralInt64(111)); - expressions[23] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[24] = BinaryenUnary(the_module, 0, expressions[23]); - expressions[25] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[26] = BinaryenUnary(the_module, 3, expressions[25]); - expressions[27] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[28] = BinaryenUnary(the_module, 4, expressions[27]); - expressions[29] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[30] = BinaryenUnary(the_module, 6, expressions[29]); - expressions[31] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[32] = BinaryenUnary(the_module, 9, expressions[31]); - expressions[33] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[34] = BinaryenUnary(the_module, 10, expressions[33]); - expressions[35] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[36] = BinaryenUnary(the_module, 13, expressions[35]); - expressions[37] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[38] = BinaryenUnary(the_module, 14, expressions[37]); - expressions[39] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[40] = BinaryenUnary(the_module, 16, expressions[39]); - expressions[41] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[42] = BinaryenUnary(the_module, 19, expressions[41]); - expressions[43] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[44] = BinaryenUnary(the_module, 20, expressions[43]); - expressions[45] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[46] = BinaryenUnary(the_module, 22, expressions[45]); - expressions[47] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[48] = BinaryenUnary(the_module, 23, expressions[47]); - expressions[49] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[50] = BinaryenUnary(the_module, 24, expressions[49]); - expressions[51] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[52] = BinaryenUnary(the_module, 25, expressions[51]); - expressions[53] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[54] = BinaryenUnary(the_module, 26, expressions[53]); - expressions[55] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[56] = BinaryenUnary(the_module, 27, expressions[55]); - expressions[57] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[58] = BinaryenUnary(the_module, 28, expressions[57]); - expressions[59] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[60] = BinaryenUnary(the_module, 29, expressions[59]); - expressions[61] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[62] = BinaryenUnary(the_module, 30, expressions[61]); - expressions[63] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[64] = BinaryenUnary(the_module, 31, expressions[63]); - expressions[65] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[66] = BinaryenUnary(the_module, 32, expressions[65]); - expressions[67] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[68] = BinaryenUnary(the_module, 52, expressions[67]); - expressions[69] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[70] = BinaryenUnary(the_module, 56, expressions[69]); - expressions[71] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[72] = BinaryenUnary(the_module, 53, expressions[71]); - expressions[73] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[74] = BinaryenUnary(the_module, 57, expressions[73]); - expressions[75] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[76] = BinaryenUnary(the_module, 54, expressions[75]); - expressions[77] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[78] = BinaryenUnary(the_module, 58, expressions[77]); - expressions[79] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[80] = BinaryenUnary(the_module, 55, expressions[79]); - expressions[81] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[82] = BinaryenUnary(the_module, 59, expressions[81]); - expressions[83] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[84] = BinaryenUnary(the_module, 33, expressions[83]); - expressions[85] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[86] = BinaryenUnary(the_module, 34, expressions[85]); - expressions[87] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[88] = BinaryenUnary(the_module, 35, expressions[87]); - expressions[89] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[90] = BinaryenUnary(the_module, 36, expressions[89]); - expressions[91] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[92] = BinaryenUnary(the_module, 37, expressions[91]); - expressions[93] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[94] = BinaryenUnary(the_module, 38, expressions[93]); - expressions[95] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[96] = BinaryenUnary(the_module, 39, expressions[95]); - expressions[97] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[98] = BinaryenUnary(the_module, 40, expressions[97]); - expressions[99] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[100] = BinaryenUnary(the_module, 41, expressions[99]); - expressions[101] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[102] = BinaryenUnary(the_module, 42, expressions[101]); - expressions[103] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[104] = BinaryenUnary(the_module, 43, expressions[103]); - expressions[105] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[106] = BinaryenUnary(the_module, 44, expressions[105]); - expressions[107] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[108] = BinaryenUnary(the_module, 45, expressions[107]); - expressions[109] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[110] = BinaryenUnary(the_module, 46, expressions[109]); - expressions[111] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - expressions[112] = BinaryenUnary(the_module, 60, expressions[111]); - expressions[113] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - expressions[114] = BinaryenUnary(the_module, 61, expressions[113]); - expressions[115] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - expressions[116] = BinaryenUnary(the_module, 62, expressions[115]); - expressions[117] = BinaryenConst(the_module, BinaryenLiteralInt64(1958505087099)); - expressions[118] = BinaryenUnary(the_module, 63, expressions[117]); - expressions[119] = BinaryenConst(the_module, BinaryenLiteralFloat32(42)); - expressions[120] = BinaryenUnary(the_module, 64, expressions[119]); - expressions[121] = BinaryenConst(the_module, BinaryenLiteralFloat64(42)); - expressions[122] = BinaryenUnary(the_module, 65, expressions[121]); - { - uint8_t t0[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[123] = BinaryenConst(the_module, BinaryenLiteralVec128(t0)); - } - expressions[124] = BinaryenUnary(the_module, 66, expressions[123]); - { - uint8_t t1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[125] = BinaryenConst(the_module, BinaryenLiteralVec128(t1)); - } - expressions[126] = BinaryenUnary(the_module, 67, expressions[125]); - { - uint8_t t2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[127] = BinaryenConst(the_module, BinaryenLiteralVec128(t2)); - } - expressions[128] = BinaryenUnary(the_module, 68, expressions[127]); - { - uint8_t t3[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[129] = BinaryenConst(the_module, BinaryenLiteralVec128(t3)); - } - expressions[130] = BinaryenUnary(the_module, 69, expressions[129]); - { - uint8_t t4[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[131] = BinaryenConst(the_module, BinaryenLiteralVec128(t4)); - } - expressions[132] = BinaryenUnary(the_module, 70, expressions[131]); - { - uint8_t t5[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[133] = BinaryenConst(the_module, BinaryenLiteralVec128(t5)); - } - expressions[134] = BinaryenUnary(the_module, 71, expressions[133]); - { - uint8_t t6[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[135] = BinaryenConst(the_module, BinaryenLiteralVec128(t6)); - } - expressions[136] = BinaryenUnary(the_module, 72, expressions[135]); - { - uint8_t t7[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[137] = BinaryenConst(the_module, BinaryenLiteralVec128(t7)); - } - expressions[138] = BinaryenUnary(the_module, 73, expressions[137]); - { - uint8_t t8[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[139] = BinaryenConst(the_module, BinaryenLiteralVec128(t8)); - } - expressions[140] = BinaryenUnary(the_module, 74, expressions[139]); - { - uint8_t t9[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[141] = BinaryenConst(the_module, BinaryenLiteralVec128(t9)); - } - expressions[142] = BinaryenUnary(the_module, 75, expressions[141]); - { - uint8_t t10[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[143] = BinaryenConst(the_module, BinaryenLiteralVec128(t10)); - } - expressions[144] = BinaryenUnary(the_module, 76, expressions[143]); - { - uint8_t t11[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[145] = BinaryenConst(the_module, BinaryenLiteralVec128(t11)); - } - expressions[146] = BinaryenUnary(the_module, 77, expressions[145]); - { - uint8_t t12[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[147] = BinaryenConst(the_module, BinaryenLiteralVec128(t12)); - } - expressions[148] = BinaryenUnary(the_module, 78, expressions[147]); - { - uint8_t t13[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[149] = BinaryenConst(the_module, BinaryenLiteralVec128(t13)); - } - expressions[150] = BinaryenUnary(the_module, 79, expressions[149]); - { - uint8_t t14[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[151] = BinaryenConst(the_module, BinaryenLiteralVec128(t14)); - } - expressions[152] = BinaryenUnary(the_module, 80, expressions[151]); - { - uint8_t t15[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[153] = BinaryenConst(the_module, BinaryenLiteralVec128(t15)); - } - expressions[154] = BinaryenUnary(the_module, 81, expressions[153]); - { - uint8_t t16[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[155] = BinaryenConst(the_module, BinaryenLiteralVec128(t16)); - } - expressions[156] = BinaryenUnary(the_module, 82, expressions[155]); - { - uint8_t t17[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[157] = BinaryenConst(the_module, BinaryenLiteralVec128(t17)); - } - expressions[158] = BinaryenUnary(the_module, 83, expressions[157]); - { - uint8_t t18[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[159] = BinaryenConst(the_module, BinaryenLiteralVec128(t18)); - } - expressions[160] = BinaryenUnary(the_module, 84, expressions[159]); - { - uint8_t t19[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[161] = BinaryenConst(the_module, BinaryenLiteralVec128(t19)); - } - expressions[162] = BinaryenUnary(the_module, 85, expressions[161]); - { - uint8_t t20[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[163] = BinaryenConst(the_module, BinaryenLiteralVec128(t20)); - } - expressions[164] = BinaryenUnary(the_module, 86, expressions[163]); - { - uint8_t t21[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[165] = BinaryenConst(the_module, BinaryenLiteralVec128(t21)); - } - expressions[166] = BinaryenUnary(the_module, 87, expressions[165]); - { - uint8_t t22[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[167] = BinaryenConst(the_module, BinaryenLiteralVec128(t22)); - } - expressions[168] = BinaryenUnary(the_module, 88, expressions[167]); - { - uint8_t t23[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[169] = BinaryenConst(the_module, BinaryenLiteralVec128(t23)); - } - expressions[170] = BinaryenUnary(the_module, 89, expressions[169]); - { - uint8_t t24[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[171] = BinaryenConst(the_module, BinaryenLiteralVec128(t24)); - } - expressions[172] = BinaryenUnary(the_module, 90, expressions[171]); - { - uint8_t t25[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[173] = BinaryenConst(the_module, BinaryenLiteralVec128(t25)); - } - expressions[174] = BinaryenUnary(the_module, 91, expressions[173]); - { - uint8_t t26[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[175] = BinaryenConst(the_module, BinaryenLiteralVec128(t26)); - } - expressions[176] = BinaryenUnary(the_module, 92, expressions[175]); - { - uint8_t t27[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[177] = BinaryenConst(the_module, BinaryenLiteralVec128(t27)); - } - expressions[178] = BinaryenUnary(the_module, 93, expressions[177]); - { - uint8_t t28[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[179] = BinaryenConst(the_module, BinaryenLiteralVec128(t28)); - } - expressions[180] = BinaryenUnary(the_module, 94, expressions[179]); - { - uint8_t t29[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[181] = BinaryenConst(the_module, BinaryenLiteralVec128(t29)); - } - expressions[182] = BinaryenUnary(the_module, 95, expressions[181]); - { - uint8_t t30[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[183] = BinaryenConst(the_module, BinaryenLiteralVec128(t30)); - } - expressions[184] = BinaryenUnary(the_module, 96, expressions[183]); - { - uint8_t t31[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[185] = BinaryenConst(the_module, BinaryenLiteralVec128(t31)); - } - expressions[186] = BinaryenUnary(the_module, 97, expressions[185]); - { - uint8_t t32[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[187] = BinaryenConst(the_module, BinaryenLiteralVec128(t32)); - } - expressions[188] = BinaryenUnary(the_module, 98, expressions[187]); - { - uint8_t t33[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[189] = BinaryenConst(the_module, BinaryenLiteralVec128(t33)); - } - expressions[190] = BinaryenUnary(the_module, 99, expressions[189]); - { - uint8_t t34[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[191] = BinaryenConst(the_module, BinaryenLiteralVec128(t34)); - } - expressions[192] = BinaryenUnary(the_module, 100, expressions[191]); - expressions[193] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[194] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[195] = BinaryenBinary(the_module, 0, expressions[193], expressions[194]); - expressions[196] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[197] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[198] = BinaryenBinary(the_module, 64, expressions[196], expressions[197]); - expressions[199] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[200] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[201] = BinaryenBinary(the_module, 3, expressions[199], expressions[200]); - expressions[202] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); - expressions[203] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); - expressions[204] = BinaryenBinary(the_module, 29, expressions[202], expressions[203]); - expressions[205] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); - expressions[206] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); - expressions[207] = BinaryenBinary(the_module, 30, expressions[205], expressions[206]); - expressions[208] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[209] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[210] = BinaryenBinary(the_module, 6, expressions[208], expressions[209]); - expressions[211] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[212] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[213] = BinaryenBinary(the_module, 7, expressions[211], expressions[212]); - expressions[214] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); - expressions[215] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); - expressions[216] = BinaryenBinary(the_module, 33, expressions[214], expressions[215]); - expressions[217] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[218] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[219] = BinaryenBinary(the_module, 9, expressions[217], expressions[218]); - expressions[220] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); - expressions[221] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); - expressions[222] = BinaryenBinary(the_module, 35, expressions[220], expressions[221]); - expressions[223] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); - expressions[224] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); - expressions[225] = BinaryenBinary(the_module, 36, expressions[223], expressions[224]); - expressions[226] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[227] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[228] = BinaryenBinary(the_module, 12, expressions[226], expressions[227]); - expressions[229] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[230] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[231] = BinaryenBinary(the_module, 13, expressions[229], expressions[230]); - expressions[232] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); - expressions[233] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); - expressions[234] = BinaryenBinary(the_module, 39, expressions[232], expressions[233]); - expressions[235] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[236] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[237] = BinaryenBinary(the_module, 53, expressions[235], expressions[236]); - expressions[238] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[239] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[240] = BinaryenBinary(the_module, 67, expressions[238], expressions[239]); - expressions[241] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[242] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[243] = BinaryenBinary(the_module, 55, expressions[241], expressions[242]); - expressions[244] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[245] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[246] = BinaryenBinary(the_module, 69, expressions[244], expressions[245]); - expressions[247] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[248] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[249] = BinaryenBinary(the_module, 15, expressions[247], expressions[248]); - expressions[250] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[251] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[252] = BinaryenBinary(the_module, 58, expressions[250], expressions[251]); - expressions[253] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[254] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[255] = BinaryenBinary(the_module, 17, expressions[253], expressions[254]); - expressions[256] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); - expressions[257] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); - expressions[258] = BinaryenBinary(the_module, 43, expressions[256], expressions[257]); - expressions[259] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); - expressions[260] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); - expressions[261] = BinaryenBinary(the_module, 44, expressions[259], expressions[260]); - expressions[262] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[263] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[264] = BinaryenBinary(the_module, 20, expressions[262], expressions[263]); - expressions[265] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); - expressions[266] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); - expressions[267] = BinaryenBinary(the_module, 46, expressions[265], expressions[266]); - expressions[268] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[269] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[270] = BinaryenBinary(the_module, 22, expressions[268], expressions[269]); - expressions[271] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[272] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[273] = BinaryenBinary(the_module, 23, expressions[271], expressions[272]); - expressions[274] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967274)); - expressions[275] = BinaryenConst(the_module, BinaryenLiteralInt64(4294967273)); - expressions[276] = BinaryenBinary(the_module, 49, expressions[274], expressions[275]); - expressions[277] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[278] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[279] = BinaryenBinary(the_module, 59, expressions[277], expressions[278]); - expressions[280] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[281] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[282] = BinaryenBinary(the_module, 73, expressions[280], expressions[281]); - expressions[283] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[284] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[285] = BinaryenBinary(the_module, 74, expressions[283], expressions[284]); - expressions[286] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[287] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[288] = BinaryenBinary(the_module, 62, expressions[286], expressions[287]); - { - uint8_t t35[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[289] = BinaryenConst(the_module, BinaryenLiteralVec128(t35)); - } - { - uint8_t t36[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[290] = BinaryenConst(the_module, BinaryenLiteralVec128(t36)); - } - expressions[291] = BinaryenBinary(the_module, 76, expressions[289], expressions[290]); - { - uint8_t t37[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[292] = BinaryenConst(the_module, BinaryenLiteralVec128(t37)); - } - { - uint8_t t38[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[293] = BinaryenConst(the_module, BinaryenLiteralVec128(t38)); - } - expressions[294] = BinaryenBinary(the_module, 77, expressions[292], expressions[293]); - { - uint8_t t39[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[295] = BinaryenConst(the_module, BinaryenLiteralVec128(t39)); - } - { - uint8_t t40[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[296] = BinaryenConst(the_module, BinaryenLiteralVec128(t40)); - } - expressions[297] = BinaryenBinary(the_module, 78, expressions[295], expressions[296]); - { - uint8_t t41[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[298] = BinaryenConst(the_module, BinaryenLiteralVec128(t41)); - } - { - uint8_t t42[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[299] = BinaryenConst(the_module, BinaryenLiteralVec128(t42)); - } - expressions[300] = BinaryenBinary(the_module, 79, expressions[298], expressions[299]); - { - uint8_t t43[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[301] = BinaryenConst(the_module, BinaryenLiteralVec128(t43)); - } - { - uint8_t t44[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[302] = BinaryenConst(the_module, BinaryenLiteralVec128(t44)); - } - expressions[303] = BinaryenBinary(the_module, 80, expressions[301], expressions[302]); - { - uint8_t t45[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[304] = BinaryenConst(the_module, BinaryenLiteralVec128(t45)); - } - { - uint8_t t46[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[305] = BinaryenConst(the_module, BinaryenLiteralVec128(t46)); - } - expressions[306] = BinaryenBinary(the_module, 81, expressions[304], expressions[305]); - { - uint8_t t47[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[307] = BinaryenConst(the_module, BinaryenLiteralVec128(t47)); - } - { - uint8_t t48[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[308] = BinaryenConst(the_module, BinaryenLiteralVec128(t48)); - } - expressions[309] = BinaryenBinary(the_module, 82, expressions[307], expressions[308]); - { - uint8_t t49[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[310] = BinaryenConst(the_module, BinaryenLiteralVec128(t49)); - } - { - uint8_t t50[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[311] = BinaryenConst(the_module, BinaryenLiteralVec128(t50)); - } - expressions[312] = BinaryenBinary(the_module, 83, expressions[310], expressions[311]); - { - uint8_t t51[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[313] = BinaryenConst(the_module, BinaryenLiteralVec128(t51)); - } - { - uint8_t t52[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[314] = BinaryenConst(the_module, BinaryenLiteralVec128(t52)); - } - expressions[315] = BinaryenBinary(the_module, 84, expressions[313], expressions[314]); - { - uint8_t t53[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[316] = BinaryenConst(the_module, BinaryenLiteralVec128(t53)); - } - { - uint8_t t54[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[317] = BinaryenConst(the_module, BinaryenLiteralVec128(t54)); - } - expressions[318] = BinaryenBinary(the_module, 85, expressions[316], expressions[317]); - { - uint8_t t55[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[319] = BinaryenConst(the_module, BinaryenLiteralVec128(t55)); - } - { - uint8_t t56[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[320] = BinaryenConst(the_module, BinaryenLiteralVec128(t56)); - } - expressions[321] = BinaryenBinary(the_module, 86, expressions[319], expressions[320]); - { - uint8_t t57[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[322] = BinaryenConst(the_module, BinaryenLiteralVec128(t57)); - } - { - uint8_t t58[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[323] = BinaryenConst(the_module, BinaryenLiteralVec128(t58)); - } - expressions[324] = BinaryenBinary(the_module, 87, expressions[322], expressions[323]); - { - uint8_t t59[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[325] = BinaryenConst(the_module, BinaryenLiteralVec128(t59)); - } - { - uint8_t t60[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[326] = BinaryenConst(the_module, BinaryenLiteralVec128(t60)); - } - expressions[327] = BinaryenBinary(the_module, 88, expressions[325], expressions[326]); - { - uint8_t t61[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[328] = BinaryenConst(the_module, BinaryenLiteralVec128(t61)); - } - { - uint8_t t62[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[329] = BinaryenConst(the_module, BinaryenLiteralVec128(t62)); - } - expressions[330] = BinaryenBinary(the_module, 89, expressions[328], expressions[329]); - { - uint8_t t63[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[331] = BinaryenConst(the_module, BinaryenLiteralVec128(t63)); - } - { - uint8_t t64[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[332] = BinaryenConst(the_module, BinaryenLiteralVec128(t64)); - } - expressions[333] = BinaryenBinary(the_module, 90, expressions[331], expressions[332]); - { - uint8_t t65[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[334] = BinaryenConst(the_module, BinaryenLiteralVec128(t65)); - } - { - uint8_t t66[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[335] = BinaryenConst(the_module, BinaryenLiteralVec128(t66)); - } - expressions[336] = BinaryenBinary(the_module, 91, expressions[334], expressions[335]); - { - uint8_t t67[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[337] = BinaryenConst(the_module, BinaryenLiteralVec128(t67)); - } - { - uint8_t t68[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[338] = BinaryenConst(the_module, BinaryenLiteralVec128(t68)); - } - expressions[339] = BinaryenBinary(the_module, 92, expressions[337], expressions[338]); - { - uint8_t t69[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[340] = BinaryenConst(the_module, BinaryenLiteralVec128(t69)); - } - { - uint8_t t70[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[341] = BinaryenConst(the_module, BinaryenLiteralVec128(t70)); - } - expressions[342] = BinaryenBinary(the_module, 93, expressions[340], expressions[341]); - { - uint8_t t71[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[343] = BinaryenConst(the_module, BinaryenLiteralVec128(t71)); - } - { - uint8_t t72[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[344] = BinaryenConst(the_module, BinaryenLiteralVec128(t72)); - } - expressions[345] = BinaryenBinary(the_module, 94, expressions[343], expressions[344]); - { - uint8_t t73[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[346] = BinaryenConst(the_module, BinaryenLiteralVec128(t73)); - } - { - uint8_t t74[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[347] = BinaryenConst(the_module, BinaryenLiteralVec128(t74)); - } - expressions[348] = BinaryenBinary(the_module, 95, expressions[346], expressions[347]); - { - uint8_t t75[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[349] = BinaryenConst(the_module, BinaryenLiteralVec128(t75)); - } - { - uint8_t t76[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[350] = BinaryenConst(the_module, BinaryenLiteralVec128(t76)); - } - expressions[351] = BinaryenBinary(the_module, 96, expressions[349], expressions[350]); - { - uint8_t t77[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[352] = BinaryenConst(the_module, BinaryenLiteralVec128(t77)); - } - { - uint8_t t78[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[353] = BinaryenConst(the_module, BinaryenLiteralVec128(t78)); - } - expressions[354] = BinaryenBinary(the_module, 97, expressions[352], expressions[353]); - { - uint8_t t79[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[355] = BinaryenConst(the_module, BinaryenLiteralVec128(t79)); - } - { - uint8_t t80[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[356] = BinaryenConst(the_module, BinaryenLiteralVec128(t80)); - } - expressions[357] = BinaryenBinary(the_module, 98, expressions[355], expressions[356]); - { - uint8_t t81[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[358] = BinaryenConst(the_module, BinaryenLiteralVec128(t81)); - } - { - uint8_t t82[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[359] = BinaryenConst(the_module, BinaryenLiteralVec128(t82)); - } - expressions[360] = BinaryenBinary(the_module, 99, expressions[358], expressions[359]); - { - uint8_t t83[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[361] = BinaryenConst(the_module, BinaryenLiteralVec128(t83)); - } - { - uint8_t t84[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[362] = BinaryenConst(the_module, BinaryenLiteralVec128(t84)); - } - expressions[363] = BinaryenBinary(the_module, 100, expressions[361], expressions[362]); - { - uint8_t t85[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[364] = BinaryenConst(the_module, BinaryenLiteralVec128(t85)); - } - { - uint8_t t86[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[365] = BinaryenConst(the_module, BinaryenLiteralVec128(t86)); - } - expressions[366] = BinaryenBinary(the_module, 101, expressions[364], expressions[365]); - { - uint8_t t87[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[367] = BinaryenConst(the_module, BinaryenLiteralVec128(t87)); - } - { - uint8_t t88[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[368] = BinaryenConst(the_module, BinaryenLiteralVec128(t88)); - } - expressions[369] = BinaryenBinary(the_module, 102, expressions[367], expressions[368]); - { - uint8_t t89[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[370] = BinaryenConst(the_module, BinaryenLiteralVec128(t89)); - } - { - uint8_t t90[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[371] = BinaryenConst(the_module, BinaryenLiteralVec128(t90)); - } - expressions[372] = BinaryenBinary(the_module, 103, expressions[370], expressions[371]); - { - uint8_t t91[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[373] = BinaryenConst(the_module, BinaryenLiteralVec128(t91)); - } - { - uint8_t t92[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[374] = BinaryenConst(the_module, BinaryenLiteralVec128(t92)); - } - expressions[375] = BinaryenBinary(the_module, 104, expressions[373], expressions[374]); - { - uint8_t t93[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[376] = BinaryenConst(the_module, BinaryenLiteralVec128(t93)); - } - { - uint8_t t94[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[377] = BinaryenConst(the_module, BinaryenLiteralVec128(t94)); - } - expressions[378] = BinaryenBinary(the_module, 105, expressions[376], expressions[377]); - { - uint8_t t95[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[379] = BinaryenConst(the_module, BinaryenLiteralVec128(t95)); - } - { - uint8_t t96[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[380] = BinaryenConst(the_module, BinaryenLiteralVec128(t96)); - } - expressions[381] = BinaryenBinary(the_module, 106, expressions[379], expressions[380]); - { - uint8_t t97[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[382] = BinaryenConst(the_module, BinaryenLiteralVec128(t97)); - } - { - uint8_t t98[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[383] = BinaryenConst(the_module, BinaryenLiteralVec128(t98)); - } - expressions[384] = BinaryenBinary(the_module, 107, expressions[382], expressions[383]); - { - uint8_t t99[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[385] = BinaryenConst(the_module, BinaryenLiteralVec128(t99)); - } - { - uint8_t t100[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[386] = BinaryenConst(the_module, BinaryenLiteralVec128(t100)); - } - expressions[387] = BinaryenBinary(the_module, 108, expressions[385], expressions[386]); - { - uint8_t t101[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[388] = BinaryenConst(the_module, BinaryenLiteralVec128(t101)); - } - { - uint8_t t102[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[389] = BinaryenConst(the_module, BinaryenLiteralVec128(t102)); - } - expressions[390] = BinaryenBinary(the_module, 109, expressions[388], expressions[389]); - { - uint8_t t103[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[391] = BinaryenConst(the_module, BinaryenLiteralVec128(t103)); - } - { - uint8_t t104[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[392] = BinaryenConst(the_module, BinaryenLiteralVec128(t104)); - } - expressions[393] = BinaryenBinary(the_module, 110, expressions[391], expressions[392]); - { - uint8_t t105[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[394] = BinaryenConst(the_module, BinaryenLiteralVec128(t105)); - } - { - uint8_t t106[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[395] = BinaryenConst(the_module, BinaryenLiteralVec128(t106)); - } - expressions[396] = BinaryenBinary(the_module, 111, expressions[394], expressions[395]); - { - uint8_t t107[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[397] = BinaryenConst(the_module, BinaryenLiteralVec128(t107)); - } - { - uint8_t t108[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[398] = BinaryenConst(the_module, BinaryenLiteralVec128(t108)); - } - expressions[399] = BinaryenBinary(the_module, 111, expressions[397], expressions[398]); - { - uint8_t t109[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[400] = BinaryenConst(the_module, BinaryenLiteralVec128(t109)); - } - { - uint8_t t110[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[401] = BinaryenConst(the_module, BinaryenLiteralVec128(t110)); - } - expressions[402] = BinaryenBinary(the_module, 113, expressions[400], expressions[401]); - { - uint8_t t111[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[403] = BinaryenConst(the_module, BinaryenLiteralVec128(t111)); - } - { - uint8_t t112[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[404] = BinaryenConst(the_module, BinaryenLiteralVec128(t112)); - } - expressions[405] = BinaryenBinary(the_module, 114, expressions[403], expressions[404]); - { - uint8_t t113[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[406] = BinaryenConst(the_module, BinaryenLiteralVec128(t113)); - } - { - uint8_t t114[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[407] = BinaryenConst(the_module, BinaryenLiteralVec128(t114)); - } - expressions[408] = BinaryenBinary(the_module, 115, expressions[406], expressions[407]); - { - uint8_t t115[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[409] = BinaryenConst(the_module, BinaryenLiteralVec128(t115)); - } - { - uint8_t t116[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[410] = BinaryenConst(the_module, BinaryenLiteralVec128(t116)); - } - expressions[411] = BinaryenBinary(the_module, 116, expressions[409], expressions[410]); - { - uint8_t t117[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[412] = BinaryenConst(the_module, BinaryenLiteralVec128(t117)); - } - { - uint8_t t118[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[413] = BinaryenConst(the_module, BinaryenLiteralVec128(t118)); - } - expressions[414] = BinaryenBinary(the_module, 117, expressions[412], expressions[413]); - { - uint8_t t119[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[415] = BinaryenConst(the_module, BinaryenLiteralVec128(t119)); - } - { - uint8_t t120[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[416] = BinaryenConst(the_module, BinaryenLiteralVec128(t120)); - } - expressions[417] = BinaryenBinary(the_module, 118, expressions[415], expressions[416]); - { - uint8_t t121[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[418] = BinaryenConst(the_module, BinaryenLiteralVec128(t121)); - } - { - uint8_t t122[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[419] = BinaryenConst(the_module, BinaryenLiteralVec128(t122)); - } - expressions[420] = BinaryenBinary(the_module, 119, expressions[418], expressions[419]); - { - uint8_t t123[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[421] = BinaryenConst(the_module, BinaryenLiteralVec128(t123)); - } - { - uint8_t t124[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[422] = BinaryenConst(the_module, BinaryenLiteralVec128(t124)); - } - expressions[423] = BinaryenBinary(the_module, 120, expressions[421], expressions[422]); - { - uint8_t t125[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[424] = BinaryenConst(the_module, BinaryenLiteralVec128(t125)); - } - { - uint8_t t126[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[425] = BinaryenConst(the_module, BinaryenLiteralVec128(t126)); - } - expressions[426] = BinaryenBinary(the_module, 121, expressions[424], expressions[425]); - { - uint8_t t127[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[427] = BinaryenConst(the_module, BinaryenLiteralVec128(t127)); - } - { - uint8_t t128[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[428] = BinaryenConst(the_module, BinaryenLiteralVec128(t128)); - } - expressions[429] = BinaryenBinary(the_module, 122, expressions[427], expressions[428]); - { - uint8_t t129[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[430] = BinaryenConst(the_module, BinaryenLiteralVec128(t129)); - } - { - uint8_t t130[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[431] = BinaryenConst(the_module, BinaryenLiteralVec128(t130)); - } - expressions[432] = BinaryenBinary(the_module, 123, expressions[430], expressions[431]); - { - uint8_t t131[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[433] = BinaryenConst(the_module, BinaryenLiteralVec128(t131)); - } - { - uint8_t t132[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[434] = BinaryenConst(the_module, BinaryenLiteralVec128(t132)); - } - expressions[435] = BinaryenBinary(the_module, 124, expressions[433], expressions[434]); - { - uint8_t t133[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[436] = BinaryenConst(the_module, BinaryenLiteralVec128(t133)); - } - { - uint8_t t134[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[437] = BinaryenConst(the_module, BinaryenLiteralVec128(t134)); - } - expressions[438] = BinaryenBinary(the_module, 125, expressions[436], expressions[437]); - { - uint8_t t135[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[439] = BinaryenConst(the_module, BinaryenLiteralVec128(t135)); - } - { - uint8_t t136[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[440] = BinaryenConst(the_module, BinaryenLiteralVec128(t136)); - } - expressions[441] = BinaryenBinary(the_module, 126, expressions[439], expressions[440]); - { - uint8_t t137[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[442] = BinaryenConst(the_module, BinaryenLiteralVec128(t137)); - } - { - uint8_t t138[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[443] = BinaryenConst(the_module, BinaryenLiteralVec128(t138)); - } - expressions[444] = BinaryenBinary(the_module, 127, expressions[442], expressions[443]); - { - uint8_t t139[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[445] = BinaryenConst(the_module, BinaryenLiteralVec128(t139)); - } - { - uint8_t t140[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[446] = BinaryenConst(the_module, BinaryenLiteralVec128(t140)); - } - expressions[447] = BinaryenBinary(the_module, 128, expressions[445], expressions[446]); - { - uint8_t t141[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[448] = BinaryenConst(the_module, BinaryenLiteralVec128(t141)); - } - { - uint8_t t142[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[449] = BinaryenConst(the_module, BinaryenLiteralVec128(t142)); - } - expressions[450] = BinaryenBinary(the_module, 129, expressions[448], expressions[449]); - { - uint8_t t143[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[451] = BinaryenConst(the_module, BinaryenLiteralVec128(t143)); - } - { - uint8_t t144[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[452] = BinaryenConst(the_module, BinaryenLiteralVec128(t144)); - } - expressions[453] = BinaryenBinary(the_module, 130, expressions[451], expressions[452]); - { - uint8_t t145[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[454] = BinaryenConst(the_module, BinaryenLiteralVec128(t145)); - } - { - uint8_t t146[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[455] = BinaryenConst(the_module, BinaryenLiteralVec128(t146)); - } - expressions[456] = BinaryenBinary(the_module, 131, expressions[454], expressions[455]); - { - uint8_t t147[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[457] = BinaryenConst(the_module, BinaryenLiteralVec128(t147)); - } - { - uint8_t t148[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[458] = BinaryenConst(the_module, BinaryenLiteralVec128(t148)); - } - expressions[459] = BinaryenBinary(the_module, 132, expressions[457], expressions[458]); - { - uint8_t t149[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[460] = BinaryenConst(the_module, BinaryenLiteralVec128(t149)); - } - { - uint8_t t150[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[461] = BinaryenConst(the_module, BinaryenLiteralVec128(t150)); - } - expressions[462] = BinaryenBinary(the_module, 133, expressions[460], expressions[461]); - { - uint8_t t151[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[463] = BinaryenConst(the_module, BinaryenLiteralVec128(t151)); - } - { - uint8_t t152[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[464] = BinaryenConst(the_module, BinaryenLiteralVec128(t152)); - } - expressions[465] = BinaryenBinary(the_module, 134, expressions[463], expressions[464]); - { - uint8_t t153[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[466] = BinaryenConst(the_module, BinaryenLiteralVec128(t153)); - } - { - uint8_t t154[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[467] = BinaryenConst(the_module, BinaryenLiteralVec128(t154)); - } - expressions[468] = BinaryenBinary(the_module, 135, expressions[466], expressions[467]); - { - uint8_t t155[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[469] = BinaryenConst(the_module, BinaryenLiteralVec128(t155)); - } - { - uint8_t t156[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[470] = BinaryenConst(the_module, BinaryenLiteralVec128(t156)); - } - expressions[471] = BinaryenBinary(the_module, 136, expressions[469], expressions[470]); - { - uint8_t t157[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[472] = BinaryenConst(the_module, BinaryenLiteralVec128(t157)); - } - { - uint8_t t158[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[473] = BinaryenConst(the_module, BinaryenLiteralVec128(t158)); - } - expressions[474] = BinaryenBinary(the_module, 137, expressions[472], expressions[473]); - { - uint8_t t159[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[475] = BinaryenConst(the_module, BinaryenLiteralVec128(t159)); - } - { - uint8_t t160[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[476] = BinaryenConst(the_module, BinaryenLiteralVec128(t160)); - } - expressions[477] = BinaryenBinary(the_module, 138, expressions[475], expressions[476]); - { - uint8_t t161[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[478] = BinaryenConst(the_module, BinaryenLiteralVec128(t161)); - } - { - uint8_t t162[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[479] = BinaryenConst(the_module, BinaryenLiteralVec128(t162)); - } - expressions[480] = BinaryenBinary(the_module, 139, expressions[478], expressions[479]); - { - uint8_t t163[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[481] = BinaryenConst(the_module, BinaryenLiteralVec128(t163)); - } - { - uint8_t t164[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[482] = BinaryenConst(the_module, BinaryenLiteralVec128(t164)); - } - expressions[483] = BinaryenBinary(the_module, 140, expressions[481], expressions[482]); - { - uint8_t t165[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[484] = BinaryenConst(the_module, BinaryenLiteralVec128(t165)); - } - { - uint8_t t166[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[485] = BinaryenConst(the_module, BinaryenLiteralVec128(t166)); - } - expressions[486] = BinaryenBinary(the_module, 141, expressions[484], expressions[485]); - { - uint8_t t167[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[487] = BinaryenConst(the_module, BinaryenLiteralVec128(t167)); - } - { - uint8_t t168[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[488] = BinaryenConst(the_module, BinaryenLiteralVec128(t168)); - } - expressions[489] = BinaryenBinary(the_module, 142, expressions[487], expressions[488]); - { - uint8_t t169[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[490] = BinaryenConst(the_module, BinaryenLiteralVec128(t169)); - } - { - uint8_t t170[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[491] = BinaryenConst(the_module, BinaryenLiteralVec128(t170)); - } - expressions[492] = BinaryenBinary(the_module, 143, expressions[490], expressions[491]); - { - uint8_t t171[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[493] = BinaryenConst(the_module, BinaryenLiteralVec128(t171)); - } - { - uint8_t t172[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[494] = BinaryenConst(the_module, BinaryenLiteralVec128(t172)); - } - expressions[495] = BinaryenBinary(the_module, 144, expressions[493], expressions[494]); - { - uint8_t t173[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[496] = BinaryenConst(the_module, BinaryenLiteralVec128(t173)); - } - { - uint8_t t174[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[497] = BinaryenConst(the_module, BinaryenLiteralVec128(t174)); - } - expressions[498] = BinaryenBinary(the_module, 145, expressions[496], expressions[497]); - { - uint8_t t175[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[499] = BinaryenConst(the_module, BinaryenLiteralVec128(t175)); - } - { - uint8_t t176[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[500] = BinaryenConst(the_module, BinaryenLiteralVec128(t176)); - } - expressions[501] = BinaryenBinary(the_module, 146, expressions[499], expressions[500]); - { - uint8_t t177[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[502] = BinaryenConst(the_module, BinaryenLiteralVec128(t177)); - } - { - uint8_t t178[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[503] = BinaryenConst(the_module, BinaryenLiteralVec128(t178)); - } - expressions[504] = BinaryenBinary(the_module, 147, expressions[502], expressions[503]); - { - uint8_t t179[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[505] = BinaryenConst(the_module, BinaryenLiteralVec128(t179)); - } - { - uint8_t t180[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[506] = BinaryenConst(the_module, BinaryenLiteralVec128(t180)); - } - expressions[507] = BinaryenBinary(the_module, 148, expressions[505], expressions[506]); - { - uint8_t t181[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[508] = BinaryenConst(the_module, BinaryenLiteralVec128(t181)); - } - { - uint8_t t182[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[509] = BinaryenConst(the_module, BinaryenLiteralVec128(t182)); - } - expressions[510] = BinaryenBinary(the_module, 149, expressions[508], expressions[509]); - { - uint8_t t183[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[511] = BinaryenConst(the_module, BinaryenLiteralVec128(t183)); - } - { - uint8_t t184[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[512] = BinaryenConst(the_module, BinaryenLiteralVec128(t184)); - } - expressions[513] = BinaryenBinary(the_module, 150, expressions[511], expressions[512]); - { - uint8_t t185[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[514] = BinaryenConst(the_module, BinaryenLiteralVec128(t185)); - } - { - uint8_t t186[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[515] = BinaryenConst(the_module, BinaryenLiteralVec128(t186)); - } - expressions[516] = BinaryenBinary(the_module, 151, expressions[514], expressions[515]); - { - uint8_t t187[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[517] = BinaryenConst(the_module, BinaryenLiteralVec128(t187)); - } - { - uint8_t t188[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[518] = BinaryenConst(the_module, BinaryenLiteralVec128(t188)); - } - expressions[519] = BinaryenBinary(the_module, 152, expressions[517], expressions[518]); - { - uint8_t t189[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[520] = BinaryenConst(the_module, BinaryenLiteralVec128(t189)); - } - { - uint8_t t190[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[521] = BinaryenConst(the_module, BinaryenLiteralVec128(t190)); - } - expressions[522] = BinaryenBinary(the_module, 153, expressions[520], expressions[521]); - { - uint8_t t191[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[523] = BinaryenConst(the_module, BinaryenLiteralVec128(t191)); - } - { - uint8_t t192[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[524] = BinaryenConst(the_module, BinaryenLiteralVec128(t192)); - } - expressions[525] = BinaryenBinary(the_module, 154, expressions[523], expressions[524]); - { - uint8_t t193[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[526] = BinaryenConst(the_module, BinaryenLiteralVec128(t193)); - } - { - uint8_t t194[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[527] = BinaryenConst(the_module, BinaryenLiteralVec128(t194)); - } - expressions[528] = BinaryenBinary(the_module, 155, expressions[526], expressions[527]); - { - uint8_t t195[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[529] = BinaryenConst(the_module, BinaryenLiteralVec128(t195)); - } - { - uint8_t t196[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[530] = BinaryenConst(the_module, BinaryenLiteralVec128(t196)); - } - expressions[531] = BinaryenBinary(the_module, 156, expressions[529], expressions[530]); - { - uint8_t t197[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[532] = BinaryenConst(the_module, BinaryenLiteralVec128(t197)); - } - { - uint8_t t198[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[533] = BinaryenConst(the_module, BinaryenLiteralVec128(t198)); - } - expressions[534] = BinaryenBinary(the_module, 157, expressions[532], expressions[533]); - { - uint8_t t199[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[535] = BinaryenConst(the_module, BinaryenLiteralVec128(t199)); - } - { - uint8_t t200[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[536] = BinaryenConst(the_module, BinaryenLiteralVec128(t200)); - } - expressions[537] = BinaryenBinary(the_module, 158, expressions[535], expressions[536]); - { - uint8_t t201[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[538] = BinaryenConst(the_module, BinaryenLiteralVec128(t201)); - } - { - uint8_t t202[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[539] = BinaryenConst(the_module, BinaryenLiteralVec128(t202)); - } - expressions[540] = BinaryenBinary(the_module, 159, expressions[538], expressions[539]); - { - uint8_t t203[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[541] = BinaryenConst(the_module, BinaryenLiteralVec128(t203)); - } - { - uint8_t t204[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[542] = BinaryenConst(the_module, BinaryenLiteralVec128(t204)); - } - expressions[543] = BinaryenBinary(the_module, 160, expressions[541], expressions[542]); - { - uint8_t t205[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[544] = BinaryenConst(the_module, BinaryenLiteralVec128(t205)); - } - { - uint8_t t206[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[545] = BinaryenConst(the_module, BinaryenLiteralVec128(t206)); - } - expressions[546] = BinaryenBinary(the_module, 161, expressions[544], expressions[545]); - { - uint8_t t207[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[547] = BinaryenConst(the_module, BinaryenLiteralVec128(t207)); - } - { - uint8_t t208[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[548] = BinaryenConst(the_module, BinaryenLiteralVec128(t208)); - } - expressions[549] = BinaryenBinary(the_module, 162, expressions[547], expressions[548]); - { - uint8_t t209[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[550] = 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[551] = BinaryenConst(the_module, BinaryenLiteralVec128(t210)); - } - expressions[552] = BinaryenBinary(the_module, 163, expressions[550], expressions[551]); - { - uint8_t t211[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[553] = BinaryenConst(the_module, BinaryenLiteralVec128(t211)); - } - { - uint8_t t212[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[554] = BinaryenConst(the_module, BinaryenLiteralVec128(t212)); - } - expressions[555] = BinaryenBinary(the_module, 164, expressions[553], expressions[554]); - { - uint8_t t213[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[556] = BinaryenConst(the_module, BinaryenLiteralVec128(t213)); - } - { - uint8_t t214[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[557] = BinaryenConst(the_module, BinaryenLiteralVec128(t214)); - } - expressions[558] = BinaryenBinary(the_module, 165, expressions[556], expressions[557]); - { - uint8_t t215[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[559] = BinaryenConst(the_module, BinaryenLiteralVec128(t215)); - } - { - uint8_t t216[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[560] = BinaryenConst(the_module, BinaryenLiteralVec128(t216)); - } - expressions[561] = BinaryenBinary(the_module, 166, expressions[559], expressions[560]); - { - uint8_t t217[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[562] = BinaryenConst(the_module, BinaryenLiteralVec128(t217)); - } - { - uint8_t t218[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[563] = BinaryenConst(the_module, BinaryenLiteralVec128(t218)); - } - expressions[564] = BinaryenBinary(the_module, 167, expressions[562], expressions[563]); - { - uint8_t t219[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[565] = BinaryenConst(the_module, BinaryenLiteralVec128(t219)); - } - { - uint8_t t220[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[566] = BinaryenConst(the_module, BinaryenLiteralVec128(t220)); - } - expressions[567] = BinaryenBinary(the_module, 168, expressions[565], expressions[566]); - { - uint8_t t221[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[568] = BinaryenConst(the_module, BinaryenLiteralVec128(t221)); - } - { - uint8_t t222[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[569] = BinaryenConst(the_module, BinaryenLiteralVec128(t222)); - } - expressions[570] = BinaryenBinary(the_module, 169, expressions[568], expressions[569]); - { - uint8_t t223[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[571] = BinaryenConst(the_module, BinaryenLiteralVec128(t223)); - } - { - uint8_t t224[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[572] = BinaryenConst(the_module, BinaryenLiteralVec128(t224)); - } - expressions[573] = BinaryenBinary(the_module, 170, expressions[571], expressions[572]); - { - uint8_t t225[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[574] = BinaryenConst(the_module, BinaryenLiteralVec128(t225)); - } - expressions[575] = BinaryenSIMDExtract(the_module, 0, expressions[574], 1); - { - uint8_t t226[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[576] = BinaryenConst(the_module, BinaryenLiteralVec128(t226)); - } - expressions[577] = BinaryenSIMDExtract(the_module, 1, expressions[576], 1); - { - uint8_t t227[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[578] = BinaryenConst(the_module, BinaryenLiteralVec128(t227)); - } - expressions[579] = BinaryenSIMDExtract(the_module, 2, expressions[578], 1); - { - uint8_t t228[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[580] = BinaryenConst(the_module, BinaryenLiteralVec128(t228)); - } - expressions[581] = BinaryenSIMDExtract(the_module, 3, expressions[580], 1); - { - uint8_t t229[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[582] = BinaryenConst(the_module, BinaryenLiteralVec128(t229)); - } - expressions[583] = BinaryenSIMDExtract(the_module, 4, expressions[582], 1); - { - uint8_t t230[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[584] = BinaryenConst(the_module, BinaryenLiteralVec128(t230)); - } - expressions[585] = BinaryenSIMDExtract(the_module, 5, expressions[584], 1); - { - uint8_t t231[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[586] = BinaryenConst(the_module, BinaryenLiteralVec128(t231)); - } - expressions[587] = BinaryenSIMDExtract(the_module, 6, expressions[586], 1); - { - uint8_t t232[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[588] = BinaryenConst(the_module, BinaryenLiteralVec128(t232)); - } - expressions[589] = BinaryenSIMDExtract(the_module, 7, expressions[588], 1); - { - uint8_t t233[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[590] = BinaryenConst(the_module, BinaryenLiteralVec128(t233)); - } - expressions[591] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - expressions[592] = BinaryenSIMDReplace(the_module, 1, expressions[590], 1, expressions[591]); - { - uint8_t t234[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[593] = BinaryenConst(the_module, BinaryenLiteralVec128(t234)); - } - expressions[594] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - expressions[595] = BinaryenSIMDReplace(the_module, 0, expressions[593], 1, expressions[594]); - { - uint8_t t235[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[596] = BinaryenConst(the_module, BinaryenLiteralVec128(t235)); - } - expressions[597] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - expressions[598] = BinaryenSIMDReplace(the_module, 2, expressions[596], 1, expressions[597]); - { - uint8_t t236[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[599] = BinaryenConst(the_module, BinaryenLiteralVec128(t236)); - } - expressions[600] = BinaryenConst(the_module, BinaryenLiteralInt64(184683593770)); - expressions[601] = BinaryenSIMDReplace(the_module, 3, expressions[599], 1, expressions[600]); - { - uint8_t t237[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[602] = BinaryenConst(the_module, BinaryenLiteralVec128(t237)); - } - expressions[603] = BinaryenConst(the_module, BinaryenLiteralFloat32(42)); - expressions[604] = BinaryenSIMDReplace(the_module, 4, expressions[602], 1, expressions[603]); - { - uint8_t t238[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[605] = BinaryenConst(the_module, BinaryenLiteralVec128(t238)); - } - expressions[606] = BinaryenConst(the_module, BinaryenLiteralFloat64(42)); - expressions[607] = BinaryenSIMDReplace(the_module, 5, expressions[605], 1, expressions[606]); - { - uint8_t t239[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[608] = BinaryenConst(the_module, BinaryenLiteralVec128(t239)); - } - expressions[609] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[610] = BinaryenSIMDShift(the_module, 0, expressions[608], expressions[609]); - { - uint8_t t240[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[611] = BinaryenConst(the_module, BinaryenLiteralVec128(t240)); - } - expressions[612] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[613] = BinaryenSIMDShift(the_module, 1, expressions[611], expressions[612]); - { - uint8_t t241[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[614] = BinaryenConst(the_module, BinaryenLiteralVec128(t241)); - } - expressions[615] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[616] = BinaryenSIMDShift(the_module, 2, expressions[614], expressions[615]); - { - uint8_t t242[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[617] = BinaryenConst(the_module, BinaryenLiteralVec128(t242)); - } - expressions[618] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[619] = BinaryenSIMDShift(the_module, 3, expressions[617], expressions[618]); - { - uint8_t t243[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[620] = BinaryenConst(the_module, BinaryenLiteralVec128(t243)); - } - expressions[621] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[622] = BinaryenSIMDShift(the_module, 4, expressions[620], expressions[621]); - { - uint8_t t244[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[623] = BinaryenConst(the_module, BinaryenLiteralVec128(t244)); - } - expressions[624] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[625] = BinaryenSIMDShift(the_module, 5, expressions[623], expressions[624]); - { - uint8_t t245[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[626] = BinaryenConst(the_module, BinaryenLiteralVec128(t245)); - } - expressions[627] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[628] = BinaryenSIMDShift(the_module, 6, expressions[626], expressions[627]); - { - uint8_t t246[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[629] = BinaryenConst(the_module, BinaryenLiteralVec128(t246)); - } - expressions[630] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[631] = BinaryenSIMDShift(the_module, 7, expressions[629], expressions[630]); - { - uint8_t t247[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[632] = BinaryenConst(the_module, BinaryenLiteralVec128(t247)); - } - expressions[633] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[634] = BinaryenSIMDShift(the_module, 8, expressions[632], expressions[633]); - { - uint8_t t248[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[635] = BinaryenConst(the_module, BinaryenLiteralVec128(t248)); - } - expressions[636] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[637] = BinaryenSIMDShift(the_module, 9, expressions[635], expressions[636]); - { - uint8_t t249[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[638] = BinaryenConst(the_module, BinaryenLiteralVec128(t249)); - } - expressions[639] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[640] = BinaryenSIMDShift(the_module, 10, expressions[638], expressions[639]); - { - uint8_t t250[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[641] = BinaryenConst(the_module, BinaryenLiteralVec128(t250)); - } - expressions[642] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[643] = BinaryenSIMDShift(the_module, 11, expressions[641], expressions[642]); - expressions[644] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[645] = BinaryenSIMDLoad(the_module, 0, 0, 1, expressions[644]); - expressions[646] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[647] = BinaryenSIMDLoad(the_module, 1, 16, 1, expressions[646]); - expressions[648] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[649] = BinaryenSIMDLoad(the_module, 2, 16, 4, expressions[648]); - expressions[650] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[651] = BinaryenSIMDLoad(the_module, 3, 0, 4, expressions[650]); - expressions[652] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[653] = BinaryenSIMDLoad(the_module, 4, 0, 8, expressions[652]); - expressions[654] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[655] = BinaryenSIMDLoad(the_module, 5, 0, 8, expressions[654]); - expressions[656] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[657] = BinaryenSIMDLoad(the_module, 6, 0, 8, expressions[656]); - expressions[658] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[659] = BinaryenSIMDLoad(the_module, 7, 0, 8, expressions[658]); - expressions[660] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[661] = BinaryenSIMDLoad(the_module, 8, 0, 8, expressions[660]); - expressions[662] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[663] = BinaryenSIMDLoad(the_module, 9, 0, 8, expressions[662]); - { - uint8_t t251[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[664] = BinaryenConst(the_module, BinaryenLiteralVec128(t251)); - } - { - uint8_t t252[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[665] = BinaryenConst(the_module, BinaryenLiteralVec128(t252)); - } - { - uint8_t mask[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[666] = BinaryenSIMDShuffle(the_module, expressions[664], expressions[665], mask); - } - { - uint8_t t253[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[667] = BinaryenConst(the_module, BinaryenLiteralVec128(t253)); - } - { - uint8_t t254[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[668] = BinaryenConst(the_module, BinaryenLiteralVec128(t254)); - } - { - uint8_t t255[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[669] = BinaryenConst(the_module, BinaryenLiteralVec128(t255)); - } - expressions[670] = BinaryenSIMDTernary(the_module, 0, expressions[667], expressions[668], expressions[669]); - { - uint8_t t256[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[671] = BinaryenConst(the_module, BinaryenLiteralVec128(t256)); - } - { - uint8_t t257[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[672] = BinaryenConst(the_module, BinaryenLiteralVec128(t257)); - } - { - uint8_t t258[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[673] = BinaryenConst(the_module, BinaryenLiteralVec128(t258)); - } - expressions[674] = BinaryenSIMDTernary(the_module, 1, expressions[671], expressions[672], expressions[673]); - { - uint8_t t259[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[675] = BinaryenConst(the_module, BinaryenLiteralVec128(t259)); - } - { - uint8_t t260[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[676] = BinaryenConst(the_module, BinaryenLiteralVec128(t260)); - } - { - uint8_t t261[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[677] = BinaryenConst(the_module, BinaryenLiteralVec128(t261)); - } - expressions[678] = BinaryenSIMDTernary(the_module, 2, expressions[675], expressions[676], expressions[677]); - { - uint8_t t262[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[679] = BinaryenConst(the_module, BinaryenLiteralVec128(t262)); - } - { - uint8_t t263[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[680] = BinaryenConst(the_module, BinaryenLiteralVec128(t263)); - } - { - uint8_t t264[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[681] = BinaryenConst(the_module, BinaryenLiteralVec128(t264)); - } - expressions[682] = BinaryenSIMDTernary(the_module, 3, expressions[679], expressions[680], expressions[681]); - { - uint8_t t265[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[683] = BinaryenConst(the_module, BinaryenLiteralVec128(t265)); - } - { - uint8_t t266[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[684] = BinaryenConst(the_module, BinaryenLiteralVec128(t266)); - } - { - uint8_t t267[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[685] = BinaryenConst(the_module, BinaryenLiteralVec128(t267)); - } - expressions[686] = BinaryenSIMDTernary(the_module, 4, expressions[683], expressions[684], expressions[685]); - expressions[687] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); - expressions[688] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[689] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); - expressions[690] = BinaryenMemoryInit(the_module, 0, expressions[687], expressions[688], expressions[689]); - expressions[691] = BinaryenDataDrop(the_module, 0); - expressions[692] = BinaryenConst(the_module, BinaryenLiteralInt32(2048)); - expressions[693] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); - expressions[694] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); - expressions[695] = BinaryenMemoryCopy(the_module, expressions[692], expressions[693], expressions[694]); - expressions[696] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[697] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - expressions[698] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); - expressions[699] = BinaryenMemoryFill(the_module, expressions[696], expressions[697], expressions[698]); - { - BinaryenExpressionRef children[] = { 0 }; - expressions[700] = BinaryenBlock(the_module, NULL, children, 0, 0); - } - expressions[701] = BinaryenIf(the_module, expressions[7], expressions[8], expressions[9]); - expressions[702] = BinaryenIf(the_module, expressions[10], expressions[11], expressions[0]); - expressions[703] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[704] = BinaryenLoop(the_module, "in", expressions[703]); - expressions[705] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[706] = BinaryenLoop(the_module, NULL, expressions[705]); - expressions[707] = BinaryenBreak(the_module, "the-value", expressions[12], expressions[13]); - expressions[708] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - expressions[709] = BinaryenBreak(the_module, "the-nothing", expressions[708], expressions[0]); - expressions[710] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - expressions[711] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[710]); - expressions[712] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]); - { - const char* names[] = { "the-value" }; - expressions[713] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[14], expressions[15]); - } - expressions[714] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - const char* names[] = { "the-nothing" }; - expressions[715] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[714], expressions[0]); - } - expressions[716] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); - expressions[717] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); - expressions[718] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); - expressions[719] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); - { - BinaryenExpressionRef operands[] = { expressions[716], expressions[717], expressions[718], expressions[719] }; - expressions[720] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 2); - } - expressions[721] = BinaryenUnary(the_module, 20, expressions[720]); - expressions[722] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); - expressions[723] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); - { - BinaryenExpressionRef operands[] = { expressions[722], expressions[723] }; - expressions[724] = BinaryenCall(the_module, "an-imported", operands, 2, 4); - } - expressions[725] = BinaryenUnary(the_module, 25, expressions[724]); - expressions[726] = BinaryenUnary(the_module, 20, expressions[725]); - expressions[727] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); - expressions[728] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); - expressions[729] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); - expressions[730] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); - expressions[731] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); - { - BinaryenExpressionRef operands[] = { expressions[728], expressions[729], expressions[730], expressions[731] }; - expressions[732] = BinaryenCallIndirect(the_module, expressions[727], operands, 4, "iiIfF"); - } - expressions[733] = BinaryenUnary(the_module, 20, expressions[732]); - expressions[734] = BinaryenLocalGet(the_module, 0, 2); - expressions[735] = BinaryenDrop(the_module, expressions[734]); - expressions[736] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); - expressions[737] = BinaryenLocalSet(the_module, 0, expressions[736]); - expressions[738] = BinaryenConst(the_module, BinaryenLiteralInt32(102)); - expressions[739] = BinaryenLocalTee(the_module, 0, expressions[738]); - expressions[740] = BinaryenDrop(the_module, expressions[739]); - expressions[741] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[742] = BinaryenLoad(the_module, 4, 1, 0, 0, 2, expressions[741]); - expressions[743] = BinaryenConst(the_module, BinaryenLiteralInt32(8)); - expressions[744] = BinaryenLoad(the_module, 2, 1, 2, 1, 3, expressions[743]); - expressions[745] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - expressions[746] = BinaryenLoad(the_module, 4, 1, 0, 0, 4, expressions[745]); - expressions[747] = BinaryenConst(the_module, BinaryenLiteralInt32(9)); - expressions[748] = BinaryenLoad(the_module, 8, 1, 2, 8, 5, expressions[747]); - expressions[749] = BinaryenStore(the_module, 4, 0, 0, expressions[19], expressions[20], 2); - expressions[750] = BinaryenStore(the_module, 8, 2, 4, expressions[21], expressions[22], 3); - expressions[751] = BinaryenSelect(the_module, expressions[16], expressions[17], expressions[18]); - expressions[752] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); - expressions[753] = BinaryenReturn(the_module, expressions[752]); - expressions[754] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); - expressions[755] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); - expressions[756] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); - expressions[757] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); - { - BinaryenExpressionRef operands[] = { expressions[754], expressions[755], expressions[756], expressions[757] }; - expressions[758] = BinaryenReturnCall(the_module, "kitchen()sinker", operands, 4, 2); - } - expressions[759] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); - expressions[760] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); - expressions[761] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); - expressions[762] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); - expressions[763] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); - { - BinaryenExpressionRef operands[] = { expressions[760], expressions[761], expressions[762], expressions[763] }; - expressions[764] = BinaryenReturnCallIndirect(the_module, expressions[759], operands, 4, "iiIfF"); - } - expressions[765] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + BinaryenModuleDispose(the_module); + expressions.clear(); + functions.clear(); + globals.clear(); + events.clear(); + exports.clear(); + relooperBlocks.clear(); + // BinaryenTypeNone: 0 + // [] + // BinaryenTypeUnreachable: 1 + // [ 1 ] + // BinaryenTypeInt32: 2 + // [ 2 ] + // BinaryenTypeInt64: 3 + // [ 3 ] + // BinaryenTypeFloat32: 4 + // [ 4 ] + // BinaryenTypeFloat64: 5 + // [ 5 ] + // BinaryenTypeVec128: 6 + // [ 6 ] + // BinaryenTypeAnyref: 7 + // [ 7 ] + // BinaryenTypeExnref: 8 + // [ 8 ] + // BinaryenTypeAuto: -1 { - BinaryenExpressionRef operands[] = { expressions[765] }; - expressions[766] = BinaryenThrow(the_module, "a-event", operands, 1); + BinaryenType t270[] = {2, 2}; + BinaryenTypeCreate(t270, 2); // 11 } - expressions[767] = BinaryenPop(the_module, 8); - expressions[768] = BinaryenLocalSet(the_module, 5, expressions[767]); - expressions[769] = BinaryenLocalGet(the_module, 5, 8); - expressions[770] = BinaryenBrOnExn(the_module, "try-block", "a-event", expressions[769]); - expressions[771] = BinaryenRethrow(the_module, expressions[770]); + // 11 [ 2, 2 ] { - BinaryenExpressionRef children[] = { expressions[771] }; - expressions[772] = BinaryenBlock(the_module, "try-block", children, 1, 2); + BinaryenType t271[] = {2, 2}; + BinaryenTypeCreate(t271, 2); // 11 } - expressions[773] = BinaryenDrop(the_module, expressions[772]); + // 11 [ 2, 2 ] { - BinaryenExpressionRef children[] = { expressions[768], expressions[773] }; - expressions[774] = BinaryenBlock(the_module, NULL, children, 2, 0); + BinaryenType t272[] = {4, 4}; + BinaryenTypeCreate(t272, 2); // 12 } - expressions[775] = BinaryenTry(the_module, expressions[766], expressions[774]); - expressions[776] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[777] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[778] = BinaryenAtomicLoad(the_module, 4, 0, 2, expressions[777]); - expressions[779] = BinaryenAtomicStore(the_module, 4, 0, expressions[776], expressions[778], 2); - expressions[780] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[781] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[782] = BinaryenConst(the_module, BinaryenLiteralInt64(0)); - expressions[783] = BinaryenAtomicWait(the_module, expressions[780], expressions[781], expressions[782], 2); - expressions[784] = BinaryenDrop(the_module, expressions[783]); - expressions[785] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[786] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[787] = BinaryenAtomicNotify(the_module, expressions[785], expressions[786]); - expressions[788] = BinaryenDrop(the_module, expressions[787]); - expressions[789] = BinaryenAtomicFence(the_module); - expressions[790] = BinaryenPop(the_module, 2); - expressions[791] = BinaryenPush(the_module, expressions[790]); - expressions[792] = BinaryenPop(the_module, 3); - expressions[793] = BinaryenPush(the_module, expressions[792]); - expressions[794] = BinaryenPop(the_module, 4); - expressions[795] = BinaryenPush(the_module, expressions[794]); - expressions[796] = BinaryenPop(the_module, 5); - expressions[797] = BinaryenPush(the_module, expressions[796]); - expressions[798] = BinaryenPop(the_module, 6); - expressions[799] = BinaryenPush(the_module, expressions[798]); - expressions[800] = BinaryenPop(the_module, 7); - expressions[801] = BinaryenPush(the_module, expressions[800]); - expressions[802] = BinaryenPop(the_module, 8); - expressions[803] = BinaryenPush(the_module, expressions[802]); - expressions[804] = BinaryenNop(the_module); - expressions[805] = BinaryenUnreachable(the_module); - BinaryenExpressionGetId(expressions[30]); - BinaryenExpressionGetType(expressions[30]); - BinaryenUnaryGetOp(expressions[30]); - BinaryenUnaryGetValue(expressions[30]); + // 12 [ 4, 4 ] + return 0; +} +// ending a Binaryen API trace + // BinaryenTypeNone: 0 + // [] + // BinaryenTypeUnreachable: 1 + // [ 1 ] + // BinaryenTypeInt32: 2 + // [ 2 ] + // BinaryenTypeInt64: 3 + // [ 3 ] + // BinaryenTypeFloat32: 4 + // [ 4 ] + // BinaryenTypeFloat64: 5 + // [ 5 ] + // BinaryenTypeVec128: 6 + // [ 6 ] + // BinaryenTypeAnyref: 7 + // [ 7 ] + // BinaryenTypeExnref: 8 + // [ 8 ] + // BinaryenTypeAuto: -1 + // 11 [ 2, 2 ] + // 11 [ 2, 2 ] + // 12 [ 4, 4 ] +Binaryen.Features.MVP: 0 +Binaryen.Features.Atomics: 1 +Binaryen.Features.BulkMemory: 16 +Binaryen.Features.MutableGlobals: 2 +Binaryen.Features.NontrappingFPToInt: 4 +Binaryen.Features.SignExt: 32 +Binaryen.Features.SIMD128: 8 +Binaryen.Features.ExceptionHandling: 64 +Binaryen.Features.TailCall: 128 +Binaryen.Features.ReferenceTypes: 256 +Binaryen.Features.All: 511 +BinaryenInvalidId: 0 +BinaryenBlockId: 1 +BinaryenIfId: 2 +BinaryenLoopId: 3 +BinaryenBreakId: 4 +BinaryenSwitchId: 5 +BinaryenCallId: 6 +BinaryenCallIndirectId: 7 +BinaryenLocalGetId: 8 +BinaryenLocalSetId: 9 +BinaryenGlobalGetId: 10 +BinaryenGlobalSetId: 11 +BinaryenLoadId: 12 +BinaryenStoreId: 13 +BinaryenConstId: 14 +BinaryenUnaryId: 15 +BinaryenBinaryId: 16 +BinaryenSelectId: 17 +BinaryenDropId: 18 +BinaryenReturnId: 19 +BinaryenHostId: 20 +BinaryenNopId: 21 +BinaryenUnreachableId: 22 +BinaryenAtomicCmpxchgId: 24 +BinaryenAtomicRMWId: 23 +BinaryenAtomicWaitId: 25 +BinaryenAtomicNotifyId: 26 +BinaryenSIMDExtractId: 28 +BinaryenSIMDReplaceId: 29 +BinaryenSIMDShuffleId: 30 +BinaryenSIMDTernaryId: 31 +BinaryenSIMDShiftId: 32 +BinaryenSIMDLoadId: 33 +MemoryInitId: 34 +DataDropId: 35 +MemoryCopyId: 36 +MemoryFillId: 37 +TryId: 40 +ThrowId: 41 +RethrowId: 42 +BrOnExnId: 43 +PushId: 38 +PopId: 39 getExpressionInfo={"id":15,"type":4,"op":6} - BinaryenExpressionPrint(expressions[30]); (f32.neg (f32.const -33.61199951171875) ) - expressions[806] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); - BinaryenExpressionGetId(expressions[806]); - BinaryenExpressionGetType(expressions[806]); - BinaryenConstGetValueI32(expressions[806]); getExpressionInfo(i32.const)={"id":14,"type":2,"value":5} - expressions[807] = BinaryenConst(the_module, BinaryenLiteralInt64(30064771078)); - BinaryenExpressionGetId(expressions[807]); - BinaryenExpressionGetType(expressions[807]); - BinaryenConstGetValueI64Low(expressions[807]); - BinaryenConstGetValueI64High(expressions[807]); getExpressionInfo(i64.const)={"id":14,"type":3,"value":{"low":6,"high":7}} - expressions[808] = BinaryenConst(the_module, BinaryenLiteralFloat32(8.5)); - BinaryenExpressionGetId(expressions[808]); - BinaryenExpressionGetType(expressions[808]); - BinaryenConstGetValueF32(expressions[808]); getExpressionInfo(f32.const)={"id":14,"type":4,"value":8.5} - expressions[809] = BinaryenConst(the_module, BinaryenLiteralFloat64(9.5)); - BinaryenExpressionGetId(expressions[809]); - BinaryenExpressionGetType(expressions[809]); - BinaryenConstGetValueF64(expressions[809]); getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} - { - BinaryenExpressionRef children[] = { expressions[24], expressions[26], expressions[28], expressions[30], expressions[32], - expressions[34], expressions[36], expressions[38], expressions[40], expressions[42], expressions[44], - expressions[46], expressions[48], expressions[50], expressions[52], expressions[54], expressions[56], - expressions[58], expressions[60], expressions[62], expressions[64], expressions[66], expressions[68], - expressions[70], expressions[72], expressions[74], expressions[76], expressions[78], expressions[80], - expressions[82], expressions[84], expressions[86], expressions[88], expressions[90], expressions[92], - expressions[94], expressions[96], expressions[98], expressions[100], expressions[102], expressions[104], - expressions[106], expressions[108], expressions[110], expressions[112], expressions[114], expressions[116], - expressions[118], expressions[120], expressions[122], expressions[124], expressions[126], expressions[128], - expressions[130], expressions[132], expressions[134], expressions[136], expressions[138], expressions[140], - expressions[142], expressions[144], expressions[146], expressions[148], expressions[150], expressions[152], - expressions[154], expressions[156], expressions[158], expressions[160], expressions[162], expressions[164], - expressions[166], expressions[168], expressions[170], expressions[172], expressions[174], expressions[176], - expressions[178], expressions[180], expressions[182], expressions[184], expressions[186], expressions[188], - expressions[190], expressions[192], expressions[195], expressions[198], expressions[201], expressions[204], - expressions[207], expressions[210], expressions[213], expressions[216], expressions[219], expressions[222], - expressions[225], expressions[228], expressions[231], expressions[234], expressions[237], expressions[240], - expressions[243], expressions[246], expressions[249], expressions[252], expressions[255], expressions[258], - expressions[261], expressions[264], expressions[267], expressions[270], expressions[273], expressions[276], - expressions[279], expressions[282], expressions[285], expressions[288], expressions[291], expressions[294], - expressions[297], expressions[300], expressions[303], expressions[306], expressions[309], expressions[312], - expressions[315], expressions[318], expressions[321], expressions[324], expressions[327], expressions[330], - expressions[333], expressions[336], expressions[339], expressions[342], expressions[345], expressions[348], - expressions[351], expressions[354], expressions[357], expressions[360], expressions[363], expressions[366], - expressions[369], expressions[372], expressions[375], expressions[378], expressions[381], expressions[384], - expressions[387], expressions[390], expressions[393], expressions[396], expressions[399], expressions[402], - expressions[405], expressions[408], expressions[411], expressions[414], expressions[417], expressions[420], - expressions[423], expressions[426], expressions[429], expressions[432], expressions[435], expressions[438], - expressions[441], expressions[444], expressions[447], expressions[450], expressions[453], expressions[456], - expressions[459], expressions[462], expressions[465], expressions[468], expressions[471], expressions[474], - expressions[477], expressions[480], expressions[483], expressions[486], expressions[489], expressions[492], - expressions[495], expressions[498], expressions[501], expressions[504], expressions[507], expressions[510], - expressions[513], expressions[516], expressions[519], expressions[522], expressions[525], expressions[528], - expressions[531], expressions[534], 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[575], expressions[577], expressions[579], - expressions[581], expressions[583], expressions[585], expressions[587], expressions[589], expressions[592], - expressions[595], expressions[598], expressions[601], expressions[604], expressions[607], expressions[610], - expressions[613], expressions[616], expressions[619], expressions[622], expressions[625], expressions[628], - expressions[631], expressions[634], expressions[637], expressions[640], expressions[643], expressions[645], - expressions[647], expressions[649], expressions[651], expressions[653], expressions[655], expressions[657], - expressions[659], expressions[661], expressions[663], expressions[666], expressions[670], expressions[674], - expressions[678], expressions[682], expressions[686], expressions[690], expressions[691], expressions[695], - expressions[699], expressions[700], expressions[701], expressions[702], expressions[704], expressions[706], - expressions[707], expressions[709], expressions[711], expressions[712], expressions[713], expressions[715], - expressions[721], expressions[726], expressions[733], expressions[735], expressions[737], expressions[740], - expressions[742], expressions[744], expressions[746], expressions[748], expressions[749], expressions[750], - expressions[751], expressions[753], expressions[758], expressions[764], expressions[775], expressions[779], - expressions[784], expressions[788], expressions[789], expressions[791], expressions[793], expressions[795], - expressions[797], expressions[799], expressions[801], expressions[803], expressions[804], expressions[805] }; - expressions[810] = BinaryenBlock(the_module, "the-value", children, 299, 0); - } - expressions[811] = BinaryenDrop(the_module, expressions[810]); - { - BinaryenExpressionRef children[] = { expressions[811] }; - expressions[812] = BinaryenBlock(the_module, "the-nothing", children, 1, 0); - } - expressions[813] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - { - BinaryenExpressionRef children[] = { expressions[812], expressions[813] }; - expressions[814] = BinaryenBlock(the_module, "the-body", children, 2, 0); - } - { - BinaryenType varTypes[] = { 2, 8 }; - functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 2, expressions[814]); - } - expressions[815] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - globals[0] = BinaryenAddGlobal(the_module, "a-global", 2, 0, expressions[815]); - { - BinaryenType paramTypes[] = { 2, 5 }; - functionTypes[1] = BinaryenAddFunctionType(the_module, "fiF", 4, paramTypes, 2); - } - BinaryenAddFunctionImport(the_module, "an-imported", "module", "base", functionTypes[1]); - BinaryenAddGlobalImport(the_module, "a-global-imp", "module", "base", 2, 0); - BinaryenAddGlobalImport(the_module, "a-mut-global-imp", "module", "base", 2, 1); - BinaryenAddEventImport(the_module, "a-event-imp", "module", "base", 0, 2, 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"); - BinaryenFunctionGetName(functions[0]); - BinaryenFunctionImportGetModule(functions[0]); - BinaryenFunctionImportGetBase(functions[0]); - BinaryenFunctionGetType(functions[0]); - BinaryenFunctionGetNumParams(functions[0]); - BinaryenFunctionGetParam(functions[0], 0); - BinaryenFunctionGetParam(functions[0], 1); - BinaryenFunctionGetParam(functions[0], 2); - BinaryenFunctionGetParam(functions[0], 3); - BinaryenFunctionGetResult(functions[0]); - BinaryenFunctionGetNumVars(functions[0]); - BinaryenFunctionGetVar(functions[0], 0); - BinaryenFunctionGetVar(functions[0], 1); - BinaryenFunctionGetBody(functions[0]); - expressions[816] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - const char* funcNames[] = { "kitchen()sinker" }; - BinaryenSetFunctionTable(the_module, 1, 4294967295, funcNames, 1, expressions[816]); - } - expressions[817] = 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[817], expressions[0] }; - BinaryenIndex segmentSizes[] = { 12, 12 }; - BinaryenSetMemory(the_module, 1, 256, "mem", segments, segmentPassive, segmentOffsets, segmentSizes, 2, 1); - } - { - BinaryenType paramTypes[] = { 0 }; - functionTypes[2] = BinaryenAddFunctionType(the_module, "v", 0, paramTypes, 0); - } - expressions[818] = BinaryenNop(the_module); - { - BinaryenType varTypes[] = { 0 }; - functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[2], varTypes, 0, expressions[818]); - } - BinaryenSetStart(the_module, functions[1]); - { - BinaryenType paramTypes[] = { 0 }; - functionTypes[3] = BinaryenAddFunctionType(the_module, NULL, 0, paramTypes, 0); - } - BinaryenModuleAutoDrop(the_module); - BinaryenModuleSetFeatures(the_module, 511); - BinaryenModuleGetFeatures(the_module); - BinaryenModulePrint(the_module); (module - (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) - (type $fiF (func (param i32 f64) (result f32))) - (type $v (func)) - (type $3 (func)) + (type $i32_i64_f32_f64_=>_i32 (func (param i32 i64 f32 f64) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) + (type $i32_f64_=>_f32 (func (param i32 f64) (result f32))) (import "module" "base" (global $a-global-imp i32)) (import "module" "base" (global $a-mut-global-imp (mut i32))) (import "module" "base" (func $an-imported (param i32 f64) (result f32))) @@ -5806,7 +6255,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (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) + (func "$kitchen()sinker" (; 1 ;) (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) @@ -7324,7 +7773,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} ) (drop (i32.eqz - (call_indirect (type $iiIfF) + (call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -7388,7 +7837,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (f32.const 1.2999999523162842) (f64.const 3.7) ) - (return_call_indirect (type $iiIfF) + (return_call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -7463,18 +7912,16 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (i32.const 42) ) ) - (func $starter (; 2 ;) (type $v) + (func $starter (; 2 ;) (nop) ) ) - BinaryenModuleValidate(the_module); - BinaryenModulePrint(the_module); (module - (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) - (type $fiF (func (param i32 f64) (result f32))) - (type $v (func)) - (type $3 (func)) + (type $i32_i64_f32_f64_=>_i32 (func (param i32 i64 f32 f64) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) + (type $i32_f64_=>_f32 (func (param i32 f64) (result f32))) (import "module" "base" (global $a-global-imp i32)) (import "module" "base" (global $a-mut-global-imp (mut i32))) (import "module" "base" (func $an-imported (param i32 f64) (result f32))) @@ -7491,7 +7938,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (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) + (func "$kitchen()sinker" (; 1 ;) (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) @@ -9009,7 +9456,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} ) (drop (i32.eqz - (call_indirect (type $iiIfF) + (call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -9073,7 +9520,7 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (f32.const 1.2999999523162842) (f64.const 3.7) ) - (return_call_indirect (type $iiIfF) + (return_call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -9148,487 +9595,24 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5} (i32.const 42) ) ) - (func $starter (; 2 ;) (type $v) + (func $starter (; 2 ;) (nop) ) ) - BinaryenModuleDispose(the_module); - functionTypes.clear(); - expressions.clear(); - functions.clear(); - globals.clear(); - events.clear(); - exports.clear(); - relooperBlocks.clear(); - the_module = BinaryenModuleCreate(); - expressions[size_t(NULL)] = BinaryenExpressionRef(NULL); - { - BinaryenType paramTypes[] = { 0 }; - functionTypes[0] = BinaryenAddFunctionType(the_module, "v", 0, paramTypes, 0); - } - { - BinaryenType paramTypes[] = { 2 }; - functionTypes[1] = BinaryenAddFunctionType(the_module, "vi", 0, paramTypes, 1); - } - BinaryenAddFunctionImport(the_module, "check", "module", "check", functionTypes[1]); - the_relooper = RelooperCreate(the_module); - expressions[1] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); - { - BinaryenExpressionRef operands[] = { expressions[1] }; - expressions[2] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[2]); - expressions[3] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[0] = BinaryenAddFunction(the_module, "just-one-block", functionTypes[0], varTypes, 1, expressions[3]); - } - the_relooper = RelooperCreate(the_module); - expressions[4] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[4] }; - expressions[5] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[5]); - expressions[6] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[6] }; - expressions[7] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[7]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); - expressions[8] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[1] = BinaryenAddFunction(the_module, "two-blocks", functionTypes[0], varTypes, 1, expressions[8]); - } - the_relooper = RelooperCreate(the_module); - expressions[9] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[9] }; - expressions[10] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[10]); - expressions[11] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[11] }; - expressions[12] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[12]); - expressions[13] = BinaryenConst(the_module, BinaryenLiteralInt32(77)); - expressions[14] = BinaryenDrop(the_module, expressions[13]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[14]); - expressions[15] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[2] = BinaryenAddFunction(the_module, "two-blocks-plus-code", functionTypes[0], varTypes, 1, expressions[15]); - } - the_relooper = RelooperCreate(the_module); - expressions[16] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[16] }; - expressions[17] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[17]); - expressions[18] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[18] }; - expressions[19] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[19]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); - expressions[20] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[3] = BinaryenAddFunction(the_module, "loop", functionTypes[0], varTypes, 1, expressions[20]); - } - the_relooper = RelooperCreate(the_module); - expressions[21] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[21] }; - expressions[22] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[22]); - expressions[23] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[23] }; - expressions[24] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[24]); - expressions[25] = BinaryenConst(the_module, BinaryenLiteralInt32(33)); - expressions[26] = BinaryenDrop(the_module, expressions[25]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[26]); - expressions[27] = BinaryenConst(the_module, BinaryenLiteralInt32(-66)); - expressions[28] = BinaryenDrop(the_module, expressions[27]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[28]); - expressions[29] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[4] = BinaryenAddFunction(the_module, "loop-plus-code", functionTypes[0], varTypes, 1, expressions[29]); - } - the_relooper = RelooperCreate(the_module); - expressions[30] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[30] }; - expressions[31] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[31]); - expressions[32] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[32] }; - expressions[33] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[33]); - expressions[34] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[34] }; - expressions[35] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[35]); - expressions[36] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[36], expressions[0]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - expressions[37] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[5] = BinaryenAddFunction(the_module, "split", functionTypes[0], varTypes, 1, expressions[37]); - } - the_relooper = RelooperCreate(the_module); - expressions[38] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[38] }; - expressions[39] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[39]); - expressions[40] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[40] }; - expressions[41] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[41]); - expressions[42] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[42] }; - expressions[43] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[43]); - expressions[44] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - expressions[45] = BinaryenDrop(the_module, expressions[44]); - expressions[46] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[46], expressions[45]); - expressions[47] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); - expressions[48] = BinaryenDrop(the_module, expressions[47]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[48]); - expressions[49] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[6] = BinaryenAddFunction(the_module, "split-plus-code", functionTypes[0], varTypes, 1, expressions[49]); - } - the_relooper = RelooperCreate(the_module); - expressions[50] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[50] }; - expressions[51] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[51]); - expressions[52] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[52] }; - expressions[53] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[53]); - expressions[54] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[54] }; - expressions[55] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[55]); - expressions[56] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[56], expressions[0]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); - expressions[57] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[7] = BinaryenAddFunction(the_module, "if", functionTypes[0], varTypes, 1, expressions[57]); - } - the_relooper = RelooperCreate(the_module); - expressions[58] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[58] }; - expressions[59] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[59]); - expressions[60] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[60] }; - expressions[61] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[61]); - expressions[62] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[62] }; - expressions[63] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[63]); - expressions[64] = BinaryenConst(the_module, BinaryenLiteralInt32(-1)); - expressions[65] = BinaryenDrop(the_module, expressions[64]); - expressions[66] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[66], expressions[65]); - expressions[67] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); - expressions[68] = BinaryenDrop(the_module, expressions[67]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[68]); - expressions[69] = BinaryenConst(the_module, BinaryenLiteralInt32(-3)); - expressions[70] = BinaryenDrop(the_module, expressions[69]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[70]); - expressions[71] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[8] = BinaryenAddFunction(the_module, "if-plus-code", functionTypes[0], varTypes, 1, expressions[71]); - } - the_relooper = RelooperCreate(the_module); - expressions[72] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[72] }; - expressions[73] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[73]); - expressions[74] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[74] }; - expressions[75] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[75]); - expressions[76] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[76] }; - expressions[77] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[77]); - expressions[78] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - { - BinaryenExpressionRef operands[] = { expressions[78] }; - expressions[79] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[79]); - expressions[80] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[80], expressions[0]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[3], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[0], expressions[0]); - expressions[81] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[9] = BinaryenAddFunction(the_module, "if-else", functionTypes[0], varTypes, 1, expressions[81]); - } - the_relooper = RelooperCreate(the_module); - expressions[82] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[82] }; - expressions[83] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[83]); - expressions[84] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[84] }; - expressions[85] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[85]); - expressions[86] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[86] }; - expressions[87] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[87]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); - expressions[88] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[88], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); - expressions[89] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[10] = BinaryenAddFunction(the_module, "loop-tail", functionTypes[0], varTypes, 1, expressions[89]); - } - the_relooper = RelooperCreate(the_module); - expressions[90] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[90] }; - expressions[91] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[91]); - expressions[92] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[92] }; - expressions[93] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[93]); - expressions[94] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[94] }; - expressions[95] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[95]); - expressions[96] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - { - BinaryenExpressionRef operands[] = { expressions[96] }; - expressions[97] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[97]); - expressions[98] = BinaryenConst(the_module, BinaryenLiteralInt32(4)); - { - BinaryenExpressionRef operands[] = { expressions[98] }; - expressions[99] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[4] = RelooperAddBlock(the_relooper, expressions[99]); - expressions[100] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); - { - BinaryenExpressionRef operands[] = { expressions[100] }; - expressions[101] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[5] = RelooperAddBlock(the_relooper, expressions[101]); - expressions[102] = BinaryenConst(the_module, BinaryenLiteralInt32(6)); - { - BinaryenExpressionRef operands[] = { expressions[102] }; - expressions[103] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[6] = RelooperAddBlock(the_relooper, expressions[103]); - expressions[104] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - expressions[105] = BinaryenDrop(the_module, expressions[104]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[105]); - expressions[106] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[106], expressions[0]); - expressions[107] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); - expressions[108] = BinaryenDrop(the_module, expressions[107]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[6], expressions[0], expressions[108]); - expressions[109] = BinaryenConst(the_module, BinaryenLiteralInt32(-6)); - RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[109], expressions[0]); - expressions[110] = BinaryenConst(the_module, BinaryenLiteralInt32(30)); - expressions[111] = BinaryenDrop(the_module, expressions[110]); - RelooperAddBranch(relooperBlocks[2], relooperBlocks[1], expressions[0], expressions[111]); - expressions[112] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - RelooperAddBranch(relooperBlocks[3], relooperBlocks[4], expressions[112], expressions[0]); - RelooperAddBranch(relooperBlocks[3], relooperBlocks[5], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[4], relooperBlocks[5], expressions[0], expressions[0]); - expressions[113] = BinaryenConst(the_module, BinaryenLiteralInt32(40)); - expressions[114] = BinaryenDrop(the_module, expressions[113]); - RelooperAddBranch(relooperBlocks[5], relooperBlocks[6], expressions[0], expressions[114]); - expressions[115] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[11] = BinaryenAddFunction(the_module, "nontrivial-loop-plus-phi-to-head", functionTypes[0], varTypes, 1, expressions[115]); - } - the_relooper = RelooperCreate(the_module); - expressions[116] = BinaryenConst(the_module, BinaryenLiteralInt32(-99)); - expressions[117] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[117] }; - expressions[118] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlockWithSwitch(the_relooper, expressions[118], expressions[116]); - expressions[119] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[119] }; - expressions[120] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[120]); - expressions[121] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[121] }; - expressions[122] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[122]); - expressions[123] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - { - BinaryenExpressionRef operands[] = { expressions[123] }; - expressions[124] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[124]); - { - BinaryenIndex indexes[] = { 2, 5 }; - RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[1], indexes, 2, expressions[0]); - } - expressions[125] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - expressions[126] = BinaryenDrop(the_module, expressions[125]); - { - BinaryenIndex indexes[] = { 4 }; - RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[2], indexes, 1, expressions[126]); - } - { - BinaryenIndex indexes[] = { 0 }; - RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[3], indexes, 0, expressions[0]); - } - expressions[127] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[12] = BinaryenAddFunction(the_module, "switch", functionTypes[0], varTypes, 1, expressions[127]); - } - the_relooper = RelooperCreate(the_module); - expressions[128] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[128] }; - expressions[129] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[129]); - expressions[130] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[130] }; - expressions[131] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[131]); - expressions[132] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[132] }; - expressions[133] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[133]); - expressions[134] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[134], expressions[0]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[2], relooperBlocks[1], expressions[0], expressions[0]); - expressions[135] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 3); - { - BinaryenType varTypes[] = { 2, 2, 3, 2, 4, 5, 2 }; - functions[13] = BinaryenAddFunction(the_module, "duffs-device", functionTypes[0], varTypes, 7, expressions[135]); - } - { - BinaryenType paramTypes[] = { 0 }; - functionTypes[2] = BinaryenAddFunctionType(the_module, "i", 2, paramTypes, 0); - } - the_relooper = RelooperCreate(the_module); - expressions[136] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - { - BinaryenExpressionRef operands[] = { expressions[136] }; - expressions[137] = BinaryenCall(the_module, "check", operands, 1, 0); - } - expressions[138] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); - expressions[139] = BinaryenReturn(the_module, expressions[138]); - { - BinaryenExpressionRef children[] = { expressions[137], expressions[139] }; - expressions[140] = BinaryenBlock(the_module, "the-list", children, 2, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[140]); - expressions[141] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[14] = BinaryenAddFunction(the_module, "return", functionTypes[2], varTypes, 1, expressions[141]); - } raw: - BinaryenModulePrint(the_module); (module - (type $v (func)) - (type $vi (func (param i32))) - (type $i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "module" "check" (func $check (param i32))) - (func $just-one-block (; 1 ;) (type $v) + (func $just-one-block (; 1 ;) (local $0 i32) (call $check (i32.const 1337) ) ) - (func $two-blocks (; 2 ;) (type $v) + (func $two-blocks (; 2 ;) (local $0 i32) (block (call $check @@ -9639,7 +9623,7 @@ raw: ) ) ) - (func $two-blocks-plus-code (; 3 ;) (type $v) + (func $two-blocks-plus-code (; 3 ;) (local $0 i32) (block (block @@ -9655,7 +9639,7 @@ raw: ) ) ) - (func $loop (; 4 ;) (type $v) + (func $loop (; 4 ;) (local $0 i32) (loop $shape$0$continue (block @@ -9671,7 +9655,7 @@ raw: ) ) ) - (func $loop-plus-code (; 5 ;) (type $v) + (func $loop-plus-code (; 5 ;) (local $0 i32) (loop $shape$0$continue (block @@ -9695,7 +9679,7 @@ raw: ) ) ) - (func $split (; 6 ;) (type $v) + (func $split (; 6 ;) (local $0 i32) (call $check (i32.const 0) @@ -9714,7 +9698,7 @@ raw: ) ) ) - (func $split-plus-code (; 7 ;) (type $v) + (func $split-plus-code (; 7 ;) (local $0 i32) (call $check (i32.const 0) @@ -9743,7 +9727,7 @@ raw: ) ) ) - (func $if (; 8 ;) (type $v) + (func $if (; 8 ;) (local $0 i32) (block $block$3$break (call $check @@ -9768,7 +9752,7 @@ raw: ) ) ) - (func $if-plus-code (; 9 ;) (type $v) + (func $if-plus-code (; 9 ;) (local $0 i32) (block $block$3$break (call $check @@ -9806,7 +9790,7 @@ raw: ) ) ) - (func $if-else (; 10 ;) (type $v) + (func $if-else (; 10 ;) (local $0 i32) (block $block$4$break (call $check @@ -9838,7 +9822,7 @@ raw: ) ) ) - (func $loop-tail (; 11 ;) (type $v) + (func $loop-tail (; 11 ;) (local $0 i32) (block $block$3$break (loop $shape$0$continue @@ -9863,7 +9847,7 @@ raw: ) ) ) - (func $nontrivial-loop-plus-phi-to-head (; 12 ;) (type $v) + (func $nontrivial-loop-plus-phi-to-head (; 12 ;) (local $0 i32) (block $block$2$break (call $check @@ -9950,7 +9934,7 @@ raw: ) ) ) - (func $switch (; 13 ;) (type $v) + (func $switch (; 13 ;) (local $0 i32) (call $check (i32.const 0) @@ -9994,7 +9978,7 @@ raw: (br $switch$1$leave) ) ) - (func $duffs-device (; 14 ;) (type $v) + (func $duffs-device (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i64) @@ -10069,7 +10053,7 @@ raw: ) ) ) - (func $return (; 15 ;) (type $i) (result i32) + (func $return (; 15 ;) (result i32) (local $0 i32) (block (call $check @@ -10082,69 +10066,59 @@ raw: ) ) - BinaryenModuleValidate(the_module); - { - const char* passes[] = { "precompute" }; - BinaryenModuleRunPasses(the_module, passes, 1); - } - BinaryenModuleValidate(the_module); - BinaryenModuleOptimize(the_module); - BinaryenModuleValidate(the_module); optimized: - BinaryenModulePrint(the_module); (module ) - BinaryenModuleDispose(the_module); - functionTypes.clear(); - expressions.clear(); - functions.clear(); - globals.clear(); - events.clear(); - exports.clear(); - relooperBlocks.clear(); - // BinaryenTypeNone: 0 - // [] - // BinaryenTypeUnreachable: 1 - // [ 1 ] - // BinaryenTypeInt32: 2 - // [ 2 ] - // BinaryenTypeInt64: 3 - // [ 3 ] - // BinaryenTypeFloat32: 4 - // [ 4 ] - // BinaryenTypeFloat64: 5 - // [ 5 ] - // BinaryenTypeVec128: 6 - // [ 6 ] - // BinaryenTypeAnyref: 7 - // [ 7 ] - // BinaryenTypeExnref: 8 - // [ 8 ] - // BinaryenTypeAuto: -1 - { - BinaryenType t268[] = {2, 2}; - BinaryenTypeCreate(t268, 2); // 9 - } - // 9 [ 2, 2 ] - { - BinaryenType t269[] = {2, 2}; - BinaryenTypeCreate(t269, 2); // 9 - } - // 9 [ 2, 2 ] - { - BinaryenType t270[] = {4, 4}; - BinaryenTypeCreate(t270, 2); // 10 - } - // 10 [ 4, 4 ] - return 0; -} +module loaded from binary form: +(module + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (global $global$0 i32 (i32.const 3)) + (event $event$0 (attr 0) (param i32 i32)) + (func $adder (; 0 ;) (param $0 i32) (param $1 i32) (result i32) + (i32.add + (local.get $0) + (local.get $1) + ) + ) +) + +(module + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (import "spectest" "print" (func $print-i32 (param i32))) + (start $starter) + (func $starter (; 1 ;) + (call $print-i32 + (i32.const 1234) + ) + ) +) + +1234 : i32 +(module + (type $none_=>_none (func)) + (func $func (; 0 ;) + (local $0 i32) + (local.set $0 + (i64.const 1234) + ) + ) +) + +[wasm-validator error in function func] i32 != i64: local.set type must match function, on +[none] (local.set $0 + [i64] (i64.const 1234) +) +validation: 0 test_parsing text: (module - (type $iii (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (global $a-global i32 (i32.const 3)) (event $a-event (attr 0) (param i32)) - (func $adder (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $adder (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (i32.add (local.get $0) (local.get $1) @@ -10154,11 +10128,11 @@ test_parsing text: module loaded from text form: (module - (type $iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (global $a-global i32 (i32.const 3)) (event $a-event (attr 0) (param i32)) - (func $ADD_ER (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $ADD_ER (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (i32.add (local.get $0) (local.get $1) @@ -10168,7 +10142,7 @@ module loaded from text form: sizeof Literal: 24 (module - (type $v (func)) + (type $none_=>_none (func)) (memory $0 1 256) (data (i32.const 10) "hello, world") (data (global.get $a-global) "segment data 2") @@ -10177,13 +10151,13 @@ sizeof Literal: 24 (export "export1" (func $fn1)) (export "export2" (func $fn2)) (export "mem" (memory $0)) - (func $fn0 (; 0 ;) (type $v) + (func $fn0 (; 0 ;) (nop) ) - (func $fn1 (; 1 ;) (type $v) + (func $fn1 (; 1 ;) (nop) ) - (func $fn2 (; 2 ;) (type $v) + (func $fn2 (; 2 ;) (nop) ) ) diff --git a/test/binaryen.js/optimize-levels.js.txt b/test/binaryen.js/optimize-levels.js.txt index 7a7613e3e..9170fe8fc 100644 --- a/test/binaryen.js/optimize-levels.js.txt +++ b/test/binaryen.js/optimize-levels.js.txt @@ -16,10 +16,10 @@ === unoptimized === (module - (type $i (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (export "test" (func $test)) - (func $test (; 0 ;) (type $i) (param $0 i32) (result i32) + (func $test (; 0 ;) (param $0 i32) (result i32) (block $block (result i32) (if (result i32) (local.get $0) @@ -34,9 +34,9 @@ optimizeLevel=2 shrinkLevel=1 (module - (type $i (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "test" (func $test)) - (func $test (; 0 ;) (; has Stack IR ;) (type $i) (param $0 i32) (result i32) + (func $test (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32) (select (local.get $0) (i32.const 0) @@ -49,9 +49,9 @@ shrinkLevel=1 optimizeLevel=0 shrinkLevel=0 (module - (type $i (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "test" (func $test)) - (func $test (; 0 ;) (type $i) (param $0 i32) (result i32) + (func $test (; 0 ;) (param $0 i32) (result i32) (select (local.get $0) (i32.const 0) @@ -64,9 +64,9 @@ shrinkLevel=0 optimizeLevel=2 shrinkLevel=1 (module - (type $i (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "test" (func $test)) - (func $test (; 0 ;) (; has Stack IR ;) (type $i) (param $0 i32) (result i32) + (func $test (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32) (select (local.get $0) (i32.const 0) diff --git a/test/binaryen.js/push-pop.js b/test/binaryen.js/push-pop.js index 1bc24963e..9f1d66719 100644 --- a/test/binaryen.js/push-pop.js +++ b/test/binaryen.js/push-pop.js @@ -18,9 +18,7 @@ function stringify(expr) { var module = new Binaryen.Module(); -var v = module.addFunctionType("v", Binaryen.none, []); - -var func = module.addFunction("func", v, [], +var func = module.addFunction("func", Binaryen.none, Binaryen.none, [], module.block(null, [ module.push(module.i32.pop()), module.push(module.i64.pop()), diff --git a/test/binaryen.js/push-pop.js.txt b/test/binaryen.js/push-pop.js.txt index 3d115cd90..bf4c5fd8c 100644 --- a/test/binaryen.js/push-pop.js.txt +++ b/test/binaryen.js/push-pop.js.txt @@ -1,6 +1,6 @@ (module - (type $v (func)) - (func $func (; 0 ;) (type $v) + (type $none_=>_none (func)) + (func $func (; 0 ;) (push (i32.pop) ) diff --git a/test/binaryen.js/reloc.js b/test/binaryen.js/reloc.js index 68c29228d..9666d17fd 100644 --- a/test/binaryen.js/reloc.js +++ b/test/binaryen.js/reloc.js @@ -16,8 +16,7 @@ module.setMemory(1, -1, null, [ // table with offset -var signature = module.addFunctionType("v", Binaryen.none, []); -var func = module.addFunction("func", signature, [], module.nop()); +var func = module.addFunction("func", Binaryen.none, Binaryen.none, [], module.nop()); module.addGlobalImport("table_base", "env", "table_base", Binaryen.i32, false); module.setFunctionTable(1, -1, [ "func", "func" ], module.global.get("table_base", Binaryen.i32)); diff --git a/test/binaryen.js/reloc.js.txt b/test/binaryen.js/reloc.js.txt index 901499f98..aa7bfc66e 100644 --- a/test/binaryen.js/reloc.js.txt +++ b/test/binaryen.js/reloc.js.txt @@ -1,12 +1,12 @@ (module - (type $v (func)) + (type $none_=>_none (func)) (import "env" "memory_base" (global $memory_base i32)) (import "env" "table_base" (global $table_base i32)) (memory $0 1) (data (global.get $memory_base) "data data") (table $0 1 funcref) (elem (global.get $table_base) $func $func) - (func $func (; 0 ;) (type $v) + (func $func (; 0 ;) (nop) ) ) diff --git a/test/binaryen.js/sieve.js b/test/binaryen.js/sieve.js index 41dd0ddd3..b2c278cbd 100644 --- a/test/binaryen.js/sieve.js +++ b/test/binaryen.js/sieve.js @@ -4,9 +4,6 @@ var module = new Binaryen.Module(); // Set a memory of initially one page, maximum 100 pages module.setMemory(1, 100); -// Create a function type for i32 (i32) (i.e., return i32, get an i32 param) -var ii = module.addFunctionType('i', Binaryen.i32, [Binaryen.i32]); - var body = module.block( null, [ @@ -59,7 +56,7 @@ var body = module.block( // Create the add function // Note: no additional local variables (that's the []) -module.addFunction('sieve', ii, [Binaryen.i32], body); +module.addFunction('sieve', Binaryen.i32, Binaryen.i32, [Binaryen.i32], body); // Export the function, so we can call it later (for simplicity we // export it as the same name as it has internally) @@ -76,4 +73,3 @@ module.optimize(); // Print out the optimized module's text console.log('optimized:\n\n' + module.emitText()); - diff --git a/test/binaryen.js/sieve.js.txt b/test/binaryen.js/sieve.js.txt index 888b6b06d..04650a35a 100644 --- a/test/binaryen.js/sieve.js.txt +++ b/test/binaryen.js/sieve.js.txt @@ -1,8 +1,8 @@ (module - (type $i (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 1 100) (export "sieve" (func $sieve)) - (func $sieve (; 0 ;) (type $i) (param $0 i32) (result i32) + (func $sieve (; 0 ;) (param $0 i32) (result i32) (local $1 i32) (if (i32.lt_u @@ -57,10 +57,10 @@ optimized: (module - (type $i (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 1 100) (export "sieve" (func $sieve)) - (func $sieve (; 0 ;) (; has Stack IR ;) (type $i) (param $0 i32) (result i32) + (func $sieve (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32) (local $1 i32) (if (i32.lt_u diff --git a/test/binaryen.js/sourcemap.js b/test/binaryen.js/sourcemap.js index f3eb7229d..04f188e23 100644 --- a/test/binaryen.js/sourcemap.js +++ b/test/binaryen.js/sourcemap.js @@ -4,8 +4,6 @@ function assert(x) { var module = new Binaryen.Module(); -var signature = module.addFunctionType("i", Binaryen.i32, []); - var fileIndex = module.addDebugInfoFileName("module.c"); console.log(module.getDebugInfoFileName(fileIndex)); @@ -16,7 +14,7 @@ var body = module.block("", [ expr ], Binaryen.i32); -var func = module.addFunction("main", signature, [], body); +var func = module.addFunction("main", Binaryen.none, Binaryen.i32, [], body); module.setDebugLocation(func, expr, fileIndex, 1, 2); module.setDebugLocation(func, body, fileIndex, 0, 3); diff --git a/test/binaryen.js/stackir.js.txt b/test/binaryen.js/stackir.js.txt index b4658b536..0dcd7cf0a 100644 --- a/test/binaryen.js/stackir.js.txt +++ b/test/binaryen.js/stackir.js.txt @@ -18,10 +18,10 @@ === default === (module - (type $i (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (export "test" (func $test)) - (func $test (; 0 ;) (type $i) (param $0 i32) (result i32) + (func $test (; 0 ;) (param $0 i32) (result i32) block $block0 (result i32) local.get $0 if (result i32) @@ -35,10 +35,10 @@ === optimize === (module - (type $i (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (export "test" (func $test)) - (func $test (; 0 ;) (type $i) (param $0 i32) (result i32) + (func $test (; 0 ;) (param $0 i32) (result i32) local.get $0 if (result i32) local.get $0 diff --git a/test/binaryen.js/validation_errors.js b/test/binaryen.js/validation_errors.js index e2ee01adb..16bc6f433 100644 --- a/test/binaryen.js/validation_errors.js +++ b/test/binaryen.js/validation_errors.js @@ -1,7 +1,6 @@ (function() { var mod = new Binaryen.Module(); - var funcType = mod.addFunctionType("v", Binaryen.void, []); - var func = mod.addFunction("test", funcType, [], + var func = mod.addFunction("test", Binaryen.none, Binaryen.none, [], mod.block("", [ mod.drop( mod.global.get("missing", Binaryen.i32) @@ -14,8 +13,7 @@ (function() { var mod = new Binaryen.Module(); - var funcType = mod.addFunctionType("v", Binaryen.void, []); - var func = mod.addFunction("test", funcType, [], + var func = mod.addFunction("test", Binaryen.none, Binaryen.none, [], mod.block("", [ mod.drop( mod.local.get(0, Binaryen.i32) @@ -25,4 +23,3 @@ mod.addFunctionExport("test", "test", func); console.log(mod.validate()) })(); - diff --git a/test/binaryen.js/validation_errors.js.txt b/test/binaryen.js/validation_errors.js.txt index 42533ee18..19b772e98 100644 --- a/test/binaryen.js/validation_errors.js.txt +++ b/test/binaryen.js/validation_errors.js.txt @@ -3,6 +3,4 @@ 0 [wasm-validator error in function test] unexpected false: local.get index must be small enough, on [i32] (local.get $0) -[wasm-validator error in function test] unexpected false: local.get must have proper type, on -[i32] (local.get $0) 0 diff --git a/test/br_to_exit.wasm.fromBinary b/test/br_to_exit.wasm.fromBinary index fa58c1969..413eed780 100644 --- a/test/br_to_exit.wasm.fromBinary +++ b/test/br_to_exit.wasm.fromBinary @@ -1,6 +1,6 @@ (module - (type $0 (func)) - (func $0 (; 0 ;) (type $0) + (type $none_=>_none (func)) + (func $0 (; 0 ;) (block $label$0 (br $label$0) ) diff --git a/test/break-to-return.wasm.fromBinary b/test/break-to-return.wasm.fromBinary index 439a0363a..d769effaf 100644 --- a/test/break-to-return.wasm.fromBinary +++ b/test/break-to-return.wasm.fromBinary @@ -1,8 +1,8 @@ (module - (type $0 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 256 256) (export "add" (func $0)) - (func $0 (; 0 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $0 (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (block $label$0 (result i32) (br $label$0 (i32.add diff --git a/test/bulk-memory.wast.from-wast b/test/bulk-memory.wast.from-wast index 960ac65e4..0f9e34b4d 100644 --- a/test/bulk-memory.wast.from-wast +++ b/test/bulk-memory.wast.from-wast @@ -1,25 +1,25 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 1024 1024) (data (i32.const 0) "hello, world") - (func $memory.init (; 0 ;) (type $FUNCSIG$v) + (func $memory.init (; 0 ;) (memory.init 0 (i32.const 512) (i32.const 0) (i32.const 12) ) ) - (func $data.drop (; 1 ;) (type $FUNCSIG$v) + (func $data.drop (; 1 ;) (data.drop 0) ) - (func $memory.copy (; 2 ;) (type $FUNCSIG$v) + (func $memory.copy (; 2 ;) (memory.copy (i32.const 512) (i32.const 0) (i32.const 12) ) ) - (func $memory.fill (; 3 ;) (type $FUNCSIG$v) + (func $memory.fill (; 3 ;) (memory.fill (i32.const 0) (i32.const 42) diff --git a/test/bulk-memory.wast.fromBinary b/test/bulk-memory.wast.fromBinary index 0659c0184..f1c3bc0ef 100644 --- a/test/bulk-memory.wast.fromBinary +++ b/test/bulk-memory.wast.fromBinary @@ -1,25 +1,25 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 1024 1024) (data (i32.const 0) "hello, world") - (func $memory.init (; 0 ;) (type $0) + (func $memory.init (; 0 ;) (memory.init 0 (i32.const 512) (i32.const 0) (i32.const 12) ) ) - (func $data.drop (; 1 ;) (type $0) + (func $data.drop (; 1 ;) (data.drop 0) ) - (func $memory.copy (; 2 ;) (type $0) + (func $memory.copy (; 2 ;) (memory.copy (i32.const 512) (i32.const 0) (i32.const 12) ) ) - (func $memory.fill (; 3 ;) (type $0) + (func $memory.fill (; 3 ;) (memory.fill (i32.const 0) (i32.const 42) diff --git a/test/bulk-memory.wast.fromBinary.noDebugInfo b/test/bulk-memory.wast.fromBinary.noDebugInfo index 69d8db333..94be984c1 100644 --- a/test/bulk-memory.wast.fromBinary.noDebugInfo +++ b/test/bulk-memory.wast.fromBinary.noDebugInfo @@ -1,25 +1,25 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 1024 1024) (data (i32.const 0) "hello, world") - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (memory.init 0 (i32.const 512) (i32.const 0) (i32.const 12) ) ) - (func $1 (; 1 ;) (type $0) + (func $1 (; 1 ;) (data.drop 0) ) - (func $2 (; 2 ;) (type $0) + (func $2 (; 2 ;) (memory.copy (i32.const 512) (i32.const 0) (i32.const 12) ) ) - (func $3 (; 3 ;) (type $0) + (func $3 (; 3 ;) (memory.fill (i32.const 0) (i32.const 42) diff --git a/test/complexBinaryNames.wasm.fromBinary b/test/complexBinaryNames.wasm.fromBinary index e50a9134d..48234983a 100644 --- a/test/complexBinaryNames.wasm.fromBinary +++ b/test/complexBinaryNames.wasm.fromBinary @@ -1,10 +1,10 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (export "$zoo (.bar)" (func $1)) - (func $foo\20\28.bar\29 (; 0 ;) (type $0) + (func $foo\20\28.bar\29 (; 0 ;) (nop) ) - (func $1 (; 1 ;) (type $0) + (func $1 (; 1 ;) (call $foo\20\28.bar\29) ) ) diff --git a/test/complexTextNames.wast.from-wast b/test/complexTextNames.wast.from-wast index d045fd406..eba5bc117 100644 --- a/test/complexTextNames.wast.from-wast +++ b/test/complexTextNames.wast.from-wast @@ -1,10 +1,10 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (export "$zoo (.bar)" (func $1)) - (func $foo\20\28.bar\29 (; 0 ;) (type $FUNCSIG$v) + (func $foo\20\28.bar\29 (; 0 ;) (nop) ) - (func $1 (; 1 ;) (type $FUNCSIG$v) + (func $1 (; 1 ;) (call $foo\20\28.bar\29) ) ) diff --git a/test/complexTextNames.wast.fromBinary b/test/complexTextNames.wast.fromBinary index e50a9134d..48234983a 100644 --- a/test/complexTextNames.wast.fromBinary +++ b/test/complexTextNames.wast.fromBinary @@ -1,10 +1,10 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (export "$zoo (.bar)" (func $1)) - (func $foo\20\28.bar\29 (; 0 ;) (type $0) + (func $foo\20\28.bar\29 (; 0 ;) (nop) ) - (func $1 (; 1 ;) (type $0) + (func $1 (; 1 ;) (call $foo\20\28.bar\29) ) ) diff --git a/test/complexTextNames.wast.fromBinary.noDebugInfo b/test/complexTextNames.wast.fromBinary.noDebugInfo index ad2a43c34..6865b99df 100644 --- a/test/complexTextNames.wast.fromBinary.noDebugInfo +++ b/test/complexTextNames.wast.fromBinary.noDebugInfo @@ -1,10 +1,10 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (export "$zoo (.bar)" (func $1)) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (nop) ) - (func $1 (; 1 ;) (type $0) + (func $1 (; 1 ;) (call $0) ) ) diff --git a/test/consume-stacky.wasm.fromBinary b/test/consume-stacky.wasm.fromBinary index e08a47b6f..f27dce1be 100644 --- a/test/consume-stacky.wasm.fromBinary +++ b/test/consume-stacky.wasm.fromBinary @@ -1,7 +1,7 @@ (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 1 1) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (local $0 i32) (local.set $0 (i32.const 1) diff --git a/test/ctor-eval/bad-indirect-call.wast.out b/test/ctor-eval/bad-indirect-call.wast.out index cb9d74286..166ee4be5 100644 --- a/test/ctor-eval/bad-indirect-call.wast.out +++ b/test/ctor-eval/bad-indirect-call.wast.out @@ -1,12 +1,12 @@ (module - (type $v (func)) + (type $none_=>_none (func)) (memory $0 256 256) (data (i32.const 10) "waka waka waka waka waka") (table $0 1 1 funcref) (elem (i32.const 0) $call-indirect) (export "test1" (func $test1)) - (func $test1 (; 0 ;) (type $v) - (call_indirect (type $v) + (func $test1 (; 0 ;) + (call_indirect (type $none_=>_none) (i32.const 1) ) (i32.store8 @@ -14,7 +14,7 @@ (i32.const 120) ) ) - (func $call-indirect (; 1 ;) (type $v) + (func $call-indirect (; 1 ;) (i32.store8 (i32.const 40) (i32.const 67) diff --git a/test/ctor-eval/bad-indirect-call2.wast.out b/test/ctor-eval/bad-indirect-call2.wast.out index 61ef71afb..11681426e 100644 --- a/test/ctor-eval/bad-indirect-call2.wast.out +++ b/test/ctor-eval/bad-indirect-call2.wast.out @@ -1,13 +1,13 @@ (module - (type $v (func)) + (type $none_=>_none (func)) (import "env" "_abort" (func $_abort)) (memory $0 256 256) (data (i32.const 10) "waka waka waka waka waka") (table $0 2 2 funcref) (elem (i32.const 0) $_abort $call-indirect) (export "test1" (func $test1)) - (func $test1 (; 1 ;) (type $v) - (call_indirect (type $v) + (func $test1 (; 1 ;) + (call_indirect (type $none_=>_none) (i32.const 0) ) (i32.store8 @@ -15,7 +15,7 @@ (i32.const 120) ) ) - (func $call-indirect (; 2 ;) (type $v) + (func $call-indirect (; 2 ;) (i32.store8 (i32.const 40) (i32.const 67) diff --git a/test/ctor-eval/basics-flatten.wast.out b/test/ctor-eval/basics-flatten.wast.out index 4273c256a..1cc62e4d6 100644 --- a/test/ctor-eval/basics-flatten.wast.out +++ b/test/ctor-eval/basics-flatten.wast.out @@ -1,8 +1,8 @@ (module - (type $v (func)) + (type $none_=>_none (func)) (memory $0 256 256) (data (i32.const 10) "nas\00\00\00aka\00yzkx waka wakm\00\00\00\00\00\00C") - (func $call-indirect (; 0 ;) (type $v) + (func $call-indirect (; 0 ;) (i32.store8 (i32.const 40) (i32.const 67) diff --git a/test/ctor-eval/basics.wast.out b/test/ctor-eval/basics.wast.out index 185e556ec..7c2cc96eb 100644 --- a/test/ctor-eval/basics.wast.out +++ b/test/ctor-eval/basics.wast.out @@ -1,8 +1,8 @@ (module - (type $v (func)) + (type $none_=>_none (func)) (memory $0 256 256) (data (i32.const 10) "nas\00\00\00aka yzkx waka wakm\00\00\00\00\00\00C") - (func $call-indirect (; 0 ;) (type $v) + (func $call-indirect (; 0 ;) (i32.store8 (i32.const 40) (i32.const 67) diff --git a/test/ctor-eval/imported2.wast.out b/test/ctor-eval/imported2.wast.out index b0788065e..db23a2b2e 100644 --- a/test/ctor-eval/imported2.wast.out +++ b/test/ctor-eval/imported2.wast.out @@ -1,11 +1,11 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 256 256) (data (i32.const 10) "wasa waka waka waka waka") (global $mine (mut i32) (i32.const 1)) (export "test2" (func $test2)) (export "test3" (func $test3)) - (func $test2 (; 0 ;) (type $FUNCSIG$v) + (func $test2 (; 0 ;) (global.set $mine (i32.const 2) ) @@ -14,7 +14,7 @@ (i32.const 115) ) ) - (func $test3 (; 1 ;) (type $FUNCSIG$v) + (func $test3 (; 1 ;) (i32.store8 (i32.const 14) (i32.const 115) diff --git a/test/ctor-eval/imported3.wast.out b/test/ctor-eval/imported3.wast.out index 47ab523c1..9fe2f2615 100644 --- a/test/ctor-eval/imported3.wast.out +++ b/test/ctor-eval/imported3.wast.out @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 256 256) (data (i32.const 10) "waka waka waka waka waka") (export "test1" (func $test1)) - (func $test1 (; 0 ;) (type $FUNCSIG$v) + (func $test1 (; 0 ;) (i32.store8 (i32.const 13) (i32.const 115) diff --git a/test/ctor-eval/indirect-call3.wast.out b/test/ctor-eval/indirect-call3.wast.out index 370e73b42..7161f0a7f 100644 --- a/test/ctor-eval/indirect-call3.wast.out +++ b/test/ctor-eval/indirect-call3.wast.out @@ -1,10 +1,10 @@ (module - (type $v (func)) + (type $none_=>_none (func)) (import "env" "tableBase" (global $tableBase i32)) (import "env" "_abort" (func $_abort)) (memory $0 256 256) (data (i32.const 10) "waka waka xaka waka waka\00\00\00\00\00\00C") - (func $call-indirect (; 1 ;) (type $v) + (func $call-indirect (; 1 ;) (i32.store8 (i32.const 40) (i32.const 67) diff --git a/test/ctor-eval/just_some.wast.out b/test/ctor-eval/just_some.wast.out index d61eb9548..fc3c3325a 100644 --- a/test/ctor-eval/just_some.wast.out +++ b/test/ctor-eval/just_some.wast.out @@ -1,13 +1,13 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 256 256) (data (i32.const 10) "wasa waka waka waka waka") (export "test2" (func $test2)) (export "test3" (func $test3)) - (func $test2 (; 0 ;) (type $FUNCSIG$v) + (func $test2 (; 0 ;) (unreachable) ) - (func $test3 (; 1 ;) (type $FUNCSIG$v) + (func $test3 (; 1 ;) (i32.store8 (i32.const 13) (i32.const 113) diff --git a/test/ctor-eval/no_partial.wast.out b/test/ctor-eval/no_partial.wast.out index ad8006a7c..6ce4272ba 100644 --- a/test/ctor-eval/no_partial.wast.out +++ b/test/ctor-eval/no_partial.wast.out @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 256 256) (data (i32.const 10) "waka waka waka waka waka") (export "test1" (func $test1)) - (func $test1 (; 0 ;) (type $FUNCSIG$v) + (func $test1 (; 0 ;) (i32.store8 (i32.const 12) (i32.const 115) diff --git a/test/ctor-eval/unsafe_call.wast.out b/test/ctor-eval/unsafe_call.wast.out index eec593fb9..a06698a12 100644 --- a/test/ctor-eval/unsafe_call.wast.out +++ b/test/ctor-eval/unsafe_call.wast.out @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 256 256) (data (i32.const 10) "waka waka waka waka waka") (export "test1" (func $test1)) - (func $test1 (; 0 ;) (type $FUNCSIG$v) + (func $test1 (; 0 ;) (call $unsafe-to-call) (i32.store (i32.const 12) @@ -18,7 +18,7 @@ (i32.const 120) ) ) - (func $unsafe-to-call (; 1 ;) (type $FUNCSIG$v) + (func $unsafe-to-call (; 1 ;) (unreachable) ) ) diff --git a/test/debugInfo.fromasm b/test/debugInfo.fromasm index ae555542a..916e2fa8e 100644 --- a/test/debugInfo.fromasm +++ b/test/debugInfo.fromasm @@ -1,4 +1,7 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "debugInfo.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/debugInfo.fromasm.clamp b/test/debugInfo.fromasm.clamp index ae555542a..916e2fa8e 100644 --- a/test/debugInfo.fromasm.clamp +++ b/test/debugInfo.fromasm.clamp @@ -1,4 +1,7 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "debugInfo.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/debugInfo.fromasm.clamp.no-opts b/test/debugInfo.fromasm.clamp.no-opts index 29525fb89..c1f9c4deb 100644 --- a/test/debugInfo.fromasm.clamp.no-opts +++ b/test/debugInfo.fromasm.clamp.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/debugInfo.fromasm.imprecise b/test/debugInfo.fromasm.imprecise index 3ceab1574..837148a7a 100644 --- a/test/debugInfo.fromasm.imprecise +++ b/test/debugInfo.fromasm.imprecise @@ -1,4 +1,7 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) (export "add" (func $add)) (export "ret" (func $ret)) (export "opts" (func $opts)) diff --git a/test/debugInfo.fromasm.imprecise.no-opts b/test/debugInfo.fromasm.imprecise.no-opts index b4c1b517e..eb705361f 100644 --- a/test/debugInfo.fromasm.imprecise.no-opts +++ b/test/debugInfo.fromasm.imprecise.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/debugInfo.fromasm.no-opts b/test/debugInfo.fromasm.no-opts index 29525fb89..c1f9c4deb 100644 --- a/test/debugInfo.fromasm.no-opts +++ b/test/debugInfo.fromasm.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/debugInfo.fromasm.read-written b/test/debugInfo.fromasm.read-written index 3459a2cf8..b66e45ac4 100644 --- a/test/debugInfo.fromasm.read-written +++ b/test/debugInfo.fromasm.read-written @@ -1,7 +1,7 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func (param i32 i32) (result i32))) - (type $2 (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) (import "env" "memory" (memory $1 256 256)) (data (global.get $gimport$0) "debugInfo.asm.js") (import "env" "__memory_base" (global $gimport$0 i32)) @@ -12,14 +12,14 @@ (export "switch_reach" (func $switch_reach)) (export "nofile" (func $nofile)) (export "inlineInto" (func $inlineInto)) - (func $add (; 0 ;) (type $1) (param $0 i32) (param $1 i32) (result i32) + (func $add (; 0 ;) (param $0 i32) (param $1 i32) (result i32) ;;@ tests/other_file.cpp:314159:0 (i32.add (local.get $1) (local.get $1) ) ) - (func $ret (; 1 ;) (type $0) (param $0 i32) (result i32) + (func $ret (; 1 ;) (param $0 i32) (result i32) ;;@ return.cpp:50:0 (local.set $0 (i32.shl @@ -33,7 +33,7 @@ (i32.const 1) ) ) - (func $opts (; 2 ;) (type $1) (param $0 i32) (param $1 i32) (result i32) + (func $opts (; 2 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) ;;@ even-opted.cpp:3:0 (i32.add @@ -64,7 +64,7 @@ (local.get $0) ) ) - (func $fib (; 3 ;) (type $0) (param $0 i32) (result i32) + (func $fib (; 3 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -123,7 +123,7 @@ ;;@ fib.c:8:0 (local.get $4) ) - (func $switch_reach (; 4 ;) (type $0) (param $0 i32) (result i32) + (func $switch_reach (; 4 ;) (param $0 i32) (result i32) (local $1 i32) (local.set $1 (block $label$1 (result i32) @@ -172,11 +172,11 @@ ;;@ /tmp/emscripten_test_binaryen2_28hnAe/src.c:59950:0 (local.get $1) ) - (func $nofile (; 5 ;) (type $2) + (func $nofile (; 5 ;) ;;@ (unknown):1337:0 (call $nofile) ) - (func $inlineInto (; 6 ;) (type $1) (param $0 i32) (param $1 i32) (result i32) + (func $inlineInto (; 6 ;) (param $0 i32) (param $1 i32) (result i32) ;;@ inline_me.c:120:0 (i32.add (local.tee $0 diff --git a/test/duplicate_types.wast.from-wast b/test/duplicate_types.wast.from-wast index a47730b16..4d93e70f9 100644 --- a/test/duplicate_types.wast.from-wast +++ b/test/duplicate_types.wast.from-wast @@ -1,17 +1,10 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$v_ (func)) - (type $FUNCSIG$v__ (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $0 (func (param i32))) - (type $FUNCSIG$vi_ (func (param i32))) - (type $b (func (param i32) (result f32))) - (type $FUNCSIG$fi (func (param i32) (result f32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (func $f0 (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (func $f0 (; 0 ;) (param $0 i32) (nop) ) - (func $f1 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $f1 (; 1 ;) (param $0 i32) (result i32) (i32.const 0) ) ) diff --git a/test/duplicate_types.wast.fromBinary b/test/duplicate_types.wast.fromBinary index 1b198ac95..22fbb5c34 100644 --- a/test/duplicate_types.wast.fromBinary +++ b/test/duplicate_types.wast.fromBinary @@ -1,10 +1,10 @@ (module - (type $0 (func (param i32))) - (type $1 (func (param i32) (result i32))) - (func $f0 (; 0 ;) (type $0) (param $0 i32) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (func $f0 (; 0 ;) (param $0 i32) (nop) ) - (func $f1 (; 1 ;) (type $1) (param $0 i32) (result i32) + (func $f1 (; 1 ;) (param $0 i32) (result i32) (i32.const 0) ) ) diff --git a/test/duplicate_types.wast.fromBinary.noDebugInfo b/test/duplicate_types.wast.fromBinary.noDebugInfo index 356c96fb0..4676c3b0b 100644 --- a/test/duplicate_types.wast.fromBinary.noDebugInfo +++ b/test/duplicate_types.wast.fromBinary.noDebugInfo @@ -1,10 +1,10 @@ (module - (type $0 (func (param i32))) - (type $1 (func (param i32) (result i32))) - (func $0 (; 0 ;) (type $0) (param $0 i32) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (func $0 (; 0 ;) (param $0 i32) (nop) ) - (func $1 (; 1 ;) (type $1) (param $0 i32) (result i32) + (func $1 (; 1 ;) (param $0 i32) (result i32) (i32.const 0) ) ) diff --git a/test/duplicated_names.wasm.fromBinary b/test/duplicated_names.wasm.fromBinary index 90eedbaa5..3cfed2eb3 100644 --- a/test/duplicated_names.wasm.fromBinary +++ b/test/duplicated_names.wasm.fromBinary @@ -1,12 +1,12 @@ (module - (type $0 (func (result i32))) - (func $foo (; 0 ;) (type $0) (result i32) + (type $none_=>_i32 (func (result i32))) + (func $foo (; 0 ;) (result i32) (i32.const 0) ) - (func $foo.1 (; 1 ;) (type $0) (result i32) + (func $foo.1 (; 1 ;) (result i32) (i32.const 1) ) - (func $foo.2 (; 2 ;) (type $0) (result i32) + (func $foo.2 (; 2 ;) (result i32) (i32.const 2) ) ) diff --git a/test/duplicated_names_collision.wasm.fromBinary b/test/duplicated_names_collision.wasm.fromBinary index a3ab6a1aa..0cb9b1389 100644 --- a/test/duplicated_names_collision.wasm.fromBinary +++ b/test/duplicated_names_collision.wasm.fromBinary @@ -1,12 +1,12 @@ (module - (type $0 (func (result i32))) - (func $foo (; 0 ;) (type $0) (result i32) + (type $none_=>_i32 (func (result i32))) + (func $foo (; 0 ;) (result i32) (i32.const 0) ) - (func $foo.1 (; 1 ;) (type $0) (result i32) + (func $foo.1 (; 1 ;) (result i32) (i32.const 1) ) - (func $foo.1.1 (; 2 ;) (type $0) (result i32) + (func $foo.1.1 (; 2 ;) (result i32) (i32.const 2) ) ) diff --git a/test/dylib.wasm.fromBinary b/test/dylib.wasm.fromBinary index 00441ea30..45d64fb67 100644 --- a/test/dylib.wasm.fromBinary +++ b/test/dylib.wasm.fromBinary @@ -1,7 +1,7 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func (result i32))) - (type $2 (func)) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $2 256)) (data (global.get $gimport$0) "hello, world!") (import "env" "table" (table $timport$3 0 funcref)) @@ -15,7 +15,7 @@ (export "_main" (func $0)) (export "runPostSets" (func $1)) (export "_str" (global $global$2)) - (func $0 (; 1 ;) (type $1) (result i32) + (func $0 (; 1 ;) (result i32) (block $label$1 (result i32) (drop (call $fimport$1 @@ -25,10 +25,10 @@ (i32.const 0) ) ) - (func $1 (; 2 ;) (type $2) + (func $1 (; 2 ;) (nop) ) - (func $2 (; 3 ;) (type $2) + (func $2 (; 3 ;) (block $label$1 (global.set $global$0 (i32.add diff --git a/test/dynamicLibrary.fromasm b/test/dynamicLibrary.fromasm index b5238fcab..8c2cbe319 100644 --- a/test/dynamicLibrary.fromasm +++ b/test/dynamicLibrary.fromasm @@ -1,6 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "dynamicLibrary.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/dynamicLibrary.fromasm.clamp b/test/dynamicLibrary.fromasm.clamp index b5238fcab..8c2cbe319 100644 --- a/test/dynamicLibrary.fromasm.clamp +++ b/test/dynamicLibrary.fromasm.clamp @@ -1,6 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "dynamicLibrary.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/dynamicLibrary.fromasm.clamp.no-opts b/test/dynamicLibrary.fromasm.clamp.no-opts index 48f6d8219..a1fcd0b3b 100644 --- a/test/dynamicLibrary.fromasm.clamp.no-opts +++ b/test/dynamicLibrary.fromasm.clamp.no-opts @@ -1,6 +1,9 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/dynamicLibrary.fromasm.imprecise b/test/dynamicLibrary.fromasm.imprecise index 146ff741b..da6cafc3d 100644 --- a/test/dynamicLibrary.fromasm.imprecise +++ b/test/dynamicLibrary.fromasm.imprecise @@ -1,6 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memoryBase" (global $memoryBase$asm2wasm$import i32)) (import "env" "abortStackOverflow" (func $abortStackOverflow (param i32))) (import "env" "_puts" (func $_puts (param i32) (result i32))) diff --git a/test/dynamicLibrary.fromasm.imprecise.no-opts b/test/dynamicLibrary.fromasm.imprecise.no-opts index 48f6d8219..a1fcd0b3b 100644 --- a/test/dynamicLibrary.fromasm.imprecise.no-opts +++ b/test/dynamicLibrary.fromasm.imprecise.no-opts @@ -1,6 +1,9 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/dynamicLibrary.fromasm.no-opts b/test/dynamicLibrary.fromasm.no-opts index 48f6d8219..a1fcd0b3b 100644 --- a/test/dynamicLibrary.fromasm.no-opts +++ b/test/dynamicLibrary.fromasm.no-opts @@ -1,6 +1,9 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/elided-br.wasm.fromBinary b/test/elided-br.wasm.fromBinary index c248ded7d..5c5ca2aee 100644 --- a/test/elided-br.wasm.fromBinary +++ b/test/elided-br.wasm.fromBinary @@ -1,6 +1,6 @@ (module - (type $0 (func)) - (func $0 (; 0 ;) (type $0) + (type $none_=>_none (func)) + (func $0 (; 0 ;) (block $label$1 (unreachable) ) diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 0c0c148a1..751eebe6f 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -1,11 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (i32.const 1024) "emcc_O2_hello_world.asm.js") (import "env" "table" (table $table 18 18 funcref)) @@ -7741,7 +7742,7 @@ ) (block (local.set $2 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 672) (local.get $0) @@ -7804,7 +7805,7 @@ ) (br_if $label$break$L5 (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 672) (local.get $2) @@ -8140,7 +8141,7 @@ ) (if (result i32) (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (local.get $4) (i32.const 1) @@ -8184,7 +8185,7 @@ ) (block (result i32) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -8223,7 +8224,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.sub (local.get $1) @@ -8920,7 +8921,7 @@ (local.get $0) ) (func $dynCall_iiii (; 33 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (local.get $2) (local.get $3) @@ -8982,7 +8983,7 @@ ) ) (func $dynCall_ii (; 37 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $1) (i32.and (local.get $0) @@ -9006,7 +9007,7 @@ ) ) (func $dynCall_vi (; 40 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $1) (i32.add (i32.and diff --git a/test/emcc_O2_hello_world.fromasm.clamp b/test/emcc_O2_hello_world.fromasm.clamp index 0c0c148a1..751eebe6f 100644 --- a/test/emcc_O2_hello_world.fromasm.clamp +++ b/test/emcc_O2_hello_world.fromasm.clamp @@ -1,11 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (i32.const 1024) "emcc_O2_hello_world.asm.js") (import "env" "table" (table $table 18 18 funcref)) @@ -7741,7 +7742,7 @@ ) (block (local.set $2 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 672) (local.get $0) @@ -7804,7 +7805,7 @@ ) (br_if $label$break$L5 (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 672) (local.get $2) @@ -8140,7 +8141,7 @@ ) (if (result i32) (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (local.get $4) (i32.const 1) @@ -8184,7 +8185,7 @@ ) (block (result i32) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -8223,7 +8224,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.sub (local.get $1) @@ -8920,7 +8921,7 @@ (local.get $0) ) (func $dynCall_iiii (; 33 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (local.get $2) (local.get $3) @@ -8982,7 +8983,7 @@ ) ) (func $dynCall_ii (; 37 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $1) (i32.and (local.get $0) @@ -9006,7 +9007,7 @@ ) ) (func $dynCall_vi (; 40 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $1) (i32.add (i32.and diff --git a/test/emcc_O2_hello_world.fromasm.clamp.no-opts b/test/emcc_O2_hello_world.fromasm.clamp.no-opts index 5991591ca..e25452c04 100644 --- a/test/emcc_O2_hello_world.fromasm.clamp.no-opts +++ b/test/emcc_O2_hello_world.fromasm.clamp.no-opts @@ -1,11 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 18 18 funcref)) (elem (global.get $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) @@ -9796,7 +9797,7 @@ ) (block (local.set $i8 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i3) (local.get $i1) (local.get $i2) @@ -9885,7 +9886,7 @@ ) (if (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i3) (local.get $i1) (local.get $i15) @@ -10508,7 +10509,7 @@ ) (if (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i1) (local.get $i4) (i32.const 1) @@ -10578,7 +10579,7 @@ ) (block (result i32) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i1) (i32.const 0) (i32.const 0) @@ -10637,7 +10638,7 @@ (local.get $i8) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i1) (i32.sub (local.get $i6) @@ -11738,7 +11739,7 @@ ) (func $dynCall_iiii (; 36 ;) (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (result i32) (return - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i2) (local.get $i3) (local.get $i4) @@ -11832,7 +11833,7 @@ ) (func $dynCall_ii (; 41 ;) (param $i1 i32) (param $i2 i32) (result i32) (return - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $i2) (i32.add (i32.and @@ -11869,7 +11870,7 @@ ) ) (func $dynCall_vi (; 44 ;) (param $i1 i32) (param $i2 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $i2) (i32.add (i32.and diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 9439cf363..bcec604b9 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -1,11 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 18 18 funcref)) (elem (global.get $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) @@ -7738,7 +7739,7 @@ ) (block (local.set $2 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 672) (local.get $0) @@ -7801,7 +7802,7 @@ ) (br_if $label$break$L5 (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 672) (local.get $2) @@ -8132,7 +8133,7 @@ ) (if (result i32) (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (local.get $4) (i32.const 1) @@ -8176,7 +8177,7 @@ ) (block (result i32) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -8215,7 +8216,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.sub (local.get $1) @@ -8898,7 +8899,7 @@ (local.get $0) ) (func $dynCall_iiii (; 32 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (local.get $2) (local.get $3) @@ -8960,7 +8961,7 @@ ) ) (func $dynCall_ii (; 36 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $1) (i32.and (local.get $0) @@ -8980,7 +8981,7 @@ ) ) (func $dynCall_vi (; 39 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $1) (i32.add (i32.and diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index e5ed66424..74d11dd8a 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -1,11 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 18 18 funcref)) (elem (global.get $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) @@ -9796,7 +9797,7 @@ ) (block (local.set $i8 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i3) (local.get $i1) (local.get $i2) @@ -9885,7 +9886,7 @@ ) (if (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i3) (local.get $i1) (local.get $i15) @@ -10508,7 +10509,7 @@ ) (if (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i1) (local.get $i4) (i32.const 1) @@ -10578,7 +10579,7 @@ ) (block (result i32) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i1) (i32.const 0) (i32.const 0) @@ -10637,7 +10638,7 @@ (local.get $i8) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i1) (i32.sub (local.get $i6) @@ -11726,7 +11727,7 @@ ) (func $dynCall_iiii (; 35 ;) (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (result i32) (return - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i2) (local.get $i3) (local.get $i4) @@ -11820,7 +11821,7 @@ ) (func $dynCall_ii (; 40 ;) (param $i1 i32) (param $i2 i32) (result i32) (return - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $i2) (i32.add (i32.and @@ -11857,7 +11858,7 @@ ) ) (func $dynCall_vi (; 43 ;) (param $i1 i32) (param $i2 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $i2) (i32.add (i32.and diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 5991591ca..e25452c04 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -1,11 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 18 18 funcref)) (elem (global.get $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) @@ -9796,7 +9797,7 @@ ) (block (local.set $i8 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i3) (local.get $i1) (local.get $i2) @@ -9885,7 +9886,7 @@ ) (if (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i3) (local.get $i1) (local.get $i15) @@ -10508,7 +10509,7 @@ ) (if (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i1) (local.get $i4) (i32.const 1) @@ -10578,7 +10579,7 @@ ) (block (result i32) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i1) (i32.const 0) (i32.const 0) @@ -10637,7 +10638,7 @@ (local.get $i8) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i1) (i32.sub (local.get $i6) @@ -11738,7 +11739,7 @@ ) (func $dynCall_iiii (; 36 ;) (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (result i32) (return - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $i2) (local.get $i3) (local.get $i4) @@ -11832,7 +11833,7 @@ ) (func $dynCall_ii (; 41 ;) (param $i1 i32) (param $i2 i32) (result i32) (return - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $i2) (i32.add (i32.and @@ -11869,7 +11870,7 @@ ) ) (func $dynCall_vi (; 44 ;) (param $i1 i32) (param $i2 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $i2) (i32.add (i32.and diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 002fdbd94..e860032f9 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -1,12 +1,17 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (import "env" "memory" (memory $memory 256 256)) (data (i32.const 1024) "emcc_hello_world.asm.js") (import "env" "table" (table $table 18 18 funcref)) @@ -1135,7 +1140,7 @@ (local.get $2) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -1243,7 +1248,7 @@ ) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $2) (local.get $0) (local.get $1) @@ -1307,7 +1312,7 @@ ) (br_if $label$break$L5 (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $2) (local.get $0) (local.get $3) @@ -1851,7 +1856,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -1893,7 +1898,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.sub (local.get $1) @@ -14921,7 +14926,7 @@ ) ) (func $dynCall_ii (; 64 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $1) (i32.and (local.get $0) @@ -14930,7 +14935,7 @@ ) ) (func $dynCall_iiii (; 65 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (local.get $2) (local.get $3) @@ -14944,7 +14949,7 @@ ) ) (func $dynCall_vi (; 66 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $1) (i32.add (i32.and diff --git a/test/emcc_hello_world.fromasm.clamp b/test/emcc_hello_world.fromasm.clamp index 3f39e80f0..a5be9dceb 100644 --- a/test/emcc_hello_world.fromasm.clamp +++ b/test/emcc_hello_world.fromasm.clamp @@ -1,11 +1,17 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (import "env" "memory" (memory $memory 256 256)) (data (i32.const 1024) "emcc_hello_world.asm.js") (import "env" "table" (table $table 18 18 funcref)) @@ -1133,7 +1139,7 @@ (local.get $2) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -1241,7 +1247,7 @@ ) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $2) (local.get $0) (local.get $1) @@ -1305,7 +1311,7 @@ ) (br_if $label$break$L5 (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $2) (local.get $0) (local.get $3) @@ -1849,7 +1855,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -1891,7 +1897,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.sub (local.get $1) @@ -14971,7 +14977,7 @@ ) ) (func $dynCall_ii (; 65 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $1) (i32.and (local.get $0) @@ -14980,7 +14986,7 @@ ) ) (func $dynCall_iiii (; 66 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (local.get $2) (local.get $3) @@ -14994,7 +15000,7 @@ ) ) (func $dynCall_vi (; 67 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $1) (i32.add (i32.and diff --git a/test/emcc_hello_world.fromasm.clamp.no-opts b/test/emcc_hello_world.fromasm.clamp.no-opts index 74d6e4dea..46b4b2719 100644 --- a/test/emcc_hello_world.fromasm.clamp.no-opts +++ b/test/emcc_hello_world.fromasm.clamp.no-opts @@ -1,11 +1,17 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 18 18 funcref)) (elem (global.get $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) @@ -2549,7 +2555,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (i32.const 0) (i32.const 0) @@ -2839,7 +2845,7 @@ ) ) (local.set $$call4 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$s) (local.get $$l) @@ -2970,7 +2976,7 @@ ) ) (local.set $$call16 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$s) (local.get $$i$0$lcssa36) @@ -4449,7 +4455,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (i32.const 0) (i32.const 0) @@ -4548,7 +4554,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$sub$ptr$sub) (i32.const 1) @@ -31615,7 +31621,7 @@ ) (func $dynCall_ii (; 76 ;) (param $index i32) (param $a1 i32) (result i32) (return - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $a1) (i32.add (i32.and @@ -31629,7 +31635,7 @@ ) (func $dynCall_iiii (; 77 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (result i32) (return - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a1) (local.get $a2) (local.get $a3) @@ -31644,7 +31650,7 @@ ) ) (func $dynCall_vi (; 78 ;) (param $index i32) (param $a1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $a1) (i32.add (i32.and diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index b3e2c99c7..b0a91c49e 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -1,11 +1,16 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 18 18 funcref)) (elem (global.get $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) @@ -1122,7 +1127,7 @@ (local.get $2) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -1225,7 +1230,7 @@ ) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $2) (local.get $0) (local.get $1) @@ -1289,7 +1294,7 @@ ) (br_if $label$break$L5 (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $2) (local.get $0) (local.get $3) @@ -1833,7 +1838,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -1875,7 +1880,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.sub (local.get $1) @@ -14816,7 +14821,7 @@ ) ) (func $dynCall_ii (; 60 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $1) (i32.and (local.get $0) @@ -14825,7 +14830,7 @@ ) ) (func $dynCall_iiii (; 61 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (local.get $2) (local.get $3) @@ -14839,7 +14844,7 @@ ) ) (func $dynCall_vi (; 62 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $1) (i32.add (i32.and diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index 341742f42..1d6097087 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -1,11 +1,16 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 18 18 funcref)) (elem (global.get $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) @@ -2549,7 +2554,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (i32.const 0) (i32.const 0) @@ -2839,7 +2844,7 @@ ) ) (local.set $$call4 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$s) (local.get $$l) @@ -2970,7 +2975,7 @@ ) ) (local.set $$call16 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$s) (local.get $$i$0$lcssa36) @@ -4449,7 +4454,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (i32.const 0) (i32.const 0) @@ -4548,7 +4553,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$sub$ptr$sub) (i32.const 1) @@ -31502,7 +31507,7 @@ ) (func $dynCall_ii (; 70 ;) (param $index i32) (param $a1 i32) (result i32) (return - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $a1) (i32.add (i32.and @@ -31516,7 +31521,7 @@ ) (func $dynCall_iiii (; 71 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (result i32) (return - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a1) (local.get $a2) (local.get $a3) @@ -31531,7 +31536,7 @@ ) ) (func $dynCall_vi (; 72 ;) (param $index i32) (param $a1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $a1) (i32.add (i32.and diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 218f7068a..e8ba408c4 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -1,12 +1,17 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 18 18 funcref)) (elem (global.get $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) @@ -2551,7 +2556,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (i32.const 0) (i32.const 0) @@ -2841,7 +2846,7 @@ ) ) (local.set $$call4 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$s) (local.get $$l) @@ -2972,7 +2977,7 @@ ) ) (local.set $$call16 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$s) (local.get $$i$0$lcssa36) @@ -4451,7 +4456,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (i32.const 0) (i32.const 0) @@ -4550,7 +4555,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$sub$ptr$sub) (i32.const 1) @@ -31565,7 +31570,7 @@ ) (func $dynCall_ii (; 75 ;) (param $index i32) (param $a1 i32) (result i32) (return - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $a1) (i32.add (i32.and @@ -31579,7 +31584,7 @@ ) (func $dynCall_iiii (; 76 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (result i32) (return - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a1) (local.get $a2) (local.get $a3) @@ -31594,7 +31599,7 @@ ) ) (func $dynCall_vi (; 77 ;) (param $index i32) (param $a1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $a1) (i32.add (i32.and diff --git a/test/events.wast.from-wast b/test/events.wast.from-wast index b48c3b46d..a511fe5a4 100644 --- a/test/events.wast.from-wast +++ b/test/events.wast.from-wast @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vif (func (param i32 f32))) - (type $FUNCSIG$v (func)) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) (import "env" "im0" (event $e-import (attr 0) (param i32))) (import "env" "im1" (event $import$event1 (attr 0) (param i32 f32))) (event $2 (attr 0) (param i32)) diff --git a/test/events.wast.fromBinary b/test/events.wast.fromBinary index f1d18fa87..2576ff887 100644 --- a/test/events.wast.fromBinary +++ b/test/events.wast.fromBinary @@ -1,7 +1,7 @@ (module - (type $0 (func (param i32 f32))) - (type $1 (func (param i32))) - (type $2 (func)) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) (import "env" "im0" (event $eimport$0 (attr 0) (param i32))) (import "env" "im1" (event $eimport$1 (attr 0) (param i32 f32))) (event $event$0 (attr 0) (param i32)) diff --git a/test/events.wast.fromBinary.noDebugInfo b/test/events.wast.fromBinary.noDebugInfo index f1d18fa87..2576ff887 100644 --- a/test/events.wast.fromBinary.noDebugInfo +++ b/test/events.wast.fromBinary.noDebugInfo @@ -1,7 +1,7 @@ (module - (type $0 (func (param i32 f32))) - (type $1 (func (param i32))) - (type $2 (func)) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) (import "env" "im0" (event $eimport$0 (attr 0) (param i32))) (import "env" "im1" (event $eimport$1 (attr 0) (param i32 f32))) (event $event$0 (attr 0) (param i32)) diff --git a/test/example/c-api-hello-world.c b/test/example/c-api-hello-world.c index 3b412f67f..550176dc6 100644 --- a/test/example/c-api-hello-world.c +++ b/test/example/c-api-hello-world.c @@ -1,4 +1,3 @@ - #include <binaryen-c.h> // "hello world" type example: create a function that adds two i32s and returns @@ -8,9 +7,9 @@ int main() { BinaryenModuleRef module = BinaryenModuleCreate(); // Create a function type for i32 (i32, i32) - BinaryenType params[2] = {BinaryenTypeInt32(), BinaryenTypeInt32()}; - BinaryenFunctionTypeRef iii = - BinaryenAddFunctionType(module, "iii", BinaryenTypeInt32(), params, 2); + BinaryenType ii[2] = {BinaryenTypeInt32(), BinaryenTypeInt32()}; + BinaryenType params = BinaryenTypeCreate(ii, 2); + BinaryenType results = BinaryenTypeInt32(); // Get the 0 and 1 arguments, and add them BinaryenExpressionRef x = BinaryenLocalGet(module, 0, BinaryenTypeInt32()), @@ -22,7 +21,7 @@ int main() { // Note: no basic blocks here, we are an AST. The function body is just an // expression node. BinaryenFunctionRef adder = - BinaryenAddFunction(module, "adder", iii, NULL, 0, add); + BinaryenAddFunction(module, "adder", params, results, NULL, 0, add); // Print it out BinaryenModulePrint(module); diff --git a/test/example/c-api-hello-world.txt b/test/example/c-api-hello-world.txt index 41cfa559c..21a7c2a16 100644 --- a/test/example/c-api-hello-world.txt +++ b/test/example/c-api-hello-world.txt @@ -1,6 +1,6 @@ (module - (type $iii (func (param i32 i32) (result i32))) - (func $adder (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (func $adder (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (i32.add (local.get $0) (local.get $1) diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index 500188a55..b3419d184 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -260,8 +260,11 @@ void test_core() { BinaryenExpressionRef callOperands4[] = { makeInt32(module, 13), makeInt64(module, 37), makeFloat32(module, 1.3f), makeFloat64(module, 3.7) }; BinaryenExpressionRef callOperands4b[] = { makeInt32(module, 13), makeInt64(module, 37), makeFloat32(module, 1.3f), makeFloat64(module, 3.7) }; - BinaryenType params[4] = { BinaryenTypeInt32(), BinaryenTypeInt64(), BinaryenTypeFloat32(), BinaryenTypeFloat64() }; - BinaryenFunctionTypeRef iiIfF = BinaryenAddFunctionType(module, "iiIfF", BinaryenTypeInt32(), params, 4); + BinaryenType iIfF_[4] = {BinaryenTypeInt32(), + BinaryenTypeInt64(), + BinaryenTypeFloat32(), + BinaryenTypeFloat64()}; + BinaryenType iIfF = BinaryenTypeCreate(iIfF_, 4); BinaryenExpressionRef temp1 = makeInt32(module, 1), temp2 = makeInt32(module, 2), temp3 = makeInt32(module, 3), temp4 = makeInt32(module, 4), temp5 = makeInt32(module, 5), @@ -635,11 +638,14 @@ void test_core() { callOperands2, 2, BinaryenTypeFloat32()))), - BinaryenUnary( - module, - BinaryenEqZInt32(), // check the output type of the call node - BinaryenCallIndirect( - module, makeInt32(module, 2449), callOperands4b, 4, "iiIfF")), + BinaryenUnary(module, + BinaryenEqZInt32(), // check the output type of the call node + BinaryenCallIndirect(module, + makeInt32(module, 2449), + callOperands4b, + 4, + iIfF, + BinaryenTypeInt32())), BinaryenDrop(module, BinaryenLocalGet(module, 0, BinaryenTypeInt32())), BinaryenLocalSet(module, 0, makeInt32(module, 101)), BinaryenDrop(module, BinaryenLocalTee(module, 0, makeInt32(module, 102))), @@ -656,8 +662,12 @@ void test_core() { // Tail call BinaryenReturnCall( module, "kitchen()sinker", callOperands4, 4, BinaryenTypeInt32()), - BinaryenReturnCallIndirect( - module, makeInt32(module, 2449), callOperands4b, 4, "iiIfF"), + BinaryenReturnCallIndirect(module, + makeInt32(module, 2449), + callOperands4b, + 4, + iIfF, + BinaryenTypeInt32()), // Exception handling BinaryenTry(module, tryBody, catchBody), // Atomics @@ -697,8 +707,8 @@ void test_core() { // Create the function BinaryenType localTypes[] = {BinaryenTypeInt32(), BinaryenTypeExnref()}; - BinaryenFunctionRef sinker = - BinaryenAddFunction(module, "kitchen()sinker", iiIfF, localTypes, 2, body); + BinaryenFunctionRef sinker = BinaryenAddFunction( + module, "kitchen()sinker", iIfF, BinaryenTypeInt32(), localTypes, 2, body); // Globals @@ -707,9 +717,10 @@ void test_core() { // Imports - BinaryenType iparams[2] = { BinaryenTypeInt32(), BinaryenTypeFloat64() }; - BinaryenFunctionTypeRef fiF = BinaryenAddFunctionType(module, "fiF", BinaryenTypeFloat32(), iparams, 2); - BinaryenAddFunctionImport(module, "an-imported", "module", "base", fiF); + BinaryenType iF_[2] = {BinaryenTypeInt32(), BinaryenTypeFloat64()}; + BinaryenType iF = BinaryenTypeCreate(iF_, 2); + BinaryenAddFunctionImport( + module, "an-imported", "module", "base", iF, BinaryenTypeFloat32()); // Exports @@ -729,14 +740,15 @@ void test_core() { // Start function. One per module - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", BinaryenTypeNone(), NULL, 0); - BinaryenFunctionRef starter = BinaryenAddFunction(module, "starter", v, NULL, 0, BinaryenNop(module)); + BinaryenFunctionRef starter = BinaryenAddFunction(module, + "starter", + BinaryenTypeNone(), + BinaryenTypeNone(), + NULL, + 0, + BinaryenNop(module)); BinaryenSetStart(module, starter); - // Unnamed function type - - BinaryenFunctionTypeRef noname = BinaryenAddFunctionType(module, NULL, BinaryenTypeNone(), NULL, 0); - // A bunch of our code needs drop(), auto-add it BinaryenModuleAutoDrop(module); @@ -756,11 +768,19 @@ void test_core() { void test_unreachable() { BinaryenModuleRef module = BinaryenModuleCreate(); - BinaryenFunctionTypeRef i = BinaryenAddFunctionType(module, "i", BinaryenTypeInt32(), NULL, 0); - BinaryenFunctionTypeRef I = BinaryenAddFunctionType(module, "I", BinaryenTypeInt64(), NULL, 0); - - BinaryenExpressionRef body = BinaryenCallIndirect(module, BinaryenUnreachable(module), NULL, 0, "I"); - BinaryenFunctionRef fn = BinaryenAddFunction(module, "unreachable-fn", i, NULL, 0, body); + BinaryenExpressionRef body = BinaryenCallIndirect(module, + BinaryenUnreachable(module), + NULL, + 0, + BinaryenTypeNone(), + BinaryenTypeInt64()); + BinaryenFunctionRef fn = BinaryenAddFunction(module, + "unreachable-fn", + BinaryenTypeNone(), + BinaryenTypeInt32(), + NULL, + 0, + body); assert(BinaryenModuleValidate(module)); BinaryenModulePrint(module); @@ -774,20 +794,26 @@ BinaryenExpressionRef makeCallCheck(BinaryenModuleRef module, int x) { void test_relooper() { BinaryenModuleRef module = BinaryenModuleCreate(); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", BinaryenTypeNone(), NULL, 0); BinaryenType localTypes[] = { BinaryenTypeInt32() }; - { - BinaryenType iparams[1] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", BinaryenTypeNone(), iparams, 1); - BinaryenAddFunctionImport(module, "check", "module", "check", vi); - } + BinaryenAddFunctionImport(module, + "check", + "module", + "check", + BinaryenTypeInt32(), + BinaryenTypeNone()); { // trivial: just one block RelooperRef relooper = RelooperCreate(module); RelooperBlockRef block = RelooperAddBlock(relooper, makeCallCheck(module, 1337)); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "just-one-block", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "just-one-block", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // two blocks RelooperRef relooper = RelooperCreate(module); @@ -795,7 +821,13 @@ void test_relooper() { RelooperBlockRef block1 = RelooperAddBlock(relooper, makeCallCheck(module, 1)); RelooperAddBranch(block0, block1, NULL, NULL); // no condition, no code on branch BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "two-blocks", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "two-blocks", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // two blocks with code between them RelooperRef relooper = RelooperCreate(module); @@ -803,7 +835,13 @@ void test_relooper() { RelooperBlockRef block1 = RelooperAddBlock(relooper, makeCallCheck(module, 1)); RelooperAddBranch(block0, block1, NULL, makeDroppedInt32(module, 77)); // code on branch BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "two-blocks-plus-code", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "two-blocks-plus-code", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // two blocks in a loop RelooperRef relooper = RelooperCreate(module); @@ -812,7 +850,13 @@ void test_relooper() { RelooperAddBranch(block0, block1, NULL, NULL); RelooperAddBranch(block1, block0, NULL, NULL); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "loop", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "loop", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // two blocks in a loop with codes RelooperRef relooper = RelooperCreate(module); @@ -821,7 +865,13 @@ void test_relooper() { RelooperAddBranch(block0, block1, NULL, makeDroppedInt32(module, 33)); RelooperAddBranch(block1, block0, NULL, makeDroppedInt32(module, -66)); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "loop-plus-code", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "loop-plus-code", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // split RelooperRef relooper = RelooperCreate(module); @@ -831,7 +881,13 @@ void test_relooper() { RelooperAddBranch(block0, block1, makeInt32(module, 55), NULL); RelooperAddBranch(block0, block2, NULL, NULL); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "split", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "split", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // split + code RelooperRef relooper = RelooperCreate(module); @@ -842,7 +898,13 @@ void test_relooper() { RelooperAddBranch(block0, block1, makeInt32(module, 55), temp); RelooperAddBranch(block0, block2, NULL, makeDroppedInt32(module, 20)); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "split-plus-code", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "split-plus-code", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // if RelooperRef relooper = RelooperCreate(module); @@ -853,7 +915,13 @@ void test_relooper() { RelooperAddBranch(block0, block2, NULL, NULL); RelooperAddBranch(block1, block2, NULL, NULL); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "if", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "if", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // if + code RelooperRef relooper = RelooperCreate(module); @@ -865,7 +933,13 @@ void test_relooper() { RelooperAddBranch(block0, block2, NULL, makeDroppedInt32(module, -2)); RelooperAddBranch(block1, block2, NULL, makeDroppedInt32(module, -3)); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "if-plus-code", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "if-plus-code", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // if-else RelooperRef relooper = RelooperCreate(module); @@ -878,7 +952,13 @@ void test_relooper() { RelooperAddBranch(block1, block3, NULL, NULL); RelooperAddBranch(block2, block3, NULL, NULL); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "if-else", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "if-else", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // loop+tail RelooperRef relooper = RelooperCreate(module); @@ -889,7 +969,13 @@ void test_relooper() { RelooperAddBranch(block1, block0, makeInt32(module, 10), NULL); RelooperAddBranch(block1, block2, NULL, NULL); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "loop-tail", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "loop-tail", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // nontrivial loop + phi to head RelooperRef relooper = RelooperCreate(module); @@ -910,7 +996,14 @@ void test_relooper() { RelooperAddBranch(block4, block5, NULL, NULL); RelooperAddBranch(block5, block6, NULL, makeDroppedInt32(module, 40)); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "nontrivial-loop-plus-phi-to-head", v, localTypes, 1, body); + BinaryenFunctionRef sinker = + BinaryenAddFunction(module, + "nontrivial-loop-plus-phi-to-head", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // switch RelooperRef relooper = RelooperCreate(module); @@ -928,7 +1021,13 @@ void test_relooper() { RelooperAddBranchForSwitch(block0, block2, to_block2, 1, makeDroppedInt32(module, 55)); RelooperAddBranchForSwitch(block0, block3, NULL, 0, NULL); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "switch", v, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "switch", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, + body); } { // duff's device RelooperRef relooper = RelooperCreate(module); @@ -941,18 +1040,29 @@ void test_relooper() { RelooperAddBranch(block2, block1, NULL, NULL); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block0, 3); // use $3 as the helper var BinaryenType localTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64(), BinaryenTypeInt32(), BinaryenTypeFloat32(), BinaryenTypeFloat64(), BinaryenTypeInt32() }; - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "duffs-device", v, localTypes, sizeof(localTypes)/sizeof(BinaryenType), body); + BinaryenFunctionRef sinker = + BinaryenAddFunction(module, + "duffs-device", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + sizeof(localTypes) / sizeof(BinaryenType), + body); } - BinaryenFunctionTypeRef i = BinaryenAddFunctionType(module, "i", BinaryenTypeInt32(), NULL, 0); - { // return in a block RelooperRef relooper = RelooperCreate(module); BinaryenExpressionRef listList[] = { makeCallCheck(module, 42), BinaryenReturn(module, makeInt32(module, 1337)) }; BinaryenExpressionRef list = BinaryenBlock(module, "the-list", listList, 2, -1); RelooperBlockRef block = RelooperAddBlock(relooper, list); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, block, 0); - BinaryenFunctionRef sinker = BinaryenAddFunction(module, "return", i, localTypes, 1, body); + BinaryenFunctionRef sinker = BinaryenAddFunction(module, + "return", + BinaryenTypeNone(), + BinaryenTypeInt32(), + localTypes, + 1, + body); } printf("raw:\n"); @@ -976,12 +1086,13 @@ void test_binaries() { { // create a module and write it to binary BinaryenModuleRef module = BinaryenModuleCreate(); - BinaryenType params[2] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; - BinaryenFunctionTypeRef iii = BinaryenAddFunctionType(module, "iii", BinaryenTypeInt32(), params, 2); + BinaryenType ii_[2] = {BinaryenTypeInt32(), BinaryenTypeInt32()}; + BinaryenType ii = BinaryenTypeCreate(ii_, 2); BinaryenExpressionRef x = BinaryenLocalGet(module, 0, BinaryenTypeInt32()), y = BinaryenLocalGet(module, 1, BinaryenTypeInt32()); BinaryenExpressionRef add = BinaryenBinary(module, BinaryenAddInt32(), x, y); - BinaryenFunctionRef adder = BinaryenAddFunction(module, "adder", iii, NULL, 0, add); + BinaryenFunctionRef adder = BinaryenAddFunction( + module, "adder", ii, BinaryenTypeInt32(), NULL, 0, add); BinaryenSetDebugInfo(1); // include names section size = BinaryenModuleWrite(module, buffer, 1024); // write out the module BinaryenSetDebugInfo(0); @@ -1019,13 +1130,17 @@ void test_interpret() { BinaryenModuleRef module = BinaryenModuleCreate(); BinaryenType iparams[2] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", BinaryenTypeNone(), iparams, 1); - BinaryenAddFunctionImport(module, "print-i32", "spectest", "print", vi); + BinaryenAddFunctionImport(module, + "print-i32", + "spectest", + "print", + BinaryenTypeInt32(), + BinaryenTypeNone()); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", BinaryenTypeNone(), NULL, 0); BinaryenExpressionRef callOperands[] = { makeInt32(module, 1234) }; BinaryenExpressionRef call = BinaryenCall(module, "print-i32", callOperands, 1, BinaryenTypeNone()); - BinaryenFunctionRef starter = BinaryenAddFunction(module, "starter", v, NULL, 0, call); + BinaryenFunctionRef starter = BinaryenAddFunction( + module, "starter", BinaryenTypeNone(), BinaryenTypeNone(), NULL, 0, call); BinaryenSetStart(module, starter); BinaryenModulePrint(module); @@ -1039,9 +1154,14 @@ void test_nonvalid() { { BinaryenModuleRef module = BinaryenModuleCreate(); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", BinaryenTypeNone(), NULL, 0); BinaryenType localTypes[] = { BinaryenTypeInt32() }; - BinaryenFunctionRef func = BinaryenAddFunction(module, "func", v, localTypes, 1, + BinaryenFunctionRef func = BinaryenAddFunction( + module, + "func", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 1, BinaryenLocalSet(module, 0, makeInt64(module, 1234)) // wrong type! ); @@ -1080,12 +1200,28 @@ void test_for_each() { BinaryenModuleRef module = BinaryenModuleCreate(); { - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", BinaryenTypeNone(), NULL, 0); - BinaryenFunctionRef fns[3] = {0}; - fns[0] = BinaryenAddFunction(module, "fn0", v, NULL, 0, BinaryenNop(module)); - fns[1] = BinaryenAddFunction(module, "fn1", v, NULL, 0, BinaryenNop(module)); - fns[2] = BinaryenAddFunction(module, "fn2", v, NULL, 0, BinaryenNop(module)); + fns[0] = BinaryenAddFunction(module, + "fn0", + BinaryenTypeNone(), + BinaryenTypeNone(), + NULL, + 0, + BinaryenNop(module)); + fns[1] = BinaryenAddFunction(module, + "fn1", + BinaryenTypeNone(), + BinaryenTypeNone(), + NULL, + 0, + BinaryenNop(module)); + fns[2] = BinaryenAddFunction(module, + "fn2", + BinaryenTypeNone(), + BinaryenTypeNone(), + NULL, + 0, + BinaryenNop(module)); for (i = 0; i < BinaryenGetNumFunctions(module) ; i++) { assert(BinaryenGetFunctionByIndex(module, i) == fns[i]); @@ -1125,6 +1261,8 @@ void test_for_each() { } int main() { + // Tracing must be first so it starts with a fresh set of interned types + test_tracing(); test_types(); test_features(); test_core(); @@ -1133,7 +1271,6 @@ int main() { test_binaries(); test_interpret(); test_nonvalid(); - test_tracing(); test_color_status(); test_for_each(); diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index 44f40ac4c..ca9061e63 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -1,32 +1,1768 @@ - // BinaryenTypeNone: 0 - // BinaryenTypeUnreachable: 1 - // BinaryenTypeInt32: 2 - // BinaryenTypeInt64: 3 - // BinaryenTypeFloat32: 4 - // BinaryenTypeFloat64: 5 - // BinaryenTypeVec128: 6 - // BinaryenTypeAnyref: 7 - // BinaryenTypeExnref: 8 - // BinaryenTypeAuto: -1 -BinaryenFeatureMVP: 0 -BinaryenFeatureAtomics: 1 -BinaryenFeatureBulkMemory: 16 -BinaryenFeatureMutableGlobals: 2 -BinaryenFeatureNontrappingFPToInt: 4 -BinaryenFeatureSignExt: 32 -BinaryenFeatureSIMD128: 8 -BinaryenFeatureExceptionHandling: 64 -BinaryenFeatureTailCall: 128 -BinaryenFeatureReferenceTypes: 256 -BinaryenFeatureAll: 511 +// beginning a Binaryen API trace +#include <math.h> +#include <map> +#include "binaryen-c.h" +int main() { + std::map<size_t, BinaryenExpressionRef> expressions; + std::map<size_t, BinaryenFunctionRef> functions; + std::map<size_t, BinaryenGlobalRef> globals; + std::map<size_t, BinaryenEventRef> events; + std::map<size_t, BinaryenExportRef> exports; + std::map<size_t, RelooperBlockRef> relooperBlocks; + BinaryenModuleRef the_module = NULL; + RelooperRef the_relooper = NULL; + the_module = BinaryenModuleCreate(); + expressions[size_t(NULL)] = BinaryenExpressionRef(NULL); + expressions[1] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[2] = BinaryenConst(the_module, BinaryenLiteralInt64(2)); + expressions[3] = BinaryenConst(the_module, BinaryenLiteralFloat32(3.14)); + expressions[4] = BinaryenConst(the_module, BinaryenLiteralFloat64(2.1828)); + expressions[5] = BinaryenConst(the_module, BinaryenLiteralFloat32(NAN)); + expressions[6] = BinaryenConst(the_module, BinaryenLiteralFloat64(NAN)); + { + uint8_t t0[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[7] = BinaryenConst(the_module, BinaryenLiteralVec128(t0)); + } + expressions[8] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); + expressions[9] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); + expressions[10] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); + expressions[11] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); + expressions[12] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); + expressions[13] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); + expressions[14] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); + expressions[15] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); + expressions[16] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); + expressions[17] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); + { + BinaryenType t1[] = {2, 3, 4, 5}; + BinaryenTypeCreate(t1, 4); // 9 + } + expressions[18] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[19] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[20] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + expressions[21] = BinaryenConst(the_module, BinaryenLiteralInt32(4)); + expressions[22] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); + expressions[23] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[24] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[25] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[26] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[27] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[28] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + expressions[29] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); + expressions[30] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + expressions[31] = BinaryenConst(the_module, BinaryenLiteralInt32(11)); + expressions[32] = BinaryenConst(the_module, BinaryenLiteralInt32(110)); + expressions[33] = BinaryenConst(the_module, BinaryenLiteralInt64(111)); + BinaryenAddEvent(the_module, "a-event", 0, 2, 0); + 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, 8); + expressions[37] = BinaryenLocalSet(the_module, 5, expressions[36]); + expressions[38] = BinaryenLocalGet(the_module, 5, 8); + 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, 2); + } + 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, 6, expressions[50]); + expressions[52] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + 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, 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, 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, 57, expressions[94]); + expressions[96] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + 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, 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 t2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[144] = BinaryenConst(the_module, BinaryenLiteralVec128(t2)); + } + expressions[145] = BinaryenUnary(the_module, 66, expressions[144]); + { + uint8_t t3[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[146] = BinaryenConst(the_module, BinaryenLiteralVec128(t3)); + } + expressions[147] = BinaryenUnary(the_module, 67, expressions[146]); + { + uint8_t t4[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[148] = BinaryenConst(the_module, BinaryenLiteralVec128(t4)); + } + expressions[149] = BinaryenUnary(the_module, 68, expressions[148]); + { + uint8_t t5[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[150] = BinaryenConst(the_module, BinaryenLiteralVec128(t5)); + } + expressions[151] = BinaryenUnary(the_module, 69, expressions[150]); + { + uint8_t t6[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[152] = BinaryenConst(the_module, BinaryenLiteralVec128(t6)); + } + expressions[153] = BinaryenUnary(the_module, 70, expressions[152]); + { + uint8_t t7[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[154] = BinaryenConst(the_module, BinaryenLiteralVec128(t7)); + } + expressions[155] = BinaryenUnary(the_module, 71, expressions[154]); + { + uint8_t t8[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[156] = BinaryenConst(the_module, BinaryenLiteralVec128(t8)); + } + expressions[157] = BinaryenUnary(the_module, 72, expressions[156]); + { + uint8_t t9[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[158] = BinaryenConst(the_module, BinaryenLiteralVec128(t9)); + } + expressions[159] = BinaryenUnary(the_module, 73, expressions[158]); + { + uint8_t t10[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[160] = BinaryenConst(the_module, BinaryenLiteralVec128(t10)); + } + expressions[161] = BinaryenUnary(the_module, 74, expressions[160]); + { + uint8_t t11[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[162] = BinaryenConst(the_module, BinaryenLiteralVec128(t11)); + } + expressions[163] = BinaryenUnary(the_module, 75, expressions[162]); + { + uint8_t t12[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[164] = BinaryenConst(the_module, BinaryenLiteralVec128(t12)); + } + expressions[165] = BinaryenUnary(the_module, 76, expressions[164]); + { + uint8_t t13[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[166] = BinaryenConst(the_module, BinaryenLiteralVec128(t13)); + } + expressions[167] = BinaryenUnary(the_module, 77, expressions[166]); + { + uint8_t t14[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[168] = BinaryenConst(the_module, BinaryenLiteralVec128(t14)); + } + expressions[169] = BinaryenUnary(the_module, 78, expressions[168]); + { + uint8_t t15[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[170] = BinaryenConst(the_module, BinaryenLiteralVec128(t15)); + } + expressions[171] = BinaryenUnary(the_module, 79, expressions[170]); + { + uint8_t t16[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[172] = BinaryenConst(the_module, BinaryenLiteralVec128(t16)); + } + expressions[173] = BinaryenUnary(the_module, 80, expressions[172]); + { + uint8_t t17[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[174] = BinaryenConst(the_module, BinaryenLiteralVec128(t17)); + } + expressions[175] = BinaryenUnary(the_module, 81, expressions[174]); + { + uint8_t t18[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[176] = BinaryenConst(the_module, BinaryenLiteralVec128(t18)); + } + expressions[177] = BinaryenUnary(the_module, 82, expressions[176]); + { + uint8_t t19[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[178] = BinaryenConst(the_module, BinaryenLiteralVec128(t19)); + } + expressions[179] = BinaryenUnary(the_module, 83, expressions[178]); + { + uint8_t t20[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[180] = BinaryenConst(the_module, BinaryenLiteralVec128(t20)); + } + expressions[181] = BinaryenUnary(the_module, 84, expressions[180]); + { + uint8_t t21[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[182] = BinaryenConst(the_module, BinaryenLiteralVec128(t21)); + } + expressions[183] = BinaryenUnary(the_module, 85, expressions[182]); + { + uint8_t t22[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[184] = BinaryenConst(the_module, BinaryenLiteralVec128(t22)); + } + expressions[185] = BinaryenUnary(the_module, 86, expressions[184]); + { + uint8_t t23[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[186] = BinaryenConst(the_module, BinaryenLiteralVec128(t23)); + } + expressions[187] = BinaryenUnary(the_module, 87, expressions[186]); + { + uint8_t t24[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[188] = BinaryenConst(the_module, BinaryenLiteralVec128(t24)); + } + expressions[189] = BinaryenUnary(the_module, 88, expressions[188]); + { + uint8_t t25[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[190] = BinaryenConst(the_module, BinaryenLiteralVec128(t25)); + } + expressions[191] = BinaryenUnary(the_module, 89, expressions[190]); + { + uint8_t t26[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[192] = BinaryenConst(the_module, BinaryenLiteralVec128(t26)); + } + expressions[193] = BinaryenUnary(the_module, 90, expressions[192]); + { + uint8_t t27[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[194] = BinaryenConst(the_module, BinaryenLiteralVec128(t27)); + } + expressions[195] = BinaryenUnary(the_module, 91, expressions[194]); + { + uint8_t t28[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[196] = BinaryenConst(the_module, BinaryenLiteralVec128(t28)); + } + expressions[197] = BinaryenUnary(the_module, 92, expressions[196]); + { + uint8_t t29[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[198] = BinaryenConst(the_module, BinaryenLiteralVec128(t29)); + } + expressions[199] = BinaryenUnary(the_module, 93, expressions[198]); + { + uint8_t t30[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[200] = BinaryenConst(the_module, BinaryenLiteralVec128(t30)); + } + expressions[201] = BinaryenUnary(the_module, 94, expressions[200]); + { + uint8_t t31[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[202] = BinaryenConst(the_module, BinaryenLiteralVec128(t31)); + } + expressions[203] = BinaryenUnary(the_module, 95, expressions[202]); + { + uint8_t t32[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[204] = BinaryenConst(the_module, BinaryenLiteralVec128(t32)); + } + expressions[205] = BinaryenUnary(the_module, 96, expressions[204]); + { + uint8_t t33[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[206] = BinaryenConst(the_module, BinaryenLiteralVec128(t33)); + } + expressions[207] = BinaryenUnary(the_module, 97, expressions[206]); + { + uint8_t t34[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[208] = BinaryenConst(the_module, BinaryenLiteralVec128(t34)); + } + expressions[209] = BinaryenUnary(the_module, 98, expressions[208]); + { + uint8_t t35[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[210] = BinaryenConst(the_module, BinaryenLiteralVec128(t35)); + } + expressions[211] = BinaryenUnary(the_module, 99, expressions[210]); + { + uint8_t t36[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[212] = BinaryenConst(the_module, BinaryenLiteralVec128(t36)); + } + expressions[213] = BinaryenUnary(the_module, 100, expressions[212]); + expressions[214] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[215] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[216] = BinaryenBinary(the_module, 0, expressions[215], expressions[214]); + expressions[217] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[218] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[219] = BinaryenBinary(the_module, 64, expressions[218], expressions[217]); + expressions[220] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[221] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[222] = BinaryenBinary(the_module, 3, expressions[221], expressions[220]); + expressions[223] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[224] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[225] = BinaryenBinary(the_module, 29, expressions[224], expressions[223]); + expressions[226] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[227] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[228] = BinaryenBinary(the_module, 30, expressions[227], expressions[226]); + expressions[229] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[230] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[231] = BinaryenBinary(the_module, 6, expressions[230], expressions[229]); + expressions[232] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[233] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[234] = BinaryenBinary(the_module, 7, expressions[233], expressions[232]); + expressions[235] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[236] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[237] = BinaryenBinary(the_module, 33, expressions[236], expressions[235]); + expressions[238] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[239] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[240] = BinaryenBinary(the_module, 9, expressions[239], expressions[238]); + expressions[241] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[242] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[243] = BinaryenBinary(the_module, 35, expressions[242], expressions[241]); + expressions[244] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[245] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[246] = BinaryenBinary(the_module, 36, expressions[245], expressions[244]); + expressions[247] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[248] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[249] = BinaryenBinary(the_module, 12, expressions[248], expressions[247]); + expressions[250] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[251] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[252] = BinaryenBinary(the_module, 13, expressions[251], expressions[250]); + expressions[253] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[254] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[255] = BinaryenBinary(the_module, 39, expressions[254], expressions[253]); + expressions[256] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[257] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[258] = BinaryenBinary(the_module, 53, expressions[257], expressions[256]); + expressions[259] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[260] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[261] = BinaryenBinary(the_module, 67, expressions[260], expressions[259]); + expressions[262] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[263] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[264] = BinaryenBinary(the_module, 55, expressions[263], expressions[262]); + expressions[265] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[266] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[267] = BinaryenBinary(the_module, 69, expressions[266], expressions[265]); + expressions[268] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[269] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[270] = BinaryenBinary(the_module, 15, expressions[269], expressions[268]); + expressions[271] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[272] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[273] = BinaryenBinary(the_module, 58, expressions[272], expressions[271]); + expressions[274] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[275] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[276] = BinaryenBinary(the_module, 17, expressions[275], expressions[274]); + expressions[277] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[278] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[279] = BinaryenBinary(the_module, 43, expressions[278], expressions[277]); + expressions[280] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[281] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[282] = BinaryenBinary(the_module, 44, expressions[281], expressions[280]); + expressions[283] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[284] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[285] = BinaryenBinary(the_module, 20, expressions[284], expressions[283]); + expressions[286] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[287] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[288] = BinaryenBinary(the_module, 46, expressions[287], expressions[286]); + expressions[289] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[290] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[291] = BinaryenBinary(the_module, 22, expressions[290], expressions[289]); + expressions[292] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); + expressions[293] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + expressions[294] = BinaryenBinary(the_module, 23, expressions[293], expressions[292]); + expressions[295] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); + expressions[296] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); + expressions[297] = BinaryenBinary(the_module, 49, expressions[296], expressions[295]); + expressions[298] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[299] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[300] = BinaryenBinary(the_module, 59, expressions[299], expressions[298]); + expressions[301] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[302] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[303] = BinaryenBinary(the_module, 73, expressions[302], expressions[301]); + expressions[304] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); + expressions[305] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); + expressions[306] = BinaryenBinary(the_module, 74, expressions[305], expressions[304]); + expressions[307] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); + expressions[308] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); + expressions[309] = BinaryenBinary(the_module, 62, expressions[308], expressions[307]); + { + uint8_t t37[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[310] = BinaryenConst(the_module, BinaryenLiteralVec128(t37)); + } + { + uint8_t t38[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[311] = BinaryenConst(the_module, BinaryenLiteralVec128(t38)); + } + expressions[312] = BinaryenBinary(the_module, 76, expressions[311], expressions[310]); + { + uint8_t t39[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[313] = BinaryenConst(the_module, BinaryenLiteralVec128(t39)); + } + { + uint8_t t40[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[314] = BinaryenConst(the_module, BinaryenLiteralVec128(t40)); + } + expressions[315] = BinaryenBinary(the_module, 77, expressions[314], expressions[313]); + { + uint8_t t41[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[316] = BinaryenConst(the_module, BinaryenLiteralVec128(t41)); + } + { + uint8_t t42[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[317] = BinaryenConst(the_module, BinaryenLiteralVec128(t42)); + } + expressions[318] = BinaryenBinary(the_module, 78, expressions[317], expressions[316]); + { + uint8_t t43[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[319] = BinaryenConst(the_module, BinaryenLiteralVec128(t43)); + } + { + uint8_t t44[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[320] = BinaryenConst(the_module, BinaryenLiteralVec128(t44)); + } + expressions[321] = BinaryenBinary(the_module, 79, expressions[320], expressions[319]); + { + uint8_t t45[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[322] = BinaryenConst(the_module, BinaryenLiteralVec128(t45)); + } + { + uint8_t t46[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[323] = BinaryenConst(the_module, BinaryenLiteralVec128(t46)); + } + expressions[324] = BinaryenBinary(the_module, 80, expressions[323], expressions[322]); + { + uint8_t t47[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[325] = BinaryenConst(the_module, BinaryenLiteralVec128(t47)); + } + { + uint8_t t48[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[326] = BinaryenConst(the_module, BinaryenLiteralVec128(t48)); + } + expressions[327] = BinaryenBinary(the_module, 81, expressions[326], expressions[325]); + { + uint8_t t49[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[328] = BinaryenConst(the_module, BinaryenLiteralVec128(t49)); + } + { + uint8_t t50[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[329] = BinaryenConst(the_module, BinaryenLiteralVec128(t50)); + } + expressions[330] = BinaryenBinary(the_module, 82, expressions[329], expressions[328]); + { + uint8_t t51[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[331] = BinaryenConst(the_module, BinaryenLiteralVec128(t51)); + } + { + uint8_t t52[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[332] = BinaryenConst(the_module, BinaryenLiteralVec128(t52)); + } + expressions[333] = BinaryenBinary(the_module, 83, expressions[332], expressions[331]); + { + uint8_t t53[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[334] = BinaryenConst(the_module, BinaryenLiteralVec128(t53)); + } + { + uint8_t t54[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[335] = BinaryenConst(the_module, BinaryenLiteralVec128(t54)); + } + expressions[336] = BinaryenBinary(the_module, 84, expressions[335], expressions[334]); + { + uint8_t t55[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[337] = BinaryenConst(the_module, BinaryenLiteralVec128(t55)); + } + { + uint8_t t56[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[338] = BinaryenConst(the_module, BinaryenLiteralVec128(t56)); + } + expressions[339] = BinaryenBinary(the_module, 85, expressions[338], expressions[337]); + { + uint8_t t57[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[340] = BinaryenConst(the_module, BinaryenLiteralVec128(t57)); + } + { + uint8_t t58[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[341] = BinaryenConst(the_module, BinaryenLiteralVec128(t58)); + } + expressions[342] = BinaryenBinary(the_module, 86, expressions[341], expressions[340]); + { + uint8_t t59[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[343] = BinaryenConst(the_module, BinaryenLiteralVec128(t59)); + } + { + uint8_t t60[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[344] = BinaryenConst(the_module, BinaryenLiteralVec128(t60)); + } + expressions[345] = BinaryenBinary(the_module, 87, expressions[344], expressions[343]); + { + uint8_t t61[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[346] = BinaryenConst(the_module, BinaryenLiteralVec128(t61)); + } + { + uint8_t t62[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[347] = BinaryenConst(the_module, BinaryenLiteralVec128(t62)); + } + expressions[348] = BinaryenBinary(the_module, 88, expressions[347], expressions[346]); + { + uint8_t t63[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[349] = BinaryenConst(the_module, BinaryenLiteralVec128(t63)); + } + { + uint8_t t64[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[350] = BinaryenConst(the_module, BinaryenLiteralVec128(t64)); + } + expressions[351] = BinaryenBinary(the_module, 89, expressions[350], expressions[349]); + { + uint8_t t65[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[352] = BinaryenConst(the_module, BinaryenLiteralVec128(t65)); + } + { + uint8_t t66[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[353] = BinaryenConst(the_module, BinaryenLiteralVec128(t66)); + } + expressions[354] = BinaryenBinary(the_module, 90, expressions[353], expressions[352]); + { + uint8_t t67[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[355] = BinaryenConst(the_module, BinaryenLiteralVec128(t67)); + } + { + uint8_t t68[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[356] = BinaryenConst(the_module, BinaryenLiteralVec128(t68)); + } + expressions[357] = BinaryenBinary(the_module, 91, expressions[356], expressions[355]); + { + uint8_t t69[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[358] = BinaryenConst(the_module, BinaryenLiteralVec128(t69)); + } + { + uint8_t t70[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[359] = BinaryenConst(the_module, BinaryenLiteralVec128(t70)); + } + expressions[360] = BinaryenBinary(the_module, 92, expressions[359], expressions[358]); + { + uint8_t t71[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[361] = BinaryenConst(the_module, BinaryenLiteralVec128(t71)); + } + { + uint8_t t72[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[362] = BinaryenConst(the_module, BinaryenLiteralVec128(t72)); + } + expressions[363] = BinaryenBinary(the_module, 93, expressions[362], expressions[361]); + { + uint8_t t73[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[364] = BinaryenConst(the_module, BinaryenLiteralVec128(t73)); + } + { + uint8_t t74[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[365] = BinaryenConst(the_module, BinaryenLiteralVec128(t74)); + } + expressions[366] = BinaryenBinary(the_module, 94, expressions[365], expressions[364]); + { + uint8_t t75[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[367] = BinaryenConst(the_module, BinaryenLiteralVec128(t75)); + } + { + uint8_t t76[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[368] = BinaryenConst(the_module, BinaryenLiteralVec128(t76)); + } + expressions[369] = BinaryenBinary(the_module, 95, expressions[368], expressions[367]); + { + uint8_t t77[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[370] = BinaryenConst(the_module, BinaryenLiteralVec128(t77)); + } + { + uint8_t t78[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[371] = BinaryenConst(the_module, BinaryenLiteralVec128(t78)); + } + expressions[372] = BinaryenBinary(the_module, 96, expressions[371], expressions[370]); + { + uint8_t t79[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[373] = BinaryenConst(the_module, BinaryenLiteralVec128(t79)); + } + { + uint8_t t80[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[374] = BinaryenConst(the_module, BinaryenLiteralVec128(t80)); + } + expressions[375] = BinaryenBinary(the_module, 97, expressions[374], expressions[373]); + { + uint8_t t81[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[376] = BinaryenConst(the_module, BinaryenLiteralVec128(t81)); + } + { + uint8_t t82[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[377] = BinaryenConst(the_module, BinaryenLiteralVec128(t82)); + } + expressions[378] = BinaryenBinary(the_module, 98, expressions[377], expressions[376]); + { + uint8_t t83[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[379] = BinaryenConst(the_module, BinaryenLiteralVec128(t83)); + } + { + uint8_t t84[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[380] = BinaryenConst(the_module, BinaryenLiteralVec128(t84)); + } + expressions[381] = BinaryenBinary(the_module, 99, expressions[380], expressions[379]); + { + uint8_t t85[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[382] = BinaryenConst(the_module, BinaryenLiteralVec128(t85)); + } + { + uint8_t t86[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[383] = BinaryenConst(the_module, BinaryenLiteralVec128(t86)); + } + expressions[384] = BinaryenBinary(the_module, 100, expressions[383], expressions[382]); + { + uint8_t t87[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[385] = BinaryenConst(the_module, BinaryenLiteralVec128(t87)); + } + { + uint8_t t88[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[386] = BinaryenConst(the_module, BinaryenLiteralVec128(t88)); + } + expressions[387] = BinaryenBinary(the_module, 101, expressions[386], expressions[385]); + { + uint8_t t89[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[388] = BinaryenConst(the_module, BinaryenLiteralVec128(t89)); + } + { + uint8_t t90[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[389] = BinaryenConst(the_module, BinaryenLiteralVec128(t90)); + } + expressions[390] = BinaryenBinary(the_module, 102, expressions[389], expressions[388]); + { + uint8_t t91[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[391] = BinaryenConst(the_module, BinaryenLiteralVec128(t91)); + } + { + uint8_t t92[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[392] = BinaryenConst(the_module, BinaryenLiteralVec128(t92)); + } + expressions[393] = BinaryenBinary(the_module, 103, expressions[392], expressions[391]); + { + uint8_t t93[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[394] = BinaryenConst(the_module, BinaryenLiteralVec128(t93)); + } + { + uint8_t t94[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[395] = BinaryenConst(the_module, BinaryenLiteralVec128(t94)); + } + expressions[396] = BinaryenBinary(the_module, 104, expressions[395], expressions[394]); + { + uint8_t t95[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[397] = BinaryenConst(the_module, BinaryenLiteralVec128(t95)); + } + { + uint8_t t96[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[398] = BinaryenConst(the_module, BinaryenLiteralVec128(t96)); + } + expressions[399] = BinaryenBinary(the_module, 105, expressions[398], expressions[397]); + { + uint8_t t97[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[400] = BinaryenConst(the_module, BinaryenLiteralVec128(t97)); + } + { + uint8_t t98[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[401] = BinaryenConst(the_module, BinaryenLiteralVec128(t98)); + } + expressions[402] = BinaryenBinary(the_module, 106, expressions[401], expressions[400]); + { + uint8_t t99[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[403] = BinaryenConst(the_module, BinaryenLiteralVec128(t99)); + } + { + uint8_t t100[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[404] = BinaryenConst(the_module, BinaryenLiteralVec128(t100)); + } + expressions[405] = BinaryenBinary(the_module, 107, expressions[404], expressions[403]); + { + uint8_t t101[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[406] = BinaryenConst(the_module, BinaryenLiteralVec128(t101)); + } + { + uint8_t t102[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[407] = BinaryenConst(the_module, BinaryenLiteralVec128(t102)); + } + expressions[408] = BinaryenBinary(the_module, 108, expressions[407], expressions[406]); + { + uint8_t t103[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[409] = BinaryenConst(the_module, BinaryenLiteralVec128(t103)); + } + { + uint8_t t104[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[410] = BinaryenConst(the_module, BinaryenLiteralVec128(t104)); + } + expressions[411] = BinaryenBinary(the_module, 109, expressions[410], expressions[409]); + { + uint8_t t105[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[412] = BinaryenConst(the_module, BinaryenLiteralVec128(t105)); + } + { + uint8_t t106[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[413] = BinaryenConst(the_module, BinaryenLiteralVec128(t106)); + } + expressions[414] = BinaryenBinary(the_module, 110, expressions[413], expressions[412]); + { + uint8_t t107[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[415] = BinaryenConst(the_module, BinaryenLiteralVec128(t107)); + } + { + uint8_t t108[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[416] = BinaryenConst(the_module, BinaryenLiteralVec128(t108)); + } + expressions[417] = BinaryenBinary(the_module, 111, expressions[416], expressions[415]); + { + uint8_t t109[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[418] = BinaryenConst(the_module, BinaryenLiteralVec128(t109)); + } + { + uint8_t t110[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[419] = BinaryenConst(the_module, BinaryenLiteralVec128(t110)); + } + expressions[420] = BinaryenBinary(the_module, 112, expressions[419], expressions[418]); + { + uint8_t t111[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[421] = BinaryenConst(the_module, BinaryenLiteralVec128(t111)); + } + { + uint8_t t112[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[422] = BinaryenConst(the_module, BinaryenLiteralVec128(t112)); + } + expressions[423] = BinaryenBinary(the_module, 113, expressions[422], expressions[421]); + { + uint8_t t113[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[424] = BinaryenConst(the_module, BinaryenLiteralVec128(t113)); + } + { + uint8_t t114[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[425] = BinaryenConst(the_module, BinaryenLiteralVec128(t114)); + } + expressions[426] = BinaryenBinary(the_module, 114, expressions[425], expressions[424]); + { + uint8_t t115[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[427] = BinaryenConst(the_module, BinaryenLiteralVec128(t115)); + } + { + uint8_t t116[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[428] = BinaryenConst(the_module, BinaryenLiteralVec128(t116)); + } + expressions[429] = BinaryenBinary(the_module, 115, expressions[428], expressions[427]); + { + uint8_t t117[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[430] = BinaryenConst(the_module, BinaryenLiteralVec128(t117)); + } + { + uint8_t t118[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[431] = BinaryenConst(the_module, BinaryenLiteralVec128(t118)); + } + expressions[432] = BinaryenBinary(the_module, 116, expressions[431], expressions[430]); + { + uint8_t t119[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[433] = BinaryenConst(the_module, BinaryenLiteralVec128(t119)); + } + { + uint8_t t120[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[434] = BinaryenConst(the_module, BinaryenLiteralVec128(t120)); + } + expressions[435] = BinaryenBinary(the_module, 117, expressions[434], expressions[433]); + { + uint8_t t121[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[436] = BinaryenConst(the_module, BinaryenLiteralVec128(t121)); + } + { + uint8_t t122[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[437] = BinaryenConst(the_module, BinaryenLiteralVec128(t122)); + } + expressions[438] = BinaryenBinary(the_module, 118, expressions[437], expressions[436]); + { + uint8_t t123[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[439] = BinaryenConst(the_module, BinaryenLiteralVec128(t123)); + } + { + uint8_t t124[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[440] = BinaryenConst(the_module, BinaryenLiteralVec128(t124)); + } + expressions[441] = BinaryenBinary(the_module, 119, expressions[440], expressions[439]); + { + uint8_t t125[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[442] = BinaryenConst(the_module, BinaryenLiteralVec128(t125)); + } + { + uint8_t t126[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[443] = BinaryenConst(the_module, BinaryenLiteralVec128(t126)); + } + expressions[444] = BinaryenBinary(the_module, 120, expressions[443], expressions[442]); + { + uint8_t t127[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[445] = BinaryenConst(the_module, BinaryenLiteralVec128(t127)); + } + { + uint8_t t128[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[446] = BinaryenConst(the_module, BinaryenLiteralVec128(t128)); + } + expressions[447] = BinaryenBinary(the_module, 121, expressions[446], expressions[445]); + { + uint8_t t129[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[448] = BinaryenConst(the_module, BinaryenLiteralVec128(t129)); + } + { + uint8_t t130[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[449] = BinaryenConst(the_module, BinaryenLiteralVec128(t130)); + } + expressions[450] = BinaryenBinary(the_module, 122, expressions[449], expressions[448]); + { + uint8_t t131[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[451] = BinaryenConst(the_module, BinaryenLiteralVec128(t131)); + } + { + uint8_t t132[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[452] = BinaryenConst(the_module, BinaryenLiteralVec128(t132)); + } + expressions[453] = BinaryenBinary(the_module, 123, expressions[452], expressions[451]); + { + uint8_t t133[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[454] = BinaryenConst(the_module, BinaryenLiteralVec128(t133)); + } + { + uint8_t t134[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[455] = BinaryenConst(the_module, BinaryenLiteralVec128(t134)); + } + expressions[456] = BinaryenBinary(the_module, 124, expressions[455], expressions[454]); + { + uint8_t t135[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[457] = BinaryenConst(the_module, BinaryenLiteralVec128(t135)); + } + { + uint8_t t136[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[458] = BinaryenConst(the_module, BinaryenLiteralVec128(t136)); + } + expressions[459] = BinaryenBinary(the_module, 125, expressions[458], expressions[457]); + { + uint8_t t137[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[460] = BinaryenConst(the_module, BinaryenLiteralVec128(t137)); + } + { + uint8_t t138[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[461] = BinaryenConst(the_module, BinaryenLiteralVec128(t138)); + } + expressions[462] = BinaryenBinary(the_module, 126, expressions[461], expressions[460]); + { + uint8_t t139[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[463] = BinaryenConst(the_module, BinaryenLiteralVec128(t139)); + } + { + uint8_t t140[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[464] = BinaryenConst(the_module, BinaryenLiteralVec128(t140)); + } + expressions[465] = BinaryenBinary(the_module, 127, expressions[464], expressions[463]); + { + uint8_t t141[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[466] = BinaryenConst(the_module, BinaryenLiteralVec128(t141)); + } + { + uint8_t t142[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[467] = BinaryenConst(the_module, BinaryenLiteralVec128(t142)); + } + expressions[468] = BinaryenBinary(the_module, 128, expressions[467], expressions[466]); + { + uint8_t t143[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[469] = BinaryenConst(the_module, BinaryenLiteralVec128(t143)); + } + { + uint8_t t144[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[470] = BinaryenConst(the_module, BinaryenLiteralVec128(t144)); + } + expressions[471] = BinaryenBinary(the_module, 133, expressions[470], expressions[469]); + { + uint8_t t145[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[472] = BinaryenConst(the_module, BinaryenLiteralVec128(t145)); + } + { + uint8_t t146[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[473] = BinaryenConst(the_module, BinaryenLiteralVec128(t146)); + } + expressions[474] = BinaryenBinary(the_module, 134, expressions[473], expressions[472]); + { + uint8_t t147[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[475] = BinaryenConst(the_module, BinaryenLiteralVec128(t147)); + } + { + uint8_t t148[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[476] = BinaryenConst(the_module, BinaryenLiteralVec128(t148)); + } + expressions[477] = BinaryenBinary(the_module, 135, expressions[476], expressions[475]); + { + uint8_t t149[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[478] = BinaryenConst(the_module, BinaryenLiteralVec128(t149)); + } + { + uint8_t t150[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[479] = BinaryenConst(the_module, BinaryenLiteralVec128(t150)); + } + expressions[480] = BinaryenBinary(the_module, 136, expressions[479], expressions[478]); + { + uint8_t t151[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[481] = BinaryenConst(the_module, BinaryenLiteralVec128(t151)); + } + { + uint8_t t152[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[482] = BinaryenConst(the_module, BinaryenLiteralVec128(t152)); + } + expressions[483] = BinaryenBinary(the_module, 137, expressions[482], expressions[481]); + { + uint8_t t153[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[484] = BinaryenConst(the_module, BinaryenLiteralVec128(t153)); + } + { + uint8_t t154[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[485] = BinaryenConst(the_module, BinaryenLiteralVec128(t154)); + } + expressions[486] = BinaryenBinary(the_module, 138, expressions[485], expressions[484]); + { + uint8_t t155[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[487] = BinaryenConst(the_module, BinaryenLiteralVec128(t155)); + } + { + uint8_t t156[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[488] = BinaryenConst(the_module, BinaryenLiteralVec128(t156)); + } + expressions[489] = BinaryenBinary(the_module, 139, expressions[488], expressions[487]); + { + uint8_t t157[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[490] = BinaryenConst(the_module, BinaryenLiteralVec128(t157)); + } + { + uint8_t t158[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[491] = BinaryenConst(the_module, BinaryenLiteralVec128(t158)); + } + expressions[492] = BinaryenBinary(the_module, 140, expressions[491], expressions[490]); + { + uint8_t t159[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[493] = BinaryenConst(the_module, BinaryenLiteralVec128(t159)); + } + { + uint8_t t160[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[494] = BinaryenConst(the_module, BinaryenLiteralVec128(t160)); + } + expressions[495] = BinaryenBinary(the_module, 141, expressions[494], expressions[493]); + { + uint8_t t161[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[496] = BinaryenConst(the_module, BinaryenLiteralVec128(t161)); + } + { + uint8_t t162[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[497] = BinaryenConst(the_module, BinaryenLiteralVec128(t162)); + } + expressions[498] = BinaryenBinary(the_module, 142, expressions[497], expressions[496]); + { + uint8_t t163[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[499] = BinaryenConst(the_module, BinaryenLiteralVec128(t163)); + } + { + uint8_t t164[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[500] = BinaryenConst(the_module, BinaryenLiteralVec128(t164)); + } + expressions[501] = BinaryenBinary(the_module, 143, expressions[500], expressions[499]); + { + uint8_t t165[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[502] = BinaryenConst(the_module, BinaryenLiteralVec128(t165)); + } + { + uint8_t t166[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[503] = BinaryenConst(the_module, BinaryenLiteralVec128(t166)); + } + expressions[504] = BinaryenBinary(the_module, 144, expressions[503], expressions[502]); + { + uint8_t t167[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[505] = BinaryenConst(the_module, BinaryenLiteralVec128(t167)); + } + { + uint8_t t168[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[506] = BinaryenConst(the_module, BinaryenLiteralVec128(t168)); + } + expressions[507] = BinaryenBinary(the_module, 145, expressions[506], expressions[505]); + { + uint8_t t169[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[508] = BinaryenConst(the_module, BinaryenLiteralVec128(t169)); + } + { + uint8_t t170[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[509] = BinaryenConst(the_module, BinaryenLiteralVec128(t170)); + } + expressions[510] = BinaryenBinary(the_module, 146, expressions[509], expressions[508]); + { + uint8_t t171[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[511] = BinaryenConst(the_module, BinaryenLiteralVec128(t171)); + } + { + uint8_t t172[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[512] = BinaryenConst(the_module, BinaryenLiteralVec128(t172)); + } + expressions[513] = BinaryenBinary(the_module, 129, expressions[512], expressions[511]); + { + uint8_t t173[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[514] = BinaryenConst(the_module, BinaryenLiteralVec128(t173)); + } + { + uint8_t t174[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[515] = BinaryenConst(the_module, BinaryenLiteralVec128(t174)); + } + expressions[516] = BinaryenBinary(the_module, 130, expressions[515], expressions[514]); + { + uint8_t t175[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[517] = BinaryenConst(the_module, BinaryenLiteralVec128(t175)); + } + { + uint8_t t176[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[518] = BinaryenConst(the_module, BinaryenLiteralVec128(t176)); + } + expressions[519] = BinaryenBinary(the_module, 131, expressions[518], expressions[517]); + { + uint8_t t177[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[520] = BinaryenConst(the_module, BinaryenLiteralVec128(t177)); + } + { + uint8_t t178[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[521] = BinaryenConst(the_module, BinaryenLiteralVec128(t178)); + } + expressions[522] = BinaryenBinary(the_module, 132, expressions[521], expressions[520]); + { + uint8_t t179[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[523] = BinaryenConst(the_module, BinaryenLiteralVec128(t179)); + } + { + uint8_t t180[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[524] = BinaryenConst(the_module, BinaryenLiteralVec128(t180)); + } + expressions[525] = BinaryenBinary(the_module, 152, expressions[524], expressions[523]); + { + uint8_t t181[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[526] = BinaryenConst(the_module, BinaryenLiteralVec128(t181)); + } + { + uint8_t t182[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[527] = BinaryenConst(the_module, BinaryenLiteralVec128(t182)); + } + expressions[528] = BinaryenBinary(the_module, 153, expressions[527], expressions[526]); + { + uint8_t t183[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[529] = BinaryenConst(the_module, BinaryenLiteralVec128(t183)); + } + { + uint8_t t184[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[530] = BinaryenConst(the_module, BinaryenLiteralVec128(t184)); + } + expressions[531] = BinaryenBinary(the_module, 154, expressions[530], expressions[529]); + { + uint8_t t185[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[532] = BinaryenConst(the_module, BinaryenLiteralVec128(t185)); + } + { + uint8_t t186[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[533] = BinaryenConst(the_module, BinaryenLiteralVec128(t186)); + } + expressions[534] = BinaryenBinary(the_module, 155, expressions[533], expressions[532]); + { + uint8_t t187[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[535] = BinaryenConst(the_module, BinaryenLiteralVec128(t187)); + } + { + uint8_t t188[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[536] = BinaryenConst(the_module, BinaryenLiteralVec128(t188)); + } + expressions[537] = BinaryenBinary(the_module, 156, expressions[536], expressions[535]); + { + uint8_t t189[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[538] = BinaryenConst(the_module, BinaryenLiteralVec128(t189)); + } + { + uint8_t t190[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[539] = BinaryenConst(the_module, BinaryenLiteralVec128(t190)); + } + expressions[540] = BinaryenBinary(the_module, 147, expressions[539], expressions[538]); + { + uint8_t t191[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[541] = BinaryenConst(the_module, BinaryenLiteralVec128(t191)); + } + { + uint8_t t192[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[542] = BinaryenConst(the_module, BinaryenLiteralVec128(t192)); + } + expressions[543] = BinaryenBinary(the_module, 148, expressions[542], expressions[541]); + { + 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)); + } + { + uint8_t t194[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[545] = BinaryenConst(the_module, BinaryenLiteralVec128(t194)); + } + expressions[546] = BinaryenBinary(the_module, 149, expressions[545], expressions[544]); + { + uint8_t t195[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[547] = BinaryenConst(the_module, BinaryenLiteralVec128(t195)); + } + { + uint8_t t196[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[548] = BinaryenConst(the_module, BinaryenLiteralVec128(t196)); + } + expressions[549] = BinaryenBinary(the_module, 150, expressions[548], expressions[547]); + { + uint8_t t197[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[550] = BinaryenConst(the_module, BinaryenLiteralVec128(t197)); + } + { + uint8_t t198[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[551] = BinaryenConst(the_module, BinaryenLiteralVec128(t198)); + } + expressions[552] = BinaryenBinary(the_module, 151, expressions[551], expressions[550]); + { + uint8_t t199[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[553] = BinaryenConst(the_module, BinaryenLiteralVec128(t199)); + } + { + uint8_t t200[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[554] = BinaryenConst(the_module, BinaryenLiteralVec128(t200)); + } + expressions[555] = BinaryenBinary(the_module, 157, expressions[554], expressions[553]); + { + uint8_t t201[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[556] = BinaryenConst(the_module, BinaryenLiteralVec128(t201)); + } + { + uint8_t t202[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[557] = BinaryenConst(the_module, BinaryenLiteralVec128(t202)); + } + expressions[558] = BinaryenBinary(the_module, 158, expressions[557], expressions[556]); + { + uint8_t t203[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[559] = BinaryenConst(the_module, BinaryenLiteralVec128(t203)); + } + { + uint8_t t204[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[560] = BinaryenConst(the_module, BinaryenLiteralVec128(t204)); + } + expressions[561] = BinaryenBinary(the_module, 159, expressions[560], expressions[559]); + { + uint8_t t205[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[562] = BinaryenConst(the_module, BinaryenLiteralVec128(t205)); + } + { + uint8_t t206[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[563] = BinaryenConst(the_module, BinaryenLiteralVec128(t206)); + } + expressions[564] = BinaryenBinary(the_module, 160, expressions[563], expressions[562]); + { + uint8_t t207[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[565] = BinaryenConst(the_module, BinaryenLiteralVec128(t207)); + } + { + uint8_t t208[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[566] = BinaryenConst(the_module, BinaryenLiteralVec128(t208)); + } + expressions[567] = BinaryenBinary(the_module, 161, expressions[566], expressions[565]); + { + uint8_t t209[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[568] = 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[569] = BinaryenConst(the_module, BinaryenLiteralVec128(t210)); + } + expressions[570] = BinaryenBinary(the_module, 162, expressions[569], expressions[568]); + { + uint8_t t211[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[571] = BinaryenConst(the_module, BinaryenLiteralVec128(t211)); + } + { + uint8_t t212[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[572] = BinaryenConst(the_module, BinaryenLiteralVec128(t212)); + } + expressions[573] = BinaryenBinary(the_module, 163, expressions[572], expressions[571]); + { + uint8_t t213[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[574] = BinaryenConst(the_module, BinaryenLiteralVec128(t213)); + } + { + uint8_t t214[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[575] = BinaryenConst(the_module, BinaryenLiteralVec128(t214)); + } + expressions[576] = BinaryenBinary(the_module, 164, expressions[575], expressions[574]); + { + uint8_t t215[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[577] = BinaryenConst(the_module, BinaryenLiteralVec128(t215)); + } + { + uint8_t t216[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[578] = BinaryenConst(the_module, BinaryenLiteralVec128(t216)); + } + expressions[579] = BinaryenBinary(the_module, 165, expressions[578], expressions[577]); + { + uint8_t t217[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[580] = BinaryenConst(the_module, BinaryenLiteralVec128(t217)); + } + { + uint8_t t218[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[581] = BinaryenConst(the_module, BinaryenLiteralVec128(t218)); + } + expressions[582] = BinaryenBinary(the_module, 166, expressions[581], expressions[580]); + { + uint8_t t219[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[583] = BinaryenConst(the_module, BinaryenLiteralVec128(t219)); + } + { + uint8_t t220[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[584] = BinaryenConst(the_module, BinaryenLiteralVec128(t220)); + } + expressions[585] = BinaryenBinary(the_module, 167, expressions[584], expressions[583]); + { + uint8_t t221[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[586] = BinaryenConst(the_module, BinaryenLiteralVec128(t221)); + } + { + uint8_t t222[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[587] = BinaryenConst(the_module, BinaryenLiteralVec128(t222)); + } + expressions[588] = BinaryenBinary(the_module, 168, expressions[587], expressions[586]); + { + uint8_t t223[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[589] = BinaryenConst(the_module, BinaryenLiteralVec128(t223)); + } + { + uint8_t t224[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[590] = BinaryenConst(the_module, BinaryenLiteralVec128(t224)); + } + expressions[591] = BinaryenBinary(the_module, 169, expressions[590], expressions[589]); + { + uint8_t t225[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[592] = BinaryenConst(the_module, BinaryenLiteralVec128(t225)); + } + { + uint8_t t226[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[593] = BinaryenConst(the_module, BinaryenLiteralVec128(t226)); + } + expressions[594] = BinaryenBinary(the_module, 170, expressions[593], expressions[592]); + { + uint8_t t227[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[595] = BinaryenConst(the_module, BinaryenLiteralVec128(t227)); + } + expressions[596] = BinaryenSIMDExtract(the_module, 0, expressions[595], 0); + { + uint8_t t228[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[597] = BinaryenConst(the_module, BinaryenLiteralVec128(t228)); + } + expressions[598] = BinaryenSIMDExtract(the_module, 1, expressions[597], 0); + { + uint8_t t229[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[599] = BinaryenConst(the_module, BinaryenLiteralVec128(t229)); + } + expressions[600] = BinaryenSIMDExtract(the_module, 2, expressions[599], 0); + { + uint8_t t230[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[601] = BinaryenConst(the_module, BinaryenLiteralVec128(t230)); + } + expressions[602] = BinaryenSIMDExtract(the_module, 3, expressions[601], 0); + { + uint8_t t231[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[603] = BinaryenConst(the_module, BinaryenLiteralVec128(t231)); + } + expressions[604] = BinaryenSIMDExtract(the_module, 4, expressions[603], 0); + { + uint8_t t232[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[605] = BinaryenConst(the_module, BinaryenLiteralVec128(t232)); + } + expressions[606] = BinaryenSIMDExtract(the_module, 5, expressions[605], 0); + { + uint8_t t233[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[607] = BinaryenConst(the_module, BinaryenLiteralVec128(t233)); + } + expressions[608] = BinaryenSIMDExtract(the_module, 6, expressions[607], 0); + { + uint8_t t234[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[609] = BinaryenConst(the_module, BinaryenLiteralVec128(t234)); + } + expressions[610] = BinaryenSIMDExtract(the_module, 7, expressions[609], 0); + expressions[611] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + { + uint8_t t235[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[612] = BinaryenConst(the_module, BinaryenLiteralVec128(t235)); + } + expressions[613] = BinaryenSIMDReplace(the_module, 0, expressions[612], 0, expressions[611]); + expressions[614] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + { + uint8_t t236[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[615] = BinaryenConst(the_module, BinaryenLiteralVec128(t236)); + } + expressions[616] = BinaryenSIMDReplace(the_module, 1, expressions[615], 0, expressions[614]); + expressions[617] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + { + uint8_t t237[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[618] = BinaryenConst(the_module, BinaryenLiteralVec128(t237)); + } + expressions[619] = BinaryenSIMDReplace(the_module, 2, expressions[618], 0, expressions[617]); + expressions[620] = BinaryenConst(the_module, BinaryenLiteralInt64(42)); + { + uint8_t t238[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[621] = BinaryenConst(the_module, BinaryenLiteralVec128(t238)); + } + expressions[622] = BinaryenSIMDReplace(the_module, 3, expressions[621], 0, expressions[620]); + expressions[623] = BinaryenConst(the_module, BinaryenLiteralFloat32(42)); + { + uint8_t t239[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[624] = BinaryenConst(the_module, BinaryenLiteralVec128(t239)); + } + expressions[625] = BinaryenSIMDReplace(the_module, 4, expressions[624], 0, expressions[623]); + expressions[626] = BinaryenConst(the_module, BinaryenLiteralFloat64(42)); + { + uint8_t t240[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[627] = BinaryenConst(the_module, BinaryenLiteralVec128(t240)); + } + expressions[628] = BinaryenSIMDReplace(the_module, 5, expressions[627], 0, expressions[626]); + { + uint8_t t241[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[629] = BinaryenConst(the_module, BinaryenLiteralVec128(t241)); + } + expressions[630] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[631] = BinaryenSIMDShift(the_module, 0, expressions[629], expressions[630]); + { + uint8_t t242[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[632] = BinaryenConst(the_module, BinaryenLiteralVec128(t242)); + } + expressions[633] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[634] = BinaryenSIMDShift(the_module, 1, expressions[632], expressions[633]); + { + uint8_t t243[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[635] = BinaryenConst(the_module, BinaryenLiteralVec128(t243)); + } + expressions[636] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[637] = BinaryenSIMDShift(the_module, 2, expressions[635], expressions[636]); + { + uint8_t t244[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[638] = BinaryenConst(the_module, BinaryenLiteralVec128(t244)); + } + expressions[639] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[640] = BinaryenSIMDShift(the_module, 3, expressions[638], expressions[639]); + { + uint8_t t245[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[641] = BinaryenConst(the_module, BinaryenLiteralVec128(t245)); + } + expressions[642] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[643] = BinaryenSIMDShift(the_module, 4, expressions[641], expressions[642]); + { + uint8_t t246[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[644] = BinaryenConst(the_module, BinaryenLiteralVec128(t246)); + } + expressions[645] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[646] = BinaryenSIMDShift(the_module, 5, expressions[644], expressions[645]); + { + uint8_t t247[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[647] = BinaryenConst(the_module, BinaryenLiteralVec128(t247)); + } + expressions[648] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[649] = BinaryenSIMDShift(the_module, 6, expressions[647], expressions[648]); + { + uint8_t t248[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[650] = BinaryenConst(the_module, BinaryenLiteralVec128(t248)); + } + expressions[651] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[652] = BinaryenSIMDShift(the_module, 7, expressions[650], expressions[651]); + { + uint8_t t249[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[653] = BinaryenConst(the_module, BinaryenLiteralVec128(t249)); + } + expressions[654] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[655] = BinaryenSIMDShift(the_module, 8, expressions[653], expressions[654]); + { + uint8_t t250[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[656] = BinaryenConst(the_module, BinaryenLiteralVec128(t250)); + } + expressions[657] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[658] = BinaryenSIMDShift(the_module, 9, expressions[656], expressions[657]); + { + uint8_t t251[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[659] = BinaryenConst(the_module, BinaryenLiteralVec128(t251)); + } + expressions[660] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[661] = BinaryenSIMDShift(the_module, 10, expressions[659], expressions[660]); + { + uint8_t t252[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[662] = BinaryenConst(the_module, BinaryenLiteralVec128(t252)); + } + expressions[663] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[664] = BinaryenSIMDShift(the_module, 11, expressions[662], expressions[663]); + expressions[665] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[666] = BinaryenSIMDLoad(the_module, 0, 0, 1, expressions[665]); + expressions[667] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[668] = BinaryenSIMDLoad(the_module, 1, 16, 1, expressions[667]); + expressions[669] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[670] = BinaryenSIMDLoad(the_module, 2, 16, 4, expressions[669]); + expressions[671] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[672] = BinaryenSIMDLoad(the_module, 3, 0, 4, expressions[671]); + expressions[673] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[674] = BinaryenSIMDLoad(the_module, 4, 0, 8, expressions[673]); + expressions[675] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[676] = BinaryenSIMDLoad(the_module, 5, 0, 8, expressions[675]); + expressions[677] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[678] = BinaryenSIMDLoad(the_module, 6, 0, 8, expressions[677]); + expressions[679] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[680] = BinaryenSIMDLoad(the_module, 7, 0, 8, expressions[679]); + expressions[681] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[682] = BinaryenSIMDLoad(the_module, 8, 0, 8, expressions[681]); + expressions[683] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); + expressions[684] = BinaryenSIMDLoad(the_module, 9, 0, 8, expressions[683]); + { + uint8_t t253[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[685] = BinaryenConst(the_module, BinaryenLiteralVec128(t253)); + } + { + uint8_t t254[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[686] = BinaryenConst(the_module, BinaryenLiteralVec128(t254)); + } + { + uint8_t mask[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + expressions[687] = BinaryenSIMDShuffle(the_module, expressions[685], expressions[686], mask); + } + { + uint8_t t255[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[688] = BinaryenConst(the_module, BinaryenLiteralVec128(t255)); + } + { + uint8_t t256[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[689] = BinaryenConst(the_module, BinaryenLiteralVec128(t256)); + } + { + uint8_t t257[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[690] = BinaryenConst(the_module, BinaryenLiteralVec128(t257)); + } + expressions[691] = BinaryenSIMDTernary(the_module, 0, expressions[688], expressions[689], expressions[690]); + { + uint8_t t258[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[692] = BinaryenConst(the_module, BinaryenLiteralVec128(t258)); + } + { + uint8_t t259[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[693] = BinaryenConst(the_module, BinaryenLiteralVec128(t259)); + } + { + uint8_t t260[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[694] = BinaryenConst(the_module, BinaryenLiteralVec128(t260)); + } + expressions[695] = BinaryenSIMDTernary(the_module, 1, expressions[692], expressions[693], expressions[694]); + { + uint8_t t261[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[696] = BinaryenConst(the_module, BinaryenLiteralVec128(t261)); + } + { + uint8_t t262[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[697] = BinaryenConst(the_module, BinaryenLiteralVec128(t262)); + } + { + uint8_t t263[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[698] = BinaryenConst(the_module, BinaryenLiteralVec128(t263)); + } + expressions[699] = BinaryenSIMDTernary(the_module, 2, expressions[696], expressions[697], expressions[698]); + { + uint8_t t264[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[700] = BinaryenConst(the_module, BinaryenLiteralVec128(t264)); + } + { + uint8_t t265[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[701] = BinaryenConst(the_module, BinaryenLiteralVec128(t265)); + } + { + uint8_t t266[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[702] = BinaryenConst(the_module, BinaryenLiteralVec128(t266)); + } + expressions[703] = BinaryenSIMDTernary(the_module, 3, expressions[700], expressions[701], expressions[702]); + { + uint8_t t267[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[704] = BinaryenConst(the_module, BinaryenLiteralVec128(t267)); + } + { + uint8_t t268[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[705] = BinaryenConst(the_module, BinaryenLiteralVec128(t268)); + } + { + uint8_t t269[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + expressions[706] = BinaryenConst(the_module, BinaryenLiteralVec128(t269)); + } + expressions[707] = BinaryenSIMDTernary(the_module, 4, expressions[704], expressions[705], expressions[706]); + expressions[708] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); + expressions[709] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[710] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); + expressions[711] = BinaryenMemoryInit(the_module, 0, expressions[708], expressions[709], expressions[710]); + expressions[712] = BinaryenDataDrop(the_module, 0); + expressions[713] = BinaryenConst(the_module, BinaryenLiteralInt32(2048)); + expressions[714] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); + expressions[715] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); + expressions[716] = BinaryenMemoryCopy(the_module, expressions[713], expressions[714], expressions[715]); + expressions[717] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[718] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + expressions[719] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); + expressions[720] = BinaryenMemoryFill(the_module, expressions[717], expressions[718], expressions[719]); + { + BinaryenExpressionRef children[] = { 0 }; + expressions[721] = BinaryenBlock(the_module, NULL, children, 0, BinaryenTypeAuto()); + } + expressions[722] = BinaryenIf(the_module, expressions[18], expressions[19], expressions[20]); + expressions[723] = BinaryenIf(the_module, expressions[21], expressions[22], expressions[0]); + expressions[724] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[725] = BinaryenLoop(the_module, "in", expressions[724]); + expressions[726] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + expressions[727] = BinaryenLoop(the_module, NULL, expressions[726]); + expressions[728] = BinaryenBreak(the_module, "the-value", expressions[23], expressions[24]); + expressions[729] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[730] = BinaryenBreak(the_module, "the-nothing", expressions[729], expressions[0]); + expressions[731] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + expressions[732] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[731]); + expressions[733] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]); + { + const char* names[] = { "the-value" }; + expressions[734] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[25], expressions[26]); + } + expressions[735] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + const char* names[] = { "the-nothing" }; + expressions[736] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[735], expressions[0]); + } + { + BinaryenExpressionRef operands[] = { expressions[10], expressions[11], expressions[12], expressions[13] }; + expressions[737] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 2); + } + expressions[738] = BinaryenUnary(the_module, 20, expressions[737]); + { + BinaryenExpressionRef operands[] = { expressions[8], expressions[9] }; + expressions[739] = BinaryenCall(the_module, "an-imported", operands, 2, 4); + } + expressions[740] = BinaryenUnary(the_module, 25, expressions[739]); + expressions[741] = BinaryenUnary(the_module, 20, expressions[740]); + expressions[742] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); + { + BinaryenExpressionRef operands[] = { expressions[14], expressions[15], expressions[16], expressions[17] }; + expressions[743] = BinaryenCallIndirect(the_module, expressions[742], operands, 4, 9, 2); + } + expressions[744] = BinaryenUnary(the_module, 20, expressions[743]); + expressions[745] = BinaryenLocalGet(the_module, 0, 2); + expressions[746] = BinaryenDrop(the_module, expressions[745]); + expressions[747] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); + expressions[748] = BinaryenLocalSet(the_module, 0, expressions[747]); + expressions[749] = BinaryenConst(the_module, BinaryenLiteralInt32(102)); + expressions[750] = BinaryenLocalTee(the_module, 0, expressions[749]); + expressions[751] = BinaryenDrop(the_module, expressions[750]); + expressions[752] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + expressions[753] = BinaryenLoad(the_module, 4, 0, 0, 0, 2, expressions[752]); + expressions[754] = BinaryenConst(the_module, BinaryenLiteralInt32(8)); + expressions[755] = BinaryenLoad(the_module, 2, 1, 2, 1, 3, expressions[754]); + expressions[756] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + expressions[757] = BinaryenLoad(the_module, 4, 0, 0, 0, 4, expressions[756]); + expressions[758] = BinaryenConst(the_module, BinaryenLiteralInt32(9)); + expressions[759] = BinaryenLoad(the_module, 8, 0, 2, 8, 5, expressions[758]); + expressions[760] = BinaryenStore(the_module, 4, 0, 0, expressions[30], expressions[31], 2); + expressions[761] = BinaryenStore(the_module, 8, 2, 4, expressions[32], expressions[33], 3); + expressions[762] = BinaryenSelect(the_module, expressions[27], expressions[28], expressions[29]); + expressions[763] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); + expressions[764] = BinaryenReturn(the_module, expressions[763]); + { + BinaryenExpressionRef operands[] = { expressions[10], expressions[11], expressions[12], expressions[13] }; + expressions[765] = BinaryenReturnCall(the_module, "kitchen()sinker", operands, 4, 2); + } + expressions[766] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); + { + BinaryenExpressionRef operands[] = { expressions[14], expressions[15], expressions[16], expressions[17] }; + expressions[767] = BinaryenReturnCallIndirect(the_module, expressions[766], operands, 4, 9, 2); + } + expressions[768] = BinaryenTry(the_module, expressions[35], expressions[43]); + expressions[769] = BinaryenAtomicLoad(the_module, 4, 0, 2, expressions[23]); + expressions[770] = BinaryenAtomicStore(the_module, 4, 0, expressions[23], expressions[769], 2); + expressions[771] = BinaryenAtomicWait(the_module, expressions[23], expressions[23], expressions[33], 2); + expressions[772] = BinaryenDrop(the_module, expressions[771]); + expressions[773] = BinaryenAtomicNotify(the_module, expressions[23], expressions[23]); + expressions[774] = BinaryenDrop(the_module, expressions[773]); + expressions[775] = BinaryenAtomicFence(the_module); + expressions[776] = BinaryenPop(the_module, 2); + expressions[777] = BinaryenPush(the_module, expressions[776]); + expressions[778] = BinaryenPop(the_module, 3); + expressions[779] = BinaryenPush(the_module, expressions[778]); + expressions[780] = BinaryenPop(the_module, 4); + expressions[781] = BinaryenPush(the_module, expressions[780]); + expressions[782] = BinaryenPop(the_module, 5); + expressions[783] = BinaryenPush(the_module, expressions[782]); + expressions[784] = BinaryenPop(the_module, 7); + expressions[785] = BinaryenPush(the_module, expressions[784]); + expressions[786] = BinaryenPop(the_module, 8); + expressions[787] = BinaryenPush(the_module, expressions[786]); + expressions[788] = BinaryenNop(the_module); + expressions[789] = BinaryenUnreachable(the_module); + BinaryenExpressionPrint(expressions[51]); (f32.neg (f32.const -33.61199951171875) ) + { + 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[199], expressions[201], expressions[203], expressions[205], expressions[207], expressions[209], + expressions[211], expressions[213], expressions[216], expressions[219], expressions[222], expressions[225], + expressions[228], expressions[231], expressions[234], expressions[237], expressions[240], expressions[243], + expressions[246], expressions[249], expressions[252], expressions[255], expressions[258], expressions[261], + expressions[264], expressions[267], expressions[270], expressions[273], expressions[276], expressions[279], + expressions[282], expressions[285], expressions[288], expressions[291], expressions[294], expressions[297], + expressions[300], expressions[303], expressions[306], expressions[309], expressions[312], expressions[315], + expressions[318], expressions[321], expressions[324], expressions[327], expressions[330], expressions[333], + expressions[336], expressions[339], expressions[342], expressions[345], expressions[348], expressions[351], + expressions[354], expressions[357], expressions[360], expressions[363], expressions[366], expressions[369], + expressions[372], expressions[375], expressions[378], expressions[381], expressions[384], expressions[387], + expressions[390], expressions[393], expressions[396], expressions[399], expressions[402], expressions[405], + expressions[408], expressions[411], expressions[414], expressions[417], expressions[420], expressions[423], + expressions[426], expressions[429], expressions[432], expressions[435], expressions[438], expressions[441], + expressions[444], expressions[447], expressions[450], expressions[453], expressions[456], expressions[459], + expressions[462], expressions[465], expressions[468], expressions[471], expressions[474], expressions[477], + expressions[480], expressions[483], expressions[486], expressions[489], expressions[492], expressions[495], + expressions[498], expressions[501], expressions[504], expressions[507], expressions[510], expressions[513], + expressions[516], expressions[519], expressions[522], expressions[525], expressions[528], expressions[531], + expressions[534], 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[596], expressions[598], expressions[600], + expressions[602], expressions[604], expressions[606], expressions[608], expressions[610], expressions[613], + expressions[616], expressions[619], expressions[622], expressions[625], expressions[628], expressions[631], + expressions[634], expressions[637], expressions[640], expressions[643], expressions[646], expressions[649], + expressions[652], expressions[655], expressions[658], expressions[661], expressions[664], expressions[666], + expressions[668], expressions[670], expressions[672], expressions[674], expressions[676], expressions[678], + expressions[680], expressions[682], expressions[684], expressions[687], expressions[691], expressions[695], + expressions[699], expressions[703], expressions[707], expressions[711], expressions[712], expressions[716], + expressions[720], expressions[721], expressions[722], expressions[723], expressions[725], expressions[727], + expressions[728], expressions[730], expressions[732], expressions[733], expressions[734], expressions[736], + expressions[738], expressions[741], expressions[744], expressions[746], expressions[748], expressions[751], + expressions[753], expressions[755], expressions[757], expressions[759], expressions[760], expressions[761], + expressions[762], expressions[764], expressions[765], expressions[767], expressions[768], expressions[770], + expressions[772], expressions[774], expressions[775], expressions[777], expressions[779], expressions[781], + expressions[783], expressions[785], expressions[787], expressions[788], expressions[789] }; + expressions[790] = BinaryenBlock(the_module, "the-value", children, 298, BinaryenTypeAuto()); + } + expressions[791] = BinaryenDrop(the_module, expressions[790]); + { + BinaryenExpressionRef children[] = { expressions[791] }; + expressions[792] = BinaryenBlock(the_module, "the-nothing", children, 1, BinaryenTypeAuto()); + } + expressions[793] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + { + BinaryenExpressionRef children[] = { expressions[792], expressions[793] }; + expressions[794] = BinaryenBlock(the_module, "the-body", children, 2, BinaryenTypeAuto()); + } + { + BinaryenType varTypes[] = { 2, 8 }; + functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", 9, 2, varTypes, 2, expressions[794]); + } + expressions[795] = BinaryenConst(the_module, BinaryenLiteralInt32(7)); + globals[0] = BinaryenAddGlobal(the_module, "a-global", 2, 0, expressions[795]); + expressions[796] = BinaryenConst(the_module, BinaryenLiteralFloat32(7.5)); + globals[1] = BinaryenAddGlobal(the_module, "a-mutable-global", 4, 1, expressions[796]); + { + BinaryenType t270[] = {2, 5}; + BinaryenTypeCreate(t270, 2); // 10 + } + BinaryenAddFunctionImport(the_module, "an-imported", "module", "base", 10, 4); + exports[0] = BinaryenAddFunctionExport(the_module, "kitchen()sinker", "kitchen_sinker"); + BinaryenFunctionGetName(functions[0]); + expressions[797] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + const char* funcNames[] = { "kitchen()sinker" }; + BinaryenSetFunctionTable(the_module, 1, 1, funcNames, 1, expressions[797]); + } + expressions[798] = 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[798], expressions[0] }; + BinaryenIndex segmentSizes[] = { 12, 12 }; + BinaryenSetMemory(the_module, 1, 256, "mem", segments, segmentPassive, segmentOffsets, segmentSizes, 2, 1); + } + expressions[799] = BinaryenNop(the_module); + { + BinaryenType varTypes[] = { 0 }; + functions[1] = BinaryenAddFunction(the_module, "starter", 0, 0, varTypes, 0, expressions[799]); + } + BinaryenSetStart(the_module, functions[1]); + BinaryenModuleAutoDrop(the_module); + BinaryenModuleSetFeatures(the_module, 511); + BinaryenModuleGetFeatures(the_module); + BinaryenModuleValidate(the_module); + BinaryenModulePrint(the_module); (module - (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) - (type $fiF (func (param i32 f64) (result f32))) - (type $v (func)) - (type $3 (func)) + (type $i32_i64_f32_f64_=>_i32 (func (param i32 i64 f32 f64) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_f64_=>_f32 (func (param i32 f64) (result f32))) (import "module" "base" (func $an-imported (param i32 f64) (result f32))) (memory $0 (shared 1 256)) (data (i32.const 10) "hello, world") @@ -39,7 +1775,7 @@ BinaryenFeatureAll: 511 (export "kitchen_sinker" (func "$kitchen()sinker")) (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) + (func "$kitchen()sinker" (; 1 ;) (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) @@ -1557,7 +3293,7 @@ BinaryenFeatureAll: 511 ) (drop (i32.eqz - (call_indirect (type $iiIfF) + (call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -1621,7 +3357,7 @@ BinaryenFeatureAll: 511 (f32.const 1.2999999523162842) (f64.const 3.7) ) - (return_call_indirect (type $iiIfF) + (return_call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -1693,32 +3429,473 @@ BinaryenFeatureAll: 511 (i32.const 42) ) ) - (func $starter (; 2 ;) (type $v) + (func $starter (; 2 ;) (nop) ) ) -(module - (type $i (func (result i32))) - (type $I (func (result i64))) - (func $unreachable-fn (; 0 ;) (type $i) (result i32) - (call_indirect (type $I) - (unreachable) - ) - ) -) + BinaryenModuleDispose(the_module); + expressions.clear(); + functions.clear(); + globals.clear(); + events.clear(); + exports.clear(); + relooperBlocks.clear(); + the_module = BinaryenModuleCreate(); + expressions[size_t(NULL)] = BinaryenExpressionRef(NULL); + BinaryenAddFunctionImport(the_module, "check", "module", "check", 2, 0); + the_relooper = RelooperCreate(the_module); + expressions[1] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); + { + BinaryenExpressionRef operands[] = { expressions[1] }; + expressions[2] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[2]); + expressions[3] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[0] = BinaryenAddFunction(the_module, "just-one-block", 0, 0, varTypes, 1, expressions[3]); + } + the_relooper = RelooperCreate(the_module); + expressions[4] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[4] }; + expressions[5] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[5]); + expressions[6] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[6] }; + expressions[7] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[7]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); + expressions[8] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[1] = BinaryenAddFunction(the_module, "two-blocks", 0, 0, varTypes, 1, expressions[8]); + } + the_relooper = RelooperCreate(the_module); + expressions[9] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[9] }; + expressions[10] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[10]); + expressions[11] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[11] }; + expressions[12] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[12]); + expressions[13] = BinaryenConst(the_module, BinaryenLiteralInt32(77)); + expressions[14] = BinaryenDrop(the_module, expressions[13]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[14]); + expressions[15] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[2] = BinaryenAddFunction(the_module, "two-blocks-plus-code", 0, 0, varTypes, 1, expressions[15]); + } + the_relooper = RelooperCreate(the_module); + expressions[16] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[16] }; + expressions[17] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[17]); + expressions[18] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[18] }; + expressions[19] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[19]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); + expressions[20] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[3] = BinaryenAddFunction(the_module, "loop", 0, 0, varTypes, 1, expressions[20]); + } + the_relooper = RelooperCreate(the_module); + expressions[21] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[21] }; + expressions[22] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[22]); + expressions[23] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[23] }; + expressions[24] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[24]); + expressions[25] = BinaryenConst(the_module, BinaryenLiteralInt32(33)); + expressions[26] = BinaryenDrop(the_module, expressions[25]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[26]); + expressions[27] = BinaryenConst(the_module, BinaryenLiteralInt32(-66)); + expressions[28] = BinaryenDrop(the_module, expressions[27]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[28]); + expressions[29] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[4] = BinaryenAddFunction(the_module, "loop-plus-code", 0, 0, varTypes, 1, expressions[29]); + } + the_relooper = RelooperCreate(the_module); + expressions[30] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[30] }; + expressions[31] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[31]); + expressions[32] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[32] }; + expressions[33] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[33]); + expressions[34] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[34] }; + expressions[35] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[35]); + expressions[36] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[36], expressions[0]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); + expressions[37] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[5] = BinaryenAddFunction(the_module, "split", 0, 0, varTypes, 1, expressions[37]); + } + the_relooper = RelooperCreate(the_module); + expressions[38] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[38] }; + expressions[39] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[39]); + expressions[40] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[40] }; + expressions[41] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[41]); + expressions[42] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[42] }; + expressions[43] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[43]); + expressions[44] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + expressions[45] = BinaryenDrop(the_module, expressions[44]); + expressions[46] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[46], expressions[45]); + expressions[47] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); + expressions[48] = BinaryenDrop(the_module, expressions[47]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[48]); + expressions[49] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[6] = BinaryenAddFunction(the_module, "split-plus-code", 0, 0, varTypes, 1, expressions[49]); + } + the_relooper = RelooperCreate(the_module); + expressions[50] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[50] }; + expressions[51] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[51]); + expressions[52] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[52] }; + expressions[53] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[53]); + expressions[54] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[54] }; + expressions[55] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[55]); + expressions[56] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[56], expressions[0]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); + expressions[57] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[7] = BinaryenAddFunction(the_module, "if", 0, 0, varTypes, 1, expressions[57]); + } + the_relooper = RelooperCreate(the_module); + expressions[58] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[58] }; + expressions[59] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[59]); + expressions[60] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[60] }; + expressions[61] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[61]); + expressions[62] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[62] }; + expressions[63] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[63]); + expressions[64] = BinaryenConst(the_module, BinaryenLiteralInt32(-1)); + expressions[65] = BinaryenDrop(the_module, expressions[64]); + expressions[66] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[66], expressions[65]); + expressions[67] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); + expressions[68] = BinaryenDrop(the_module, expressions[67]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[68]); + expressions[69] = BinaryenConst(the_module, BinaryenLiteralInt32(-3)); + expressions[70] = BinaryenDrop(the_module, expressions[69]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[70]); + expressions[71] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[8] = BinaryenAddFunction(the_module, "if-plus-code", 0, 0, varTypes, 1, expressions[71]); + } + the_relooper = RelooperCreate(the_module); + expressions[72] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[72] }; + expressions[73] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[73]); + expressions[74] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[74] }; + expressions[75] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[75]); + expressions[76] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[76] }; + expressions[77] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[77]); + expressions[78] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + { + BinaryenExpressionRef operands[] = { expressions[78] }; + expressions[79] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[79]); + expressions[80] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[80], expressions[0]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[3], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[0], expressions[0]); + expressions[81] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[9] = BinaryenAddFunction(the_module, "if-else", 0, 0, varTypes, 1, expressions[81]); + } + the_relooper = RelooperCreate(the_module); + expressions[82] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[82] }; + expressions[83] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[83]); + expressions[84] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[84] }; + expressions[85] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[85]); + expressions[86] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[86] }; + expressions[87] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[87]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); + expressions[88] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[88], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); + expressions[89] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[10] = BinaryenAddFunction(the_module, "loop-tail", 0, 0, varTypes, 1, expressions[89]); + } + the_relooper = RelooperCreate(the_module); + expressions[90] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[90] }; + expressions[91] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[91]); + expressions[92] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[92] }; + expressions[93] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[93]); + expressions[94] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[94] }; + expressions[95] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[95]); + expressions[96] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + { + BinaryenExpressionRef operands[] = { expressions[96] }; + expressions[97] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[97]); + expressions[98] = BinaryenConst(the_module, BinaryenLiteralInt32(4)); + { + BinaryenExpressionRef operands[] = { expressions[98] }; + expressions[99] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[4] = RelooperAddBlock(the_relooper, expressions[99]); + expressions[100] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); + { + BinaryenExpressionRef operands[] = { expressions[100] }; + expressions[101] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[5] = RelooperAddBlock(the_relooper, expressions[101]); + expressions[102] = BinaryenConst(the_module, BinaryenLiteralInt32(6)); + { + BinaryenExpressionRef operands[] = { expressions[102] }; + expressions[103] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[6] = RelooperAddBlock(the_relooper, expressions[103]); + expressions[104] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + expressions[105] = BinaryenDrop(the_module, expressions[104]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[105]); + expressions[106] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[106], expressions[0]); + expressions[107] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); + expressions[108] = BinaryenDrop(the_module, expressions[107]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[6], expressions[0], expressions[108]); + expressions[109] = BinaryenConst(the_module, BinaryenLiteralInt32(-6)); + RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[109], expressions[0]); + expressions[110] = BinaryenConst(the_module, BinaryenLiteralInt32(30)); + expressions[111] = BinaryenDrop(the_module, expressions[110]); + RelooperAddBranch(relooperBlocks[2], relooperBlocks[1], expressions[0], expressions[111]); + expressions[112] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); + RelooperAddBranch(relooperBlocks[3], relooperBlocks[4], expressions[112], expressions[0]); + RelooperAddBranch(relooperBlocks[3], relooperBlocks[5], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[4], relooperBlocks[5], expressions[0], expressions[0]); + expressions[113] = BinaryenConst(the_module, BinaryenLiteralInt32(40)); + expressions[114] = BinaryenDrop(the_module, expressions[113]); + RelooperAddBranch(relooperBlocks[5], relooperBlocks[6], expressions[0], expressions[114]); + expressions[115] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[11] = BinaryenAddFunction(the_module, "nontrivial-loop-plus-phi-to-head", 0, 0, varTypes, 1, expressions[115]); + } + the_relooper = RelooperCreate(the_module); + expressions[116] = BinaryenConst(the_module, BinaryenLiteralInt32(-99)); + expressions[117] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[117] }; + expressions[118] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlockWithSwitch(the_relooper, expressions[118], expressions[116]); + expressions[119] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[119] }; + expressions[120] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[120]); + expressions[121] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[121] }; + expressions[122] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[122]); + expressions[123] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); + { + BinaryenExpressionRef operands[] = { expressions[123] }; + expressions[124] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[124]); + { + BinaryenIndex indexes[] = { 2, 5 }; + RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[1], indexes, 2, expressions[0]); + } + expressions[125] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); + expressions[126] = BinaryenDrop(the_module, expressions[125]); + { + BinaryenIndex indexes[] = { 4 }; + RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[2], indexes, 1, expressions[126]); + } + { + BinaryenIndex indexes[] = { 0 }; + RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[3], indexes, 0, expressions[0]); + } + expressions[127] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[12] = BinaryenAddFunction(the_module, "switch", 0, 0, varTypes, 1, expressions[127]); + } + the_relooper = RelooperCreate(the_module); + expressions[128] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); + { + BinaryenExpressionRef operands[] = { expressions[128] }; + expressions[129] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[129]); + expressions[130] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); + { + BinaryenExpressionRef operands[] = { expressions[130] }; + expressions[131] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[131]); + expressions[132] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); + { + BinaryenExpressionRef operands[] = { expressions[132] }; + expressions[133] = BinaryenCall(the_module, "check", operands, 1, 0); + } + relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[133]); + expressions[134] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[134], expressions[0]); + RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); + RelooperAddBranch(relooperBlocks[2], relooperBlocks[1], expressions[0], expressions[0]); + expressions[135] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 3); + { + BinaryenType varTypes[] = { 2, 2, 3, 2, 4, 5, 2 }; + functions[13] = BinaryenAddFunction(the_module, "duffs-device", 0, 0, varTypes, 7, expressions[135]); + } + the_relooper = RelooperCreate(the_module); + expressions[136] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); + { + BinaryenExpressionRef operands[] = { expressions[136] }; + expressions[137] = BinaryenCall(the_module, "check", operands, 1, 0); + } + expressions[138] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); + expressions[139] = BinaryenReturn(the_module, expressions[138]); + { + BinaryenExpressionRef children[] = { expressions[137], expressions[139] }; + expressions[140] = BinaryenBlock(the_module, "the-list", children, 2, BinaryenTypeAuto()); + } + relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[140]); + expressions[141] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); + { + BinaryenType varTypes[] = { 2 }; + functions[14] = BinaryenAddFunction(the_module, "return", 0, 2, varTypes, 1, expressions[141]); + } raw: + BinaryenModulePrint(the_module); (module - (type $v (func)) - (type $vi (func (param i32))) - (type $i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "module" "check" (func $check (param i32))) - (func $just-one-block (; 1 ;) (type $v) + (func $just-one-block (; 1 ;) (local $0 i32) (call $check (i32.const 1337) ) ) - (func $two-blocks (; 2 ;) (type $v) + (func $two-blocks (; 2 ;) (local $0 i32) (block (call $check @@ -1729,7 +3906,7 @@ raw: ) ) ) - (func $two-blocks-plus-code (; 3 ;) (type $v) + (func $two-blocks-plus-code (; 3 ;) (local $0 i32) (block (block @@ -1745,7 +3922,7 @@ raw: ) ) ) - (func $loop (; 4 ;) (type $v) + (func $loop (; 4 ;) (local $0 i32) (loop $shape$0$continue (block @@ -1761,7 +3938,7 @@ raw: ) ) ) - (func $loop-plus-code (; 5 ;) (type $v) + (func $loop-plus-code (; 5 ;) (local $0 i32) (loop $shape$0$continue (block @@ -1785,7 +3962,7 @@ raw: ) ) ) - (func $split (; 6 ;) (type $v) + (func $split (; 6 ;) (local $0 i32) (call $check (i32.const 0) @@ -1804,7 +3981,7 @@ raw: ) ) ) - (func $split-plus-code (; 7 ;) (type $v) + (func $split-plus-code (; 7 ;) (local $0 i32) (call $check (i32.const 0) @@ -1833,7 +4010,7 @@ raw: ) ) ) - (func $if (; 8 ;) (type $v) + (func $if (; 8 ;) (local $0 i32) (block $block$3$break (call $check @@ -1858,7 +4035,7 @@ raw: ) ) ) - (func $if-plus-code (; 9 ;) (type $v) + (func $if-plus-code (; 9 ;) (local $0 i32) (block $block$3$break (call $check @@ -1896,7 +4073,7 @@ raw: ) ) ) - (func $if-else (; 10 ;) (type $v) + (func $if-else (; 10 ;) (local $0 i32) (block $block$4$break (call $check @@ -1928,7 +4105,7 @@ raw: ) ) ) - (func $loop-tail (; 11 ;) (type $v) + (func $loop-tail (; 11 ;) (local $0 i32) (block $block$3$break (loop $shape$0$continue @@ -1953,7 +4130,7 @@ raw: ) ) ) - (func $nontrivial-loop-plus-phi-to-head (; 12 ;) (type $v) + (func $nontrivial-loop-plus-phi-to-head (; 12 ;) (local $0 i32) (block $block$2$break (call $check @@ -2040,7 +4217,7 @@ raw: ) ) ) - (func $switch (; 13 ;) (type $v) + (func $switch (; 13 ;) (local $0 i32) (call $check (i32.const 0) @@ -2084,7 +4261,7 @@ raw: (br $switch$1$leave) ) ) - (func $duffs-device (; 14 ;) (type $v) + (func $duffs-device (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i64) @@ -2159,7 +4336,7 @@ raw: ) ) ) - (func $return (; 15 ;) (type $i) (result i32) + (func $return (; 15 ;) (result i32) (local $0 i32) (block (call $check @@ -2171,1837 +4348,74 @@ raw: ) ) ) + BinaryenModuleValidate(the_module); + BinaryenModuleOptimize(the_module); + BinaryenModuleValidate(the_module); optimized: + BinaryenModulePrint(the_module); (module ) -module loaded from binary form: -(module - (type $0 (func (param i32 i32) (result i32))) - (func $adder (; 0 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) - (i32.add - (local.get $0) - (local.get $1) - ) - ) -) -module s-expr printed (in memory): -(module - (type $0 (func (param i32 i32) (result i32))) - (func $adder (; 0 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) - (i32.add - (local.get $0) - (local.get $1) - ) - ) -) - -module s-expr printed (in memory, caller-owned): -(module - (type $0 (func (param i32 i32) (result i32))) - (func $adder (; 0 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) - (i32.add - (local.get $0) - (local.get $1) - ) - ) -) - -(module - (type $vi (func (param i32))) - (type $v (func)) - (import "spectest" "print" (func $print-i32 (param i32))) - (start $starter) - (func $starter (; 1 ;) (type $v) - (call $print-i32 - (i32.const 1234) - ) - ) -) -1234 : i32 -(module - (type $v (func)) - (func $func (; 0 ;) (type $v) - (local $0 i32) - (local.set $0 - (i64.const 1234) - ) - ) -) -validation: 0 -// beginning a Binaryen API trace -#include <math.h> -#include <map> -#include "binaryen-c.h" -int main() { - std::map<size_t, BinaryenFunctionTypeRef> functionTypes; - std::map<size_t, BinaryenExpressionRef> expressions; - std::map<size_t, BinaryenFunctionRef> functions; - std::map<size_t, BinaryenGlobalRef> globals; - std::map<size_t, BinaryenEventRef> events; - std::map<size_t, BinaryenExportRef> exports; - std::map<size_t, RelooperBlockRef> relooperBlocks; - BinaryenModuleRef the_module = NULL; - RelooperRef the_relooper = NULL; - the_module = BinaryenModuleCreate(); - expressions[size_t(NULL)] = BinaryenExpressionRef(NULL); - expressions[1] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[2] = BinaryenConst(the_module, BinaryenLiteralInt64(2)); - expressions[3] = BinaryenConst(the_module, BinaryenLiteralFloat32(3.14)); - expressions[4] = BinaryenConst(the_module, BinaryenLiteralFloat64(2.1828)); - expressions[5] = BinaryenConst(the_module, BinaryenLiteralFloat32(NAN)); - expressions[6] = BinaryenConst(the_module, BinaryenLiteralFloat64(NAN)); - { - uint8_t t0[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[7] = BinaryenConst(the_module, BinaryenLiteralVec128(t0)); - } - expressions[8] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); - expressions[9] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); - expressions[10] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); - expressions[11] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); - expressions[12] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); - expressions[13] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); - expressions[14] = BinaryenConst(the_module, BinaryenLiteralInt32(13)); - expressions[15] = BinaryenConst(the_module, BinaryenLiteralInt64(37)); - expressions[16] = BinaryenConst(the_module, BinaryenLiteralFloat32(1.3)); - expressions[17] = BinaryenConst(the_module, BinaryenLiteralFloat64(3.7)); - { - BinaryenType paramTypes[] = { 2, 3, 4, 5 }; - functionTypes[0] = BinaryenAddFunctionType(the_module, "iiIfF", 2, paramTypes, 4); - } - expressions[18] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[19] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - expressions[20] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - expressions[21] = BinaryenConst(the_module, BinaryenLiteralInt32(4)); - expressions[22] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); - expressions[23] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[24] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[25] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[26] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[27] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[28] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - expressions[29] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); - expressions[30] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - expressions[31] = BinaryenConst(the_module, BinaryenLiteralInt32(11)); - expressions[32] = BinaryenConst(the_module, BinaryenLiteralInt32(110)); - expressions[33] = BinaryenConst(the_module, BinaryenLiteralInt64(111)); - BinaryenAddEvent(the_module, "a-event", 0, 2, 0); - 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, 8); - expressions[37] = BinaryenLocalSet(the_module, 5, expressions[36]); - expressions[38] = BinaryenLocalGet(the_module, 5, 8); - 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, 2); - } - 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, 6, expressions[50]); - expressions[52] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - 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, 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, 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, 57, expressions[94]); - expressions[96] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - 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, 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[144] = BinaryenConst(the_module, BinaryenLiteralVec128(t1)); - } - 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[146] = BinaryenConst(the_module, BinaryenLiteralVec128(t2)); - } - 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[148] = BinaryenConst(the_module, BinaryenLiteralVec128(t3)); - } - 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[150] = BinaryenConst(the_module, BinaryenLiteralVec128(t4)); - } - 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[152] = BinaryenConst(the_module, BinaryenLiteralVec128(t5)); - } - 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[154] = BinaryenConst(the_module, BinaryenLiteralVec128(t6)); - } - 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[156] = BinaryenConst(the_module, BinaryenLiteralVec128(t7)); - } - 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[158] = BinaryenConst(the_module, BinaryenLiteralVec128(t8)); - } - 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[160] = BinaryenConst(the_module, BinaryenLiteralVec128(t9)); - } - 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[162] = BinaryenConst(the_module, BinaryenLiteralVec128(t10)); - } - 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[164] = BinaryenConst(the_module, BinaryenLiteralVec128(t11)); - } - 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[166] = BinaryenConst(the_module, BinaryenLiteralVec128(t12)); - } - 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[168] = BinaryenConst(the_module, BinaryenLiteralVec128(t13)); - } - 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[170] = BinaryenConst(the_module, BinaryenLiteralVec128(t14)); - } - 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[172] = BinaryenConst(the_module, BinaryenLiteralVec128(t15)); - } - 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[174] = BinaryenConst(the_module, BinaryenLiteralVec128(t16)); - } - 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[176] = BinaryenConst(the_module, BinaryenLiteralVec128(t17)); - } - 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[178] = BinaryenConst(the_module, BinaryenLiteralVec128(t18)); - } - 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[180] = BinaryenConst(the_module, BinaryenLiteralVec128(t19)); - } - 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[182] = BinaryenConst(the_module, BinaryenLiteralVec128(t20)); - } - 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[184] = BinaryenConst(the_module, BinaryenLiteralVec128(t21)); - } - 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[186] = BinaryenConst(the_module, BinaryenLiteralVec128(t22)); - } - 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[188] = BinaryenConst(the_module, BinaryenLiteralVec128(t23)); - } - 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[190] = BinaryenConst(the_module, BinaryenLiteralVec128(t24)); - } - 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[192] = BinaryenConst(the_module, BinaryenLiteralVec128(t25)); - } - 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[194] = BinaryenConst(the_module, BinaryenLiteralVec128(t26)); - } - 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[196] = BinaryenConst(the_module, BinaryenLiteralVec128(t27)); - } - expressions[197] = BinaryenUnary(the_module, 92, expressions[196]); - { - uint8_t t28[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[198] = BinaryenConst(the_module, BinaryenLiteralVec128(t28)); - } - expressions[199] = BinaryenUnary(the_module, 93, expressions[198]); - { - uint8_t t29[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[200] = BinaryenConst(the_module, BinaryenLiteralVec128(t29)); - } - expressions[201] = BinaryenUnary(the_module, 94, expressions[200]); - { - uint8_t t30[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[202] = BinaryenConst(the_module, BinaryenLiteralVec128(t30)); - } - expressions[203] = BinaryenUnary(the_module, 95, expressions[202]); - { - uint8_t t31[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[204] = BinaryenConst(the_module, BinaryenLiteralVec128(t31)); - } - expressions[205] = BinaryenUnary(the_module, 96, expressions[204]); - { - uint8_t t32[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[206] = BinaryenConst(the_module, BinaryenLiteralVec128(t32)); - } - expressions[207] = BinaryenUnary(the_module, 97, expressions[206]); - { - uint8_t t33[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[208] = BinaryenConst(the_module, BinaryenLiteralVec128(t33)); - } - expressions[209] = BinaryenUnary(the_module, 98, expressions[208]); - { - uint8_t t34[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[210] = BinaryenConst(the_module, BinaryenLiteralVec128(t34)); - } - expressions[211] = BinaryenUnary(the_module, 99, expressions[210]); - { - uint8_t t35[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[212] = BinaryenConst(the_module, BinaryenLiteralVec128(t35)); - } - expressions[213] = BinaryenUnary(the_module, 100, expressions[212]); - expressions[214] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[215] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[216] = BinaryenBinary(the_module, 0, expressions[215], expressions[214]); - expressions[217] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[218] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[219] = BinaryenBinary(the_module, 64, expressions[218], expressions[217]); - expressions[220] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[221] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[222] = BinaryenBinary(the_module, 3, expressions[221], expressions[220]); - expressions[223] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[224] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[225] = BinaryenBinary(the_module, 29, expressions[224], expressions[223]); - expressions[226] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[227] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[228] = BinaryenBinary(the_module, 30, expressions[227], expressions[226]); - expressions[229] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[230] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[231] = BinaryenBinary(the_module, 6, expressions[230], expressions[229]); - expressions[232] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[233] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[234] = BinaryenBinary(the_module, 7, expressions[233], expressions[232]); - expressions[235] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[236] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[237] = BinaryenBinary(the_module, 33, expressions[236], expressions[235]); - expressions[238] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[239] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[240] = BinaryenBinary(the_module, 9, expressions[239], expressions[238]); - expressions[241] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[242] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[243] = BinaryenBinary(the_module, 35, expressions[242], expressions[241]); - expressions[244] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[245] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[246] = BinaryenBinary(the_module, 36, expressions[245], expressions[244]); - expressions[247] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[248] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[249] = BinaryenBinary(the_module, 12, expressions[248], expressions[247]); - expressions[250] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[251] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[252] = BinaryenBinary(the_module, 13, expressions[251], expressions[250]); - expressions[253] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[254] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[255] = BinaryenBinary(the_module, 39, expressions[254], expressions[253]); - expressions[256] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[257] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[258] = BinaryenBinary(the_module, 53, expressions[257], expressions[256]); - expressions[259] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[260] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[261] = BinaryenBinary(the_module, 67, expressions[260], expressions[259]); - expressions[262] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[263] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[264] = BinaryenBinary(the_module, 55, expressions[263], expressions[262]); - expressions[265] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[266] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[267] = BinaryenBinary(the_module, 69, expressions[266], expressions[265]); - expressions[268] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[269] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[270] = BinaryenBinary(the_module, 15, expressions[269], expressions[268]); - expressions[271] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[272] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[273] = BinaryenBinary(the_module, 58, expressions[272], expressions[271]); - expressions[274] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[275] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[276] = BinaryenBinary(the_module, 17, expressions[275], expressions[274]); - expressions[277] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[278] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[279] = BinaryenBinary(the_module, 43, expressions[278], expressions[277]); - expressions[280] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[281] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[282] = BinaryenBinary(the_module, 44, expressions[281], expressions[280]); - expressions[283] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[284] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[285] = BinaryenBinary(the_module, 20, expressions[284], expressions[283]); - expressions[286] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[287] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[288] = BinaryenBinary(the_module, 46, expressions[287], expressions[286]); - expressions[289] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[290] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[291] = BinaryenBinary(the_module, 22, expressions[290], expressions[289]); - expressions[292] = BinaryenConst(the_module, BinaryenLiteralInt32(-11)); - expressions[293] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - expressions[294] = BinaryenBinary(the_module, 23, expressions[293], expressions[292]); - expressions[295] = BinaryenConst(the_module, BinaryenLiteralInt64(-23)); - expressions[296] = BinaryenConst(the_module, BinaryenLiteralInt64(-22)); - expressions[297] = BinaryenBinary(the_module, 49, expressions[296], expressions[295]); - expressions[298] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[299] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[300] = BinaryenBinary(the_module, 59, expressions[299], expressions[298]); - expressions[301] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[302] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[303] = BinaryenBinary(the_module, 73, expressions[302], expressions[301]); - expressions[304] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9007.33)); - expressions[305] = BinaryenConst(the_module, BinaryenLiteralFloat64(-9005.84)); - expressions[306] = BinaryenBinary(the_module, 74, expressions[305], expressions[304]); - expressions[307] = BinaryenConst(the_module, BinaryenLiteralFloat32(-62.5)); - expressions[308] = BinaryenConst(the_module, BinaryenLiteralFloat32(-33.612)); - expressions[309] = BinaryenBinary(the_module, 62, expressions[308], expressions[307]); - { - uint8_t t36[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[310] = 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[311] = BinaryenConst(the_module, BinaryenLiteralVec128(t37)); - } - expressions[312] = BinaryenBinary(the_module, 76, expressions[311], expressions[310]); - { - uint8_t t38[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[313] = 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[314] = BinaryenConst(the_module, BinaryenLiteralVec128(t39)); - } - expressions[315] = BinaryenBinary(the_module, 77, expressions[314], expressions[313]); - { - uint8_t t40[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[316] = 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[317] = BinaryenConst(the_module, BinaryenLiteralVec128(t41)); - } - expressions[318] = BinaryenBinary(the_module, 78, expressions[317], expressions[316]); - { - uint8_t t42[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[319] = 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[320] = BinaryenConst(the_module, BinaryenLiteralVec128(t43)); - } - expressions[321] = BinaryenBinary(the_module, 79, expressions[320], expressions[319]); - { - uint8_t t44[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[322] = 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[323] = BinaryenConst(the_module, BinaryenLiteralVec128(t45)); - } - expressions[324] = BinaryenBinary(the_module, 80, expressions[323], expressions[322]); - { - uint8_t t46[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[325] = 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[326] = BinaryenConst(the_module, BinaryenLiteralVec128(t47)); - } - expressions[327] = BinaryenBinary(the_module, 81, expressions[326], expressions[325]); - { - uint8_t t48[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[328] = 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[329] = BinaryenConst(the_module, BinaryenLiteralVec128(t49)); - } - expressions[330] = BinaryenBinary(the_module, 82, expressions[329], expressions[328]); - { - uint8_t t50[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[331] = 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[332] = BinaryenConst(the_module, BinaryenLiteralVec128(t51)); - } - expressions[333] = BinaryenBinary(the_module, 83, expressions[332], expressions[331]); - { - uint8_t t52[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[334] = 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[335] = BinaryenConst(the_module, BinaryenLiteralVec128(t53)); - } - expressions[336] = BinaryenBinary(the_module, 84, expressions[335], expressions[334]); - { - uint8_t t54[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[337] = 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[338] = BinaryenConst(the_module, BinaryenLiteralVec128(t55)); - } - expressions[339] = BinaryenBinary(the_module, 85, expressions[338], expressions[337]); - { - uint8_t t56[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[340] = 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[341] = BinaryenConst(the_module, BinaryenLiteralVec128(t57)); - } - expressions[342] = BinaryenBinary(the_module, 86, expressions[341], expressions[340]); - { - uint8_t t58[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[343] = 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[344] = BinaryenConst(the_module, BinaryenLiteralVec128(t59)); - } - expressions[345] = BinaryenBinary(the_module, 87, expressions[344], expressions[343]); - { - uint8_t t60[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[346] = 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[347] = BinaryenConst(the_module, BinaryenLiteralVec128(t61)); - } - expressions[348] = BinaryenBinary(the_module, 88, expressions[347], expressions[346]); - { - uint8_t t62[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[349] = 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[350] = BinaryenConst(the_module, BinaryenLiteralVec128(t63)); - } - expressions[351] = BinaryenBinary(the_module, 89, expressions[350], expressions[349]); - { - uint8_t t64[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[352] = 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[353] = BinaryenConst(the_module, BinaryenLiteralVec128(t65)); - } - expressions[354] = BinaryenBinary(the_module, 90, expressions[353], expressions[352]); - { - uint8_t t66[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[355] = 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[356] = BinaryenConst(the_module, BinaryenLiteralVec128(t67)); - } - expressions[357] = BinaryenBinary(the_module, 91, expressions[356], expressions[355]); - { - uint8_t t68[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[358] = 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[359] = BinaryenConst(the_module, BinaryenLiteralVec128(t69)); - } - expressions[360] = BinaryenBinary(the_module, 92, expressions[359], expressions[358]); - { - uint8_t t70[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[361] = 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[362] = BinaryenConst(the_module, BinaryenLiteralVec128(t71)); - } - expressions[363] = BinaryenBinary(the_module, 93, expressions[362], expressions[361]); - { - uint8_t t72[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[364] = 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[365] = BinaryenConst(the_module, BinaryenLiteralVec128(t73)); - } - expressions[366] = BinaryenBinary(the_module, 94, expressions[365], expressions[364]); - { - uint8_t t74[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[367] = 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[368] = BinaryenConst(the_module, BinaryenLiteralVec128(t75)); - } - expressions[369] = BinaryenBinary(the_module, 95, expressions[368], expressions[367]); - { - uint8_t t76[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[370] = 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[371] = BinaryenConst(the_module, BinaryenLiteralVec128(t77)); - } - expressions[372] = BinaryenBinary(the_module, 96, expressions[371], expressions[370]); - { - uint8_t t78[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[373] = 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[374] = BinaryenConst(the_module, BinaryenLiteralVec128(t79)); - } - expressions[375] = BinaryenBinary(the_module, 97, expressions[374], expressions[373]); - { - uint8_t t80[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[376] = 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[377] = BinaryenConst(the_module, BinaryenLiteralVec128(t81)); - } - expressions[378] = BinaryenBinary(the_module, 98, expressions[377], expressions[376]); - { - uint8_t t82[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[379] = 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[380] = BinaryenConst(the_module, BinaryenLiteralVec128(t83)); - } - expressions[381] = BinaryenBinary(the_module, 99, expressions[380], expressions[379]); - { - uint8_t t84[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[382] = 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[383] = BinaryenConst(the_module, BinaryenLiteralVec128(t85)); - } - expressions[384] = BinaryenBinary(the_module, 100, expressions[383], expressions[382]); - { - uint8_t t86[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[385] = 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[386] = BinaryenConst(the_module, BinaryenLiteralVec128(t87)); - } - expressions[387] = BinaryenBinary(the_module, 101, expressions[386], expressions[385]); - { - uint8_t t88[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[388] = 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[389] = BinaryenConst(the_module, BinaryenLiteralVec128(t89)); - } - expressions[390] = BinaryenBinary(the_module, 102, expressions[389], expressions[388]); - { - uint8_t t90[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[391] = 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[392] = BinaryenConst(the_module, BinaryenLiteralVec128(t91)); - } - expressions[393] = BinaryenBinary(the_module, 103, expressions[392], expressions[391]); - { - uint8_t t92[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[394] = 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[395] = BinaryenConst(the_module, BinaryenLiteralVec128(t93)); - } - expressions[396] = BinaryenBinary(the_module, 104, expressions[395], expressions[394]); - { - uint8_t t94[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[397] = 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[398] = BinaryenConst(the_module, BinaryenLiteralVec128(t95)); - } - expressions[399] = BinaryenBinary(the_module, 105, expressions[398], expressions[397]); - { - uint8_t t96[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[400] = 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[401] = BinaryenConst(the_module, BinaryenLiteralVec128(t97)); - } - expressions[402] = BinaryenBinary(the_module, 106, expressions[401], expressions[400]); - { - uint8_t t98[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[403] = 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[404] = BinaryenConst(the_module, BinaryenLiteralVec128(t99)); - } - expressions[405] = BinaryenBinary(the_module, 107, expressions[404], expressions[403]); - { - uint8_t t100[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[406] = 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[407] = BinaryenConst(the_module, BinaryenLiteralVec128(t101)); - } - expressions[408] = BinaryenBinary(the_module, 108, expressions[407], expressions[406]); - { - uint8_t t102[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[409] = 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[410] = BinaryenConst(the_module, BinaryenLiteralVec128(t103)); - } - expressions[411] = BinaryenBinary(the_module, 109, expressions[410], expressions[409]); - { - uint8_t t104[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[412] = 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[413] = BinaryenConst(the_module, BinaryenLiteralVec128(t105)); - } - expressions[414] = BinaryenBinary(the_module, 110, expressions[413], expressions[412]); - { - uint8_t t106[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[415] = 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[416] = BinaryenConst(the_module, BinaryenLiteralVec128(t107)); - } - expressions[417] = BinaryenBinary(the_module, 111, expressions[416], expressions[415]); - { - uint8_t t108[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[418] = 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[419] = BinaryenConst(the_module, BinaryenLiteralVec128(t109)); - } - expressions[420] = BinaryenBinary(the_module, 112, expressions[419], expressions[418]); - { - uint8_t t110[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[421] = 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[422] = BinaryenConst(the_module, BinaryenLiteralVec128(t111)); - } - expressions[423] = BinaryenBinary(the_module, 113, expressions[422], expressions[421]); - { - uint8_t t112[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[424] = 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[425] = BinaryenConst(the_module, BinaryenLiteralVec128(t113)); - } - expressions[426] = BinaryenBinary(the_module, 114, expressions[425], expressions[424]); - { - uint8_t t114[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[427] = 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[428] = BinaryenConst(the_module, BinaryenLiteralVec128(t115)); - } - expressions[429] = BinaryenBinary(the_module, 115, expressions[428], expressions[427]); - { - uint8_t t116[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[430] = 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[431] = BinaryenConst(the_module, BinaryenLiteralVec128(t117)); - } - expressions[432] = BinaryenBinary(the_module, 116, expressions[431], expressions[430]); - { - uint8_t t118[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[433] = 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[434] = BinaryenConst(the_module, BinaryenLiteralVec128(t119)); - } - expressions[435] = BinaryenBinary(the_module, 117, expressions[434], expressions[433]); - { - uint8_t t120[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[436] = 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[437] = BinaryenConst(the_module, BinaryenLiteralVec128(t121)); - } - expressions[438] = BinaryenBinary(the_module, 118, expressions[437], expressions[436]); - { - uint8_t t122[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[439] = 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[440] = BinaryenConst(the_module, BinaryenLiteralVec128(t123)); - } - expressions[441] = BinaryenBinary(the_module, 119, expressions[440], expressions[439]); - { - uint8_t t124[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[442] = 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[443] = BinaryenConst(the_module, BinaryenLiteralVec128(t125)); - } - expressions[444] = BinaryenBinary(the_module, 120, expressions[443], expressions[442]); - { - uint8_t t126[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[445] = 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[446] = BinaryenConst(the_module, BinaryenLiteralVec128(t127)); - } - expressions[447] = BinaryenBinary(the_module, 121, expressions[446], expressions[445]); - { - uint8_t t128[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[448] = 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[449] = BinaryenConst(the_module, BinaryenLiteralVec128(t129)); - } - expressions[450] = BinaryenBinary(the_module, 122, expressions[449], expressions[448]); - { - uint8_t t130[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[451] = 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[452] = BinaryenConst(the_module, BinaryenLiteralVec128(t131)); - } - expressions[453] = BinaryenBinary(the_module, 123, expressions[452], expressions[451]); - { - uint8_t t132[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[454] = 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[455] = BinaryenConst(the_module, BinaryenLiteralVec128(t133)); - } - expressions[456] = BinaryenBinary(the_module, 124, expressions[455], expressions[454]); - { - uint8_t t134[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[457] = 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[458] = BinaryenConst(the_module, BinaryenLiteralVec128(t135)); - } - expressions[459] = BinaryenBinary(the_module, 125, expressions[458], expressions[457]); - { - uint8_t t136[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[460] = 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[461] = BinaryenConst(the_module, BinaryenLiteralVec128(t137)); - } - expressions[462] = BinaryenBinary(the_module, 126, expressions[461], expressions[460]); - { - uint8_t t138[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[463] = 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[464] = BinaryenConst(the_module, BinaryenLiteralVec128(t139)); - } - expressions[465] = BinaryenBinary(the_module, 127, expressions[464], expressions[463]); - { - uint8_t t140[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[466] = 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[467] = BinaryenConst(the_module, BinaryenLiteralVec128(t141)); - } - expressions[468] = BinaryenBinary(the_module, 128, expressions[467], expressions[466]); - { - uint8_t t142[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[469] = 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[470] = BinaryenConst(the_module, BinaryenLiteralVec128(t143)); - } - expressions[471] = BinaryenBinary(the_module, 133, expressions[470], expressions[469]); - { - uint8_t t144[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[472] = 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[473] = BinaryenConst(the_module, BinaryenLiteralVec128(t145)); - } - expressions[474] = BinaryenBinary(the_module, 134, expressions[473], expressions[472]); - { - uint8_t t146[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[475] = 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[476] = BinaryenConst(the_module, BinaryenLiteralVec128(t147)); - } - expressions[477] = BinaryenBinary(the_module, 135, expressions[476], expressions[475]); - { - uint8_t t148[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[478] = 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[479] = BinaryenConst(the_module, BinaryenLiteralVec128(t149)); - } - expressions[480] = BinaryenBinary(the_module, 136, expressions[479], expressions[478]); - { - uint8_t t150[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[481] = 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[482] = BinaryenConst(the_module, BinaryenLiteralVec128(t151)); - } - expressions[483] = BinaryenBinary(the_module, 137, expressions[482], expressions[481]); - { - uint8_t t152[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[484] = 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[485] = BinaryenConst(the_module, BinaryenLiteralVec128(t153)); - } - expressions[486] = BinaryenBinary(the_module, 138, expressions[485], expressions[484]); - { - uint8_t t154[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[487] = 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[488] = BinaryenConst(the_module, BinaryenLiteralVec128(t155)); - } - expressions[489] = BinaryenBinary(the_module, 139, expressions[488], expressions[487]); - { - uint8_t t156[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[490] = 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[491] = BinaryenConst(the_module, BinaryenLiteralVec128(t157)); - } - expressions[492] = BinaryenBinary(the_module, 140, expressions[491], expressions[490]); - { - uint8_t t158[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[493] = 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[494] = BinaryenConst(the_module, BinaryenLiteralVec128(t159)); - } - expressions[495] = BinaryenBinary(the_module, 141, expressions[494], expressions[493]); - { - uint8_t t160[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[496] = 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[497] = BinaryenConst(the_module, BinaryenLiteralVec128(t161)); - } - expressions[498] = BinaryenBinary(the_module, 142, expressions[497], expressions[496]); - { - uint8_t t162[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[499] = 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[500] = BinaryenConst(the_module, BinaryenLiteralVec128(t163)); - } - expressions[501] = BinaryenBinary(the_module, 143, expressions[500], expressions[499]); - { - uint8_t t164[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[502] = 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[503] = BinaryenConst(the_module, BinaryenLiteralVec128(t165)); - } - expressions[504] = BinaryenBinary(the_module, 144, expressions[503], expressions[502]); - { - uint8_t t166[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[505] = 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[506] = BinaryenConst(the_module, BinaryenLiteralVec128(t167)); - } - expressions[507] = BinaryenBinary(the_module, 145, expressions[506], expressions[505]); - { - uint8_t t168[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[508] = 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[509] = BinaryenConst(the_module, BinaryenLiteralVec128(t169)); - } - expressions[510] = BinaryenBinary(the_module, 146, expressions[509], expressions[508]); - { - uint8_t t170[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[511] = 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[512] = BinaryenConst(the_module, BinaryenLiteralVec128(t171)); - } - expressions[513] = BinaryenBinary(the_module, 129, expressions[512], expressions[511]); - { - uint8_t t172[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[514] = 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[515] = BinaryenConst(the_module, BinaryenLiteralVec128(t173)); - } - expressions[516] = BinaryenBinary(the_module, 130, expressions[515], expressions[514]); - { - uint8_t t174[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[517] = 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[518] = BinaryenConst(the_module, BinaryenLiteralVec128(t175)); - } - expressions[519] = BinaryenBinary(the_module, 131, expressions[518], expressions[517]); - { - uint8_t t176[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[520] = 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[521] = BinaryenConst(the_module, BinaryenLiteralVec128(t177)); - } - expressions[522] = BinaryenBinary(the_module, 132, expressions[521], expressions[520]); - { - uint8_t t178[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[523] = 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[524] = BinaryenConst(the_module, BinaryenLiteralVec128(t179)); - } - expressions[525] = BinaryenBinary(the_module, 152, expressions[524], expressions[523]); - { - uint8_t t180[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[526] = BinaryenConst(the_module, BinaryenLiteralVec128(t180)); - } - { - uint8_t t181[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[527] = BinaryenConst(the_module, BinaryenLiteralVec128(t181)); - } - expressions[528] = BinaryenBinary(the_module, 153, expressions[527], expressions[526]); - { - uint8_t t182[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[529] = BinaryenConst(the_module, BinaryenLiteralVec128(t182)); - } - { - uint8_t t183[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[530] = BinaryenConst(the_module, BinaryenLiteralVec128(t183)); - } - expressions[531] = BinaryenBinary(the_module, 154, expressions[530], expressions[529]); - { - uint8_t t184[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[532] = BinaryenConst(the_module, BinaryenLiteralVec128(t184)); - } - { - uint8_t t185[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[533] = BinaryenConst(the_module, BinaryenLiteralVec128(t185)); - } - expressions[534] = BinaryenBinary(the_module, 155, expressions[533], expressions[532]); - { - uint8_t t186[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[535] = BinaryenConst(the_module, BinaryenLiteralVec128(t186)); - } - { - uint8_t t187[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[536] = BinaryenConst(the_module, BinaryenLiteralVec128(t187)); - } - expressions[537] = BinaryenBinary(the_module, 156, expressions[536], expressions[535]); - { - uint8_t t188[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[538] = BinaryenConst(the_module, BinaryenLiteralVec128(t188)); - } - { - uint8_t t189[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[539] = BinaryenConst(the_module, BinaryenLiteralVec128(t189)); - } - expressions[540] = BinaryenBinary(the_module, 147, expressions[539], expressions[538]); - { - uint8_t t190[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[541] = BinaryenConst(the_module, BinaryenLiteralVec128(t190)); - } - { - uint8_t t191[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[542] = BinaryenConst(the_module, BinaryenLiteralVec128(t191)); - } - expressions[543] = BinaryenBinary(the_module, 148, expressions[542], expressions[541]); - { - uint8_t t192[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[544] = BinaryenConst(the_module, BinaryenLiteralVec128(t192)); - } - { - uint8_t t193[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[545] = BinaryenConst(the_module, BinaryenLiteralVec128(t193)); - } - expressions[546] = BinaryenBinary(the_module, 149, expressions[545], expressions[544]); - { - uint8_t t194[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[547] = BinaryenConst(the_module, BinaryenLiteralVec128(t194)); - } - { - uint8_t t195[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[548] = BinaryenConst(the_module, BinaryenLiteralVec128(t195)); - } - expressions[549] = BinaryenBinary(the_module, 150, expressions[548], expressions[547]); - { - uint8_t t196[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[550] = BinaryenConst(the_module, BinaryenLiteralVec128(t196)); - } - { - uint8_t t197[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[551] = BinaryenConst(the_module, BinaryenLiteralVec128(t197)); - } - expressions[552] = BinaryenBinary(the_module, 151, expressions[551], expressions[550]); - { - uint8_t t198[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[553] = BinaryenConst(the_module, BinaryenLiteralVec128(t198)); - } - { - uint8_t t199[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[554] = BinaryenConst(the_module, BinaryenLiteralVec128(t199)); - } - expressions[555] = BinaryenBinary(the_module, 157, expressions[554], expressions[553]); - { - uint8_t t200[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[556] = BinaryenConst(the_module, BinaryenLiteralVec128(t200)); - } - { - uint8_t t201[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[557] = BinaryenConst(the_module, BinaryenLiteralVec128(t201)); - } - expressions[558] = BinaryenBinary(the_module, 158, expressions[557], expressions[556]); - { - uint8_t t202[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[559] = BinaryenConst(the_module, BinaryenLiteralVec128(t202)); - } - { - uint8_t t203[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[560] = BinaryenConst(the_module, BinaryenLiteralVec128(t203)); - } - expressions[561] = BinaryenBinary(the_module, 159, expressions[560], expressions[559]); - { - uint8_t t204[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[562] = BinaryenConst(the_module, BinaryenLiteralVec128(t204)); - } - { - uint8_t t205[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[563] = BinaryenConst(the_module, BinaryenLiteralVec128(t205)); - } - expressions[564] = BinaryenBinary(the_module, 160, expressions[563], expressions[562]); - { - uint8_t t206[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[565] = 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[566] = BinaryenConst(the_module, BinaryenLiteralVec128(t207)); - } - expressions[567] = BinaryenBinary(the_module, 161, expressions[566], expressions[565]); - { - uint8_t t208[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[568] = 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[569] = BinaryenConst(the_module, BinaryenLiteralVec128(t209)); - } - expressions[570] = BinaryenBinary(the_module, 162, expressions[569], expressions[568]); - { - uint8_t t210[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[571] = BinaryenConst(the_module, BinaryenLiteralVec128(t210)); - } - { - uint8_t t211[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[572] = BinaryenConst(the_module, BinaryenLiteralVec128(t211)); - } - expressions[573] = BinaryenBinary(the_module, 163, expressions[572], expressions[571]); - { - uint8_t t212[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[574] = BinaryenConst(the_module, BinaryenLiteralVec128(t212)); - } - { - uint8_t t213[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[575] = BinaryenConst(the_module, BinaryenLiteralVec128(t213)); - } - expressions[576] = BinaryenBinary(the_module, 164, expressions[575], expressions[574]); - { - uint8_t t214[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[577] = BinaryenConst(the_module, BinaryenLiteralVec128(t214)); - } - { - uint8_t t215[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[578] = BinaryenConst(the_module, BinaryenLiteralVec128(t215)); - } - expressions[579] = BinaryenBinary(the_module, 165, expressions[578], expressions[577]); - { - uint8_t t216[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[580] = BinaryenConst(the_module, BinaryenLiteralVec128(t216)); - } - { - uint8_t t217[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[581] = BinaryenConst(the_module, BinaryenLiteralVec128(t217)); - } - expressions[582] = BinaryenBinary(the_module, 166, expressions[581], expressions[580]); - { - uint8_t t218[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[583] = BinaryenConst(the_module, BinaryenLiteralVec128(t218)); - } - { - uint8_t t219[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[584] = BinaryenConst(the_module, BinaryenLiteralVec128(t219)); - } - expressions[585] = BinaryenBinary(the_module, 167, expressions[584], expressions[583]); - { - uint8_t t220[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[586] = BinaryenConst(the_module, BinaryenLiteralVec128(t220)); - } - { - uint8_t t221[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[587] = BinaryenConst(the_module, BinaryenLiteralVec128(t221)); - } - expressions[588] = BinaryenBinary(the_module, 168, expressions[587], expressions[586]); - { - uint8_t t222[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[589] = BinaryenConst(the_module, BinaryenLiteralVec128(t222)); - } - { - uint8_t t223[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[590] = BinaryenConst(the_module, BinaryenLiteralVec128(t223)); - } - expressions[591] = BinaryenBinary(the_module, 169, expressions[590], expressions[589]); - { - uint8_t t224[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[592] = BinaryenConst(the_module, BinaryenLiteralVec128(t224)); - } - { - uint8_t t225[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[593] = BinaryenConst(the_module, BinaryenLiteralVec128(t225)); - } - expressions[594] = BinaryenBinary(the_module, 170, expressions[593], expressions[592]); - { - uint8_t t226[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[595] = BinaryenConst(the_module, BinaryenLiteralVec128(t226)); - } - expressions[596] = BinaryenSIMDExtract(the_module, 0, expressions[595], 0); - { - uint8_t t227[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[597] = BinaryenConst(the_module, BinaryenLiteralVec128(t227)); - } - expressions[598] = BinaryenSIMDExtract(the_module, 1, expressions[597], 0); - { - uint8_t t228[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[599] = BinaryenConst(the_module, BinaryenLiteralVec128(t228)); - } - expressions[600] = BinaryenSIMDExtract(the_module, 2, expressions[599], 0); - { - uint8_t t229[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[601] = BinaryenConst(the_module, BinaryenLiteralVec128(t229)); - } - expressions[602] = BinaryenSIMDExtract(the_module, 3, expressions[601], 0); - { - uint8_t t230[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[603] = BinaryenConst(the_module, BinaryenLiteralVec128(t230)); - } - expressions[604] = BinaryenSIMDExtract(the_module, 4, expressions[603], 0); - { - uint8_t t231[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[605] = BinaryenConst(the_module, BinaryenLiteralVec128(t231)); - } - expressions[606] = BinaryenSIMDExtract(the_module, 5, expressions[605], 0); - { - uint8_t t232[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[607] = BinaryenConst(the_module, BinaryenLiteralVec128(t232)); - } - expressions[608] = BinaryenSIMDExtract(the_module, 6, expressions[607], 0); - { - uint8_t t233[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[609] = BinaryenConst(the_module, BinaryenLiteralVec128(t233)); - } - expressions[610] = BinaryenSIMDExtract(the_module, 7, expressions[609], 0); - expressions[611] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - { - uint8_t t234[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[612] = BinaryenConst(the_module, BinaryenLiteralVec128(t234)); - } - expressions[613] = BinaryenSIMDReplace(the_module, 0, expressions[612], 0, expressions[611]); - expressions[614] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - { - uint8_t t235[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[615] = BinaryenConst(the_module, BinaryenLiteralVec128(t235)); - } - expressions[616] = BinaryenSIMDReplace(the_module, 1, expressions[615], 0, expressions[614]); - expressions[617] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - { - uint8_t t236[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[618] = BinaryenConst(the_module, BinaryenLiteralVec128(t236)); - } - expressions[619] = BinaryenSIMDReplace(the_module, 2, expressions[618], 0, expressions[617]); - expressions[620] = BinaryenConst(the_module, BinaryenLiteralInt64(42)); - { - uint8_t t237[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[621] = BinaryenConst(the_module, BinaryenLiteralVec128(t237)); - } - expressions[622] = BinaryenSIMDReplace(the_module, 3, expressions[621], 0, expressions[620]); - expressions[623] = BinaryenConst(the_module, BinaryenLiteralFloat32(42)); - { - uint8_t t238[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[624] = BinaryenConst(the_module, BinaryenLiteralVec128(t238)); - } - expressions[625] = BinaryenSIMDReplace(the_module, 4, expressions[624], 0, expressions[623]); - expressions[626] = BinaryenConst(the_module, BinaryenLiteralFloat64(42)); - { - uint8_t t239[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[627] = BinaryenConst(the_module, BinaryenLiteralVec128(t239)); - } - expressions[628] = BinaryenSIMDReplace(the_module, 5, expressions[627], 0, expressions[626]); - { - uint8_t t240[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[629] = BinaryenConst(the_module, BinaryenLiteralVec128(t240)); - } - expressions[630] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[631] = BinaryenSIMDShift(the_module, 0, expressions[629], expressions[630]); - { - uint8_t t241[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[632] = BinaryenConst(the_module, BinaryenLiteralVec128(t241)); - } - expressions[633] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[634] = BinaryenSIMDShift(the_module, 1, expressions[632], expressions[633]); - { - uint8_t t242[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[635] = BinaryenConst(the_module, BinaryenLiteralVec128(t242)); - } - expressions[636] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[637] = BinaryenSIMDShift(the_module, 2, expressions[635], expressions[636]); - { - uint8_t t243[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[638] = BinaryenConst(the_module, BinaryenLiteralVec128(t243)); - } - expressions[639] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[640] = BinaryenSIMDShift(the_module, 3, expressions[638], expressions[639]); - { - uint8_t t244[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[641] = BinaryenConst(the_module, BinaryenLiteralVec128(t244)); - } - expressions[642] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[643] = BinaryenSIMDShift(the_module, 4, expressions[641], expressions[642]); - { - uint8_t t245[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[644] = BinaryenConst(the_module, BinaryenLiteralVec128(t245)); - } - expressions[645] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[646] = BinaryenSIMDShift(the_module, 5, expressions[644], expressions[645]); - { - uint8_t t246[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[647] = BinaryenConst(the_module, BinaryenLiteralVec128(t246)); - } - expressions[648] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[649] = BinaryenSIMDShift(the_module, 6, expressions[647], expressions[648]); - { - uint8_t t247[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[650] = BinaryenConst(the_module, BinaryenLiteralVec128(t247)); - } - expressions[651] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[652] = BinaryenSIMDShift(the_module, 7, expressions[650], expressions[651]); - { - uint8_t t248[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[653] = BinaryenConst(the_module, BinaryenLiteralVec128(t248)); - } - expressions[654] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[655] = BinaryenSIMDShift(the_module, 8, expressions[653], expressions[654]); - { - uint8_t t249[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[656] = BinaryenConst(the_module, BinaryenLiteralVec128(t249)); - } - expressions[657] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[658] = BinaryenSIMDShift(the_module, 9, expressions[656], expressions[657]); - { - uint8_t t250[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[659] = BinaryenConst(the_module, BinaryenLiteralVec128(t250)); - } - expressions[660] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[661] = BinaryenSIMDShift(the_module, 10, expressions[659], expressions[660]); - { - uint8_t t251[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[662] = BinaryenConst(the_module, BinaryenLiteralVec128(t251)); - } - expressions[663] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[664] = BinaryenSIMDShift(the_module, 11, expressions[662], expressions[663]); - expressions[665] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[666] = BinaryenSIMDLoad(the_module, 0, 0, 1, expressions[665]); - expressions[667] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[668] = BinaryenSIMDLoad(the_module, 1, 16, 1, expressions[667]); - expressions[669] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[670] = BinaryenSIMDLoad(the_module, 2, 16, 4, expressions[669]); - expressions[671] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[672] = BinaryenSIMDLoad(the_module, 3, 0, 4, expressions[671]); - expressions[673] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[674] = BinaryenSIMDLoad(the_module, 4, 0, 8, expressions[673]); - expressions[675] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[676] = BinaryenSIMDLoad(the_module, 5, 0, 8, expressions[675]); - expressions[677] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[678] = BinaryenSIMDLoad(the_module, 6, 0, 8, expressions[677]); - expressions[679] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[680] = BinaryenSIMDLoad(the_module, 7, 0, 8, expressions[679]); - expressions[681] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[682] = BinaryenSIMDLoad(the_module, 8, 0, 8, expressions[681]); - expressions[683] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); - expressions[684] = BinaryenSIMDLoad(the_module, 9, 0, 8, expressions[683]); - { - uint8_t t252[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[685] = BinaryenConst(the_module, BinaryenLiteralVec128(t252)); - } - { - uint8_t t253[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[686] = BinaryenConst(the_module, BinaryenLiteralVec128(t253)); - } - { - uint8_t mask[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - expressions[687] = BinaryenSIMDShuffle(the_module, expressions[685], expressions[686], mask); - } - { - uint8_t t254[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[688] = BinaryenConst(the_module, BinaryenLiteralVec128(t254)); - } - { - uint8_t t255[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[689] = BinaryenConst(the_module, BinaryenLiteralVec128(t255)); - } - { - uint8_t t256[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[690] = BinaryenConst(the_module, BinaryenLiteralVec128(t256)); - } - expressions[691] = BinaryenSIMDTernary(the_module, 0, expressions[688], expressions[689], expressions[690]); - { - uint8_t t257[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[692] = BinaryenConst(the_module, BinaryenLiteralVec128(t257)); - } - { - uint8_t t258[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[693] = BinaryenConst(the_module, BinaryenLiteralVec128(t258)); - } - { - uint8_t t259[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[694] = BinaryenConst(the_module, BinaryenLiteralVec128(t259)); - } - expressions[695] = BinaryenSIMDTernary(the_module, 1, expressions[692], expressions[693], expressions[694]); - { - uint8_t t260[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[696] = BinaryenConst(the_module, BinaryenLiteralVec128(t260)); - } - { - uint8_t t261[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[697] = BinaryenConst(the_module, BinaryenLiteralVec128(t261)); - } - { - uint8_t t262[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[698] = BinaryenConst(the_module, BinaryenLiteralVec128(t262)); - } - expressions[699] = BinaryenSIMDTernary(the_module, 2, expressions[696], expressions[697], expressions[698]); - { - uint8_t t263[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[700] = BinaryenConst(the_module, BinaryenLiteralVec128(t263)); - } - { - uint8_t t264[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[701] = BinaryenConst(the_module, BinaryenLiteralVec128(t264)); - } - { - uint8_t t265[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[702] = BinaryenConst(the_module, BinaryenLiteralVec128(t265)); - } - expressions[703] = BinaryenSIMDTernary(the_module, 3, expressions[700], expressions[701], expressions[702]); - { - uint8_t t266[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[704] = BinaryenConst(the_module, BinaryenLiteralVec128(t266)); - } - { - uint8_t t267[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[705] = BinaryenConst(the_module, BinaryenLiteralVec128(t267)); - } - { - uint8_t t268[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - expressions[706] = BinaryenConst(the_module, BinaryenLiteralVec128(t268)); - } - expressions[707] = BinaryenSIMDTernary(the_module, 4, expressions[704], expressions[705], expressions[706]); - expressions[708] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); - expressions[709] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[710] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); - expressions[711] = BinaryenMemoryInit(the_module, 0, expressions[708], expressions[709], expressions[710]); - expressions[712] = BinaryenDataDrop(the_module, 0); - expressions[713] = BinaryenConst(the_module, BinaryenLiteralInt32(2048)); - expressions[714] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); - expressions[715] = BinaryenConst(the_module, BinaryenLiteralInt32(12)); - expressions[716] = BinaryenMemoryCopy(the_module, expressions[713], expressions[714], expressions[715]); - expressions[717] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[718] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - expressions[719] = BinaryenConst(the_module, BinaryenLiteralInt32(1024)); - expressions[720] = BinaryenMemoryFill(the_module, expressions[717], expressions[718], expressions[719]); - { - BinaryenExpressionRef children[] = { 0 }; - expressions[721] = BinaryenBlock(the_module, NULL, children, 0, BinaryenTypeAuto()); - } - expressions[722] = BinaryenIf(the_module, expressions[18], expressions[19], expressions[20]); - expressions[723] = BinaryenIf(the_module, expressions[21], expressions[22], expressions[0]); - expressions[724] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[725] = BinaryenLoop(the_module, "in", expressions[724]); - expressions[726] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - expressions[727] = BinaryenLoop(the_module, NULL, expressions[726]); - expressions[728] = BinaryenBreak(the_module, "the-value", expressions[23], expressions[24]); - expressions[729] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - expressions[730] = BinaryenBreak(the_module, "the-nothing", expressions[729], expressions[0]); - expressions[731] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - expressions[732] = BinaryenBreak(the_module, "the-value", expressions[0], expressions[731]); - expressions[733] = BinaryenBreak(the_module, "the-nothing", expressions[0], expressions[0]); - { - const char* names[] = { "the-value" }; - expressions[734] = BinaryenSwitch(the_module, names, 1, "the-value", expressions[25], expressions[26]); - } - expressions[735] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - const char* names[] = { "the-nothing" }; - expressions[736] = BinaryenSwitch(the_module, names, 1, "the-nothing", expressions[735], expressions[0]); - } - { - BinaryenExpressionRef operands[] = { expressions[10], expressions[11], expressions[12], expressions[13] }; - expressions[737] = BinaryenCall(the_module, "kitchen()sinker", operands, 4, 2); - } - expressions[738] = BinaryenUnary(the_module, 20, expressions[737]); - { - BinaryenExpressionRef operands[] = { expressions[8], expressions[9] }; - expressions[739] = BinaryenCall(the_module, "an-imported", operands, 2, 4); - } - expressions[740] = BinaryenUnary(the_module, 25, expressions[739]); - expressions[741] = BinaryenUnary(the_module, 20, expressions[740]); - expressions[742] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); + BinaryenModuleDispose(the_module); + expressions.clear(); + functions.clear(); + globals.clear(); + events.clear(); + exports.clear(); + relooperBlocks.clear(); + // BinaryenTypeNone: 0 + // BinaryenTypeUnreachable: 1 + // BinaryenTypeInt32: 2 + // BinaryenTypeInt64: 3 + // BinaryenTypeFloat32: 4 + // BinaryenTypeFloat64: 5 + // BinaryenTypeVec128: 6 + // BinaryenTypeAnyref: 7 + // BinaryenTypeExnref: 8 + // BinaryenTypeAuto: -1 { - BinaryenExpressionRef operands[] = { expressions[14], expressions[15], expressions[16], expressions[17] }; - expressions[743] = BinaryenCallIndirect(the_module, expressions[742], operands, 4, "iiIfF"); + BinaryenType t271[] = {2, 2}; + BinaryenTypeCreate(t271, 2); // 11 } - expressions[744] = BinaryenUnary(the_module, 20, expressions[743]); - expressions[745] = BinaryenLocalGet(the_module, 0, 2); - expressions[746] = BinaryenDrop(the_module, expressions[745]); - expressions[747] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); - expressions[748] = BinaryenLocalSet(the_module, 0, expressions[747]); - expressions[749] = BinaryenConst(the_module, BinaryenLiteralInt32(102)); - expressions[750] = BinaryenLocalTee(the_module, 0, expressions[749]); - expressions[751] = BinaryenDrop(the_module, expressions[750]); - expressions[752] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[753] = BinaryenLoad(the_module, 4, 0, 0, 0, 2, expressions[752]); - expressions[754] = BinaryenConst(the_module, BinaryenLiteralInt32(8)); - expressions[755] = BinaryenLoad(the_module, 2, 1, 2, 1, 3, expressions[754]); - expressions[756] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - expressions[757] = BinaryenLoad(the_module, 4, 0, 0, 0, 4, expressions[756]); - expressions[758] = BinaryenConst(the_module, BinaryenLiteralInt32(9)); - expressions[759] = BinaryenLoad(the_module, 8, 0, 2, 8, 5, expressions[758]); - expressions[760] = BinaryenStore(the_module, 4, 0, 0, expressions[30], expressions[31], 2); - expressions[761] = BinaryenStore(the_module, 8, 2, 4, expressions[32], expressions[33], 3); - expressions[762] = BinaryenSelect(the_module, expressions[27], expressions[28], expressions[29]); - expressions[763] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); - expressions[764] = BinaryenReturn(the_module, expressions[763]); { - BinaryenExpressionRef operands[] = { expressions[10], expressions[11], expressions[12], expressions[13] }; - expressions[765] = BinaryenReturnCall(the_module, "kitchen()sinker", operands, 4, 2); + BinaryenType t272[] = {2, 2}; + BinaryenTypeCreate(t272, 2); // 11 } - expressions[766] = BinaryenConst(the_module, BinaryenLiteralInt32(2449)); { - BinaryenExpressionRef operands[] = { expressions[14], expressions[15], expressions[16], expressions[17] }; - expressions[767] = BinaryenReturnCallIndirect(the_module, expressions[766], operands, 4, "iiIfF"); + BinaryenType t273[] = {4, 4}; + BinaryenTypeCreate(t273, 2); // 12 } - expressions[768] = BinaryenTry(the_module, expressions[35], expressions[43]); - expressions[769] = BinaryenAtomicLoad(the_module, 4, 0, 2, expressions[23]); - expressions[770] = BinaryenAtomicStore(the_module, 4, 0, expressions[23], expressions[769], 2); - expressions[771] = BinaryenAtomicWait(the_module, expressions[23], expressions[23], expressions[33], 2); - expressions[772] = BinaryenDrop(the_module, expressions[771]); - expressions[773] = BinaryenAtomicNotify(the_module, expressions[23], expressions[23]); - expressions[774] = BinaryenDrop(the_module, expressions[773]); - expressions[775] = BinaryenAtomicFence(the_module); - expressions[776] = BinaryenPop(the_module, 2); - expressions[777] = BinaryenPush(the_module, expressions[776]); - expressions[778] = BinaryenPop(the_module, 3); - expressions[779] = BinaryenPush(the_module, expressions[778]); - expressions[780] = BinaryenPop(the_module, 4); - expressions[781] = BinaryenPush(the_module, expressions[780]); - expressions[782] = BinaryenPop(the_module, 5); - expressions[783] = BinaryenPush(the_module, expressions[782]); - expressions[784] = BinaryenPop(the_module, 7); - expressions[785] = BinaryenPush(the_module, expressions[784]); - expressions[786] = BinaryenPop(the_module, 8); - expressions[787] = BinaryenPush(the_module, expressions[786]); - expressions[788] = BinaryenNop(the_module); - expressions[789] = BinaryenUnreachable(the_module); - BinaryenExpressionPrint(expressions[51]); + return 0; +} +// ending a Binaryen API trace + // BinaryenTypeNone: 0 + // BinaryenTypeUnreachable: 1 + // BinaryenTypeInt32: 2 + // BinaryenTypeInt64: 3 + // BinaryenTypeFloat32: 4 + // BinaryenTypeFloat64: 5 + // BinaryenTypeVec128: 6 + // BinaryenTypeAnyref: 7 + // BinaryenTypeExnref: 8 + // BinaryenTypeAuto: -1 +BinaryenFeatureMVP: 0 +BinaryenFeatureAtomics: 1 +BinaryenFeatureBulkMemory: 16 +BinaryenFeatureMutableGlobals: 2 +BinaryenFeatureNontrappingFPToInt: 4 +BinaryenFeatureSignExt: 32 +BinaryenFeatureSIMD128: 8 +BinaryenFeatureExceptionHandling: 64 +BinaryenFeatureTailCall: 128 +BinaryenFeatureReferenceTypes: 256 +BinaryenFeatureAll: 511 (f32.neg (f32.const -33.61199951171875) ) - { - 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[199], expressions[201], expressions[203], expressions[205], expressions[207], expressions[209], - expressions[211], expressions[213], expressions[216], expressions[219], expressions[222], expressions[225], - expressions[228], expressions[231], expressions[234], expressions[237], expressions[240], expressions[243], - expressions[246], expressions[249], expressions[252], expressions[255], expressions[258], expressions[261], - expressions[264], expressions[267], expressions[270], expressions[273], expressions[276], expressions[279], - expressions[282], expressions[285], expressions[288], expressions[291], expressions[294], expressions[297], - expressions[300], expressions[303], expressions[306], expressions[309], expressions[312], expressions[315], - expressions[318], expressions[321], expressions[324], expressions[327], expressions[330], expressions[333], - expressions[336], expressions[339], expressions[342], expressions[345], expressions[348], expressions[351], - expressions[354], expressions[357], expressions[360], expressions[363], expressions[366], expressions[369], - expressions[372], expressions[375], expressions[378], expressions[381], expressions[384], expressions[387], - expressions[390], expressions[393], expressions[396], expressions[399], expressions[402], expressions[405], - expressions[408], expressions[411], expressions[414], expressions[417], expressions[420], expressions[423], - expressions[426], expressions[429], expressions[432], expressions[435], expressions[438], expressions[441], - expressions[444], expressions[447], expressions[450], expressions[453], expressions[456], expressions[459], - expressions[462], expressions[465], expressions[468], expressions[471], expressions[474], expressions[477], - expressions[480], expressions[483], expressions[486], expressions[489], expressions[492], expressions[495], - expressions[498], expressions[501], expressions[504], expressions[507], expressions[510], expressions[513], - expressions[516], expressions[519], expressions[522], expressions[525], expressions[528], expressions[531], - expressions[534], 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[596], expressions[598], expressions[600], - expressions[602], expressions[604], expressions[606], expressions[608], expressions[610], expressions[613], - expressions[616], expressions[619], expressions[622], expressions[625], expressions[628], expressions[631], - expressions[634], expressions[637], expressions[640], expressions[643], expressions[646], expressions[649], - expressions[652], expressions[655], expressions[658], expressions[661], expressions[664], expressions[666], - expressions[668], expressions[670], expressions[672], expressions[674], expressions[676], expressions[678], - expressions[680], expressions[682], expressions[684], expressions[687], expressions[691], expressions[695], - expressions[699], expressions[703], expressions[707], expressions[711], expressions[712], expressions[716], - expressions[720], expressions[721], expressions[722], expressions[723], expressions[725], expressions[727], - expressions[728], expressions[730], expressions[732], expressions[733], expressions[734], expressions[736], - expressions[738], expressions[741], expressions[744], expressions[746], expressions[748], expressions[751], - expressions[753], expressions[755], expressions[757], expressions[759], expressions[760], expressions[761], - expressions[762], expressions[764], expressions[765], expressions[767], expressions[768], expressions[770], - expressions[772], expressions[774], expressions[775], expressions[777], expressions[779], expressions[781], - expressions[783], expressions[785], expressions[787], expressions[788], expressions[789] }; - expressions[790] = BinaryenBlock(the_module, "the-value", children, 298, BinaryenTypeAuto()); - } - expressions[791] = BinaryenDrop(the_module, expressions[790]); - { - BinaryenExpressionRef children[] = { expressions[791] }; - expressions[792] = BinaryenBlock(the_module, "the-nothing", children, 1, BinaryenTypeAuto()); - } - expressions[793] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - { - BinaryenExpressionRef children[] = { expressions[792], expressions[793] }; - expressions[794] = BinaryenBlock(the_module, "the-body", children, 2, BinaryenTypeAuto()); - } - { - BinaryenType varTypes[] = { 2, 8 }; - functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 2, expressions[794]); - } - expressions[795] = BinaryenConst(the_module, BinaryenLiteralInt32(7)); - globals[0] = BinaryenAddGlobal(the_module, "a-global", 2, 0, expressions[795]); - expressions[796] = BinaryenConst(the_module, BinaryenLiteralFloat32(7.5)); - globals[1] = BinaryenAddGlobal(the_module, "a-mutable-global", 4, 1, expressions[796]); - { - BinaryenType paramTypes[] = { 2, 5 }; - functionTypes[1] = BinaryenAddFunctionType(the_module, "fiF", 4, paramTypes, 2); - } - BinaryenAddFunctionImport(the_module, "an-imported", "module", "base", functionTypes[1]); - exports[0] = BinaryenAddFunctionExport(the_module, "kitchen()sinker", "kitchen_sinker"); - BinaryenFunctionGetName(functions[0]); - expressions[797] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - const char* funcNames[] = { "kitchen()sinker" }; - BinaryenSetFunctionTable(the_module, 1, 1, funcNames, 1, expressions[797]); - } - expressions[798] = 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[798], expressions[0] }; - BinaryenIndex segmentSizes[] = { 12, 12 }; - BinaryenSetMemory(the_module, 1, 256, "mem", segments, segmentPassive, segmentOffsets, segmentSizes, 2, 1); - } - { - BinaryenType paramTypes[] = { 0 }; - functionTypes[2] = BinaryenAddFunctionType(the_module, "v", 0, paramTypes, 0); - } - expressions[799] = BinaryenNop(the_module); - { - BinaryenType varTypes[] = { 0 }; - functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[2], varTypes, 0, expressions[799]); - } - BinaryenSetStart(the_module, functions[1]); - { - BinaryenType paramTypes[] = { 0 }; - functionTypes[3] = BinaryenAddFunctionType(the_module, NULL, 0, paramTypes, 0); - } - BinaryenModuleAutoDrop(the_module); - BinaryenModuleSetFeatures(the_module, 511); - BinaryenModuleGetFeatures(the_module); - BinaryenModuleValidate(the_module); - BinaryenModulePrint(the_module); (module - (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) - (type $fiF (func (param i32 f64) (result f32))) - (type $v (func)) - (type $3 (func)) + (type $i32_i64_f32_f64_=>_i32 (func (param i32 i64 f32 f64) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_f64_=>_f32 (func (param i32 f64) (result f32))) (import "module" "base" (func $an-imported (param i32 f64) (result f32))) (memory $0 (shared 1 256)) (data (i32.const 10) "hello, world") @@ -4014,7 +4428,7 @@ int main() { (export "kitchen_sinker" (func "$kitchen()sinker")) (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) + (func "$kitchen()sinker" (; 1 ;) (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) @@ -5532,7 +5946,7 @@ int main() { ) (drop (i32.eqz - (call_indirect (type $iiIfF) + (call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -5596,7 +6010,7 @@ int main() { (f32.const 1.2999999523162842) (f64.const 3.7) ) - (return_call_indirect (type $iiIfF) + (return_call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -5668,486 +6082,32 @@ int main() { (i32.const 42) ) ) - (func $starter (; 2 ;) (type $v) + (func $starter (; 2 ;) (nop) ) ) - BinaryenModuleDispose(the_module); - functionTypes.clear(); - expressions.clear(); - functions.clear(); - globals.clear(); - events.clear(); - exports.clear(); - relooperBlocks.clear(); - the_module = BinaryenModuleCreate(); - expressions[size_t(NULL)] = BinaryenExpressionRef(NULL); - { - BinaryenType paramTypes[] = { 0 }; - functionTypes[0] = BinaryenAddFunctionType(the_module, "v", 0, paramTypes, 0); - } - { - BinaryenType paramTypes[] = { 2 }; - functionTypes[1] = BinaryenAddFunctionType(the_module, "vi", 0, paramTypes, 1); - } - BinaryenAddFunctionImport(the_module, "check", "module", "check", functionTypes[1]); - the_relooper = RelooperCreate(the_module); - expressions[1] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); - { - BinaryenExpressionRef operands[] = { expressions[1] }; - expressions[2] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[2]); - expressions[3] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[0] = BinaryenAddFunction(the_module, "just-one-block", functionTypes[0], varTypes, 1, expressions[3]); - } - the_relooper = RelooperCreate(the_module); - expressions[4] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[4] }; - expressions[5] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[5]); - expressions[6] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[6] }; - expressions[7] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[7]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); - expressions[8] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[1] = BinaryenAddFunction(the_module, "two-blocks", functionTypes[0], varTypes, 1, expressions[8]); - } - the_relooper = RelooperCreate(the_module); - expressions[9] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[9] }; - expressions[10] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[10]); - expressions[11] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[11] }; - expressions[12] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[12]); - expressions[13] = BinaryenConst(the_module, BinaryenLiteralInt32(77)); - expressions[14] = BinaryenDrop(the_module, expressions[13]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[14]); - expressions[15] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[2] = BinaryenAddFunction(the_module, "two-blocks-plus-code", functionTypes[0], varTypes, 1, expressions[15]); - } - the_relooper = RelooperCreate(the_module); - expressions[16] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[16] }; - expressions[17] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[17]); - expressions[18] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[18] }; - expressions[19] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[19]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); - expressions[20] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[3] = BinaryenAddFunction(the_module, "loop", functionTypes[0], varTypes, 1, expressions[20]); - } - the_relooper = RelooperCreate(the_module); - expressions[21] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[21] }; - expressions[22] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[22]); - expressions[23] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[23] }; - expressions[24] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[24]); - expressions[25] = BinaryenConst(the_module, BinaryenLiteralInt32(33)); - expressions[26] = BinaryenDrop(the_module, expressions[25]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[26]); - expressions[27] = BinaryenConst(the_module, BinaryenLiteralInt32(-66)); - expressions[28] = BinaryenDrop(the_module, expressions[27]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[28]); - expressions[29] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[4] = BinaryenAddFunction(the_module, "loop-plus-code", functionTypes[0], varTypes, 1, expressions[29]); - } - the_relooper = RelooperCreate(the_module); - expressions[30] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[30] }; - expressions[31] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[31]); - expressions[32] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[32] }; - expressions[33] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[33]); - expressions[34] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[34] }; - expressions[35] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[35]); - expressions[36] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[36], expressions[0]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - expressions[37] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[5] = BinaryenAddFunction(the_module, "split", functionTypes[0], varTypes, 1, expressions[37]); - } - the_relooper = RelooperCreate(the_module); - expressions[38] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[38] }; - expressions[39] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[39]); - expressions[40] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[40] }; - expressions[41] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[41]); - expressions[42] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[42] }; - expressions[43] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[43]); - expressions[44] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - expressions[45] = BinaryenDrop(the_module, expressions[44]); - expressions[46] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[46], expressions[45]); - expressions[47] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); - expressions[48] = BinaryenDrop(the_module, expressions[47]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[48]); - expressions[49] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[6] = BinaryenAddFunction(the_module, "split-plus-code", functionTypes[0], varTypes, 1, expressions[49]); - } - the_relooper = RelooperCreate(the_module); - expressions[50] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[50] }; - expressions[51] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[51]); - expressions[52] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[52] }; - expressions[53] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[53]); - expressions[54] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[54] }; - expressions[55] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[55]); - expressions[56] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[56], expressions[0]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); - expressions[57] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[7] = BinaryenAddFunction(the_module, "if", functionTypes[0], varTypes, 1, expressions[57]); - } - the_relooper = RelooperCreate(the_module); - expressions[58] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[58] }; - expressions[59] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[59]); - expressions[60] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[60] }; - expressions[61] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[61]); - expressions[62] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[62] }; - expressions[63] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[63]); - expressions[64] = BinaryenConst(the_module, BinaryenLiteralInt32(-1)); - expressions[65] = BinaryenDrop(the_module, expressions[64]); - expressions[66] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[66], expressions[65]); - expressions[67] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); - expressions[68] = BinaryenDrop(the_module, expressions[67]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[68]); - expressions[69] = BinaryenConst(the_module, BinaryenLiteralInt32(-3)); - expressions[70] = BinaryenDrop(the_module, expressions[69]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[70]); - expressions[71] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[8] = BinaryenAddFunction(the_module, "if-plus-code", functionTypes[0], varTypes, 1, expressions[71]); - } - the_relooper = RelooperCreate(the_module); - expressions[72] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[72] }; - expressions[73] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[73]); - expressions[74] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[74] }; - expressions[75] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[75]); - expressions[76] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[76] }; - expressions[77] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[77]); - expressions[78] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - { - BinaryenExpressionRef operands[] = { expressions[78] }; - expressions[79] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[79]); - expressions[80] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[80], expressions[0]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[3], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[0], expressions[0]); - expressions[81] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[9] = BinaryenAddFunction(the_module, "if-else", functionTypes[0], varTypes, 1, expressions[81]); - } - the_relooper = RelooperCreate(the_module); - expressions[82] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[82] }; - expressions[83] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[83]); - expressions[84] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[84] }; - expressions[85] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[85]); - expressions[86] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[86] }; - expressions[87] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[87]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); - expressions[88] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[88], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); - expressions[89] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[10] = BinaryenAddFunction(the_module, "loop-tail", functionTypes[0], varTypes, 1, expressions[89]); - } - the_relooper = RelooperCreate(the_module); - expressions[90] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[90] }; - expressions[91] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[91]); - expressions[92] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[92] }; - expressions[93] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[93]); - expressions[94] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[94] }; - expressions[95] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[95]); - expressions[96] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - { - BinaryenExpressionRef operands[] = { expressions[96] }; - expressions[97] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[97]); - expressions[98] = BinaryenConst(the_module, BinaryenLiteralInt32(4)); - { - BinaryenExpressionRef operands[] = { expressions[98] }; - expressions[99] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[4] = RelooperAddBlock(the_relooper, expressions[99]); - expressions[100] = BinaryenConst(the_module, BinaryenLiteralInt32(5)); - { - BinaryenExpressionRef operands[] = { expressions[100] }; - expressions[101] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[5] = RelooperAddBlock(the_relooper, expressions[101]); - expressions[102] = BinaryenConst(the_module, BinaryenLiteralInt32(6)); - { - BinaryenExpressionRef operands[] = { expressions[102] }; - expressions[103] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[6] = RelooperAddBlock(the_relooper, expressions[103]); - expressions[104] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - expressions[105] = BinaryenDrop(the_module, expressions[104]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[105]); - expressions[106] = BinaryenConst(the_module, BinaryenLiteralInt32(-2)); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[106], expressions[0]); - expressions[107] = BinaryenConst(the_module, BinaryenLiteralInt32(20)); - expressions[108] = BinaryenDrop(the_module, expressions[107]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[6], expressions[0], expressions[108]); - expressions[109] = BinaryenConst(the_module, BinaryenLiteralInt32(-6)); - RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[109], expressions[0]); - expressions[110] = BinaryenConst(the_module, BinaryenLiteralInt32(30)); - expressions[111] = BinaryenDrop(the_module, expressions[110]); - RelooperAddBranch(relooperBlocks[2], relooperBlocks[1], expressions[0], expressions[111]); - expressions[112] = BinaryenConst(the_module, BinaryenLiteralInt32(-10)); - RelooperAddBranch(relooperBlocks[3], relooperBlocks[4], expressions[112], expressions[0]); - RelooperAddBranch(relooperBlocks[3], relooperBlocks[5], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[4], relooperBlocks[5], expressions[0], expressions[0]); - expressions[113] = BinaryenConst(the_module, BinaryenLiteralInt32(40)); - expressions[114] = BinaryenDrop(the_module, expressions[113]); - RelooperAddBranch(relooperBlocks[5], relooperBlocks[6], expressions[0], expressions[114]); - expressions[115] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[11] = BinaryenAddFunction(the_module, "nontrivial-loop-plus-phi-to-head", functionTypes[0], varTypes, 1, expressions[115]); - } - the_relooper = RelooperCreate(the_module); - expressions[116] = BinaryenConst(the_module, BinaryenLiteralInt32(-99)); - expressions[117] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[117] }; - expressions[118] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlockWithSwitch(the_relooper, expressions[118], expressions[116]); - expressions[119] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[119] }; - expressions[120] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[120]); - expressions[121] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[121] }; - expressions[122] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[122]); - expressions[123] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); - { - BinaryenExpressionRef operands[] = { expressions[123] }; - expressions[124] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[124]); - { - BinaryenIndex indexes[] = { 2, 5 }; - RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[1], indexes, 2, expressions[0]); - } - expressions[125] = BinaryenConst(the_module, BinaryenLiteralInt32(55)); - expressions[126] = BinaryenDrop(the_module, expressions[125]); - { - BinaryenIndex indexes[] = { 4 }; - RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[2], indexes, 1, expressions[126]); - } - { - BinaryenIndex indexes[] = { 0 }; - RelooperAddBranchForSwitch(relooperBlocks[0], relooperBlocks[3], indexes, 0, expressions[0]); - } - expressions[127] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[12] = BinaryenAddFunction(the_module, "switch", functionTypes[0], varTypes, 1, expressions[127]); - } - the_relooper = RelooperCreate(the_module); - expressions[128] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); - { - BinaryenExpressionRef operands[] = { expressions[128] }; - expressions[129] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[129]); - expressions[130] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - { - BinaryenExpressionRef operands[] = { expressions[130] }; - expressions[131] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[131]); - expressions[132] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); - { - BinaryenExpressionRef operands[] = { expressions[132] }; - expressions[133] = BinaryenCall(the_module, "check", operands, 1, 0); - } - relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[133]); - expressions[134] = BinaryenConst(the_module, BinaryenLiteralInt32(10)); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[134], expressions[0]); - RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[0], expressions[0]); - RelooperAddBranch(relooperBlocks[2], relooperBlocks[1], expressions[0], expressions[0]); - expressions[135] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 3); - { - BinaryenType varTypes[] = { 2, 2, 3, 2, 4, 5, 2 }; - functions[13] = BinaryenAddFunction(the_module, "duffs-device", functionTypes[0], varTypes, 7, expressions[135]); - } - { - BinaryenType paramTypes[] = { 0 }; - functionTypes[2] = BinaryenAddFunctionType(the_module, "i", 2, paramTypes, 0); - } - the_relooper = RelooperCreate(the_module); - expressions[136] = BinaryenConst(the_module, BinaryenLiteralInt32(42)); - { - BinaryenExpressionRef operands[] = { expressions[136] }; - expressions[137] = BinaryenCall(the_module, "check", operands, 1, 0); - } - expressions[138] = BinaryenConst(the_module, BinaryenLiteralInt32(1337)); - expressions[139] = BinaryenReturn(the_module, expressions[138]); - { - BinaryenExpressionRef children[] = { expressions[137], expressions[139] }; - expressions[140] = BinaryenBlock(the_module, "the-list", children, 2, BinaryenTypeAuto()); - } - relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[140]); - expressions[141] = RelooperRenderAndDispose(the_relooper, relooperBlocks[0], 0); - { - BinaryenType varTypes[] = { 2 }; - functions[14] = BinaryenAddFunction(the_module, "return", functionTypes[2], varTypes, 1, expressions[141]); - } +(module + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) + (func $unreachable-fn (; 0 ;) (result i32) + (call_indirect (type $none_=>_i64) + (unreachable) + ) + ) +) raw: - BinaryenModulePrint(the_module); (module - (type $v (func)) - (type $vi (func (param i32))) - (type $i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "module" "check" (func $check (param i32))) - (func $just-one-block (; 1 ;) (type $v) + (func $just-one-block (; 1 ;) (local $0 i32) (call $check (i32.const 1337) ) ) - (func $two-blocks (; 2 ;) (type $v) + (func $two-blocks (; 2 ;) (local $0 i32) (block (call $check @@ -6158,7 +6118,7 @@ raw: ) ) ) - (func $two-blocks-plus-code (; 3 ;) (type $v) + (func $two-blocks-plus-code (; 3 ;) (local $0 i32) (block (block @@ -6174,7 +6134,7 @@ raw: ) ) ) - (func $loop (; 4 ;) (type $v) + (func $loop (; 4 ;) (local $0 i32) (loop $shape$0$continue (block @@ -6190,7 +6150,7 @@ raw: ) ) ) - (func $loop-plus-code (; 5 ;) (type $v) + (func $loop-plus-code (; 5 ;) (local $0 i32) (loop $shape$0$continue (block @@ -6214,7 +6174,7 @@ raw: ) ) ) - (func $split (; 6 ;) (type $v) + (func $split (; 6 ;) (local $0 i32) (call $check (i32.const 0) @@ -6233,7 +6193,7 @@ raw: ) ) ) - (func $split-plus-code (; 7 ;) (type $v) + (func $split-plus-code (; 7 ;) (local $0 i32) (call $check (i32.const 0) @@ -6262,7 +6222,7 @@ raw: ) ) ) - (func $if (; 8 ;) (type $v) + (func $if (; 8 ;) (local $0 i32) (block $block$3$break (call $check @@ -6287,7 +6247,7 @@ raw: ) ) ) - (func $if-plus-code (; 9 ;) (type $v) + (func $if-plus-code (; 9 ;) (local $0 i32) (block $block$3$break (call $check @@ -6325,7 +6285,7 @@ raw: ) ) ) - (func $if-else (; 10 ;) (type $v) + (func $if-else (; 10 ;) (local $0 i32) (block $block$4$break (call $check @@ -6357,7 +6317,7 @@ raw: ) ) ) - (func $loop-tail (; 11 ;) (type $v) + (func $loop-tail (; 11 ;) (local $0 i32) (block $block$3$break (loop $shape$0$continue @@ -6382,7 +6342,7 @@ raw: ) ) ) - (func $nontrivial-loop-plus-phi-to-head (; 12 ;) (type $v) + (func $nontrivial-loop-plus-phi-to-head (; 12 ;) (local $0 i32) (block $block$2$break (call $check @@ -6469,7 +6429,7 @@ raw: ) ) ) - (func $switch (; 13 ;) (type $v) + (func $switch (; 13 ;) (local $0 i32) (call $check (i32.const 0) @@ -6513,7 +6473,7 @@ raw: (br $switch$1$leave) ) ) - (func $duffs-device (; 14 ;) (type $v) + (func $duffs-device (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i64) @@ -6588,7 +6548,7 @@ raw: ) ) ) - (func $return (; 15 ;) (type $i) (result i32) + (func $return (; 15 ;) (result i32) (local $0 i32) (block (call $check @@ -6600,47 +6560,65 @@ raw: ) ) ) - BinaryenModuleValidate(the_module); - BinaryenModuleOptimize(the_module); - BinaryenModuleValidate(the_module); optimized: - BinaryenModulePrint(the_module); (module ) - BinaryenModuleDispose(the_module); - functionTypes.clear(); - expressions.clear(); - functions.clear(); - globals.clear(); - events.clear(); - exports.clear(); - relooperBlocks.clear(); - // BinaryenTypeNone: 0 - // BinaryenTypeUnreachable: 1 - // BinaryenTypeInt32: 2 - // BinaryenTypeInt64: 3 - // BinaryenTypeFloat32: 4 - // BinaryenTypeFloat64: 5 - // BinaryenTypeVec128: 6 - // BinaryenTypeAnyref: 7 - // BinaryenTypeExnref: 8 - // BinaryenTypeAuto: -1 - { - BinaryenType t269[] = {2, 2}; - BinaryenTypeCreate(t269, 2); // 9 - } - { - BinaryenType t270[] = {2, 2}; - BinaryenTypeCreate(t270, 2); // 9 - } - { - BinaryenType t271[] = {4, 4}; - BinaryenTypeCreate(t271, 2); // 10 - } - return 0; -} +module loaded from binary form: +(module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (func $adder (; 0 ;) (param $0 i32) (param $1 i32) (result i32) + (i32.add + (local.get $0) + (local.get $1) + ) + ) +) +module s-expr printed (in memory): +(module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (func $adder (; 0 ;) (param $0 i32) (param $1 i32) (result i32) + (i32.add + (local.get $0) + (local.get $1) + ) + ) +) + +module s-expr printed (in memory, caller-owned): +(module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (func $adder (; 0 ;) (param $0 i32) (param $1 i32) (result i32) + (i32.add + (local.get $0) + (local.get $1) + ) + ) +) + +(module + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (import "spectest" "print" (func $print-i32 (param i32))) + (start $starter) + (func $starter (; 1 ;) + (call $print-i32 + (i32.const 1234) + ) + ) +) +1234 : i32 +(module + (type $none_=>_none (func)) + (func $func (; 0 ;) + (local $0 i32) + (local.set $0 + (i64.const 1234) + ) + ) +) +validation: 0 (module - (type $v (func)) + (type $none_=>_none (func)) (memory $0 1 256) (data (i32.const 10) "hello, world") (data (global.get $a-global) "segment data 2") @@ -6649,13 +6627,13 @@ optimized: (export "export1" (func $fn1)) (export "export2" (func $fn2)) (export "mem" (memory $0)) - (func $fn0 (; 0 ;) (type $v) + (func $fn0 (; 0 ;) (nop) ) - (func $fn1 (; 1 ;) (type $v) + (func $fn1 (; 1 ;) (nop) ) - (func $fn2 (; 2 ;) (type $v) + (func $fn2 (; 2 ;) (nop) ) ) diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt index 92f620e73..bd6ba34e4 100644 --- a/test/example/c-api-kitchen-sink.txt.txt +++ b/test/example/c-api-kitchen-sink.txt.txt @@ -2,10 +2,10 @@ (f32.const -33.61199951171875) ) (module - (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) - (type $fiF (func (param i32 f64) (result f32))) - (type $v (func)) - (type $3 (func)) + (type $i32_i64_f32_f64_=>_i32 (func (param i32 i64 f32 f64) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_f64_=>_f32 (func (param i32 f64) (result f32))) (import "module" "base" (func $an-imported (param i32 f64) (result f32))) (memory $0 (shared 1 256)) (data (i32.const 10) "hello, world") @@ -18,7 +18,7 @@ (export "kitchen_sinker" (func "$kitchen()sinker")) (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) + (func "$kitchen()sinker" (; 1 ;) (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) @@ -1536,7 +1536,7 @@ ) (drop (i32.eqz - (call_indirect (type $iiIfF) + (call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -1600,7 +1600,7 @@ (f32.const 1.2999999523162842) (f64.const 3.7) ) - (return_call_indirect (type $iiIfF) + (return_call_indirect (type $i32_i64_f32_f64_=>_i32) (i32.const 13) (i64.const 37) (f32.const 1.2999999523162842) @@ -1672,22 +1672,22 @@ (i32.const 42) ) ) - (func $starter (; 2 ;) (type $v) + (func $starter (; 2 ;) (nop) ) ) (module - (type $v (func)) - (type $vi (func (param i32))) - (type $i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "module" "check" (func $check (param i32))) - (func $just-one-block (; 1 ;) (type $v) + (func $just-one-block (; 1 ;) (local $0 i32) (call $check (i32.const 1337) ) ) - (func $two-blocks (; 2 ;) (type $v) + (func $two-blocks (; 2 ;) (local $0 i32) (block (call $check @@ -1698,7 +1698,7 @@ ) ) ) - (func $two-blocks-plus-code (; 3 ;) (type $v) + (func $two-blocks-plus-code (; 3 ;) (local $0 i32) (block (block @@ -1714,7 +1714,7 @@ ) ) ) - (func $loop (; 4 ;) (type $v) + (func $loop (; 4 ;) (local $0 i32) (loop $shape$0$continue (block @@ -1730,7 +1730,7 @@ ) ) ) - (func $loop-plus-code (; 5 ;) (type $v) + (func $loop-plus-code (; 5 ;) (local $0 i32) (loop $shape$0$continue (block @@ -1754,7 +1754,7 @@ ) ) ) - (func $split (; 6 ;) (type $v) + (func $split (; 6 ;) (local $0 i32) (call $check (i32.const 0) @@ -1773,7 +1773,7 @@ ) ) ) - (func $split-plus-code (; 7 ;) (type $v) + (func $split-plus-code (; 7 ;) (local $0 i32) (call $check (i32.const 0) @@ -1802,7 +1802,7 @@ ) ) ) - (func $if (; 8 ;) (type $v) + (func $if (; 8 ;) (local $0 i32) (block $block$3$break (call $check @@ -1827,7 +1827,7 @@ ) ) ) - (func $if-plus-code (; 9 ;) (type $v) + (func $if-plus-code (; 9 ;) (local $0 i32) (block $block$3$break (call $check @@ -1865,7 +1865,7 @@ ) ) ) - (func $if-else (; 10 ;) (type $v) + (func $if-else (; 10 ;) (local $0 i32) (block $block$4$break (call $check @@ -1897,7 +1897,7 @@ ) ) ) - (func $loop-tail (; 11 ;) (type $v) + (func $loop-tail (; 11 ;) (local $0 i32) (block $block$3$break (loop $shape$0$continue @@ -1922,7 +1922,7 @@ ) ) ) - (func $nontrivial-loop-plus-phi-to-head (; 12 ;) (type $v) + (func $nontrivial-loop-plus-phi-to-head (; 12 ;) (local $0 i32) (block $block$2$break (call $check @@ -2009,7 +2009,7 @@ ) ) ) - (func $switch (; 13 ;) (type $v) + (func $switch (; 13 ;) (local $0 i32) (call $check (i32.const 0) @@ -2053,7 +2053,7 @@ (br $switch$1$leave) ) ) - (func $duffs-device (; 14 ;) (type $v) + (func $duffs-device (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i64) @@ -2128,7 +2128,7 @@ ) ) ) - (func $return (; 15 ;) (type $i) (result i32) + (func $return (; 15 ;) (result i32) (local $0 i32) (block (call $check diff --git a/test/example/c-api-relooper-unreachable-if.cpp b/test/example/c-api-relooper-unreachable-if.cpp index 0cd4004c5..3b35221ec 100644 --- a/test/example/c-api-relooper-unreachable-if.cpp +++ b/test/example/c-api-relooper-unreachable-if.cpp @@ -6,7 +6,6 @@ #include "binaryen-c.h" int main() { - std::map<size_t, BinaryenFunctionTypeRef> functionTypes; std::map<size_t, BinaryenExpressionRef> expressions; std::map<size_t, BinaryenFunctionRef> functions; std::map<size_t, RelooperBlockRef> relooperBlocks; @@ -33,10 +32,6 @@ int main() { expressions[5] = BinaryenBlock(the_module, "bb0", children, 2, BinaryenTypeAuto()); } relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[5]); - { - BinaryenType paramTypes[] = {BinaryenTypeNone()}; - functionTypes[0] = BinaryenAddFunctionType(the_module, "rustfn-0-40", BinaryenTypeNone(), paramTypes, 0); - } expressions[6] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[7] = BinaryenLoad(the_module, 4, 0, 0, 0, BinaryenTypeInt32(), expressions[6]); expressions[8] = BinaryenLocalSet(the_module, 0, expressions[7]); @@ -46,7 +41,13 @@ int main() { { BinaryenType varTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[0] = BinaryenAddFunction(the_module, "tinycore::eh_personality", functionTypes[0], varTypes, 3, expressions[9]); + functions[0] = BinaryenAddFunction(the_module, + "tinycore::eh_personality", + BinaryenTypeNone(), + BinaryenTypeNone(), + varTypes, + 3, + expressions[9]); } BinaryenAddFunctionExport(the_module, "tinycore::eh_personality", "tinycore::eh_personality"); the_relooper = RelooperCreate(the_module); @@ -69,7 +70,13 @@ int main() { { BinaryenType varTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[1] = BinaryenAddFunction(the_module, "tinycore::eh_unwind_resume", functionTypes[0], varTypes, 3, expressions[18]); + functions[1] = BinaryenAddFunction(the_module, + "tinycore::eh_unwind_resume", + BinaryenTypeNone(), + BinaryenTypeNone(), + varTypes, + 3, + expressions[18]); } BinaryenAddFunctionExport(the_module, "tinycore::eh_unwind_resume", "tinycore::eh_unwind_resume"); the_relooper = RelooperCreate(the_module); @@ -85,10 +92,6 @@ int main() { relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[20]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[1], expressions[0], expressions[0]); - { - BinaryenType paramTypes[] = {BinaryenTypeNone()}; - functionTypes[1] = BinaryenAddFunctionType(the_module, "rustfn-0-42", BinaryenTypeNone(), paramTypes, 0); - } expressions[21] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[22] = BinaryenLoad(the_module, 4, 0, 0, 0, BinaryenTypeInt32(), expressions[21]); expressions[23] = BinaryenLocalSet(the_module, 0, expressions[22]); @@ -98,7 +101,13 @@ int main() { { BinaryenType varTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[2] = BinaryenAddFunction(the_module, "tinycore::panic_fmt", functionTypes[1], varTypes, 3, expressions[24]); + functions[2] = BinaryenAddFunction(the_module, + "tinycore::panic_fmt", + BinaryenTypeNone(), + BinaryenTypeNone(), + varTypes, + 3, + expressions[24]); } BinaryenAddFunctionExport(the_module, "tinycore::panic_fmt", "tinycore::panic_fmt"); the_relooper = RelooperCreate(the_module); @@ -121,7 +130,13 @@ int main() { { BinaryenType varTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[3] = BinaryenAddFunction(the_module, "tinycore::rust_eh_register_frames", functionTypes[0], varTypes, 3, expressions[33]); + functions[3] = BinaryenAddFunction(the_module, + "tinycore::rust_eh_register_frames", + BinaryenTypeNone(), + BinaryenTypeNone(), + varTypes, + 3, + expressions[33]); } BinaryenAddFunctionExport(the_module, "tinycore::rust_eh_register_frames", "tinycore::rust_eh_register_frames"); the_relooper = RelooperCreate(the_module); @@ -144,7 +159,13 @@ int main() { { BinaryenType varTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[4] = BinaryenAddFunction(the_module, "tinycore::rust_eh_unregister_frames", functionTypes[0], varTypes, 3, expressions[42]); + functions[4] = BinaryenAddFunction(the_module, + "tinycore::rust_eh_unregister_frames", + BinaryenTypeNone(), + BinaryenTypeNone(), + varTypes, + 3, + expressions[42]); } BinaryenAddFunctionExport(the_module, "tinycore::rust_eh_unregister_frames", "tinycore::rust_eh_unregister_frames"); the_relooper = RelooperCreate(the_module); @@ -152,11 +173,12 @@ int main() { expressions[44] = BinaryenLocalSet(the_module, 1, expressions[43]); expressions[45] = BinaryenLocalGet(the_module, 1, BinaryenTypeInt32()); expressions[46] = BinaryenLocalSet(the_module, 2, expressions[45]); - { - BinaryenType paramTypes[] = {BinaryenTypeInt32()}; - functionTypes[2] = BinaryenAddFunctionType(the_module, "print_i32", BinaryenTypeNone(), paramTypes, 1); - } - BinaryenAddFunctionImport(the_module, "print_i32", "spectest", "print", functionTypes[2]); + BinaryenAddFunctionImport(the_module, + "print_i32", + "spectest", + "print", + BinaryenTypeInt32(), + BinaryenTypeNone()); expressions[47] = BinaryenLocalGet(the_module, 2, BinaryenTypeInt32()); { BinaryenExpressionRef operands[] = { expressions[47] }; @@ -178,10 +200,6 @@ int main() { } relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[54]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); - { - BinaryenType paramTypes[] = {BinaryenTypeInt32()}; - functionTypes[3] = BinaryenAddFunctionType(the_module, "rustfn-0-49", BinaryenTypeNone(), paramTypes, 1); - } expressions[55] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[56] = BinaryenLoad(the_module, 4, 0, 0, 0, BinaryenTypeInt32(), expressions[55]); expressions[57] = BinaryenLocalSet(the_module, 3, expressions[56]); @@ -194,7 +212,13 @@ int main() { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[5] = BinaryenAddFunction(the_module, "wasm::print_i32", functionTypes[3], varTypes, 5, expressions[58]); + functions[5] = BinaryenAddFunction(the_module, + "wasm::print_i32", + BinaryenTypeInt32(), + BinaryenTypeNone(), + varTypes, + 5, + expressions[58]); } BinaryenAddFunctionExport(the_module, "wasm::print_i32", "wasm::print_i32"); the_relooper = RelooperCreate(the_module); @@ -255,10 +279,6 @@ int main() { expressions[100] = BinaryenUnreachable(the_module); relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[100]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - { - BinaryenType paramTypes[] = {BinaryenTypeNone()}; - functionTypes[4] = BinaryenAddFunctionType(the_module, "rustfn-0-54", BinaryenTypeInt32(), paramTypes, 0); - } expressions[101] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[102] = BinaryenLoad(the_module, 4, 0, 0, 0, BinaryenTypeInt32(), expressions[101]); expressions[103] = BinaryenLocalSet(the_module, 6, expressions[102]); @@ -275,7 +295,13 @@ int main() { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[6] = BinaryenAddFunction(the_module, "real_main", functionTypes[4], varTypes, 9, expressions[104]); + functions[6] = BinaryenAddFunction(the_module, + "real_main", + BinaryenTypeNone(), + BinaryenTypeInt32(), + varTypes, + 9, + expressions[104]); } BinaryenAddFunctionExport(the_module, "real_main", "real_main"); the_relooper = RelooperCreate(the_module); @@ -378,10 +404,6 @@ int main() { relooperBlocks[4] = RelooperAddBlock(the_relooper, expressions[152]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[4], expressions[0], expressions[0]); RelooperAddBranch(relooperBlocks[2], relooperBlocks[3], expressions[0], expressions[0]); - { - BinaryenType paramTypes[] = {BinaryenTypeInt32(), BinaryenTypeInt32()}; - functionTypes[5] = BinaryenAddFunctionType(the_module, "rustfn-0-57", BinaryenTypeInt32(), paramTypes, 2); - } expressions[153] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[154] = BinaryenLoad(the_module, 4, 0, 0, 0, BinaryenTypeInt32(), expressions[153]); expressions[155] = BinaryenLocalSet(the_module, 9, expressions[154]); @@ -399,14 +421,18 @@ int main() { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[7] = BinaryenAddFunction(the_module, "main", functionTypes[5], varTypes, 10, expressions[156]); + BinaryenType ii_[2] = {BinaryenTypeInt32(), BinaryenTypeInt32()}; + BinaryenType ii = BinaryenTypeCreate(ii_, 2); + functions[7] = BinaryenAddFunction(the_module, + "main", + ii, + BinaryenTypeInt32(), + varTypes, + 10, + expressions[156]); } BinaryenAddFunctionExport(the_module, "main", "main"); { - BinaryenType paramTypes[] = {BinaryenTypeNone()}; - functionTypes[6] = BinaryenAddFunctionType(the_module, "__wasm_start", BinaryenTypeNone(), paramTypes, 0); - } - { const char* segments[] = { 0 }; BinaryenExpressionRef segmentOffsets[] = { 0 }; int8_t segmentPassive[] = { 0 }; @@ -437,7 +463,13 @@ int main() { BinaryenAddFunctionExport(the_module, "__wasm_start", "rust_entry"); { BinaryenType varTypes[] = {BinaryenTypeNone()}; - functions[8] = BinaryenAddFunction(the_module, "__wasm_start", functionTypes[6], varTypes, 0, expressions[164]); + functions[8] = BinaryenAddFunction(the_module, + "__wasm_start", + BinaryenTypeNone(), + BinaryenTypeNone(), + varTypes, + 0, + expressions[164]); } BinaryenSetStart(the_module, functions[8]); the_relooper = RelooperCreate(the_module); @@ -518,10 +550,6 @@ int main() { expressions[206] = BinaryenUnreachable(the_module); relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[206]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[2], expressions[0], expressions[0]); - { - BinaryenType paramTypes[] = {BinaryenTypeInt32(), BinaryenTypeInt32()}; - functionTypes[7] = BinaryenAddFunctionType(the_module, "rustfn-0-13", BinaryenTypeInt32(), paramTypes, 2); - } expressions[207] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[208] = BinaryenLoad(the_module, 4, 0, 0, 0, BinaryenTypeInt32(), expressions[207]); expressions[209] = BinaryenLocalSet(the_module, 8, expressions[208]); @@ -538,7 +566,15 @@ int main() { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[9] = BinaryenAddFunction(the_module, "_isize_as_tinycore::Add_::add", functionTypes[7], varTypes, 9, expressions[210]); + BinaryenType ii_[2] = {BinaryenTypeInt32(), BinaryenTypeInt32()}; + BinaryenType ii = BinaryenTypeCreate(ii_, 2); + functions[9] = BinaryenAddFunction(the_module, + "_isize_as_tinycore::Add_::add", + ii, + BinaryenTypeInt32(), + varTypes, + 9, + expressions[210]); } BinaryenAddFunctionExport(the_module, "_isize_as_tinycore::Add_::add", "_isize_as_tinycore::Add_::add"); the_relooper = RelooperCreate(the_module); @@ -565,10 +601,6 @@ int main() { expressions[223] = BinaryenBlock(the_module, "bb0", children, 5, BinaryenTypeAuto()); } relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[223]); - { - BinaryenType paramTypes[] = {BinaryenTypeInt32()}; - functionTypes[8] = BinaryenAddFunctionType(the_module, "rustfn-0-22", BinaryenTypeInt32(), paramTypes, 1); - } expressions[224] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[225] = BinaryenLoad(the_module, 4, 0, 0, 0, BinaryenTypeInt32(), expressions[224]); expressions[226] = BinaryenLocalSet(the_module, 4, expressions[225]); @@ -582,7 +614,13 @@ int main() { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[10] = BinaryenAddFunction(the_module, "_bool_as_tinycore::Not_::not", functionTypes[8], varTypes, 6, expressions[227]); + functions[10] = BinaryenAddFunction(the_module, + "_bool_as_tinycore::Not_::not", + BinaryenTypeInt32(), + BinaryenTypeInt32(), + varTypes, + 6, + expressions[227]); } BinaryenAddFunctionExport(the_module, "_bool_as_tinycore::Not_::not", "_bool_as_tinycore::Not_::not"); the_relooper = RelooperCreate(the_module); @@ -614,10 +652,6 @@ int main() { expressions[245] = BinaryenBlock(the_module, "bb0", children, 7, BinaryenTypeAuto()); } relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[245]); - { - BinaryenType paramTypes[] = {BinaryenTypeInt32(), BinaryenTypeInt32()}; - functionTypes[9] = BinaryenAddFunctionType(the_module, "rustfn-0-33", BinaryenTypeInt32(), paramTypes, 2); - } expressions[246] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[247] = BinaryenLoad(the_module, 4, 0, 0, 0, BinaryenTypeInt32(), expressions[246]); expressions[248] = BinaryenLocalSet(the_module, 7, expressions[247]); @@ -633,7 +667,15 @@ int main() { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[11] = BinaryenAddFunction(the_module, "_i16_as_tinycore::PartialEq_::eq", functionTypes[9], varTypes, 8, expressions[249]); + BinaryenType ii_[2] = {BinaryenTypeInt32(), BinaryenTypeInt32()}; + BinaryenType ii = BinaryenTypeCreate(ii_, 2); + functions[11] = BinaryenAddFunction(the_module, + "_i16_as_tinycore::PartialEq_::eq", + ii, + BinaryenTypeInt32(), + varTypes, + 8, + expressions[249]); } BinaryenAddFunctionExport(the_module, "_i16_as_tinycore::PartialEq_::eq", "_i16_as_tinycore::PartialEq_::eq"); the_relooper = RelooperCreate(the_module); @@ -665,10 +707,6 @@ int main() { expressions[267] = BinaryenBlock(the_module, "bb0", children, 7, BinaryenTypeAuto()); } relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[267]); - { - BinaryenType paramTypes[] = {BinaryenTypeInt64(), BinaryenTypeInt64()}; - functionTypes[10] = BinaryenAddFunctionType(the_module, "rustfn-0-37", BinaryenTypeInt32(), paramTypes, 2); - } expressions[268] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[269] = BinaryenLoad(the_module, 4, 0, 0, 0, BinaryenTypeInt64(), expressions[268]); expressions[270] = BinaryenLocalSet(the_module, 7, expressions[269]); @@ -684,12 +722,19 @@ int main() { BinaryenTypeInt64(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[12] = BinaryenAddFunction(the_module, "_i64_as_tinycore::PartialEq_::eq", functionTypes[10], varTypes, 8, expressions[271]); + BinaryenType ii_[2] = {BinaryenTypeInt64(), BinaryenTypeInt64()}; + BinaryenType ii = BinaryenTypeCreate(ii_, 2); + functions[12] = BinaryenAddFunction(the_module, + "_i64_as_tinycore::PartialEq_::eq", + ii, + BinaryenTypeInt32(), + varTypes, + 8, + expressions[271]); } BinaryenAddFunctionExport(the_module, "_i64_as_tinycore::PartialEq_::eq", "_i64_as_tinycore::PartialEq_::eq"); assert(BinaryenModuleValidate(the_module)); BinaryenModuleDispose(the_module); - functionTypes.clear(); expressions.clear(); functions.clear(); relooperBlocks.clear(); diff --git a/test/example/c-api-unused-mem.cpp b/test/example/c-api-unused-mem.cpp index 3ca6f49e2..17e8004eb 100644 --- a/test/example/c-api-unused-mem.cpp +++ b/test/example/c-api-unused-mem.cpp @@ -7,7 +7,6 @@ #include "binaryen-c.h" int main() { - std::map<size_t, BinaryenFunctionTypeRef> functionTypes; std::map<size_t, BinaryenExpressionRef> expressions; std::map<size_t, BinaryenFunctionRef> functions; std::map<size_t, RelooperBlockRef> relooperBlocks; @@ -40,10 +39,6 @@ int main() { } relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[6]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); - { - BinaryenType paramTypes[] = {BinaryenTypeNone()}; - functionTypes[0] = BinaryenAddFunctionType(the_module, "rustfn-0-3", BinaryenTypeNone(), paramTypes, 0); - } expressions[7] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[8] = BinaryenLoad(the_module, 4, 0, 0, 0, BinaryenTypeInt32(), expressions[7]); @@ -54,14 +49,16 @@ int main() { { BinaryenType varTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32(), BinaryenTypeInt64()}; - functions[0] = BinaryenAddFunction(the_module, "main", functionTypes[0], varTypes, 3, expressions[10]); + functions[0] = BinaryenAddFunction(the_module, + "main", + BinaryenTypeNone(), + BinaryenTypeNone(), + varTypes, + 3, + expressions[10]); } BinaryenAddFunctionExport(the_module, "main", "main"); { - BinaryenType paramTypes[] = {BinaryenTypeNone()}; - functionTypes[1] = BinaryenAddFunctionType(the_module, "__wasm_start", BinaryenTypeNone(), paramTypes, 0); - } - { const char* segments[] = { 0 }; int8_t segmentPassive[] = { 0 }; BinaryenExpressionRef segmentOffsets[] = { 0 }; @@ -83,7 +80,13 @@ int main() { BinaryenAddFunctionExport(the_module, "__wasm_start", "rust_entry"); { BinaryenType varTypes[] = {BinaryenTypeNone()}; - functions[1] = BinaryenAddFunction(the_module, "__wasm_start", functionTypes[1], varTypes, 0, expressions[15]); + functions[1] = BinaryenAddFunction(the_module, + "__wasm_start", + BinaryenTypeNone(), + BinaryenTypeNone(), + varTypes, + 0, + expressions[15]); } assert(BinaryenModuleValidate(the_module)); BinaryenModulePrint(the_module); diff --git a/test/example/c-api-unused-mem.txt b/test/example/c-api-unused-mem.txt index 56cd3a948..6a4188994 100644 --- a/test/example/c-api-unused-mem.txt +++ b/test/example/c-api-unused-mem.txt @@ -1,11 +1,10 @@ (module - (type $rustfn-0-3 (func)) - (type $__wasm_start (func)) + (type $none_=>_none (func)) (memory $0 1024 1024) (export "memory" (memory $0)) (export "main" (func $main)) (export "rust_entry" (func $__wasm_start)) - (func $main (; 0 ;) (type $rustfn-0-3) + (func $main (; 0 ;) (local $0 i32) (local $1 i32) (local $2 i64) @@ -29,7 +28,7 @@ ) ) ) - (func $__wasm_start (; 1 ;) (type $__wasm_start) + (func $__wasm_start (; 1 ;) (i32.store (i32.const 0) (i32.const 65535) @@ -39,12 +38,12 @@ ) 148 (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 1024 1024) (export "memory" (memory $0)) (export "main" (func $main)) (export "rust_entry" (func $__wasm_start)) - (func $main (; 0 ;) (type $0) + (func $main (; 0 ;) (local $0 i32) (local $1 i32) (local $2 i64) @@ -69,7 +68,7 @@ (unreachable) ) ) - (func $__wasm_start (; 1 ;) (type $0) + (func $__wasm_start (; 1 ;) (i32.store (i32.const 0) (i32.const 65535) diff --git a/test/example/cpp-threads.cpp b/test/example/cpp-threads.cpp index 72724d8b6..e59bd5243 100644 --- a/test/example/cpp-threads.cpp +++ b/test/example/cpp-threads.cpp @@ -13,8 +13,8 @@ void worker() { BinaryenModuleRef module = BinaryenModuleCreate(); // Create a function type for i32 (i32, i32) - BinaryenType params[2] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; - BinaryenFunctionTypeRef iii = BinaryenAddFunctionType(module, "iii", BinaryenTypeInt32(), params, 2); + BinaryenType ii_[2] = {BinaryenTypeInt32(), BinaryenTypeInt32()}; + BinaryenType ii = BinaryenTypeCreate(ii_, 2); // Get the 0 and 1 arguments, and add them BinaryenExpressionRef x = BinaryenLocalGet(module, 0, BinaryenTypeInt32()), @@ -25,7 +25,8 @@ void worker() { // Create the add function // Note: no additional local variables // Note: no basic blocks here, we are an AST. The function body is just an expression node. - BinaryenFunctionRef adder = BinaryenAddFunction(module, "adder", iii, NULL, 0, ret); + BinaryenFunctionRef adder = + BinaryenAddFunction(module, "adder", ii, BinaryenTypeInt32(), NULL, 0, ret); // validate it assert(BinaryenModuleValidate(module)); @@ -38,8 +39,7 @@ void worker() { BinaryenModuleDispose(module); } -int main() -{ +int main() { std::vector<std::thread> threads; std::cout << "create threads...\n"; diff --git a/test/example/relooper-fuzz.c b/test/example/relooper-fuzz.c index 5691c5660..4a6330e6e 100644 --- a/test/example/relooper-fuzz.c +++ b/test/example/relooper-fuzz.c @@ -57,8 +57,13 @@ int main() { ); BinaryenExpressionRef checkBodyList[] = { halter, incer, debugger, returner }; BinaryenExpressionRef checkBody = BinaryenBlock(module, NULL, checkBodyList, sizeof(checkBodyList) / sizeof(BinaryenExpressionRef), BinaryenTypeAuto()); - BinaryenFunctionTypeRef i = BinaryenAddFunctionType(module, "i", BinaryenTypeInt32(), NULL, 0); - BinaryenAddFunction(module, "check", i, NULL, 0, checkBody); + BinaryenAddFunction(module, + "check", + BinaryenTypeNone(), + BinaryenTypeInt32(), + NULL, + 0, + checkBody); // contents of main() begin here @@ -244,16 +249,20 @@ int main() { full[numDecisions] = body; BinaryenExpressionRef all = BinaryenBlock(module, NULL, full, numDecisions + 1, BinaryenTypeAuto()); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", BinaryenTypeNone(), NULL, 0); BinaryenType localTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; // state, free-for-label - BinaryenFunctionRef theMain = BinaryenAddFunction(module, "main", v, localTypes, 2, all); + BinaryenFunctionRef theMain = BinaryenAddFunction( + module, "main", BinaryenTypeNone(), BinaryenTypeNone(), localTypes, 2, all); BinaryenSetStart(module, theMain); // import BinaryenType iparams[] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", BinaryenTypeNone(), iparams, 1); - BinaryenAddFunctionImport(module, "print", "spectest", "print", vi); + BinaryenAddFunctionImport(module, + "print", + "spectest", + "print", + BinaryenTypeInt32(), + BinaryenTypeNone()); // memory BinaryenSetMemory(module, 1, 1, "mem", NULL, NULL, NULL, NULL, 0, 0); diff --git a/test/example/relooper-fuzz.txt b/test/example/relooper-fuzz.txt index 1a61c71b1..950ba0d0f 100644 --- a/test/example/relooper-fuzz.txt +++ b/test/example/relooper-fuzz.txt @@ -1,12 +1,12 @@ (module - (type $i (func (result i32))) - (type $v (func)) - (type $vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "spectest" "print" (func $print (param i32))) (memory $0 1 1) (export "mem" (memory $0)) (start $main) - (func $check (; 1 ;) (type $i) (result i32) + (func $check (; 1 ;) (result i32) (if (i32.eq (i32.load @@ -41,7 +41,7 @@ ) ) ) - (func $main (; 2 ;) (type $v) + (func $main (; 2 ;) (local $0 i32) (local $1 i32) (i32.store @@ -292,14 +292,14 @@ ) ) (module - (type $i (func (result i32))) - (type $v (func)) - (type $vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "spectest" "print" (func $print (param i32))) (memory $0 1 1) (export "mem" (memory $0)) (start $main) - (func $check (; 1 ;) (; has Stack IR ;) (type $i) (result i32) + (func $check (; 1 ;) (; has Stack IR ;) (result i32) (if (i32.eq (i32.load @@ -334,7 +334,7 @@ ) ) ) - (func $main (; 2 ;) (; has Stack IR ;) (type $v) + (func $main (; 2 ;) (; has Stack IR ;) (local $0 i32) (local $1 i32) (i32.store diff --git a/test/example/relooper-fuzz1.c b/test/example/relooper-fuzz1.c index 55271356c..f4a049697 100644 --- a/test/example/relooper-fuzz1.c +++ b/test/example/relooper-fuzz1.c @@ -1,5 +1,3 @@ - - #include <assert.h> #include <stdio.h> @@ -67,10 +65,13 @@ int main() { NULL, checkBodyList, sizeof(checkBodyList) / sizeof(BinaryenExpressionRef), BinaryenTypeAuto() ); - BinaryenFunctionTypeRef i = BinaryenAddFunctionType(module, "i", - BinaryenTypeInt32(), - NULL, 0); - BinaryenAddFunction(module, "check", i, NULL, 0, checkBody); + BinaryenAddFunction(module, + "check", + BinaryenTypeNone(), + BinaryenTypeInt32(), + NULL, + 0, + checkBody); // contents of main() begin here @@ -309,22 +310,19 @@ int main() { numDecisions + 1, BinaryenTypeAuto()); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", - BinaryenTypeNone(), - NULL, 0); // locals: state, free-for-label BinaryenType localTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; - BinaryenFunctionRef theMain = BinaryenAddFunction(module, "main", v, - localTypes, 2, all); + BinaryenFunctionRef theMain = BinaryenAddFunction( + module, "main", BinaryenTypeNone(), BinaryenTypeNone(), localTypes, 2, all); BinaryenSetStart(module, theMain); // import - - BinaryenType iparams[] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", - BinaryenTypeNone(), - iparams, 1); - BinaryenAddFunctionImport(module, "print", "spectest", "print", vi); + BinaryenAddFunctionImport(module, + "print", + "spectest", + "print", + BinaryenTypeInt32(), + BinaryenTypeNone()); // memory BinaryenSetMemory(module, 1, 1, "mem", NULL, NULL, NULL, NULL, 0, 0); diff --git a/test/example/relooper-fuzz1.txt b/test/example/relooper-fuzz1.txt index dfdc0b08e..213d46230 100644 --- a/test/example/relooper-fuzz1.txt +++ b/test/example/relooper-fuzz1.txt @@ -1,12 +1,12 @@ (module - (type $i (func (result i32))) - (type $v (func)) - (type $vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "spectest" "print" (func $print (param i32))) (memory $0 1 1) (export "mem" (memory $0)) (start $main) - (func $check (; 1 ;) (type $i) (result i32) + (func $check (; 1 ;) (result i32) (if (i32.eq (i32.load @@ -41,7 +41,7 @@ ) ) ) - (func $main (; 2 ;) (type $v) + (func $main (; 2 ;) (local $0 i32) (local $1 i32) (i32.store @@ -268,14 +268,14 @@ ) ) (module - (type $i (func (result i32))) - (type $v (func)) - (type $vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "spectest" "print" (func $print (param i32))) (memory $0 1 1) (export "mem" (memory $0)) (start $main) - (func $check (; 1 ;) (; has Stack IR ;) (type $i) (result i32) + (func $check (; 1 ;) (; has Stack IR ;) (result i32) (if (i32.eq (i32.load @@ -310,7 +310,7 @@ ) ) ) - (func $main (; 2 ;) (; has Stack IR ;) (type $v) + (func $main (; 2 ;) (; has Stack IR ;) (local $0 i32) (i32.store (i32.const 8) diff --git a/test/example/relooper-fuzz2.c b/test/example/relooper-fuzz2.c index 4d5af6759..217aaf9fa 100644 --- a/test/example/relooper-fuzz2.c +++ b/test/example/relooper-fuzz2.c @@ -1,5 +1,3 @@ - - #include <assert.h> #include <stdio.h> @@ -67,10 +65,13 @@ int main() { NULL, checkBodyList, sizeof(checkBodyList) / sizeof(BinaryenExpressionRef), BinaryenTypeInt32() ); - BinaryenFunctionTypeRef i = BinaryenAddFunctionType(module, "i", - BinaryenTypeInt32(), - NULL, 0); - BinaryenAddFunction(module, "check", i, NULL, 0, checkBody); + BinaryenAddFunction(module, + "check", + BinaryenTypeNone(), + BinaryenTypeInt32(), + NULL, + 0, + checkBody); // contents of main() begin here @@ -240,215 +241,357 @@ int main() { } - RelooperAddBranch(b0, b1, NULL, - BinaryenStore(module, - 4, 0, 0, + RelooperAddBranch( + b0, + b1, + NULL, + BinaryenStore( + module, + 4, + 0, + 0, BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, + BinaryenBinary( + module, BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 4)) - ), - BinaryenTypeInt32() - )); - - RelooperAddBranch(b1, b1, NULL, - BinaryenStore(module, - 4, 0, 0, + BinaryenConst(module, BinaryenLiteralInt32(4 * 4))), + BinaryenTypeInt32())); + + RelooperAddBranch( + b1, + b1, + NULL, + BinaryenStore( + module, + 4, + 0, + 0, BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, + BinaryenBinary( + module, BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 4)) - ), - BinaryenTypeInt32() - )); + BinaryenConst(module, BinaryenLiteralInt32(4 * 4))), + BinaryenTypeInt32())); { BinaryenIndex values[] = { 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86 }; - RelooperAddBranchForSwitch(b2, b7, values, - sizeof(values) / sizeof(BinaryenIndex), - BinaryenStore(module, - 4, 0, 0, - BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, - BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), - BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 6)) - ), - BinaryenTypeInt32() - )); + RelooperAddBranchForSwitch( + b2, + b7, + values, + sizeof(values) / sizeof(BinaryenIndex), + BinaryenStore( + module, + 4, + 0, + 0, + BinaryenConst(module, BinaryenLiteralInt32(4)), + BinaryenBinary( + module, + BinaryenAddInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), + BinaryenConst(module, BinaryenLiteralInt32(4))), + BinaryenConst(module, BinaryenLiteralInt32(4 * 6))), + BinaryenTypeInt32())); } - RelooperAddBranchForSwitch(b2, b4, NULL, 0, - BinaryenStore(module, - 4, 0, 0, + RelooperAddBranchForSwitch( + b2, + b4, + NULL, + 0, + BinaryenStore( + module, + 4, + 0, + 0, BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, + BinaryenBinary( + module, BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 4)) - ), - BinaryenTypeInt32() - )); - - RelooperAddBranchForSwitch(b3, b6, NULL, 0, - BinaryenStore(module, - 4, 0, 0, + BinaryenConst(module, BinaryenLiteralInt32(4 * 4))), + BinaryenTypeInt32())); + + RelooperAddBranchForSwitch( + b3, + b6, + NULL, + 0, + BinaryenStore( + module, + 4, + 0, + 0, BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, + BinaryenBinary( + module, BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 5)) - ), - BinaryenTypeInt32() - )); - - RelooperAddBranch(b4, b7, BinaryenBinary(module, - BinaryenEqInt32(), - BinaryenBinary(module, - BinaryenRemUInt32(), - BinaryenLocalGet(module, 0, BinaryenTypeInt32()), - BinaryenConst(module, BinaryenLiteralInt32(2)) - ), - BinaryenConst(module, BinaryenLiteralInt32(0)) - ), - BinaryenStore(module, - 4, 0, 0, - BinaryenConst(module, BinaryenLiteralInt32(4)), + BinaryenConst(module, BinaryenLiteralInt32(4 * 5))), + BinaryenTypeInt32())); + + RelooperAddBranch( + b4, + b7, + BinaryenBinary( + module, + BinaryenEqInt32(), BinaryenBinary(module, + BinaryenRemUInt32(), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), + BinaryenConst(module, BinaryenLiteralInt32(2))), + BinaryenConst(module, BinaryenLiteralInt32(0))), + BinaryenStore( + module, + 4, + 0, + 0, + BinaryenConst(module, BinaryenLiteralInt32(4)), + BinaryenBinary( + module, BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 5)) - ), - BinaryenTypeInt32() - )); - - RelooperAddBranch(b4, b3, NULL, - BinaryenStore(module, - 4, 0, 0, + BinaryenConst(module, BinaryenLiteralInt32(4 * 5))), + BinaryenTypeInt32())); + + RelooperAddBranch( + b4, + b3, + NULL, + BinaryenStore( + module, + 4, + 0, + 0, BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, + BinaryenBinary( + module, BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 3)) - ), - BinaryenTypeInt32() - )); - - RelooperAddBranchForSwitch(b5, b1, NULL, 0, - BinaryenStore(module, - 4, 0, 0, + BinaryenConst(module, BinaryenLiteralInt32(4 * 3))), + BinaryenTypeInt32())); + + RelooperAddBranchForSwitch( + b5, + b1, + NULL, + 0, + BinaryenStore( + module, + 4, + 0, + 0, BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, + BinaryenBinary( + module, BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 4)) - ), - BinaryenTypeInt32() - )); + BinaryenConst(module, BinaryenLiteralInt32(4 * 4))), + BinaryenTypeInt32())); { BinaryenIndex values[] = { 0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99,102,105,108 }; - RelooperAddBranchForSwitch(b6, b1, values, - sizeof(values) / sizeof(BinaryenIndex), - BinaryenStore(module, - 4, 0, 0, - BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, - BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), - BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 2)) - ), - BinaryenTypeInt32() - )); + RelooperAddBranchForSwitch( + b6, + b1, + values, + sizeof(values) / sizeof(BinaryenIndex), + BinaryenStore( + module, + 4, + 0, + 0, + BinaryenConst(module, BinaryenLiteralInt32(4)), + BinaryenBinary( + module, + BinaryenAddInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), + BinaryenConst(module, BinaryenLiteralInt32(4))), + BinaryenConst(module, BinaryenLiteralInt32(4 * 2))), + BinaryenTypeInt32())); } { BinaryenIndex values[] = { 1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100,103,106,109,112,115,118,121,124,127,130,133,136,139,142,145,148,151,154,157,160 }; - RelooperAddBranchForSwitch(b6, b7, values, - sizeof(values) / sizeof(BinaryenIndex), - BinaryenStore(module, - 4, 0, 0, - BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, - BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), - BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 3)) - ), - BinaryenTypeInt32() - )); + RelooperAddBranchForSwitch( + b6, + b7, + values, + sizeof(values) / sizeof(BinaryenIndex), + BinaryenStore( + module, + 4, + 0, + 0, + BinaryenConst(module, BinaryenLiteralInt32(4)), + BinaryenBinary( + module, + BinaryenAddInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), + BinaryenConst(module, BinaryenLiteralInt32(4))), + BinaryenConst(module, BinaryenLiteralInt32(4 * 3))), + BinaryenTypeInt32())); } - RelooperAddBranchForSwitch(b6, b2, NULL, 0, - BinaryenStore(module, - 4, 0, 0, + RelooperAddBranchForSwitch( + b6, + b2, + NULL, + 0, + BinaryenStore( + module, + 4, + 0, + 0, BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, + BinaryenBinary( + module, BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 3)) - ), - BinaryenTypeInt32() - )); - - RelooperAddBranch(b7, b5, BinaryenBinary(module, - BinaryenEqInt32(), - BinaryenBinary(module, - BinaryenRemUInt32(), - BinaryenLocalGet(module, 0, BinaryenTypeInt32()), - BinaryenConst(module, BinaryenLiteralInt32(2)) - ), - BinaryenConst(module, BinaryenLiteralInt32(0)) - ), - BinaryenStore(module, - 4, 0, 0, - BinaryenConst(module, BinaryenLiteralInt32(4)), + BinaryenConst(module, BinaryenLiteralInt32(4 * 3))), + BinaryenTypeInt32())); + + RelooperAddBranch( + b7, + b5, + BinaryenBinary( + module, + BinaryenEqInt32(), BinaryenBinary(module, + BinaryenRemUInt32(), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), + BinaryenConst(module, BinaryenLiteralInt32(2))), + BinaryenConst(module, BinaryenLiteralInt32(0))), + BinaryenStore( + module, + 4, + 0, + 0, + BinaryenConst(module, BinaryenLiteralInt32(4)), + BinaryenBinary( + module, BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 1)) - ), - BinaryenTypeInt32() - )); - - RelooperAddBranch(b7, b1, NULL, - BinaryenStore(module, - 4, 0, 0, + BinaryenConst(module, BinaryenLiteralInt32(4 * 1))), + BinaryenTypeInt32())); + + RelooperAddBranch( + b7, + b1, + NULL, + BinaryenStore( + module, + 4, + 0, + 0, BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, + BinaryenBinary( + module, BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 4)) - ), - BinaryenTypeInt32() - )); - - RelooperAddBranch(b8, b8, NULL, - BinaryenStore(module, - 4, 0, 0, + BinaryenConst(module, BinaryenLiteralInt32(4 * 4))), + BinaryenTypeInt32())); + + RelooperAddBranch( + b8, + b8, + NULL, + BinaryenStore( + module, + 4, + 0, + 0, BinaryenConst(module, BinaryenLiteralInt32(4)), - BinaryenBinary(module, + BinaryenBinary( + module, BinaryenAddInt32(), - BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), + BinaryenLoad(module, + 4, + 0, + 0, + 0, + BinaryenTypeInt32(), BinaryenConst(module, BinaryenLiteralInt32(4))), - BinaryenConst(module, BinaryenLiteralInt32(4 * 2)) - ), - BinaryenTypeInt32() - )); + BinaryenConst(module, BinaryenLiteralInt32(4 * 2))), + BinaryenTypeInt32())); BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, b0, 1); @@ -474,22 +617,19 @@ int main() { numDecisions + 1, BinaryenTypeNone()); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", - BinaryenTypeNone(), - NULL, 0); // locals: state, free-for-label BinaryenType localTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; - BinaryenFunctionRef theMain = BinaryenAddFunction(module, "main", v, - localTypes, 2, all); + BinaryenFunctionRef theMain = BinaryenAddFunction( + module, "main", BinaryenTypeNone(), BinaryenTypeNone(), localTypes, 2, all); BinaryenSetStart(module, theMain); // import - - BinaryenType iparams[] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", - BinaryenTypeNone(), - iparams, 1); - BinaryenAddFunctionImport(module, "print", "spectest", "print", vi); + BinaryenAddFunctionImport(module, + "print", + "spectest", + "print", + BinaryenTypeInt32(), + BinaryenTypeNone()); // memory BinaryenSetMemory(module, 1, 1, "mem", NULL, NULL, NULL, NULL, 0, 0); diff --git a/test/example/relooper-fuzz2.txt b/test/example/relooper-fuzz2.txt index 6ceb1f9cf..17e9461e7 100644 --- a/test/example/relooper-fuzz2.txt +++ b/test/example/relooper-fuzz2.txt @@ -1,12 +1,12 @@ (module - (type $i (func (result i32))) - (type $v (func)) - (type $vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "spectest" "print" (func $print (param i32))) (memory $0 1 1) (export "mem" (memory $0)) (start $main) - (func $check (; 1 ;) (type $i) (result i32) + (func $check (; 1 ;) (result i32) (if (i32.ge_u (i32.load @@ -41,7 +41,7 @@ ) ) ) - (func $main (; 2 ;) (type $v) + (func $main (; 2 ;) (local $0 i32) (local $1 i32) (i32.store diff --git a/test/example/relooper-merge1.c b/test/example/relooper-merge1.c index 320e73efa..68796a6f6 100644 --- a/test/example/relooper-merge1.c +++ b/test/example/relooper-merge1.c @@ -1,5 +1,3 @@ - - #include <assert.h> #include <stdio.h> @@ -67,10 +65,13 @@ int main() { NULL, checkBodyList, sizeof(checkBodyList) / sizeof(BinaryenExpressionRef), BinaryenTypeInt32() ); - BinaryenFunctionTypeRef i = BinaryenAddFunctionType(module, "i", - BinaryenTypeInt32(), - NULL, 0); - BinaryenAddFunction(module, "check", i, NULL, 0, checkBody); + BinaryenAddFunction(module, + "check", + BinaryenTypeNone(), + BinaryenTypeInt32(), + NULL, + 0, + checkBody); // contents of main() begin here @@ -176,22 +177,24 @@ int main() { BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, b0, 1); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", - BinaryenTypeNone(), - NULL, 0); // locals: state, free-for-label BinaryenType localTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; - BinaryenFunctionRef theMain = BinaryenAddFunction(module, "main", v, - localTypes, 2, body); + BinaryenFunctionRef theMain = BinaryenAddFunction(module, + "main", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 2, + body); BinaryenSetStart(module, theMain); // import - - BinaryenType iparams[] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", - BinaryenTypeNone(), - iparams, 1); - BinaryenAddFunctionImport(module, "print", "spectest", "print", vi); + BinaryenAddFunctionImport(module, + "print", + "spectest", + "print", + BinaryenTypeInt32(), + BinaryenTypeNone()); // memory BinaryenSetMemory(module, 1, 1, "mem", NULL, NULL, NULL, NULL, 0, 0); diff --git a/test/example/relooper-merge1.txt b/test/example/relooper-merge1.txt index 87f91523f..913570949 100644 --- a/test/example/relooper-merge1.txt +++ b/test/example/relooper-merge1.txt @@ -1,12 +1,12 @@ (module - (type $i (func (result i32))) - (type $v (func)) - (type $vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "spectest" "print" (func $print (param i32))) (memory $0 1 1) (export "mem" (memory $0)) (start $main) - (func $check (; 1 ;) (type $i) (result i32) + (func $check (; 1 ;) (result i32) (if (i32.ge_u (i32.load @@ -41,7 +41,7 @@ ) ) ) - (func $main (; 2 ;) (type $v) + (func $main (; 2 ;) (local $0 i32) (local $1 i32) (block diff --git a/test/example/relooper-merge2.c b/test/example/relooper-merge2.c index 9387d572b..c4ac11a14 100644 --- a/test/example/relooper-merge2.c +++ b/test/example/relooper-merge2.c @@ -1,5 +1,3 @@ - - #include <assert.h> #include <stdio.h> @@ -67,10 +65,13 @@ int main() { NULL, checkBodyList, sizeof(checkBodyList) / sizeof(BinaryenExpressionRef), BinaryenTypeInt32() ); - BinaryenFunctionTypeRef i = BinaryenAddFunctionType(module, "i", - BinaryenTypeInt32(), - NULL, 0); - BinaryenAddFunction(module, "check", i, NULL, 0, checkBody); + BinaryenAddFunction(module, + "check", + BinaryenTypeNone(), + BinaryenTypeInt32(), + NULL, + 0, + checkBody); // contents of main() begin here @@ -188,22 +189,24 @@ int main() { BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, b0, 1); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", - BinaryenTypeNone(), - NULL, 0); // locals: state, free-for-label BinaryenType localTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; - BinaryenFunctionRef theMain = BinaryenAddFunction(module, "main", v, - localTypes, 2, body); + BinaryenFunctionRef theMain = BinaryenAddFunction(module, + "main", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 2, + body); BinaryenSetStart(module, theMain); // import - - BinaryenType iparams[] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", - BinaryenTypeNone(), - iparams, 1); - BinaryenAddFunctionImport(module, "print", "spectest", "print", vi); + BinaryenAddFunctionImport(module, + "print", + "spectest", + "print", + BinaryenTypeInt32(), + BinaryenTypeNone()); // memory BinaryenSetMemory(module, 1, 1, "mem", NULL, NULL, NULL, NULL, 0, 0); diff --git a/test/example/relooper-merge2.txt b/test/example/relooper-merge2.txt index e11281f5d..a1f12b61a 100644 --- a/test/example/relooper-merge2.txt +++ b/test/example/relooper-merge2.txt @@ -1,12 +1,12 @@ (module - (type $i (func (result i32))) - (type $v (func)) - (type $vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "spectest" "print" (func $print (param i32))) (memory $0 1 1) (export "mem" (memory $0)) (start $main) - (func $check (; 1 ;) (type $i) (result i32) + (func $check (; 1 ;) (result i32) (if (i32.ge_u (i32.load @@ -41,7 +41,7 @@ ) ) ) - (func $main (; 2 ;) (type $v) + (func $main (; 2 ;) (local $0 i32) (local $1 i32) (block diff --git a/test/example/relooper-merge3.c b/test/example/relooper-merge3.c index 1bb650391..276ab3c3c 100644 --- a/test/example/relooper-merge3.c +++ b/test/example/relooper-merge3.c @@ -1,5 +1,3 @@ - - #include <assert.h> #include <stdio.h> @@ -67,10 +65,13 @@ int main() { NULL, checkBodyList, sizeof(checkBodyList) / sizeof(BinaryenExpressionRef), BinaryenTypeInt32() ); - BinaryenFunctionTypeRef i = BinaryenAddFunctionType(module, "i", - BinaryenTypeInt32(), - NULL, 0); - BinaryenAddFunction(module, "check", i, NULL, 0, checkBody); + BinaryenAddFunction(module, + "check", + BinaryenTypeNone(), + BinaryenTypeInt32(), + NULL, + 0, + checkBody); // contents of main() begin here @@ -175,22 +176,24 @@ int main() { BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, b0, 1); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", - BinaryenTypeNone(), - NULL, 0); // locals: state, free-for-label BinaryenType localTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; - BinaryenFunctionRef theMain = BinaryenAddFunction(module, "main", v, - localTypes, 2, body); + BinaryenFunctionRef theMain = BinaryenAddFunction(module, + "main", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 2, + body); BinaryenSetStart(module, theMain); // import - - BinaryenType iparams[] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", - BinaryenTypeNone(), - iparams, 1); - BinaryenAddFunctionImport(module, "print", "spectest", "print", vi); + BinaryenAddFunctionImport(module, + "print", + "spectest", + "print", + BinaryenTypeInt32(), + BinaryenTypeNone()); // memory BinaryenSetMemory(module, 1, 1, "mem", NULL, NULL, NULL, NULL, 0, 0); diff --git a/test/example/relooper-merge3.txt b/test/example/relooper-merge3.txt index 32c669a06..8975a9967 100644 --- a/test/example/relooper-merge3.txt +++ b/test/example/relooper-merge3.txt @@ -1,12 +1,12 @@ (module - (type $i (func (result i32))) - (type $v (func)) - (type $vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "spectest" "print" (func $print (param i32))) (memory $0 1 1) (export "mem" (memory $0)) (start $main) - (func $check (; 1 ;) (type $i) (result i32) + (func $check (; 1 ;) (result i32) (if (i32.ge_u (i32.load @@ -41,7 +41,7 @@ ) ) ) - (func $main (; 2 ;) (type $v) + (func $main (; 2 ;) (local $0 i32) (local $1 i32) (block diff --git a/test/example/relooper-merge4.c b/test/example/relooper-merge4.c index 86ba272f2..b168a2db6 100644 --- a/test/example/relooper-merge4.c +++ b/test/example/relooper-merge4.c @@ -1,5 +1,3 @@ - - #include <assert.h> #include <stdio.h> @@ -67,10 +65,13 @@ int main() { NULL, checkBodyList, sizeof(checkBodyList) / sizeof(BinaryenExpressionRef), BinaryenTypeInt32() ); - BinaryenFunctionTypeRef i = BinaryenAddFunctionType(module, "i", - BinaryenTypeInt32(), - NULL, 0); - BinaryenAddFunction(module, "check", i, NULL, 0, checkBody); + BinaryenAddFunction(module, + "check", + BinaryenTypeNone(), + BinaryenTypeInt32(), + NULL, + 0, + checkBody); // contents of main() begin here @@ -175,22 +176,24 @@ int main() { BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, b0, 1); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", - BinaryenTypeNone(), - NULL, 0); // locals: state, free-for-label BinaryenType localTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; - BinaryenFunctionRef theMain = BinaryenAddFunction(module, "main", v, - localTypes, 2, body); + BinaryenFunctionRef theMain = BinaryenAddFunction(module, + "main", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 2, + body); BinaryenSetStart(module, theMain); // import - - BinaryenType iparams[] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", - BinaryenTypeNone(), - iparams, 1); - BinaryenAddFunctionImport(module, "print", "spectest", "print", vi); + BinaryenAddFunctionImport(module, + "print", + "spectest", + "print", + BinaryenTypeInt32(), + BinaryenTypeNone()); // memory BinaryenSetMemory(module, 1, 1, "mem", NULL, NULL, NULL, NULL, 0, 0); diff --git a/test/example/relooper-merge4.txt b/test/example/relooper-merge4.txt index ff3c75881..b6d560555 100644 --- a/test/example/relooper-merge4.txt +++ b/test/example/relooper-merge4.txt @@ -1,12 +1,12 @@ (module - (type $i (func (result i32))) - (type $v (func)) - (type $vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "spectest" "print" (func $print (param i32))) (memory $0 1 1) (export "mem" (memory $0)) (start $main) - (func $check (; 1 ;) (type $i) (result i32) + (func $check (; 1 ;) (result i32) (if (i32.ge_u (i32.load @@ -41,7 +41,7 @@ ) ) ) - (func $main (; 2 ;) (type $v) + (func $main (; 2 ;) (local $0 i32) (local $1 i32) (block diff --git a/test/example/relooper-merge5.c b/test/example/relooper-merge5.c index 67048159f..deee2afee 100644 --- a/test/example/relooper-merge5.c +++ b/test/example/relooper-merge5.c @@ -1,5 +1,3 @@ - - #include <assert.h> #include <stdio.h> @@ -67,10 +65,13 @@ int main() { NULL, checkBodyList, sizeof(checkBodyList) / sizeof(BinaryenExpressionRef), BinaryenTypeInt32() ); - BinaryenFunctionTypeRef i = BinaryenAddFunctionType(module, "i", - BinaryenTypeInt32(), - NULL, 0); - BinaryenAddFunction(module, "check", i, NULL, 0, checkBody); + BinaryenAddFunction(module, + "check", + BinaryenTypeNone(), + BinaryenTypeInt32(), + NULL, + 0, + checkBody); // contents of main() begin here @@ -175,22 +176,24 @@ int main() { BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, b0, 1); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", - BinaryenTypeNone(), - NULL, 0); // locals: state, free-for-label BinaryenType localTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; - BinaryenFunctionRef theMain = BinaryenAddFunction(module, "main", v, - localTypes, 2, body); + BinaryenFunctionRef theMain = BinaryenAddFunction(module, + "main", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 2, + body); BinaryenSetStart(module, theMain); // import - - BinaryenType iparams[] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", - BinaryenTypeNone(), - iparams, 1); - BinaryenAddFunctionImport(module, "print", "spectest", "print", vi); + BinaryenAddFunctionImport(module, + "print", + "spectest", + "print", + BinaryenTypeInt32(), + BinaryenTypeNone()); // memory BinaryenSetMemory(module, 1, 1, "mem", NULL, NULL, NULL, NULL, 0, 0); diff --git a/test/example/relooper-merge5.txt b/test/example/relooper-merge5.txt index bd3a68310..9b5a752c8 100644 --- a/test/example/relooper-merge5.txt +++ b/test/example/relooper-merge5.txt @@ -1,12 +1,12 @@ (module - (type $i (func (result i32))) - (type $v (func)) - (type $vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "spectest" "print" (func $print (param i32))) (memory $0 1 1) (export "mem" (memory $0)) (start $main) - (func $check (; 1 ;) (type $i) (result i32) + (func $check (; 1 ;) (result i32) (if (i32.ge_u (i32.load @@ -41,7 +41,7 @@ ) ) ) - (func $main (; 2 ;) (type $v) + (func $main (; 2 ;) (local $0 i32) (local $1 i32) (block diff --git a/test/example/relooper-merge6.c b/test/example/relooper-merge6.c index d51504d68..a9b26e8e1 100644 --- a/test/example/relooper-merge6.c +++ b/test/example/relooper-merge6.c @@ -1,5 +1,3 @@ - - #include <assert.h> #include <stdio.h> @@ -67,10 +65,13 @@ int main() { NULL, checkBodyList, sizeof(checkBodyList) / sizeof(BinaryenExpressionRef), BinaryenTypeInt32() ); - BinaryenFunctionTypeRef i = BinaryenAddFunctionType(module, "i", - BinaryenTypeInt32(), - NULL, 0); - BinaryenAddFunction(module, "check", i, NULL, 0, checkBody); + BinaryenAddFunction(module, + "check", + BinaryenTypeNone(), + BinaryenTypeInt32(), + NULL, + 0, + checkBody); // contents of main() begin here @@ -166,22 +167,24 @@ int main() { BinaryenExpressionRef body = RelooperRenderAndDispose(relooper, b0, 1); - BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", - BinaryenTypeNone(), - NULL, 0); // locals: state, free-for-label BinaryenType localTypes[] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; - BinaryenFunctionRef theMain = BinaryenAddFunction(module, "main", v, - localTypes, 2, body); + BinaryenFunctionRef theMain = BinaryenAddFunction(module, + "main", + BinaryenTypeNone(), + BinaryenTypeNone(), + localTypes, + 2, + body); BinaryenSetStart(module, theMain); // import - - BinaryenType iparams[] = { BinaryenTypeInt32() }; - BinaryenFunctionTypeRef vi = BinaryenAddFunctionType(module, "vi", - BinaryenTypeNone(), - iparams, 1); - BinaryenAddFunctionImport(module, "print", "spectest", "print", vi); + BinaryenAddFunctionImport(module, + "print", + "spectest", + "print", + BinaryenTypeInt32(), + BinaryenTypeNone()); // memory BinaryenSetMemory(module, 1, 1, "mem", NULL, NULL, NULL, NULL, 0, 0); diff --git a/test/example/relooper-merge6.txt b/test/example/relooper-merge6.txt index 67d99802c..d34029759 100644 --- a/test/example/relooper-merge6.txt +++ b/test/example/relooper-merge6.txt @@ -1,12 +1,12 @@ (module - (type $i (func (result i32))) - (type $v (func)) - (type $vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "spectest" "print" (func $print (param i32))) (memory $0 1 1) (export "mem" (memory $0)) (start $main) - (func $check (; 1 ;) (type $i) (result i32) + (func $check (; 1 ;) (result i32) (if (i32.ge_u (i32.load @@ -41,7 +41,7 @@ ) ) ) - (func $main (; 2 ;) (type $v) + (func $main (; 2 ;) (local $0 i32) (local $1 i32) (block diff --git a/test/exception-handling.wast.from-wast b/test/exception-handling.wast.from-wast index e3209518e..85a21e9bf 100644 --- a/test/exception-handling.wast.from-wast +++ b/test/exception-handling.wast.from-wast @@ -1,18 +1,18 @@ (module - (type $FUNCSIG$ee (func (param exnref) (result exnref))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $exnref_=>_exnref (func (param exnref) (result exnref))) (event $e0 (attr 0) (param i32)) - (func $exnref_test (; 0 ;) (type $FUNCSIG$ee) (param $0 exnref) (result exnref) + (func $exnref_test (; 0 ;) (param $0 exnref) (result exnref) (local.get $0) ) - (func $foo (; 1 ;) (type $FUNCSIG$v) + (func $foo (; 1 ;) (nop) ) - (func $bar (; 2 ;) (type $FUNCSIG$v) + (func $bar (; 2 ;) (nop) ) - (func $eh_test (; 3 ;) (type $FUNCSIG$v) + (func $eh_test (; 3 ;) (local $exn exnref) (try (throw $e0 diff --git a/test/exception-handling.wast.fromBinary b/test/exception-handling.wast.fromBinary index 043eadf87..f83ad5d48 100644 --- a/test/exception-handling.wast.fromBinary +++ b/test/exception-handling.wast.fromBinary @@ -1,18 +1,18 @@ (module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (param exnref) (result exnref))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $exnref_=>_exnref (func (param exnref) (result exnref))) (event $event$0 (attr 0) (param i32)) - (func $exnref_test (; 0 ;) (type $2) (param $0 exnref) (result exnref) + (func $exnref_test (; 0 ;) (param $0 exnref) (result exnref) (local.get $0) ) - (func $foo (; 1 ;) (type $0) + (func $foo (; 1 ;) (nop) ) - (func $bar (; 2 ;) (type $0) + (func $bar (; 2 ;) (nop) ) - (func $eh_test (; 3 ;) (type $0) + (func $eh_test (; 3 ;) (local $0 exnref) (try (throw $event$0 diff --git a/test/exception-handling.wast.fromBinary.noDebugInfo b/test/exception-handling.wast.fromBinary.noDebugInfo index 4242c1395..0e9ceecae 100644 --- a/test/exception-handling.wast.fromBinary.noDebugInfo +++ b/test/exception-handling.wast.fromBinary.noDebugInfo @@ -1,18 +1,18 @@ (module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (param exnref) (result exnref))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $exnref_=>_exnref (func (param exnref) (result exnref))) (event $event$0 (attr 0) (param i32)) - (func $0 (; 0 ;) (type $2) (param $0 exnref) (result exnref) + (func $0 (; 0 ;) (param $0 exnref) (result exnref) (local.get $0) ) - (func $1 (; 1 ;) (type $0) + (func $1 (; 1 ;) (nop) ) - (func $2 (; 2 ;) (type $0) + (func $2 (; 2 ;) (nop) ) - (func $3 (; 3 ;) (type $0) + (func $3 (; 3 ;) (local $0 exnref) (try (throw $event$0 diff --git a/test/export-import.wast.from-wast b/test/export-import.wast.from-wast index f8ebdfd24..c7abd619b 100644 --- a/test/export-import.wast.from-wast +++ b/test/export-import.wast.from-wast @@ -1,5 +1,5 @@ (module - (type $v (func)) + (type $none_=>_none (func)) (import "env" "test2" (global $test2 i32)) (import "env" "test1" (func $test1)) (export "test1" (func $test1)) diff --git a/test/export-import.wast.fromBinary b/test/export-import.wast.fromBinary index aaab00c2d..5b7bcd030 100644 --- a/test/export-import.wast.fromBinary +++ b/test/export-import.wast.fromBinary @@ -1,5 +1,5 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (import "env" "test2" (global $gimport$1 i32)) (import "env" "test1" (func $test1)) (export "test1" (func $test1)) diff --git a/test/export-import.wast.fromBinary.noDebugInfo b/test/export-import.wast.fromBinary.noDebugInfo index 94942c901..7f973328d 100644 --- a/test/export-import.wast.fromBinary.noDebugInfo +++ b/test/export-import.wast.fromBinary.noDebugInfo @@ -1,5 +1,5 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (import "env" "test2" (global $gimport$1 i32)) (import "env" "test1" (func $fimport$0)) (export "test1" (func $fimport$0)) diff --git a/test/extra-unreachable.wast.from-wast b/test/extra-unreachable.wast.from-wast index d889eed20..bc5df92c4 100644 --- a/test/extra-unreachable.wast.from-wast +++ b/test/extra-unreachable.wast.from-wast @@ -1,21 +1,21 @@ (module - (type $ii (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result 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) + (func $foo (; 0 ;) (param $0 i32) (result i32) (i32.const 0) ) - (func $test_function_block (; 1 ;) (type $ii) + (func $test_function_block (; 1 ;) (block $block (unreachable) (nop) ) ) - (func $test (; 2 ;) (type $ii) + (func $test (; 2 ;) (block $block (i32.eqz (unreachable) @@ -62,7 +62,7 @@ ) ) (global.set $g - (call_indirect (type $ii) + (call_indirect (type $none_=>_none) (unreachable) ) ) diff --git a/test/extra-unreachable.wast.fromBinary b/test/extra-unreachable.wast.fromBinary index 3c3c5f71c..0b63e66c0 100644 --- a/test/extra-unreachable.wast.fromBinary +++ b/test/extra-unreachable.wast.fromBinary @@ -1,18 +1,18 @@ (module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result 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 $2) (param $0 i32) (result i32) + (func $foo (; 0 ;) (param $0 i32) (result i32) (i32.const 0) ) - (func $test_function_block (; 1 ;) (type $0) + (func $test_function_block (; 1 ;) (unreachable) ) - (func $test (; 2 ;) (type $0) + (func $test (; 2 ;) (block $label$1 (unreachable) ) diff --git a/test/extra-unreachable.wast.fromBinary.noDebugInfo b/test/extra-unreachable.wast.fromBinary.noDebugInfo index 4be633808..ff107189e 100644 --- a/test/extra-unreachable.wast.fromBinary.noDebugInfo +++ b/test/extra-unreachable.wast.fromBinary.noDebugInfo @@ -1,18 +1,18 @@ (module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result 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 $2) (param $0 i32) (result i32) + (func $0 (; 0 ;) (param $0 i32) (result i32) (i32.const 0) ) - (func $1 (; 1 ;) (type $0) + (func $1 (; 1 ;) (unreachable) ) - (func $2 (; 2 ;) (type $0) + (func $2 (; 2 ;) (block $label$1 (unreachable) ) diff --git a/test/fib-dbg.wasm.fromBinary b/test/fib-dbg.wasm.fromBinary index 297911b8d..0abcb7f4a 100644 --- a/test/fib-dbg.wasm.fromBinary +++ b/test/fib-dbg.wasm.fromBinary @@ -1,9 +1,9 @@ (module - (type $0 (func (param i32 i32))) - (type $1 (func (param i32) (result i32))) - (type $2 (func (result i32))) - (type $3 (func (param i32))) - (type $4 (func)) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $9 256 256)) (import "env" "table" (table $timport$10 0 0 funcref)) (import "env" "DYNAMICTOP_PTR" (global $gimport$0 i32)) @@ -48,7 +48,7 @@ (export "stackRestore" (func $stackRestore)) (export "_fib" (func $_fib)) (export "stackAlloc" (func $stackAlloc)) - (func $stackAlloc (; 0 ;) (type $1) (param $0 i32) (result i32) + (func $stackAlloc (; 0 ;) (param $0 i32) (result i32) (local $1 i32) (block $label$1 (local.set $1 @@ -74,17 +74,17 @@ ) ) ) - (func $stackSave (; 1 ;) (type $2) (result i32) + (func $stackSave (; 1 ;) (result i32) (return (global.get $global$3) ) ) - (func $stackRestore (; 2 ;) (type $3) (param $0 i32) + (func $stackRestore (; 2 ;) (param $0 i32) (global.set $global$3 (local.get $0) ) ) - (func $establishStackSpace (; 3 ;) (type $0) (param $0 i32) (param $1 i32) + (func $establishStackSpace (; 3 ;) (param $0 i32) (param $1 i32) (block $label$1 (global.set $global$3 (local.get $0) @@ -94,7 +94,7 @@ ) ) ) - (func $setThrew (; 4 ;) (type $0) (param $0 i32) (param $1 i32) + (func $setThrew (; 4 ;) (param $0 i32) (param $1 i32) (if (i32.eq (global.get $global$7) @@ -110,7 +110,7 @@ ) ) ) - (func $_fib (; 5 ;) (type $1) (param $0 i32) (result i32) + (func $_fib (; 5 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -210,7 +210,7 @@ ) ) ) - (func $runPostSets (; 6 ;) (type $4) + (func $runPostSets (; 6 ;) (local $0 i32) (nop) ) diff --git a/test/fn_prolog_epilog.debugInfo.wasm.fromBinary b/test/fn_prolog_epilog.debugInfo.wasm.fromBinary index 2681f8bb4..702b1c818 100644 --- a/test/fn_prolog_epilog.debugInfo.wasm.fromBinary +++ b/test/fn_prolog_epilog.debugInfo.wasm.fromBinary @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) ;;@ src.cpp:1:1 - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (nop) ;;@ src.cpp:2:1 (block $label$1 diff --git a/test/fn_prolog_epilog.debugInfo.wast.from-wast b/test/fn_prolog_epilog.debugInfo.wast.from-wast index 1a1933171..ba8667631 100644 --- a/test/fn_prolog_epilog.debugInfo.wast.from-wast +++ b/test/fn_prolog_epilog.debugInfo.wast.from-wast @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) ;;@ src.cpp:1:1 - (func $0 (; 0 ;) (type $FUNCSIG$v) + (func $0 (; 0 ;) (nop) ;;@ src.cpp:2:1 (block $l0 diff --git a/test/fn_prolog_epilog.debugInfo.wast.fromBinary b/test/fn_prolog_epilog.debugInfo.wast.fromBinary index 735a9dbcf..2f0e97ecd 100644 --- a/test/fn_prolog_epilog.debugInfo.wast.fromBinary +++ b/test/fn_prolog_epilog.debugInfo.wast.fromBinary @@ -1,6 +1,6 @@ (module - (type $0 (func)) - (func $0 (; 0 ;) (type $0) + (type $none_=>_none (func)) + (func $0 (; 0 ;) (nop) (block $label$1 (block $label$2 diff --git a/test/fn_prolog_epilog.debugInfo.wast.fromBinary.noDebugInfo b/test/fn_prolog_epilog.debugInfo.wast.fromBinary.noDebugInfo index 735a9dbcf..2f0e97ecd 100644 --- a/test/fn_prolog_epilog.debugInfo.wast.fromBinary.noDebugInfo +++ b/test/fn_prolog_epilog.debugInfo.wast.fromBinary.noDebugInfo @@ -1,6 +1,6 @@ (module - (type $0 (func)) - (func $0 (; 0 ;) (type $0) + (type $none_=>_none (func)) + (func $0 (; 0 ;) (nop) (block $label$1 (block $label$2 diff --git a/test/grow_memory.wast.from-wast b/test/grow_memory.wast.from-wast index 383591320..8663da629 100644 --- a/test/grow_memory.wast.from-wast +++ b/test/grow_memory.wast.from-wast @@ -1,16 +1,16 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 1) (export "memory" (memory $0)) (export "grow" (func $0)) (export "current" (func $1)) - (func $0 (; 0 ;) (type $0) (param $var$0 i32) (result i32) + (func $0 (; 0 ;) (param $var$0 i32) (result i32) (memory.grow (local.get $var$0) ) ) - (func $1 (; 1 ;) (type $1) (result i32) + (func $1 (; 1 ;) (result i32) (memory.size) ) ) diff --git a/test/grow_memory.wast.fromBinary b/test/grow_memory.wast.fromBinary index 8a54e4a7c..e5be876cb 100644 --- a/test/grow_memory.wast.fromBinary +++ b/test/grow_memory.wast.fromBinary @@ -1,16 +1,16 @@ (module - (type $0 (func (result i32))) - (type $1 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 1) (export "memory" (memory $0)) (export "grow" (func $0)) (export "current" (func $1)) - (func $0 (; 0 ;) (type $1) (param $0 i32) (result i32) + (func $0 (; 0 ;) (param $0 i32) (result i32) (memory.grow (local.get $0) ) ) - (func $1 (; 1 ;) (type $0) (result i32) + (func $1 (; 1 ;) (result i32) (memory.size) ) ) diff --git a/test/grow_memory.wast.fromBinary.noDebugInfo b/test/grow_memory.wast.fromBinary.noDebugInfo index 8a54e4a7c..e5be876cb 100644 --- a/test/grow_memory.wast.fromBinary.noDebugInfo +++ b/test/grow_memory.wast.fromBinary.noDebugInfo @@ -1,16 +1,16 @@ (module - (type $0 (func (result i32))) - (type $1 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 1) (export "memory" (memory $0)) (export "grow" (func $0)) (export "current" (func $1)) - (func $0 (; 0 ;) (type $1) (param $0 i32) (result i32) + (func $0 (; 0 ;) (param $0 i32) (result i32) (memory.grow (local.get $0) ) ) - (func $1 (; 1 ;) (type $0) (result i32) + (func $1 (; 1 ;) (result i32) (memory.size) ) ) diff --git a/test/hello_world.fromasm b/test/hello_world.fromasm index 424565b54..e3f04d7b9 100644 --- a/test/hello_world.fromasm +++ b/test/hello_world.fromasm @@ -1,4 +1,5 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "hello_world.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/hello_world.fromasm.clamp b/test/hello_world.fromasm.clamp index 424565b54..e3f04d7b9 100644 --- a/test/hello_world.fromasm.clamp +++ b/test/hello_world.fromasm.clamp @@ -1,4 +1,5 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "hello_world.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/hello_world.fromasm.clamp.no-opts b/test/hello_world.fromasm.clamp.no-opts index 711efc298..483a5b33b 100644 --- a/test/hello_world.fromasm.clamp.no-opts +++ b/test/hello_world.fromasm.clamp.no-opts @@ -1,4 +1,5 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/hello_world.fromasm.imprecise b/test/hello_world.fromasm.imprecise index 5d0d5b8d6..40c67dcf5 100644 --- a/test/hello_world.fromasm.imprecise +++ b/test/hello_world.fromasm.imprecise @@ -1,4 +1,5 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (export "add" (func $add)) (func $add (; 0 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) (i32.add diff --git a/test/hello_world.fromasm.imprecise.no-opts b/test/hello_world.fromasm.imprecise.no-opts index 711efc298..483a5b33b 100644 --- a/test/hello_world.fromasm.imprecise.no-opts +++ b/test/hello_world.fromasm.imprecise.no-opts @@ -1,4 +1,5 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/hello_world.fromasm.no-opts b/test/hello_world.fromasm.no-opts index 711efc298..483a5b33b 100644 --- a/test/hello_world.fromasm.no-opts +++ b/test/hello_world.fromasm.no-opts @@ -1,4 +1,5 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/hello_world.wast.from-wast b/test/hello_world.wast.from-wast index 8efc9e227..cbe9cb5ae 100644 --- a/test/hello_world.wast.from-wast +++ b/test/hello_world.wast.from-wast @@ -1,8 +1,8 @@ (module - (type $0 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 256 256) (export "add" (func $add)) - (func $add (; 0 ;) (type $0) (param $x i32) (param $y i32) (result i32) + (func $add (; 0 ;) (param $x i32) (param $y i32) (result i32) (i32.add (local.get $x) (local.get $y) diff --git a/test/hello_world.wast.fromBinary b/test/hello_world.wast.fromBinary index 86a8473e5..9b96024e2 100644 --- a/test/hello_world.wast.fromBinary +++ b/test/hello_world.wast.fromBinary @@ -1,8 +1,8 @@ (module - (type $0 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 256 256) (export "add" (func $add)) - (func $add (; 0 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $add (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (i32.add (local.get $0) (local.get $1) diff --git a/test/hello_world.wast.fromBinary.noDebugInfo b/test/hello_world.wast.fromBinary.noDebugInfo index 37a165244..f44465c5e 100644 --- a/test/hello_world.wast.fromBinary.noDebugInfo +++ b/test/hello_world.wast.fromBinary.noDebugInfo @@ -1,8 +1,8 @@ (module - (type $0 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 256 256) (export "add" (func $0)) - (func $0 (; 0 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $0 (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (i32.add (local.get $0) (local.get $1) diff --git a/test/hello_world.wat b/test/hello_world.wat index 8efc9e227..cbe9cb5ae 100644 --- a/test/hello_world.wat +++ b/test/hello_world.wat @@ -1,8 +1,8 @@ (module - (type $0 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 256 256) (export "add" (func $add)) - (func $add (; 0 ;) (type $0) (param $x i32) (param $y i32) (result i32) + (func $add (; 0 ;) (param $x i32) (param $y i32) (result i32) (i32.add (local.get $x) (local.get $y) diff --git a/test/i64-setTempRet0.fromasm b/test/i64-setTempRet0.fromasm index fcbff937a..2e6ee16ff 100644 --- a/test/i64-setTempRet0.fromasm +++ b/test/i64-setTempRet0.fromasm @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_none (func (param i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "i64-setTempRet0.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/i64-setTempRet0.fromasm.clamp b/test/i64-setTempRet0.fromasm.clamp index fcbff937a..2e6ee16ff 100644 --- a/test/i64-setTempRet0.fromasm.clamp +++ b/test/i64-setTempRet0.fromasm.clamp @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_none (func (param i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "i64-setTempRet0.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/i64-setTempRet0.fromasm.clamp.no-opts b/test/i64-setTempRet0.fromasm.clamp.no-opts index d509aacfc..3d2248692 100644 --- a/test/i64-setTempRet0.fromasm.clamp.no-opts +++ b/test/i64-setTempRet0.fromasm.clamp.no-opts @@ -1,8 +1,7 @@ (module - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $legaltype$illegalImportResult (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $i32_=>_none (func (param i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/i64-setTempRet0.fromasm.imprecise b/test/i64-setTempRet0.fromasm.imprecise index 19155019c..39803d613 100644 --- a/test/i64-setTempRet0.fromasm.imprecise +++ b/test/i64-setTempRet0.fromasm.imprecise @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_none (func (param i32))) (import "env" "setTempRet0" (func $setTempRet0 (param i32))) (import "env" "getTempRet0" (func $getTempRet0 (result i32))) (import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32))) diff --git a/test/i64-setTempRet0.fromasm.imprecise.no-opts b/test/i64-setTempRet0.fromasm.imprecise.no-opts index d509aacfc..3d2248692 100644 --- a/test/i64-setTempRet0.fromasm.imprecise.no-opts +++ b/test/i64-setTempRet0.fromasm.imprecise.no-opts @@ -1,8 +1,7 @@ (module - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $legaltype$illegalImportResult (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $i32_=>_none (func (param i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/i64-setTempRet0.fromasm.no-opts b/test/i64-setTempRet0.fromasm.no-opts index d509aacfc..3d2248692 100644 --- a/test/i64-setTempRet0.fromasm.no-opts +++ b/test/i64-setTempRet0.fromasm.no-opts @@ -1,8 +1,7 @@ (module - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $legaltype$illegalImportResult (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $i32_=>_none (func (param i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/importedSignCast.fromasm b/test/importedSignCast.fromasm index 8748842ab..5947d1448 100644 --- a/test/importedSignCast.fromasm +++ b/test/importedSignCast.fromasm @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "importedSignCast.asm.js") (import "env" "table" (table $table 1 1 funcref)) diff --git a/test/importedSignCast.fromasm.clamp b/test/importedSignCast.fromasm.clamp index 8748842ab..5947d1448 100644 --- a/test/importedSignCast.fromasm.clamp +++ b/test/importedSignCast.fromasm.clamp @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "importedSignCast.asm.js") (import "env" "table" (table $table 1 1 funcref)) diff --git a/test/importedSignCast.fromasm.clamp.no-opts b/test/importedSignCast.fromasm.clamp.no-opts index 7f3dfc347..837e4c589 100644 --- a/test/importedSignCast.fromasm.clamp.no-opts +++ b/test/importedSignCast.fromasm.clamp.no-opts @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 1 1 funcref)) (elem (global.get $__table_base) $gm) diff --git a/test/importedSignCast.fromasm.imprecise b/test/importedSignCast.fromasm.imprecise index 63caaf11f..fca640200 100644 --- a/test/importedSignCast.fromasm.imprecise +++ b/test/importedSignCast.fromasm.imprecise @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "table" (table $table 1 1 funcref)) (elem (global.get $__table_base) $gm) (import "env" "__table_base" (global $__table_base i32)) diff --git a/test/importedSignCast.fromasm.imprecise.no-opts b/test/importedSignCast.fromasm.imprecise.no-opts index 7f3dfc347..837e4c589 100644 --- a/test/importedSignCast.fromasm.imprecise.no-opts +++ b/test/importedSignCast.fromasm.imprecise.no-opts @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 1 1 funcref)) (elem (global.get $__table_base) $gm) diff --git a/test/importedSignCast.fromasm.no-opts b/test/importedSignCast.fromasm.no-opts index 7f3dfc347..837e4c589 100644 --- a/test/importedSignCast.fromasm.no-opts +++ b/test/importedSignCast.fromasm.no-opts @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 1 1 funcref)) (elem (global.get $__table_base) $gm) diff --git a/test/kitchen_sink.wast.from-wast b/test/kitchen_sink.wast.from-wast index e06fdef19..534d3982a 100644 --- a/test/kitchen_sink.wast.from-wast +++ b/test/kitchen_sink.wast.from-wast @@ -1,8 +1,8 @@ (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 4096 4096) (data (i32.const 1026) "\14\00") - (func $kitchensink (; 0 ;) (type $0) (result i32) + (func $kitchensink (; 0 ;) (result i32) (block $block0 (result i32) (drop (i32.add diff --git a/test/kitchen_sink.wast.fromBinary b/test/kitchen_sink.wast.fromBinary index a9f82912c..c8b5e6b30 100644 --- a/test/kitchen_sink.wast.fromBinary +++ b/test/kitchen_sink.wast.fromBinary @@ -1,8 +1,8 @@ (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 4096 4096) (data (i32.const 1026) "\14\00") - (func $kitchensink (; 0 ;) (type $0) (result i32) + (func $kitchensink (; 0 ;) (result i32) (drop (i32.add (i32.const 10) diff --git a/test/kitchen_sink.wast.fromBinary.noDebugInfo b/test/kitchen_sink.wast.fromBinary.noDebugInfo index 3e11c5f14..6dd620d2b 100644 --- a/test/kitchen_sink.wast.fromBinary.noDebugInfo +++ b/test/kitchen_sink.wast.fromBinary.noDebugInfo @@ -1,8 +1,8 @@ (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 4096 4096) (data (i32.const 1026) "\14\00") - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (drop (i32.add (i32.const 10) diff --git a/test/lld/duplicate_imports.wat.out b/test/lld/duplicate_imports.wat.out index 323365711..7bd86fd95 100644 --- a/test/lld/duplicate_imports.wat.out +++ b/test/lld/duplicate_imports.wat.out @@ -1,11 +1,12 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func (result i32))) - (type $2 (func)) - (type $FUNCSIG$ij (func (param i64) (result i32))) - (type $FUNCSIG$fifd (func (param i32 f32 f64) (result f32))) - (type $FUNCSIG$fidd (func (param i32 f64 f64) (result f32))) - (type $legaltype$puts2 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_f32_f64_=>_f32 (func (param i32 f32 f64) (result f32))) + (type $i32_f64_f64_=>_f32 (func (param i32 f64 f64) (result f32))) (import "env" "puts" (func $puts1 (param i32) (result i32))) (import "env" "invoke_ffd" (func $invoke_ffd (param i32 f32 f64) (result f32))) (import "env" "invoke_ffd" (func $invoke_ffd2 (param i32 f64 f64) (result f32))) @@ -25,7 +26,7 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $main (; 4 ;) (type $1) (result i32) + (func $main (; 4 ;) (result i32) (drop (call $puts1 (i32.const 568) @@ -33,7 +34,7 @@ ) (i32.const 0) ) - (func $__wasm_call_ctors (; 5 ;) (type $2) + (func $__wasm_call_ctors (; 5 ;) (nop) ) (func $stackSave (; 6 ;) (result i32) diff --git a/test/lld/em_asm.wat.mem.out b/test/lld/em_asm.wat.mem.out index 6b6ad6c95..951755cc6 100644 --- a/test/lld/em_asm.wat.mem.out +++ b/test/lld/em_asm.wat.mem.out @@ -1,9 +1,10 @@ (module - (type $0 (func (param i32 i32 i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "emscripten_asm_const_iii" (func $emscripten_asm_const_iii (param i32 i32 i32) (result i32))) (memory $0 2) (table $0 1 1 funcref) @@ -17,10 +18,10 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors (; 1 ;) (nop) ) - (func $__original_main (; 2 ;) (type $2) (result i32) + (func $__original_main (; 2 ;) (result i32) (local $0 i32) (global.set $global$0 (local.tee $0 @@ -67,7 +68,7 @@ ) (i32.const 0) ) - (func $main (; 3 ;) (type $3) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) (func $stackSave (; 4 ;) (result i32) diff --git a/test/lld/em_asm.wat.out b/test/lld/em_asm.wat.out index c66cdc1cc..5167d837d 100644 --- a/test/lld/em_asm.wat.out +++ b/test/lld/em_asm.wat.out @@ -1,9 +1,10 @@ (module - (type $0 (func (param i32 i32 i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "emscripten_asm_const_iii" (func $emscripten_asm_const_iii (param i32 i32 i32) (result i32))) (memory $0 2) (data (i32.const 568) "{ Module.print(\"Hello world\"); }\00\00{ return $0 + $1; }\00ii\00{ Module.print(\"Got \" + $0); }\00i\00") @@ -18,10 +19,10 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors (; 1 ;) (nop) ) - (func $__original_main (; 2 ;) (type $2) (result i32) + (func $__original_main (; 2 ;) (result i32) (local $0 i32) (global.set $global$0 (local.tee $0 @@ -68,7 +69,7 @@ ) (i32.const 0) ) - (func $main (; 3 ;) (type $3) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) (func $stackSave (; 4 ;) (result i32) diff --git a/test/lld/em_asm_O0.wat.out b/test/lld/em_asm_O0.wat.out index 692b3fe6e..0a6cc1c4c 100644 --- a/test/lld/em_asm_O0.wat.out +++ b/test/lld/em_asm_O0.wat.out @@ -1,12 +1,10 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func (param i32 i32 i32) (result i32))) - (type $2 (func (param i32 i32) (result i32))) - (type $3 (func (result i32))) - (type $4 (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "emscripten_asm_const_i" (func $emscripten_asm_const_i (param i32) (result i32))) (import "env" "emscripten_asm_const_iii" (func $emscripten_asm_const_iii (param i32 i32 i32) (result i32))) (import "env" "emscripten_asm_const_ii" (func $emscripten_asm_const_ii (param i32 i32) (result i32))) @@ -25,7 +23,7 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $main (; 3 ;) (type $3) (result i32) + (func $main (; 3 ;) (result i32) (local $t1 i32) (local $t2 i32) (drop @@ -51,7 +49,7 @@ ) (i32.const 0) ) - (func $__wasm_call_ctors (; 4 ;) (type $4) + (func $__wasm_call_ctors (; 4 ;) (nop) ) (func $stackSave (; 5 ;) (result i32) diff --git a/test/lld/em_asm_main_thread.wat.out b/test/lld/em_asm_main_thread.wat.out index 2020b172e..b5d351caf 100644 --- a/test/lld/em_asm_main_thread.wat.out +++ b/test/lld/em_asm_main_thread.wat.out @@ -1,12 +1,12 @@ (module - (type $0 (func (param i32 i32 i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32 i32))) - (type $4 (func (param i32 i32))) - (type $5 (func (param i32) (result i32))) - (type $6 (func (param i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "emscripten_asm_const_sync_on_main_thread_iii" (func $emscripten_asm_const_sync_on_main_thread_iii (param i32 i32 i32) (result i32))) (memory $0 2) (data (i32.const 568) "{ Module.print(\"Hello world\"); }\00{ return $0 + $1; }\00{ Module.print(\"Got \" + $0); }\00") @@ -23,10 +23,10 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors (; 1 ;) (nop) ) - (func $__original_main (; 2 ;) (type $2) (result i32) + (func $__original_main (; 2 ;) (result i32) (local $0 i32) (local $1 i32) (global.set $global$0 @@ -104,10 +104,10 @@ ) (i32.const 0) ) - (func $__em_asm_sig_builder::inner<>\20const\20__em_asm_sig_builder::__em_asm_sig<>\28\29 (; 3 ;) (type $2) (result i32) + (func $__em_asm_sig_builder::inner<>\20const\20__em_asm_sig_builder::__em_asm_sig<>\28\29 (; 3 ;) (result i32) (i32.const 0) ) - (func $__em_asm_sig_builder::inner<int\2c\20int>\20const\20__em_asm_sig_builder::__em_asm_sig<int\2c\20int>\28int\2c\20int\29 (; 4 ;) (type $3) (param $0 i32) (param $1 i32) (param $2 i32) + (func $__em_asm_sig_builder::inner<int\2c\20int>\20const\20__em_asm_sig_builder::__em_asm_sig<int\2c\20int>\28int\2c\20int\29 (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (global.set $global$0 (local.tee $3 @@ -152,7 +152,7 @@ ) ) ) - (func $__em_asm_sig_builder::inner<int>\20const\20__em_asm_sig_builder::__em_asm_sig<int>\28int\29 (; 5 ;) (type $4) (param $0 i32) (param $1 i32) + (func $__em_asm_sig_builder::inner<int>\20const\20__em_asm_sig_builder::__em_asm_sig<int>\28int\29 (; 5 ;) (param $0 i32) (param $1 i32) (local $2 i32) (global.set $global$0 (local.tee $2 @@ -188,10 +188,10 @@ ) ) ) - (func $__em_asm_sig_builder::sig_char\28int\29 (; 6 ;) (type $5) (param $0 i32) (result i32) + (func $__em_asm_sig_builder::sig_char\28int\29 (; 6 ;) (param $0 i32) (result i32) (i32.const 105) ) - (func $main (; 7 ;) (type $6) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) (func $stackSave (; 8 ;) (result i32) diff --git a/test/lld/em_asm_shared.wat.out b/test/lld/em_asm_shared.wat.out index f3b676f24..c31d75e8c 100644 --- a/test/lld/em_asm_shared.wat.out +++ b/test/lld/em_asm_shared.wat.out @@ -1,11 +1,9 @@ (module - (type $0 (func (param i32 i32 i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$3) "{ Module.print(\"Hello world\"); }\00\00{ return $0 + $1; }\00ii\00{ Module.print(\"Got \" + $0); }\00i\00") (import "env" "table" (table $0 0 funcref)) @@ -29,13 +27,13 @@ (export "_ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJiEEE6bufferE" (global $global$2)) (export "main" (func $main)) (export "__post_instantiate" (func $__post_instantiate)) - (func $__wasm_call_ctors (; 6 ;) (type $1) + (func $__wasm_call_ctors (; 6 ;) (call $__wasm_apply_relocs) ) - (func $__wasm_apply_relocs (; 7 ;) (type $1) + (func $__wasm_apply_relocs (; 7 ;) (nop) ) - (func $__original_main (; 8 ;) (type $2) (result i32) + (func $__original_main (; 8 ;) (result i32) (local $0 i32) (local $1 i32) (call $stackRestore @@ -94,7 +92,7 @@ ) (i32.const 0) ) - (func $main (; 9 ;) (type $3) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) (func $__post_instantiate (; 10 ;) diff --git a/test/lld/em_asm_table.wat.out b/test/lld/em_asm_table.wat.out index 48d02d208..3d71b49af 100644 --- a/test/lld/em_asm_table.wat.out +++ b/test/lld/em_asm_table.wat.out @@ -1,8 +1,11 @@ (module - (type $0 (func (param i32 i32))) - (type $1 (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $0 8192)) (import "env" "emscripten_log" (func $fimport$0 (param i32 i32))) (import "env" "emscripten_asm_const_iii" (func $emscripten_asm_const_iii (param i32 i32 i32) (result i32))) @@ -46,14 +49,14 @@ ) ) (func $dynCall_vii (; 6 ;) (param $fptr i32) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vii) + (call_indirect (type $i32_i32_=>_none) (local.get $0) (local.get $1) (local.get $fptr) ) ) (func $dynCall_iiii (; 7 ;) (param $fptr i32) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (local.get $1) (local.get $2) diff --git a/test/lld/em_js_O0.wat.out b/test/lld/em_js_O0.wat.out index 6e141975d..bfca21703 100644 --- a/test/lld/em_js_O0.wat.out +++ b/test/lld/em_js_O0.wat.out @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$i (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $0 256 256)) (data (i32.const 1024) "(void)<::>{ out(\"no args works\"); }\00(void)<::>{ out(\"no args returning int\"); return 12; }\00(void)<::>{ out(\"no args returning double\"); return 12.25; }\00(int x)<::>{ out(\" takes ints: \" + x);}\00(double d)<::>{ out(\" takes doubles: \" + d);}\00(char* str)<::>{ out(\" takes strings: \" + UTF8ToString(str)); return 7.75; }\00(int x, int y)<::>{ out(\" takes multiple ints: \" + x + \", \" + y); return 6; }\00(int x, const char* str, double d)<::>{ out(\" mixed arg types: \" + x + \", \" + UTF8ToString(str) + \", \" + d); return 8.125; }\00(int unused)<::>{ out(\" ignores unused args\"); return 5.5; }\00(int x, int y)<::>{ out(\" skips unused args: \" + y); return 6; }\00(double x, double y, double z)<::>{ out(\" \" + x + \" + \" + z); return x + z; }\00(void)<::>{ out(\" can use <::> separator in user code\"); return 15; }\00(void)<::>{ var x, y; x = {}; y = 3; x[y] = [1, 2, 3]; out(\" can have commas in user code: \" + x[y]); return x[y][1]; }\00(void)<::>{ var jsString = \'\e3\81\93\e3\82\93\e3\81\ab\e3\81\a1\e3\81\af\'; var lengthBytes = lengthBytesUTF8(jsString); var stringOnWasmHeap = _malloc(lengthBytes); stringToUTF8(jsString, stringOnWasmHeap, lengthBytes+1); return stringOnWasmHeap; }\00(void)<::>{ var jsString = \'hello from js\'; var lengthBytes = jsString.length+1; var stringOnWasmHeap = _malloc(lengthBytes); stringToUTF8(jsString, stringOnWasmHeap, lengthBytes+1); return stringOnWasmHeap; }\00BEGIN\n\00 noarg_int returned: %d\n\00 noarg_double returned: %f\n\00 stringarg returned: %f\n\00string arg\00 multi_intarg returned: %d\n\00 multi_mixedarg returned: %f\n\00hello\00 unused_args returned: %d\n\00 skip_args returned: %f\n\00 add_outer returned: %f\n\00 user_separator returned: %d\n\00 user_comma returned: %d\n\00 return_str returned: %s\n\00 return_utf8_str returned: %s\n\00END\n\00\00\cc\1a\00\00\00\00\00\00\00\00\00\00\00\00\00\00T!\"\19\0d\01\02\03\11K\1c\0c\10\04\0b\1d\12\1e\'hnopqb \05\06\0f\13\14\15\1a\08\16\07($\17\18\t\n\0e\1b\1f%#\83\82}&*+<=>?CGJMXYZ[\\]^_`acdefgijklrstyz{|\00\00\00\00\00\00\00\00\00Illegal byte sequence\00Domain error\00Result not representable\00Not a tty\00Permission denied\00Operation not permitted\00No such file or directory\00No such process\00File exists\00Value too large for data type\00No space left on device\00Out of memory\00Resource busy\00Interrupted system call\00Resource temporarily unavailable\00Invalid seek\00Cross-device link\00Read-only file system\00Directory not empty\00Connection reset by peer\00Operation timed out\00Connection refused\00Host is down\00Host is unreachable\00Address in use\00Broken pipe\00I/O error\00No such device or address\00Block device required\00No such device\00Not a directory\00Is a directory\00Text file busy\00Exec format error\00Invalid argument\00Argument list too long\00Symbolic link loop\00Filename too long\00Too many open files in system\00No file descriptors available\00Bad file descriptor\00No child process\00Bad address\00File too large\00Too many links\00No locks available\00Resource deadlock would occur\00State not recoverable\00Previous owner died\00Operation canceled\00Function not implemented\00No message of desired type\00Identifier removed\00Device not a stream\00No data available\00Device timeout\00Out of streams resources\00Link has been severed\00Protocol error\00Bad message\00File descriptor in bad state\00Not a socket\00Destination address required\00Message too large\00Protocol wrong type for socket\00Protocol not available\00Protocol not supported\00Socket type not supported\00Not supported\00Protocol family not supported\00Address family not supported by protocol\00Address not available\00Network is down\00Network unreachable\00Connection reset by network\00Connection aborted\00No buffer space available\00Socket is connected\00Socket not connected\00Cannot send after socket shutdown\00Operation already in progress\00Operation in progress\00Stale file handle\00Remote I/O error\00Quota exceeded\00No medium found\00Wrong medium type\00No error information\00\00-+ 0X0x\00(null)\00\00\00\00\11\00\n\00\11\11\11\00\00\00\00\05\00\00\00\00\00\00\t\00\00\00\00\0b\00\00\00\00\00\00\00\00\11\00\0f\n\11\11\11\03\n\07\00\01\13\t\0b\0b\00\00\t\06\0b\00\00\0b\00\06\11\00\00\00\11\11\11\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\00\00\00\00\00\11\00\n\n\11\11\11\00\n\00\00\02\00\t\0b\00\00\00\t\00\0b\00\00\0b\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\0c\00\00\00\00\t\0c\00\00\00\00\00\0c\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\04\0d\00\00\00\00\t\0e\00\00\00\00\00\0e\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\00\0f\00\00\00\00\t\10\00\00\00\00\00\10\00\00\10\00\00\12\00\00\00\12\12\12\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\12\12\12\00\00\00\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\00\n\00\00\00\00\t\0b\00\00\00\00\00\0b\00\00\0b\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\0c\00\00\00\00\t\0c\00\00\00\00\00\0c\00\00\0c\00\000123456789ABCDEF-0X+0X 0X-0x+0x 0x\00inf\00INF\00nan\00NAN\00.\00") (data (i32.const 5232) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") diff --git a/test/lld/hello_world.passive.wat.out b/test/lld/hello_world.passive.wat.out index 6c9fd4ef7..e811b43e0 100644 --- a/test/lld/hello_world.passive.wat.out +++ b/test/lld/hello_world.passive.wat.out @@ -1,8 +1,9 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "puts" (func $puts (param i32) (result i32))) (memory $0 2) (data passive "Hello, world\00") @@ -19,17 +20,17 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors (; 1 ;) (call $__wasm_init_memory) ) - (func $__wasm_init_memory (; 2 ;) (type $1) + (func $__wasm_init_memory (; 2 ;) (memory.init 0 (i32.const 568) (i32.const 0) (i32.const 14) ) ) - (func $__original_main (; 3 ;) (type $2) (result i32) + (func $__original_main (; 3 ;) (result i32) (drop (call $puts (i32.const 568) @@ -37,7 +38,7 @@ ) (i32.const 0) ) - (func $main (; 4 ;) (type $3) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) (func $stackSave (; 5 ;) (result i32) diff --git a/test/lld/hello_world.wat.mem.out b/test/lld/hello_world.wat.mem.out index b81b73a1b..54951e8aa 100644 --- a/test/lld/hello_world.wat.mem.out +++ b/test/lld/hello_world.wat.mem.out @@ -1,8 +1,9 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "puts" (func $puts (param i32) (result i32))) (memory $0 2) (table $0 1 1 funcref) @@ -16,10 +17,10 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors (; 1 ;) (nop) ) - (func $__original_main (; 2 ;) (type $2) (result i32) + (func $__original_main (; 2 ;) (result i32) (drop (call $puts (i32.const 568) @@ -27,7 +28,7 @@ ) (i32.const 0) ) - (func $main (; 3 ;) (type $3) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) (func $stackSave (; 4 ;) (result i32) diff --git a/test/lld/hello_world.wat.out b/test/lld/hello_world.wat.out index 55bc3a89a..1ce91bcb3 100644 --- a/test/lld/hello_world.wat.out +++ b/test/lld/hello_world.wat.out @@ -1,8 +1,9 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "puts" (func $puts (param i32) (result i32))) (memory $0 2) (data (i32.const 568) "Hello, world\00") @@ -17,10 +18,10 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors (; 1 ;) (nop) ) - (func $__original_main (; 2 ;) (type $2) (result i32) + (func $__original_main (; 2 ;) (result i32) (drop (call $puts (i32.const 568) @@ -28,7 +29,7 @@ ) (i32.const 0) ) - (func $main (; 3 ;) (type $3) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) (func $stackSave (; 4 ;) (result i32) diff --git a/test/lld/init.wat.out b/test/lld/init.wat.out index 52eb0dd51..1ff306e3a 100644 --- a/test/lld/init.wat.out +++ b/test/lld/init.wat.out @@ -1,7 +1,9 @@ (module - (type $0 (func)) - (type $1 (func (result i32))) - (type $2 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 2) (table $0 1 1 funcref) (global $global$0 (mut i32) (i32.const 66112)) @@ -14,23 +16,23 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $__wasm_call_ctors (; 0 ;) (type $0) + (func $__wasm_call_ctors (; 0 ;) (call $init_x) (call $init_y) ) - (func $init_x (; 1 ;) (type $0) + (func $init_x (; 1 ;) (i32.store offset=568 (i32.const 0) (i32.const 14) ) ) - (func $init_y (; 2 ;) (type $0) + (func $init_y (; 2 ;) (i32.store offset=572 (i32.const 0) (i32.const 144) ) ) - (func $__original_main (; 3 ;) (type $1) (result i32) + (func $__original_main (; 3 ;) (result i32) (i32.add (i32.load offset=568 (i32.const 0) @@ -40,7 +42,7 @@ ) ) ) - (func $main (; 4 ;) (type $2) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) (func $stackSave (; 5 ;) (result i32) diff --git a/test/lld/recursive.wat.out b/test/lld/recursive.wat.out index af4caef45..22d4ba729 100644 --- a/test/lld/recursive.wat.out +++ b/test/lld/recursive.wat.out @@ -1,7 +1,9 @@ (module - (type $0 (func (param i32 i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (import "env" "iprintf" (func $iprintf (param i32 i32) (result i32))) (memory $0 2) (data (i32.const 568) "%d:%d\n\00Result: %d\n\00") @@ -16,10 +18,10 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $__wasm_call_ctors (; 1 ;) (type $1) + (func $__wasm_call_ctors (; 1 ;) (nop) ) - (func $foo (; 2 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $foo (; 2 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (global.set $global$0 (local.tee $2 @@ -54,7 +56,7 @@ (local.get $0) ) ) - (func $__original_main (; 3 ;) (type $2) (result i32) + (func $__original_main (; 3 ;) (result i32) (local $0 i32) (global.set $global$0 (local.tee $0 @@ -85,7 +87,7 @@ ) (i32.const 0) ) - (func $main (; 4 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) (func $stackSave (; 5 ;) (result i32) diff --git a/test/lld/recursive_safe_stack.wat.out b/test/lld/recursive_safe_stack.wat.out index 7253a28fb..a9248782c 100644 --- a/test/lld/recursive_safe_stack.wat.out +++ b/test/lld/recursive_safe_stack.wat.out @@ -1,8 +1,9 @@ (module - (type $0 (func (param i32 i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $FUNCSIG$v (func)) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "printf" (func $printf (param i32 i32) (result i32))) (import "env" "__handle_stack_overflow" (func $__handle_stack_overflow)) (memory $0 2) @@ -22,10 +23,10 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $__wasm_call_ctors (; 2 ;) (type $1) + (func $__wasm_call_ctors (; 2 ;) (nop) ) - (func $foo (; 3 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $foo (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -84,7 +85,7 @@ (local.get $0) ) ) - (func $__original_main (; 4 ;) (type $2) (result i32) + (func $__original_main (; 4 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -139,7 +140,7 @@ ) (i32.const 0) ) - (func $main (; 5 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) (func $__set_stack_limit (; 6 ;) (param $0 i32) diff --git a/test/lld/reserved_func_ptr.wat.out b/test/lld/reserved_func_ptr.wat.out index fd0d1f4af..a7d39b4b3 100644 --- a/test/lld/reserved_func_ptr.wat.out +++ b/test/lld/reserved_func_ptr.wat.out @@ -1,12 +1,13 @@ (module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (param i32 i32) (result i32))) - (type $3 (func (param f32 f32 i32) (result f32))) - (type $4 (func (param f64 i32) (result f64))) - (type $5 (func (param i32 i32 i32))) - (type $6 (func (param i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) + (type $f32_f32_i32_=>_f32 (func (param f32 f32 i32) (result f32))) + (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (import "env" "_Z4atoiPKc" (func $atoi\28char\20const*\29 (param i32) (result i32))) (memory $0 2) (table $0 3 3 funcref) @@ -22,16 +23,16 @@ (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) (export "dynCall_viii" (func $dynCall_viii)) - (func $__wasm_call_ctors (; 1 ;) (type $0) + (func $__wasm_call_ctors (; 1 ;) (nop) ) - (func $address_taken_func\28int\2c\20int\2c\20int\29 (; 2 ;) (type $5) (param $0 i32) (param $1 i32) (param $2 i32) + (func $address_taken_func\28int\2c\20int\2c\20int\29 (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (nop) ) - (func $address_taken_func2\28int\2c\20int\2c\20int\29 (; 3 ;) (type $5) (param $0 i32) (param $1 i32) (param $2 i32) + (func $address_taken_func2\28int\2c\20int\2c\20int\29 (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (nop) ) - (func $main (; 4 ;) (type $2) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -71,22 +72,22 @@ ) ) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (local.get $2) ) - (call_indirect (type $1) + (call_indirect (type $i32_=>_none) (i32.const 3) (local.get $3) ) (drop - (call_indirect (type $2) + (call_indirect (type $i32_i32_=>_i32) (i32.const 4) (i32.const 5) (local.get $4) ) ) (drop - (call_indirect (type $3) + (call_indirect (type $f32_f32_i32_=>_f32) (f32.const 3.0999999046325684) (f32.const 4.199999809265137) (i32.const 5) @@ -94,13 +95,13 @@ ) ) (drop - (call_indirect (type $4) + (call_indirect (type $f64_i32_=>_f64) (f64.const 4.2) (i32.const 5) (local.get $1) ) ) - (call_indirect (type $5) + (call_indirect (type $i32_i32_i32_=>_none) (i32.const 1) (i32.const 2) (i32.const 3) @@ -144,7 +145,7 @@ ) ) (func $dynCall_viii (; 9 ;) (param $fptr i32) (param $0 i32) (param $1 i32) (param $2 i32) - (call_indirect (type $FUNCSIG$viii) + (call_indirect (type $i32_i32_i32_=>_none) (local.get $0) (local.get $1) (local.get $2) diff --git a/test/lld/shared.wat.out b/test/lld/shared.wat.out index d27672f3a..5cc1cf88f 100644 --- a/test/lld/shared.wat.out +++ b/test/lld/shared.wat.out @@ -1,8 +1,7 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$2) "Hello, world\00\00\00\00\00\00\00\00\00\00\00\00") (import "env" "table" (table $0 0 funcref)) @@ -21,10 +20,10 @@ (export "ptr_puts" (global $global$0)) (export "ptr_local_func" (global $global$1)) (export "__post_instantiate" (func $__post_instantiate)) - (func $__wasm_call_ctors (; 4 ;) (type $1) + (func $__wasm_call_ctors (; 4 ;) (call $__wasm_apply_relocs) ) - (func $__wasm_apply_relocs (; 5 ;) (type $1) + (func $__wasm_apply_relocs (; 5 ;) (i32.store (i32.add (global.get $gimport$2) @@ -40,7 +39,7 @@ (global.get $gimport$7) ) ) - (func $print_message\28\29 (; 6 ;) (type $2) (result i32) + (func $print_message\28\29 (; 6 ;) (result i32) (drop (call $puts (i32.add diff --git a/test/lld/shared_longjmp.wat.out b/test/lld/shared_longjmp.wat.out index c6bdf1c17..083fcb3cc 100644 --- a/test/lld/shared_longjmp.wat.out +++ b/test/lld/shared_longjmp.wat.out @@ -1,14 +1,12 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func (param i32 i32 i32 i32) (result i32))) - (type $2 (func (result i32))) - (type $3 (func (param i32 i32))) - (type $4 (func (param i32 i32 i32))) - (type $5 (func (param i32 i32 i32) (result i32))) - (type $6 (func (param i32))) - (type $7 (func)) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$2) "\00\00\00\00\00\00\00\00") (import "env" "table" (table $0 0 funcref)) @@ -35,13 +33,13 @@ (export "__threwValue" (global $global$1)) (export "dynCall_vii" (func $dynCall_vii)) (export "__post_instantiate" (func $__post_instantiate)) - (func $__wasm_call_ctors (; 11 ;) (type $7) + (func $__wasm_call_ctors (; 11 ;) (call $__wasm_apply_relocs) ) - (func $__wasm_apply_relocs (; 12 ;) (type $7) + (func $__wasm_apply_relocs (; 12 ;) (nop) ) - (func $_start (; 13 ;) (type $7) + (func $_start (; 13 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -145,7 +143,7 @@ (unreachable) ) (func $dynCall_vii (; 14 ;) (param $fptr i32) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vii) + (call_indirect (type $i32_i32_=>_none) (local.get $0) (local.get $1) (local.get $fptr) diff --git a/test/lld/standalone-wasm-with-start.wat.out b/test/lld/standalone-wasm-with-start.wat.out index 424d2f85e..1ac0d3d9c 100644 --- a/test/lld/standalone-wasm-with-start.wat.out +++ b/test/lld/standalone-wasm-with-start.wat.out @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) (memory $0 2) (table $0 1 1 funcref) (elem (i32.const 0) $foo) @@ -14,10 +16,10 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $_start (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $_start (; 0 ;) (result i32) (nop) ) - (func $foo (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $foo (; 1 ;) (result i32) (nop) ) (func $stackSave (; 2 ;) (result i32) diff --git a/test/lld/standalone-wasm.wat.out b/test/lld/standalone-wasm.wat.out index 5e9fa4c91..64dbfaf0a 100644 --- a/test/lld/standalone-wasm.wat.out +++ b/test/lld/standalone-wasm.wat.out @@ -1,6 +1,9 @@ (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 2) (table $0 1 1 funcref) (elem (i32.const 0) $foo) @@ -16,13 +19,13 @@ (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) (export "_start" (func $_start)) - (func $__original_main (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $__original_main (; 0 ;) (result i32) (nop) ) - (func $main (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 1 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) - (func $foo (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $foo (; 2 ;) (result i32) (nop) ) (func $stackSave (; 3 ;) (result i32) diff --git a/test/lld/standalone-wasm2.wat.out b/test/lld/standalone-wasm2.wat.out index fe669b414..def030c64 100644 --- a/test/lld/standalone-wasm2.wat.out +++ b/test/lld/standalone-wasm2.wat.out @@ -1,5 +1,9 @@ (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 2) (global $global$0 (mut i32) (i32.const 66112)) (global $global$1 i32 (i32.const 66112)) @@ -13,10 +17,10 @@ (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) (export "_start" (func $_start)) - (func $__original_main (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $__original_main (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (nop) ) - (func $main (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 1 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main (local.get $0) (local.get $1) diff --git a/test/lld/standalone-wasm3.wat.out b/test/lld/standalone-wasm3.wat.out index a334d96e4..639b18988 100644 --- a/test/lld/standalone-wasm3.wat.out +++ b/test/lld/standalone-wasm3.wat.out @@ -1,5 +1,8 @@ (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 2) (global $global$0 (mut i32) (i32.const 66112)) (global $global$1 i32 (i32.const 66112)) @@ -11,7 +14,7 @@ (export "stackAlloc" (func $stackAlloc)) (export "stackRestore" (func $stackRestore)) (export "__growWasmMemory" (func $__growWasmMemory)) - (func $__original_main (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $__original_main (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (nop) ) (func $stackSave (; 1 ;) (result i32) diff --git a/test/memory-import.wast.from-wast b/test/memory-import.wast.from-wast index 6532a1018..38d6f0931 100644 --- a/test/memory-import.wast.from-wast +++ b/test/memory-import.wast.from-wast @@ -1,7 +1,7 @@ (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $0 1 1)) - (func $foo (; 0 ;) (type $0) (result i32) + (func $foo (; 0 ;) (result i32) (i32.load offset=13 (i32.const 37) ) diff --git a/test/memory-import.wast.fromBinary b/test/memory-import.wast.fromBinary index 427dbb782..d073a469a 100644 --- a/test/memory-import.wast.fromBinary +++ b/test/memory-import.wast.fromBinary @@ -1,7 +1,7 @@ (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $0 1 1)) - (func $foo (; 0 ;) (type $0) (result i32) + (func $foo (; 0 ;) (result i32) (i32.load offset=13 (i32.const 37) ) diff --git a/test/memory-import.wast.fromBinary.noDebugInfo b/test/memory-import.wast.fromBinary.noDebugInfo index a7cf4ced4..9709e1003 100644 --- a/test/memory-import.wast.fromBinary.noDebugInfo +++ b/test/memory-import.wast.fromBinary.noDebugInfo @@ -1,7 +1,7 @@ (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $0 1 1)) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (i32.load offset=13 (i32.const 37) ) diff --git a/test/memorygrowth-minimal.fromasm b/test/memorygrowth-minimal.fromasm index fdc4bf41d..58c4136cf 100644 --- a/test/memorygrowth-minimal.fromasm +++ b/test/memorygrowth-minimal.fromasm @@ -1,4 +1,5 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256)) (data (global.get $__memory_base) "memorygrowth-minimal.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/memorygrowth-minimal.fromasm.clamp b/test/memorygrowth-minimal.fromasm.clamp index fdc4bf41d..58c4136cf 100644 --- a/test/memorygrowth-minimal.fromasm.clamp +++ b/test/memorygrowth-minimal.fromasm.clamp @@ -1,4 +1,5 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256)) (data (global.get $__memory_base) "memorygrowth-minimal.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/memorygrowth-minimal.fromasm.clamp.no-opts b/test/memorygrowth-minimal.fromasm.clamp.no-opts index 70f1600f3..fec0a5227 100644 --- a/test/memorygrowth-minimal.fromasm.clamp.no-opts +++ b/test/memorygrowth-minimal.fromasm.clamp.no-opts @@ -1,4 +1,5 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/memorygrowth-minimal.fromasm.imprecise b/test/memorygrowth-minimal.fromasm.imprecise index 1c70223ec..2e984c7ad 100644 --- a/test/memorygrowth-minimal.fromasm.imprecise +++ b/test/memorygrowth-minimal.fromasm.imprecise @@ -1,4 +1,5 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256)) (export "__growWasmMemory" (func $__growWasmMemory)) (func $__growWasmMemory (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32) diff --git a/test/memorygrowth-minimal.fromasm.imprecise.no-opts b/test/memorygrowth-minimal.fromasm.imprecise.no-opts index 70f1600f3..fec0a5227 100644 --- a/test/memorygrowth-minimal.fromasm.imprecise.no-opts +++ b/test/memorygrowth-minimal.fromasm.imprecise.no-opts @@ -1,4 +1,5 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/memorygrowth-minimal.fromasm.no-opts b/test/memorygrowth-minimal.fromasm.no-opts index 70f1600f3..fec0a5227 100644 --- a/test/memorygrowth-minimal.fromasm.no-opts +++ b/test/memorygrowth-minimal.fromasm.no-opts @@ -1,4 +1,5 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index f1858e724..14ff6a9e0 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -1,10 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256)) (data (global.get $__memory_base) "memorygrowth.asm.js") (import "env" "table" (table $table 8 8 funcref)) @@ -7772,7 +7774,7 @@ ) (block (local.set $2 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 1144) (local.get $0) @@ -7838,7 +7840,7 @@ ) (br_if $label$break$a (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 1144) (local.get $2) @@ -8170,7 +8172,7 @@ (local.set $2 (if (result i32) (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (local.get $4) (i32.const 1) @@ -8213,7 +8215,7 @@ ) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -8264,7 +8266,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.sub (local.get $1) @@ -8964,7 +8966,7 @@ ) ) (func $lb (; 32 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (local.get $2) (local.get $3) @@ -9021,7 +9023,7 @@ ) ) (func $kb (; 36 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $1) (i32.and (local.get $0) @@ -9037,7 +9039,7 @@ ) ) (func $mb (; 38 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $1) (i32.add (i32.and diff --git a/test/memorygrowth.fromasm.clamp b/test/memorygrowth.fromasm.clamp index f1858e724..14ff6a9e0 100644 --- a/test/memorygrowth.fromasm.clamp +++ b/test/memorygrowth.fromasm.clamp @@ -1,10 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256)) (data (global.get $__memory_base) "memorygrowth.asm.js") (import "env" "table" (table $table 8 8 funcref)) @@ -7772,7 +7774,7 @@ ) (block (local.set $2 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 1144) (local.get $0) @@ -7838,7 +7840,7 @@ ) (br_if $label$break$a (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 1144) (local.get $2) @@ -8170,7 +8172,7 @@ (local.set $2 (if (result i32) (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (local.get $4) (i32.const 1) @@ -8213,7 +8215,7 @@ ) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -8264,7 +8266,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.sub (local.get $1) @@ -8964,7 +8966,7 @@ ) ) (func $lb (; 32 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (local.get $2) (local.get $3) @@ -9021,7 +9023,7 @@ ) ) (func $kb (; 36 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $1) (i32.and (local.get $0) @@ -9037,7 +9039,7 @@ ) ) (func $mb (; 38 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $1) (i32.add (i32.and diff --git a/test/memorygrowth.fromasm.clamp.no-opts b/test/memorygrowth.fromasm.clamp.no-opts index f18677923..d33cf0535 100644 --- a/test/memorygrowth.fromasm.clamp.no-opts +++ b/test/memorygrowth.fromasm.clamp.no-opts @@ -1,10 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256)) (import "env" "table" (table $table 8 8 funcref)) (elem (global.get $__table_base) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) @@ -9844,7 +9846,7 @@ ) (block (local.set $h - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $c) (local.get $a) (local.get $b) @@ -9933,7 +9935,7 @@ ) (if (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $c) (local.get $a) (local.get $q) @@ -10557,7 +10559,7 @@ ) (if (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a) (local.get $d) (i32.const 1) @@ -10626,7 +10628,7 @@ ) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a) (i32.const 0) (i32.const 0) @@ -10696,7 +10698,7 @@ (local.get $h) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a) (i32.sub (local.get $f) @@ -11819,7 +11821,7 @@ ) (func $lb (; 35 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32) (return - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $b) (local.get $c) (local.get $d) @@ -11897,7 +11899,7 @@ ) (func $kb (; 40 ;) (param $a i32) (param $b i32) (result i32) (return - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $b) (i32.add (i32.and @@ -11926,7 +11928,7 @@ (return) ) (func $mb (; 42 ;) (param $a i32) (param $b i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $b) (i32.add (i32.and diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index 61c455725..0e91ad865 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -1,10 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256)) (import "env" "table" (table $table 8 8 funcref)) (elem (global.get $__table_base) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) @@ -7766,7 +7768,7 @@ ) (block (local.set $2 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 1144) (local.get $0) @@ -7832,7 +7834,7 @@ ) (br_if $label$break$a (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 1144) (local.get $2) @@ -8159,7 +8161,7 @@ (local.set $2 (if (result i32) (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (local.get $4) (i32.const 1) @@ -8202,7 +8204,7 @@ ) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -8253,7 +8255,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.sub (local.get $1) @@ -8938,7 +8940,7 @@ ) ) (func $lb (; 31 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (local.get $2) (local.get $3) @@ -8995,7 +8997,7 @@ ) ) (func $kb (; 35 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $1) (i32.and (local.get $0) @@ -9007,7 +9009,7 @@ (nop) ) (func $mb (; 37 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $1) (i32.add (i32.and diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index ef39f5e2e..eff0292e1 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -1,10 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256)) (import "env" "table" (table $table 8 8 funcref)) (elem (global.get $__table_base) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) @@ -9844,7 +9846,7 @@ ) (block (local.set $h - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $c) (local.get $a) (local.get $b) @@ -9933,7 +9935,7 @@ ) (if (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $c) (local.get $a) (local.get $q) @@ -10557,7 +10559,7 @@ ) (if (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a) (local.get $d) (i32.const 1) @@ -10626,7 +10628,7 @@ ) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a) (i32.const 0) (i32.const 0) @@ -10696,7 +10698,7 @@ (local.get $h) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a) (i32.sub (local.get $f) @@ -11807,7 +11809,7 @@ ) (func $lb (; 34 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32) (return - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $b) (local.get $c) (local.get $d) @@ -11885,7 +11887,7 @@ ) (func $kb (; 39 ;) (param $a i32) (param $b i32) (result i32) (return - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $b) (i32.add (i32.and @@ -11914,7 +11916,7 @@ (return) ) (func $mb (; 41 ;) (param $a i32) (param $b i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $b) (i32.add (i32.and diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index f18677923..d33cf0535 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -1,10 +1,12 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256)) (import "env" "table" (table $table 8 8 funcref)) (elem (global.get $__table_base) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) @@ -9844,7 +9846,7 @@ ) (block (local.set $h - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $c) (local.get $a) (local.get $b) @@ -9933,7 +9935,7 @@ ) (if (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $c) (local.get $a) (local.get $q) @@ -10557,7 +10559,7 @@ ) (if (i32.eq - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a) (local.get $d) (i32.const 1) @@ -10626,7 +10628,7 @@ ) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a) (i32.const 0) (i32.const 0) @@ -10696,7 +10698,7 @@ (local.get $h) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a) (i32.sub (local.get $f) @@ -11819,7 +11821,7 @@ ) (func $lb (; 35 ;) (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result i32) (return - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $b) (local.get $c) (local.get $d) @@ -11897,7 +11899,7 @@ ) (func $kb (; 40 ;) (param $a i32) (param $b i32) (result i32) (return - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $b) (i32.add (i32.and @@ -11926,7 +11928,7 @@ (return) ) (func $mb (; 42 ;) (param $a i32) (param $b i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $b) (i32.add (i32.and diff --git a/test/metadatas.wasm.fromBinary b/test/metadatas.wasm.fromBinary index 2e6531678..213539086 100644 --- a/test/metadatas.wasm.fromBinary +++ b/test/metadatas.wasm.fromBinary @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (export "a" (func $0)) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (nop) ) ;; custom section "emscripten_metadata", size 7 diff --git a/test/metadce/corners.wast.dced b/test/metadce/corners.wast.dced index 070f4bd8b..11f37f398 100644 --- a/test/metadce/corners.wast.dced +++ b/test/metadce/corners.wast.dced @@ -1,5 +1,5 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "table" (table $0 10 10 funcref)) (elem (i32.const 0) $imported_table_func) (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32)) @@ -7,7 +7,7 @@ (import "env" "an-imported-table-func" (func $imported_table_func)) (global $STACKTOP (mut i32) (global.get $STACKTOP$asm2wasm$import)) (export "stackAlloc" (func $stackAlloc)) - (func $stackAlloc (; 2 ;) (type $FUNCSIG$v) + (func $stackAlloc (; 2 ;) (drop (global.get $STACKTOP) ) diff --git a/test/metadce/outside.wast.dced b/test/metadce/outside.wast.dced index c1f399ede..3768e02eb 100644 --- a/test/metadce/outside.wast.dced +++ b/test/metadce/outside.wast.dced @@ -1,5 +1,5 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "memory" (memory $0 256 256)) (data (i32.const 1024) "abcd") (data (global.get $from_segment) "abcd") @@ -11,10 +11,10 @@ (global $from_segment (mut i32) (i32.const 0)) (global $from_segment_2 (mut i32) (i32.const 0)) (export "wasm_func" (func $a_wasm_func)) - (func $table_func (; 1 ;) (type $FUNCSIG$v) + (func $table_func (; 1 ;) (nop) ) - (func $a_wasm_func (; 2 ;) (type $FUNCSIG$v) + (func $a_wasm_func (; 2 ;) (call $a_js_func) (drop (global.get $DYNAMICTOP_PTR$asm2wasm$import) diff --git a/test/metadce/rooted-export.wast.dced b/test/metadce/rooted-export.wast.dced index fd4d10226..7be29e0d2 100644 --- a/test/metadce/rooted-export.wast.dced +++ b/test/metadce/rooted-export.wast.dced @@ -1,9 +1,10 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (event $b_wasm_event (attr 0) (param i32)) (export "wasm_func_b" (func $b_wasm_func)) (export "wasm_event_b" (event $b_wasm_event)) - (func $b_wasm_func (; 0 ;) (type $FUNCSIG$v) + (func $b_wasm_func (; 0 ;) (unreachable) ) ) diff --git a/test/metadce/spanning_cycle.wast.dced b/test/metadce/spanning_cycle.wast.dced index 3782d20fd..807f10dd0 100644 --- a/test/metadce/spanning_cycle.wast.dced +++ b/test/metadce/spanning_cycle.wast.dced @@ -1,10 +1,10 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "js_func" (func $a_js_func)) (memory $0 1 1) (data passive "Hello, datacount section!") (export "wasm_func_a" (func $a_wasm_func)) - (func $a_wasm_func (; 1 ;) (type $FUNCSIG$v) + (func $a_wasm_func (; 1 ;) (memory.init 0 (i32.const 0) (i32.const 0) diff --git a/test/metadce/threaded.wast.dced b/test/metadce/threaded.wast.dced index e5a00da35..6513743e7 100644 --- a/test/metadce/threaded.wast.dced +++ b/test/metadce/threaded.wast.dced @@ -1,5 +1,5 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "js_func4" (func $js_func_4)) (import "env" "js_func3" (func $js_func_3)) (import "env" "js_func2" (func $js_func_2)) @@ -7,16 +7,16 @@ (export "wasm_func2" (func $wasm_func_2)) (export "wasm_func3" (func $wasm_func_3)) (export "wasm_func4" (func $wasm_func_4)) - (func $wasm_func_4 (; 3 ;) (type $FUNCSIG$v) + (func $wasm_func_4 (; 3 ;) (nop) ) - (func $wasm_func_3 (; 4 ;) (type $FUNCSIG$v) + (func $wasm_func_3 (; 4 ;) (call $js_func_4) ) - (func $wasm_func_2 (; 5 ;) (type $FUNCSIG$v) + (func $wasm_func_2 (; 5 ;) (call $js_func_3) ) - (func $wasm_func_1 (; 6 ;) (type $FUNCSIG$v) + (func $wasm_func_1 (; 6 ;) (call $js_func_2) ) ) diff --git a/test/metadce/threaded_cycle.wast.dced b/test/metadce/threaded_cycle.wast.dced index 6a4d3450e..6c568a426 100644 --- a/test/metadce/threaded_cycle.wast.dced +++ b/test/metadce/threaded_cycle.wast.dced @@ -1,5 +1,5 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "js_func4" (func $js_func_4)) (import "env" "js_func3" (func $js_func_3)) (import "env" "js_func2" (func $js_func_2)) @@ -8,16 +8,16 @@ (export "wasm_func2" (func $wasm_func_2)) (export "wasm_func3" (func $wasm_func_3)) (export "wasm_func4" (func $wasm_func_4)) - (func $wasm_func_4 (; 4 ;) (type $FUNCSIG$v) + (func $wasm_func_4 (; 4 ;) (call $js_func_1) ) - (func $wasm_func_3 (; 5 ;) (type $FUNCSIG$v) + (func $wasm_func_3 (; 5 ;) (call $js_func_4) ) - (func $wasm_func_2 (; 6 ;) (type $FUNCSIG$v) + (func $wasm_func_2 (; 6 ;) (call $js_func_3) ) - (func $wasm_func_1 (; 7 ;) (type $FUNCSIG$v) + (func $wasm_func_1 (; 7 ;) (call $js_func_2) ) ) diff --git a/test/min.fromasm b/test/min.fromasm index 5a74603e3..32122d4ac 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -1,4 +1,8 @@ (module + (type $none_=>_i32 (func (result i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "min.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/min.fromasm.clamp b/test/min.fromasm.clamp index 5a74603e3..32122d4ac 100644 --- a/test/min.fromasm.clamp +++ b/test/min.fromasm.clamp @@ -1,4 +1,8 @@ (module + (type $none_=>_i32 (func (result i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "min.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/min.fromasm.clamp.no-opts b/test/min.fromasm.clamp.no-opts index ac8e11e87..040bff89a 100644 --- a/test/min.fromasm.clamp.no-opts +++ b/test/min.fromasm.clamp.no-opts @@ -1,4 +1,8 @@ (module + (type $none_=>_i32 (func (result i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/min.fromasm.imprecise b/test/min.fromasm.imprecise index 8bf578712..76046dc59 100644 --- a/test/min.fromasm.imprecise +++ b/test/min.fromasm.imprecise @@ -1,4 +1,8 @@ (module + (type $none_=>_i32 (func (result i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (export "floats" (func $floats)) (export "getTempRet0" (func $ub)) diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index ac8e11e87..040bff89a 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -1,4 +1,8 @@ (module + (type $none_=>_i32 (func (result i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts index ac8e11e87..040bff89a 100644 --- a/test/min.fromasm.no-opts +++ b/test/min.fromasm.no-opts @@ -1,4 +1,8 @@ (module + (type $none_=>_i32 (func (result i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/min.wast.from-wast b/test/min.wast.from-wast index b34ee140b..191b331ad 100644 --- a/test/min.wast.from-wast +++ b/test/min.wast.from-wast @@ -1,18 +1,18 @@ (module - (type $0 (func (param f32) (result f32))) - (type $1 (func (param i32 i32) (result f32))) - (type $2 (func (param i32) (result i32))) - (type $3 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (memory $0 256 256) (export "floats" (func $floats)) - (func $floats (; 0 ;) (type $0) (param $f f32) (result f32) + (func $floats (; 0 ;) (param $f f32) (result f32) (local $t f32) (f32.add (local.get $t) (local.get $f) ) ) - (func $neg (; 1 ;) (type $1) (param $k i32) (param $p i32) (result f32) + (func $neg (; 1 ;) (param $k i32) (param $p i32) (result f32) (local $n f32) (local.tee $n (f32.neg @@ -28,7 +28,7 @@ ) ) ) - (func $littleswitch (; 2 ;) (type $2) (param $x i32) (result i32) + (func $littleswitch (; 2 ;) (param $x i32) (result i32) (block $topmost (result i32) (block $switch-case$2 (block $switch-case$1 @@ -49,7 +49,7 @@ (i32.const 0) ) ) - (func $f1 (; 3 ;) (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) + (func $f1 (; 3 ;) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) (block $topmost (result i32) (local.get $i3) ) diff --git a/test/min.wast.fromBinary b/test/min.wast.fromBinary index 837a4f559..fdeade04d 100644 --- a/test/min.wast.fromBinary +++ b/test/min.wast.fromBinary @@ -1,18 +1,18 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func (param i32 i32 i32) (result i32))) - (type $2 (func (param i32 i32) (result f32))) - (type $3 (func (param f32) (result f32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (memory $0 256 256) (export "floats" (func $floats)) - (func $floats (; 0 ;) (type $3) (param $0 f32) (result f32) + (func $floats (; 0 ;) (param $0 f32) (result f32) (local $1 f32) (f32.add (local.get $1) (local.get $0) ) ) - (func $neg (; 1 ;) (type $2) (param $0 i32) (param $1 i32) (result f32) + (func $neg (; 1 ;) (param $0 i32) (param $1 i32) (result f32) (local $2 f32) (local.tee $2 (f32.neg @@ -28,7 +28,7 @@ ) ) ) - (func $littleswitch (; 2 ;) (type $0) (param $0 i32) (result i32) + (func $littleswitch (; 2 ;) (param $0 i32) (result i32) (block $label$1 (result i32) (block $label$2 (block $label$3 @@ -48,7 +48,7 @@ ) ) ) - (func $f1 (; 3 ;) (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $f1 (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local.get $2) ) ) diff --git a/test/min.wast.fromBinary.noDebugInfo b/test/min.wast.fromBinary.noDebugInfo index 87311d395..f88f56c90 100644 --- a/test/min.wast.fromBinary.noDebugInfo +++ b/test/min.wast.fromBinary.noDebugInfo @@ -1,18 +1,18 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func (param i32 i32 i32) (result i32))) - (type $2 (func (param i32 i32) (result f32))) - (type $3 (func (param f32) (result f32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (memory $0 256 256) (export "floats" (func $0)) - (func $0 (; 0 ;) (type $3) (param $0 f32) (result f32) + (func $0 (; 0 ;) (param $0 f32) (result f32) (local $1 f32) (f32.add (local.get $1) (local.get $0) ) ) - (func $1 (; 1 ;) (type $2) (param $0 i32) (param $1 i32) (result f32) + (func $1 (; 1 ;) (param $0 i32) (param $1 i32) (result f32) (local $2 f32) (local.tee $2 (f32.neg @@ -28,7 +28,7 @@ ) ) ) - (func $2 (; 2 ;) (type $0) (param $0 i32) (result i32) + (func $2 (; 2 ;) (param $0 i32) (result i32) (block $label$1 (result i32) (block $label$2 (block $label$3 @@ -48,7 +48,7 @@ ) ) ) - (func $3 (; 3 ;) (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $3 (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local.get $2) ) ) diff --git a/test/mutable-global.wasm.fromBinary b/test/mutable-global.wasm.fromBinary index 7ce80b82d..159fc7a5d 100644 --- a/test/mutable-global.wasm.fromBinary +++ b/test/mutable-global.wasm.fromBinary @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (import "env" "global-mut" (global $gimport$0 (mut i32))) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (global.set $gimport$0 (i32.add (global.get $gimport$0) diff --git a/test/mutable-global.wast.from-wast b/test/mutable-global.wast.from-wast index 8ee9d0555..45a2eba6a 100644 --- a/test/mutable-global.wast.from-wast +++ b/test/mutable-global.wast.from-wast @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (import "env" "global-mut" (global $global-mut (mut i32))) - (func $foo (; 0 ;) (type $0) + (func $foo (; 0 ;) (global.set $global-mut (i32.add (global.get $global-mut) diff --git a/test/mutable-global.wast.fromBinary b/test/mutable-global.wast.fromBinary index 7894cd2c6..69070e70d 100644 --- a/test/mutable-global.wast.fromBinary +++ b/test/mutable-global.wast.fromBinary @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (import "env" "global-mut" (global $gimport$0 (mut i32))) - (func $foo (; 0 ;) (type $0) + (func $foo (; 0 ;) (global.set $gimport$0 (i32.add (global.get $gimport$0) diff --git a/test/mutable-global.wast.fromBinary.noDebugInfo b/test/mutable-global.wast.fromBinary.noDebugInfo index 7ce80b82d..159fc7a5d 100644 --- a/test/mutable-global.wast.fromBinary.noDebugInfo +++ b/test/mutable-global.wast.fromBinary.noDebugInfo @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (import "env" "global-mut" (global $gimport$0 (mut i32))) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (global.set $gimport$0 (i32.add (global.get $gimport$0) diff --git a/test/newsyntax.wast.from-wast b/test/newsyntax.wast.from-wast index 09758b90d..dba2de3d5 100644 --- a/test/newsyntax.wast.from-wast +++ b/test/newsyntax.wast.from-wast @@ -1,17 +1,17 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iid (func (param i32 f64) (result i32))) + (type $none_=>_none (func)) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (import "env" "table" (table $0 9 9 funcref)) (export "call_indirect" (func $0)) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (func $0 (; 0 ;) (drop - (call_indirect (type $FUNCSIG$iid) + (call_indirect (type $i32_f64_=>_i32) (i32.const 10) (f64.const 20) (i32.const 30) ) ) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 1) ) ) diff --git a/test/newsyntax.wast.fromBinary b/test/newsyntax.wast.fromBinary index 3def8819d..27e8679ab 100644 --- a/test/newsyntax.wast.fromBinary +++ b/test/newsyntax.wast.fromBinary @@ -1,17 +1,17 @@ (module - (type $0 (func)) - (type $1 (func (param i32 f64) (result i32))) + (type $none_=>_none (func)) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (import "env" "table" (table $timport$0 9 9 funcref)) (export "call_indirect" (func $0)) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (drop - (call_indirect (type $1) + (call_indirect (type $i32_f64_=>_i32) (i32.const 10) (f64.const 20) (i32.const 30) ) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (i32.const 1) ) ) diff --git a/test/newsyntax.wast.fromBinary.noDebugInfo b/test/newsyntax.wast.fromBinary.noDebugInfo index 3def8819d..27e8679ab 100644 --- a/test/newsyntax.wast.fromBinary.noDebugInfo +++ b/test/newsyntax.wast.fromBinary.noDebugInfo @@ -1,17 +1,17 @@ (module - (type $0 (func)) - (type $1 (func (param i32 f64) (result i32))) + (type $none_=>_none (func)) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (import "env" "table" (table $timport$0 9 9 funcref)) (export "call_indirect" (func $0)) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (drop - (call_indirect (type $1) + (call_indirect (type $i32_f64_=>_i32) (i32.const 10) (f64.const 20) (i32.const 30) ) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (i32.const 1) ) ) diff --git a/test/noffi_f32.fromasm b/test/noffi_f32.fromasm index 9776d7be1..7f760a28f 100644 --- a/test/noffi_f32.fromasm +++ b/test/noffi_f32.fromasm @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ff (func (param f32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "noffi_f32.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/noffi_f32.fromasm.clamp b/test/noffi_f32.fromasm.clamp index 9776d7be1..7f760a28f 100644 --- a/test/noffi_f32.fromasm.clamp +++ b/test/noffi_f32.fromasm.clamp @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ff (func (param f32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "noffi_f32.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/noffi_f32.fromasm.clamp.no-opts b/test/noffi_f32.fromasm.clamp.no-opts index 648a14b8b..61a7ed0d9 100644 --- a/test/noffi_f32.fromasm.clamp.no-opts +++ b/test/noffi_f32.fromasm.clamp.no-opts @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ff (func (param f32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/noffi_f32.fromasm.imprecise b/test/noffi_f32.fromasm.imprecise index 4c86c32b5..bff887835 100644 --- a/test/noffi_f32.fromasm.imprecise +++ b/test/noffi_f32.fromasm.imprecise @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ff (func (param f32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) + (type $none_=>_i32 (func (result i32))) (import "env" "_importf" (func $importf (param f32) (result f32))) (export "main" (func $main)) (export "exportf" (func $exportf)) diff --git a/test/noffi_f32.fromasm.imprecise.no-opts b/test/noffi_f32.fromasm.imprecise.no-opts index 648a14b8b..61a7ed0d9 100644 --- a/test/noffi_f32.fromasm.imprecise.no-opts +++ b/test/noffi_f32.fromasm.imprecise.no-opts @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ff (func (param f32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/noffi_f32.fromasm.no-opts b/test/noffi_f32.fromasm.no-opts index 648a14b8b..61a7ed0d9 100644 --- a/test/noffi_f32.fromasm.no-opts +++ b/test/noffi_f32.fromasm.no-opts @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$ff (func (param f32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/noffi_i64.fromasm b/test/noffi_i64.fromasm index 4cb3ba65a..f0bc77e3d 100644 --- a/test/noffi_i64.fromasm +++ b/test/noffi_i64.fromasm @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$jj (func (param i64) (result i64))) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "noffi_i64.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/noffi_i64.fromasm.clamp b/test/noffi_i64.fromasm.clamp index 4cb3ba65a..f0bc77e3d 100644 --- a/test/noffi_i64.fromasm.clamp +++ b/test/noffi_i64.fromasm.clamp @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$jj (func (param i64) (result i64))) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "noffi_i64.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/noffi_i64.fromasm.clamp.no-opts b/test/noffi_i64.fromasm.clamp.no-opts index c93e6b442..02839f2da 100644 --- a/test/noffi_i64.fromasm.clamp.no-opts +++ b/test/noffi_i64.fromasm.clamp.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$jj (func (param i64) (result i64))) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/noffi_i64.fromasm.imprecise b/test/noffi_i64.fromasm.imprecise index 9a740be3f..d64d4edb4 100644 --- a/test/noffi_i64.fromasm.imprecise +++ b/test/noffi_i64.fromasm.imprecise @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$jj (func (param i64) (result i64))) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "_importll" (func $importll (param i64) (result i64))) (export "_add" (func $add)) (export "_main" (func $main)) diff --git a/test/noffi_i64.fromasm.imprecise.no-opts b/test/noffi_i64.fromasm.imprecise.no-opts index c93e6b442..02839f2da 100644 --- a/test/noffi_i64.fromasm.imprecise.no-opts +++ b/test/noffi_i64.fromasm.imprecise.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$jj (func (param i64) (result i64))) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/noffi_i64.fromasm.no-opts b/test/noffi_i64.fromasm.no-opts index c93e6b442..02839f2da 100644 --- a/test/noffi_i64.fromasm.no-opts +++ b/test/noffi_i64.fromasm.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$jj (func (param i64) (result i64))) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/passes/1.txt b/test/passes/1.txt index 3e12ecba6..580787dff 100644 --- a/test/passes/1.txt +++ b/test/passes/1.txt @@ -1,22 +1,22 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (func $trivial (; 0 ;) (type $FUNCSIG$v) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (func $trivial (; 0 ;) (nop) ) - (func $trivial2 (; 1 ;) (type $FUNCSIG$v) + (func $trivial2 (; 1 ;) (call $trivial) (call $trivial) ) - (func $return-void (; 2 ;) (type $FUNCSIG$v) + (func $return-void (; 2 ;) (nop) ) - (func $return-val (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $return-val (; 3 ;) (result i32) (i32.const 1) ) - (func $ifs (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $ifs (; 4 ;) (param $0 i32) (result i32) (if (result i32) (local.get $0) (select @@ -31,7 +31,7 @@ ) ) ) - (func $loops (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $loops (; 5 ;) (param $0 i32) (if (local.get $0) (loop $shape$2$continue @@ -52,12 +52,12 @@ ) ) ) - (func $br-out (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $br-out (; 6 ;) (param $0 i32) (call $br-out (i32.const 5) ) ) - (func $unreachable (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $unreachable (; 7 ;) (param $0 i32) (if (i32.eqz (local.get $0) @@ -82,10 +82,10 @@ ) ) ) - (func $empty-blocks (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $empty-blocks (; 8 ;) (param $0 i32) (nop) ) - (func $before-and-after (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $before-and-after (; 9 ;) (param $0 i32) (call $before-and-after (i32.const 1) ) @@ -181,7 +181,7 @@ (i32.const 25) ) ) - (func $switch (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $switch (; 10 ;) (param $0 i32) (call $switch (i32.const 1) ) @@ -199,10 +199,10 @@ (i32.const 3) ) ) - (func $no-return (; 11 ;) (type $FUNCSIG$v) + (func $no-return (; 11 ;) (nop) ) - (func $if-br-wat (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $if-br-wat (; 12 ;) (param $0 i32) (call $if-br-wat (i32.const 0) ) diff --git a/test/passes/O.bin.txt b/test/passes/O.bin.txt index 7af8de37e..d6edd802d 100644 --- a/test/passes/O.bin.txt +++ b/test/passes/O.bin.txt @@ -1,11 +1,11 @@ (module - (type $0 (func (param i64) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (export "fac-rec" (func $0)) (export "fac-rec-named" (func $1)) (export "fac-iter" (func $2)) (export "fac-iter-named" (func $3)) (export "fac-opt" (func $4)) - (func $0 (; 0 ;) (; has Stack IR ;) (type $0) (param $0 i64) (result i64) + (func $0 (; 0 ;) (; has Stack IR ;) (param $0 i64) (result i64) (if (result i64) (i64.eqz (local.get $0) @@ -22,7 +22,7 @@ ) ) ) - (func $1 (; 1 ;) (; has Stack IR ;) (type $0) (param $0 i64) (result i64) + (func $1 (; 1 ;) (; has Stack IR ;) (param $0 i64) (result i64) (if (result i64) (i64.eqz (local.get $0) @@ -39,10 +39,10 @@ ) ) ) - (func $2 (; 2 ;) (; has Stack IR ;) (type $0) (param $0 i64) (result i64) + (func $2 (; 2 ;) (; has Stack IR ;) (param $0 i64) (result i64) (unreachable) ) - (func $3 (; 3 ;) (; has Stack IR ;) (type $0) (param $0 i64) (result i64) + (func $3 (; 3 ;) (; has Stack IR ;) (param $0 i64) (result i64) (local $1 i64) (local.set $1 (i64.const 1) @@ -73,7 +73,7 @@ ) (local.get $1) ) - (func $4 (; 4 ;) (; has Stack IR ;) (type $0) (param $0 i64) (result i64) + (func $4 (; 4 ;) (; has Stack IR ;) (param $0 i64) (result i64) (local $1 i64) (local.set $1 (i64.const 1) diff --git a/test/passes/O.txt b/test/passes/O.txt index 0d3284a9f..dc8ad9848 100644 --- a/test/passes/O.txt +++ b/test/passes/O.txt @@ -1,13 +1,13 @@ (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vj (func (param i64))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i64_=>_none (func (param i64))) + (type $none_=>_i32 (func (result i32))) (export "ret" (func $ret)) (export "waka" (func $if-0-unreachable-to-none)) (export "many-selects" (func $many-selects)) (export "end-if-else" (func $end-if-else)) (export "end-if-else-call" (func $end-if-else-call)) - (func $ret (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) + (func $ret (; 0 ;) (; has Stack IR ;) (result i32) (drop (call $ret) ) @@ -19,10 +19,10 @@ ) (i32.const 999) ) - (func $if-0-unreachable-to-none (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$vj) (param $0 i64) + (func $if-0-unreachable-to-none (; 1 ;) (; has Stack IR ;) (param $0 i64) (unreachable) ) - (func $many-selects (; 2 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $many-selects (; 2 ;) (; has Stack IR ;) (param $0 i32) (result i32) (select (i32.const -1073741824) (select @@ -39,14 +39,14 @@ ) ) ) - (func $end-if-else (; 3 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $end-if-else (; 3 ;) (; has Stack IR ;) (param $0 i32) (result i32) (select (i32.const 1) (local.get $0) (local.get $0) ) ) - (func $end-if-else-call (; 4 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $end-if-else-call (; 4 ;) (; has Stack IR ;) (param $0 i32) (result i32) (if (result i32) (local.get $0) (call $ret) diff --git a/test/passes/O1.txt b/test/passes/O1.txt index 2d1e75d6e..4f9faeda8 100644 --- a/test/passes/O1.txt +++ b/test/passes/O1.txt @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 1 1) (global $global$0 (mut i32) (i32.const 10)) (export "foo" (func $0)) - (func $0 (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $0 (; 0 ;) (result i32) (global.set $global$0 (i32.const 0) ) diff --git a/test/passes/O1_print-stack-ir.txt b/test/passes/O1_print-stack-ir.txt index 088ee663b..c98b65d79 100644 --- a/test/passes/O1_print-stack-ir.txt +++ b/test/passes/O1_print-stack-ir.txt @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "stacky-help" (func $stacky-help)) - (func $stacky-help (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $stacky-help (; 0 ;) (param $0 i32) (result i32) (i32.add (call $stacky-help (i32.const 0) @@ -25,9 +25,9 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "stacky-help" (func $stacky-help)) - (func $stacky-help (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $stacky-help (; 0 ;) (param $0 i32) (result i32) (i32.add (call $stacky-help (i32.const 0) diff --git a/test/passes/O2_precompute-propagate_print-stack-ir.txt b/test/passes/O2_precompute-propagate_print-stack-ir.txt index e89a8890c..af85b166f 100644 --- a/test/passes/O2_precompute-propagate_print-stack-ir.txt +++ b/test/passes/O2_precompute-propagate_print-stack-ir.txt @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$jiiij (func (param i32 i32 i32 i64) (result i64))) + (type $i32_i32_i32_i64_=>_i64 (func (param i32 i32 i32 i64) (result i64))) (export "func" (func $0)) - (func $0 (; 0 ;) (type $FUNCSIG$jiiij) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i64) (result i64) + (func $0 (; 0 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i64) (result i64) (local $4 i32) (local.set $3 (i64.const 2147483647) @@ -11,9 +11,9 @@ ) ) (module - (type $FUNCSIG$jiiij (func (param i32 i32 i32 i64) (result i64))) + (type $i32_i32_i32_i64_=>_i64 (func (param i32 i32 i32 i64) (result i64))) (export "func" (func $0)) - (func $0 (; 0 ;) (type $FUNCSIG$jiiij) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i64) (result i64) + (func $0 (; 0 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i64) (result i64) (local $4 i32) (local.set $3 (i64.const 2147483647) diff --git a/test/passes/O2_print-stack-ir.txt b/test/passes/O2_print-stack-ir.txt index 04f4f144d..b2578a04e 100644 --- a/test/passes/O2_print-stack-ir.txt +++ b/test/passes/O2_print-stack-ir.txt @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "stacky-help" (func $stacky-help)) - (func $stacky-help (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $stacky-help (; 0 ;) (param $0 i32) (result i32) i32.const 0 call $stacky-help i32.const 1 @@ -16,9 +16,9 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "stacky-help" (func $stacky-help)) - (func $stacky-help (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $stacky-help (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32) (i32.add (call $stacky-help (i32.const 0) diff --git a/test/passes/O3_inlining.txt b/test/passes/O3_inlining.txt index 0fdcd5331..285052478 100644 --- a/test/passes/O3_inlining.txt +++ b/test/passes/O3_inlining.txt @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) (memory $0 1 1) (global $global$1 (mut i32) (i32.const 100)) (export "func_217" (func $1)) - (func $1 (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $1 (; 0 ;) (param $0 i32) (if (global.get $global$1) (unreachable) diff --git a/test/passes/O3_low-memory-unused_metrics.txt b/test/passes/O3_low-memory-unused_metrics.txt index bf5cd01a8..f7d6d7dad 100644 --- a/test/passes/O3_low-memory-unused_metrics.txt +++ b/test/passes/O3_low-memory-unused_metrics.txt @@ -25,10 +25,10 @@ total store : 160 unary : 28 (module - (type $0 (func (param i32 i32 i32) (result i32))) - (type $2 (func (param i32 i32) (result i32))) - (type $3 (func (param i32 i32 i32 i32))) - (type $10 (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "memory" (memory $0 4096 4096)) (import "env" "table" (table $0 10 funcref)) (import "env" "crc32" (func $fimport$14 (param i32 i32 i32) (result i32))) @@ -40,7 +40,7 @@ total (import "env" "memset" (func $fimport$97 (param i32 i32 i32) (result i32))) (import "env" "memcpy" (func $fimport$98 (param i32 i32 i32) (result i32))) (export "deflate" (func $0)) - (func $0 (; 8 ;) (; has Stack IR ;) (type $2) (param $0 i32) (param $1 i32) (result i32) + (func $0 (; 8 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2445,7 +2445,7 @@ total ) ) ) - (call_indirect (type $2) + (call_indirect (type $i32_i32_=>_i32) (local.get $2) (local.get $1) (i32.load diff --git a/test/passes/O3_print-stack-ir.txt b/test/passes/O3_print-stack-ir.txt index 73bfa261d..9538fff8a 100644 --- a/test/passes/O3_print-stack-ir.txt +++ b/test/passes/O3_print-stack-ir.txt @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "stacky-help" (func $stacky-help)) - (func $stacky-help (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $stacky-help (; 0 ;) (param $0 i32) (result i32) i32.const 0 call $stacky-help i32.const 1 @@ -14,9 +14,9 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "stacky-help" (func $stacky-help)) - (func $stacky-help (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $stacky-help (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32) (i32.add (call $stacky-help (i32.const 0) diff --git a/test/passes/O4_disable-bulk-memory.txt b/test/passes/O4_disable-bulk-memory.txt index 2f354eb59..fbacd7190 100644 --- a/test/passes/O4_disable-bulk-memory.txt +++ b/test/passes/O4_disable-bulk-memory.txt @@ -1,8 +1,8 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (global $global$0 (mut i32) (i32.const 10)) (export "func_59_invoker" (func $0)) - (func $0 (; 0 ;) (; has Stack IR ;) (type $0) + (func $0 (; 0 ;) (; has Stack IR ;) (global.set $global$0 (i32.const 0) ) @@ -10,11 +10,13 @@ ) ) (module - (type $0 (func)) - (type $3 (func (param i32) (result i32))) - (type $8 (func (result f64))) - (type $10 (func (param i32) (result f64))) - (type $11 (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $none_=>_f64 (func (result f64))) + (type $i32_=>_f64 (func (param i32) (result f64))) (import "env" "memory" (memory $0 1)) (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") @@ -30,7 +32,7 @@ (export "bench" (func $assembly/index/bench)) (export "getBody" (func $assembly/index/getBody)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (; has Stack IR ;) (type $3) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -600,7 +602,7 @@ ) (local.get $0) ) - (func $assembly/index/init (; 5 ;) (; has Stack IR ;) (type $0) + (func $assembly/index/init (; 5 ;) (; has Stack IR ;) (local $0 i32) (local $1 i32) (local.set $1 @@ -1010,7 +1012,7 @@ ) ) ) - (func $assembly/index/NBodySystem#energy (; 7 ;) (; has Stack IR ;) (type $10) (param $0 i32) (result f64) + (func $assembly/index/NBodySystem#energy (; 7 ;) (; has Stack IR ;) (param $0 i32) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -1207,7 +1209,7 @@ ) (local.get $1) ) - (func $assembly/index/step (; 8 ;) (; has Stack IR ;) (type $8) (result f64) + (func $assembly/index/step (; 8 ;) (; has Stack IR ;) (result f64) (call $assembly/index/NBodySystem#advance (global.get $global$5) ) @@ -1215,7 +1217,7 @@ (global.get $global$5) ) ) - (func $assembly/index/bench (; 9 ;) (; has Stack IR ;) (type $11) (param $0 i32) + (func $assembly/index/bench (; 9 ;) (; has Stack IR ;) (param $0 i32) (local $1 i32) (block $label$1 (loop $label$2 @@ -1238,7 +1240,7 @@ ) ) ) - (func $assembly/index/getBody (; 10 ;) (; has Stack IR ;) (type $3) (param $0 i32) (result i32) + (func $assembly/index/getBody (; 10 ;) (; has Stack IR ;) (param $0 i32) (result i32) (local $1 i32) (if (result i32) (i32.lt_u @@ -1279,7 +1281,7 @@ (i32.const 0) ) ) - (func $start (; 11 ;) (; has Stack IR ;) (type $0) + (func $start (; 11 ;) (; has Stack IR ;) (global.set $global$0 (i32.const 104) ) @@ -1287,7 +1289,7 @@ (i32.const 104) ) ) - (func $null (; 12 ;) (; has Stack IR ;) (type $0) + (func $null (; 12 ;) (; has Stack IR ;) (nop) ) ) diff --git a/test/passes/Os_print-stack-ir.txt b/test/passes/Os_print-stack-ir.txt index b559e448a..7b34da8e1 100644 --- a/test/passes/Os_print-stack-ir.txt +++ b/test/passes/Os_print-stack-ir.txt @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "stacky-help" (func $stacky-help)) - (func $stacky-help (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $stacky-help (; 0 ;) (param $0 i32) (result i32) i32.const 0 call $stacky-help i32.const 1 @@ -14,9 +14,9 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "stacky-help" (func $stacky-help)) - (func $stacky-help (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $stacky-help (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32) (i32.add (call $stacky-help (i32.const 0) @@ -40,55 +40,55 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$f (func (result f32))) - (type $FUNCSIG$d (func (result f64))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $none_=>_f32 (func (result f32))) + (type $none_=>_f64 (func (result f64))) (export "ppi32" (func $0)) (export "ppi64" (func $1)) (export "ppf32" (func $2)) (export "ppf64" (func $3)) - (func $0 (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $0 (; 0 ;) (result i32) i32.const 1 ) - (func $1 (; 1 ;) (type $FUNCSIG$j) (result i64) + (func $1 (; 1 ;) (result i64) i64.const 1 ) - (func $2 (; 2 ;) (type $FUNCSIG$f) (result f32) + (func $2 (; 2 ;) (result f32) f32.const 1 ) - (func $3 (; 3 ;) (type $FUNCSIG$d) (result f64) + (func $3 (; 3 ;) (result f64) f64.const 1 ) ) (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$f (func (result f32))) - (type $FUNCSIG$d (func (result f64))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $none_=>_f32 (func (result f32))) + (type $none_=>_f64 (func (result f64))) (export "ppi32" (func $0)) (export "ppi64" (func $1)) (export "ppf32" (func $2)) (export "ppf64" (func $3)) - (func $0 (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) + (func $0 (; 0 ;) (; has Stack IR ;) (result i32) (push (i32.const 1) ) (i32.pop) ) - (func $1 (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$j) (result i64) + (func $1 (; 1 ;) (; has Stack IR ;) (result i64) (push (i64.const 1) ) (i64.pop) ) - (func $2 (; 2 ;) (; has Stack IR ;) (type $FUNCSIG$f) (result f32) + (func $2 (; 2 ;) (; has Stack IR ;) (result f32) (push (f32.const 1) ) (f32.pop) ) - (func $3 (; 3 ;) (; has Stack IR ;) (type $FUNCSIG$d) (result f64) + (func $3 (; 3 ;) (; has Stack IR ;) (result f64) (push (f64.const 1) ) diff --git a/test/passes/Oz.txt b/test/passes/Oz.txt index 49e570295..431553b95 100644 --- a/test/passes/Oz.txt +++ b/test/passes/Oz.txt @@ -1,10 +1,10 @@ (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (memory $0 100 100) (export "localcse" (func $basics)) (export "localcse-2" (func $8)) - (func $basics (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $basics (; 0 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) (i32.add (i32.add (local.get $0) @@ -16,7 +16,7 @@ ) ) ) - (func $8 (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $8 (; 1 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (i32.store (local.tee $0 (i32.add diff --git a/test/passes/alignment-lowering.txt b/test/passes/alignment-lowering.txt index 61066dc54..1030f71d4 100644 --- a/test/passes/alignment-lowering.txt +++ b/test/passes/alignment-lowering.txt @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 1 1) - (func $func_4 (; 0 ;) (type $FUNCSIG$v) + (func $func_4 (; 0 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -278,7 +278,7 @@ ) ) ) - (func $func_2 (; 1 ;) (type $FUNCSIG$v) + (func $func_2 (; 1 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -415,7 +415,7 @@ ) ) ) - (func $func_1 (; 2 ;) (type $FUNCSIG$v) + (func $func_1 (; 2 ;) (drop (i32.load8_u (i32.const 4) @@ -466,7 +466,7 @@ (unreachable) ) ) - (func $func_signed (; 3 ;) (type $FUNCSIG$v) + (func $func_signed (; 3 ;) (local $0 i32) (local $1 i32) (drop diff --git a/test/passes/asyncify.txt b/test/passes/asyncify.txt index 317e6f442..f19b764fa 100644 --- a/test/passes/asyncify.txt +++ b/test/passes/asyncify.txt @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (memory $0 1 2) (global $sleeping (mut i32) (i32.const 0)) (global $__asyncify_state (mut i32) (i32.const 0)) @@ -9,7 +9,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $do_sleep (; 0 ;) (type $FUNCSIG$v) + (func $do_sleep (; 0 ;) (local $0 i32) (local $1 i32) (block @@ -51,7 +51,7 @@ ) (nop) ) - (func $work (; 1 ;) (type $FUNCSIG$v) + (func $work (; 1 ;) (local $0 i32) (local $1 i32) (if @@ -173,10 +173,10 @@ ) (nop) ) - (func $stuff (; 2 ;) (type $FUNCSIG$v) + (func $stuff (; 2 ;) (nop) ) - (func $first_event (; 3 ;) (type $FUNCSIG$v) + (func $first_event (; 3 ;) (local $0 i32) (local $1 i32) (if @@ -272,7 +272,7 @@ ) (nop) ) - (func $second_event (; 4 ;) (type $FUNCSIG$v) + (func $second_event (; 4 ;) (block (call $asyncify_stop_unwind) (nop) @@ -285,7 +285,7 @@ ) (nop) ) - (func $never_sleep (; 5 ;) (type $FUNCSIG$v) + (func $never_sleep (; 5 ;) (block (call $stuff) (nop) @@ -368,10 +368,10 @@ ) ) (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "import" (func $import)) (import "env" "import2" (func $import2 (result i32))) (import "env" "import3" (func $import3 (param i32))) @@ -382,7 +382,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $calls-import (; 3 ;) (type $FUNCSIG$v) + (func $calls-import (; 3 ;) (local $0 i32) (local $1 i32) (if @@ -478,7 +478,7 @@ ) (nop) ) - (func $calls-import2 (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $calls-import2 (; 4 ;) (result i32) (local $temp i32) (local $1 i32) (local $2 i32) @@ -678,7 +678,7 @@ ) (i32.const 0) ) - (func $calls-import2-drop (; 5 ;) (type $FUNCSIG$v) + (func $calls-import2-drop (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -828,7 +828,7 @@ ) ) ) - (func $calls-nothing (; 6 ;) (type $FUNCSIG$v) + (func $calls-nothing (; 6 ;) (local $0 i32) (local.set $0 (i32.eqz @@ -840,7 +840,7 @@ ) (nop) ) - (func $many-locals (; 7 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $many-locals (; 7 ;) (param $x i32) (result i32) (local $y i32) (local $2 i32) (local $3 i32) @@ -1127,7 +1127,7 @@ ) (i32.const 0) ) - (func $calls-import2-if (; 8 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-import2-if (; 8 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1303,7 +1303,7 @@ ) ) ) - (func $calls-import2-if-else (; 9 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-import2-if-else (; 9 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1549,7 +1549,7 @@ ) ) ) - (func $calls-import2-if-else-oneside (; 10 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $calls-import2-if-else-oneside (; 10 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1796,7 +1796,7 @@ ) (i32.const 0) ) - (func $calls-import2-if-else-oneside2 (; 11 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $calls-import2-if-else-oneside2 (; 11 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2043,7 +2043,7 @@ ) (i32.const 0) ) - (func $calls-loop (; 12 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-loop (; 12 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2259,7 +2259,7 @@ ) ) ) - (func $calls-loop2 (; 13 ;) (type $FUNCSIG$v) + (func $calls-loop2 (; 13 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2418,7 +2418,7 @@ ) ) ) - (func $calls-mix (; 14 ;) (type $FUNCSIG$v) + (func $calls-mix (; 14 ;) (local $0 i32) (local $1 i32) (if @@ -2572,10 +2572,10 @@ ) (nop) ) - (func $boring (; 15 ;) (type $FUNCSIG$v) + (func $boring (; 15 ;) (nop) ) - (func $calls-mix-deep (; 16 ;) (type $FUNCSIG$v) + (func $calls-mix-deep (; 16 ;) (local $0 i32) (local $1 i32) (if @@ -2729,11 +2729,11 @@ ) (nop) ) - (func $boring-deep (; 17 ;) (type $FUNCSIG$v) + (func $boring-deep (; 17 ;) (call $boring) (nop) ) - (func $import-deep (; 18 ;) (type $FUNCSIG$v) + (func $import-deep (; 18 ;) (local $0 i32) (local $1 i32) (if @@ -2901,6 +2901,8 @@ ) ) (module + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (memory $0 1 1) (global $__asyncify_state (mut i32) (i32.const 0)) (global $__asyncify_data (mut i32) (i32.const 0)) diff --git a/test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt b/test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt index c7e35c2f8..49c3ed7ed 100644 --- a/test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt +++ b/test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "import" (func $import)) (import "env" "import2" (func $import2 (result i32))) (import "env" "import3" (func $import3 (param i32))) @@ -12,7 +12,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $calls-import (; 3 ;) (type $FUNCSIG$v) + (func $calls-import (; 3 ;) (local $0 i32) (local $1 i32) (if @@ -99,7 +99,7 @@ ) (nop) ) - (func $calls-import2 (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $calls-import2 (; 4 ;) (result i32) (local $temp i32) (local $1 i32) (local $2 i32) @@ -290,7 +290,7 @@ ) (i32.const 0) ) - (func $calls-import2-drop (; 5 ;) (type $FUNCSIG$v) + (func $calls-import2-drop (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -431,7 +431,7 @@ ) ) ) - (func $calls-nothing (; 6 ;) (type $FUNCSIG$v) + (func $calls-nothing (; 6 ;) (local $0 i32) (local.set $0 (i32.eqz diff --git a/test/passes/asyncify_mod-asyncify-always-and-only-unwind_O.txt b/test/passes/asyncify_mod-asyncify-always-and-only-unwind_O.txt index 3f83675e8..68359770d 100644 --- a/test/passes/asyncify_mod-asyncify-always-and-only-unwind_O.txt +++ b/test/passes/asyncify_mod-asyncify-always-and-only-unwind_O.txt @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (import "env" "import" (func $import)) (memory $0 1 2) (global $__asyncify_state (mut i32) (i32.const 0)) @@ -12,7 +13,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_unwind)) - (func $calls-import (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $calls-import (; 1 ;) (; has Stack IR ;) (local $0 i32) (call $import) (i32.store diff --git a/test/passes/asyncify_mod-asyncify-never-unwind.txt b/test/passes/asyncify_mod-asyncify-never-unwind.txt index 8647f5426..1806e1fcd 100644 --- a/test/passes/asyncify_mod-asyncify-never-unwind.txt +++ b/test/passes/asyncify_mod-asyncify-never-unwind.txt @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "import" (func $import)) (import "env" "import2" (func $import2 (result i32))) (import "env" "import3" (func $import3 (param i32))) @@ -12,7 +12,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $calls-import (; 3 ;) (type $FUNCSIG$v) + (func $calls-import (; 3 ;) (local $0 i32) (local $1 i32) (if @@ -105,7 +105,7 @@ ) (nop) ) - (func $calls-import2 (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $calls-import2 (; 4 ;) (result i32) (local $temp i32) (local $1 i32) (local $2 i32) @@ -302,7 +302,7 @@ ) (i32.const 0) ) - (func $calls-import2-drop (; 5 ;) (type $FUNCSIG$v) + (func $calls-import2-drop (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -449,7 +449,7 @@ ) ) ) - (func $calls-nothing (; 6 ;) (type $FUNCSIG$v) + (func $calls-nothing (; 6 ;) (local $0 i32) (local.set $0 (i32.eqz diff --git a/test/passes/asyncify_mod-asyncify-never-unwind_O.txt b/test/passes/asyncify_mod-asyncify-never-unwind_O.txt index b185f5c6b..2390d6e93 100644 --- a/test/passes/asyncify_mod-asyncify-never-unwind_O.txt +++ b/test/passes/asyncify_mod-asyncify-never-unwind_O.txt @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (import "env" "import" (func $import)) (memory $0 1 2) (global $__asyncify_state (mut i32) (i32.const 0)) @@ -12,7 +13,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_unwind)) - (func $calls-import (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $calls-import (; 1 ;) (; has Stack IR ;) (if (select (i32.eqz diff --git a/test/passes/asyncify_optimize-level=1.txt b/test/passes/asyncify_optimize-level=1.txt index 589803cd2..9922e4f41 100644 --- a/test/passes/asyncify_optimize-level=1.txt +++ b/test/passes/asyncify_optimize-level=1.txt @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "import" (func $import)) (import "env" "import2" (func $import2 (result i32))) (import "env" "import3" (func $import3 (param i32))) @@ -13,7 +13,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $calls-import (; 3 ;) (type $FUNCSIG$v) + (func $calls-import (; 3 ;) (local $0 i32) (local.set $0 (block $__asyncify_unwind (result i32) @@ -79,7 +79,7 @@ ) ) ) - (func $calls-import2 (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $calls-import2 (; 4 ;) (result i32) (local $0 i32) (local $1 i32) (if @@ -199,7 +199,7 @@ ) (i32.const 0) ) - (func $calls-import2-drop (; 5 ;) (type $FUNCSIG$v) + (func $calls-import2-drop (; 5 ;) (local $0 i32) (local.set $0 (block $__asyncify_unwind (result i32) @@ -267,10 +267,10 @@ ) ) ) - (func $calls-nothing (; 6 ;) (type $FUNCSIG$v) + (func $calls-nothing (; 6 ;) (nop) ) - (func $many-locals (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $many-locals (; 7 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (if @@ -418,7 +418,7 @@ ) (i32.const 0) ) - (func $calls-import2-if (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $calls-import2-if (; 8 ;) (param $0 i32) (local $1 i32) (if (i32.eq @@ -534,7 +534,7 @@ ) ) ) - (func $calls-import2-if-else (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $calls-import2-if-else (; 9 ;) (param $0 i32) (local $1 i32) (local $2 i32) (if @@ -707,7 +707,7 @@ ) ) ) - (func $calls-import2-if-else-oneside (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $calls-import2-if-else-oneside (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (if @@ -873,7 +873,7 @@ ) (i32.const 0) ) - (func $calls-import2-if-else-oneside2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $calls-import2-if-else-oneside2 (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (if @@ -1039,7 +1039,7 @@ ) (i32.const 0) ) - (func $calls-loop (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $calls-loop (; 12 ;) (param $0 i32) (local $1 i32) (if (i32.eq @@ -1163,7 +1163,7 @@ ) ) ) - (func $calls-loop2 (; 13 ;) (type $FUNCSIG$v) + (func $calls-loop2 (; 13 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1288,7 +1288,7 @@ ) ) ) - (func $calls-mix (; 14 ;) (type $FUNCSIG$v) + (func $calls-mix (; 14 ;) (local $0 i32) (local.set $0 (block $__asyncify_unwind (result i32) @@ -1390,10 +1390,10 @@ ) ) ) - (func $boring (; 15 ;) (type $FUNCSIG$v) + (func $boring (; 15 ;) (nop) ) - (func $calls-mix-deep (; 16 ;) (type $FUNCSIG$v) + (func $calls-mix-deep (; 16 ;) (local $0 i32) (local.set $0 (block $__asyncify_unwind (result i32) @@ -1495,10 +1495,10 @@ ) ) ) - (func $boring-deep (; 17 ;) (type $FUNCSIG$v) + (func $boring-deep (; 17 ;) (call $boring) ) - (func $import-deep (; 18 ;) (type $FUNCSIG$v) + (func $import-deep (; 18 ;) (local $0 i32) (local.set $0 (block $__asyncify_unwind (result i32) diff --git a/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.txt b/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.txt index 2caa76d8e..dc92b497d 100644 --- a/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.txt +++ b/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.txt @@ -1,7 +1,7 @@ (module - (type $f (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "import" (func $import)) (import "env" "import2" (func $import2 (result i32))) (import "env" "import3" (func $import3 (param i32))) @@ -14,7 +14,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $calls-import (; 3 ;) (type $f) + (func $calls-import (; 3 ;) (local $0 i32) (local.set $0 (global.get $__asyncify_state) @@ -33,7 +33,7 @@ (nop) ) ) - (func $calls-import2-drop (; 4 ;) (type $f) + (func $calls-import2-drop (; 4 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -62,7 +62,7 @@ (nop) ) ) - (func $returns (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $returns (; 5 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -109,7 +109,7 @@ ) ) ) - (func $calls-indirect (; 6 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-indirect (; 6 ;) (param $x i32) (local $1 i32) (local $2 i32) (local.set $2 @@ -120,7 +120,7 @@ (local.get $x) ) (block - (call_indirect (type $f) + (call_indirect (type $none_=>_none) (local.get $1) ) (if diff --git a/test/passes/asyncify_pass-arg=asyncify-blacklist@foo,bar.txt b/test/passes/asyncify_pass-arg=asyncify-blacklist@foo,bar.txt index 2c7ad5fe0..f15153c45 100644 --- a/test/passes/asyncify_pass-arg=asyncify-blacklist@foo,bar.txt +++ b/test/passes/asyncify_pass-arg=asyncify-blacklist@foo,bar.txt @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (import "env" "import" (func $import)) (memory $0 1 2) (global $__asyncify_state (mut i32) (i32.const 0)) @@ -8,15 +9,15 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $foo (; 1 ;) (type $FUNCSIG$v) + (func $foo (; 1 ;) (call $import) (nop) ) - (func $bar (; 2 ;) (type $FUNCSIG$v) + (func $bar (; 2 ;) (call $import) (nop) ) - (func $baz (; 3 ;) (type $FUNCSIG$v) + (func $baz (; 3 ;) (local $0 i32) (local $1 i32) (if @@ -112,11 +113,11 @@ ) (nop) ) - (func $other1 (; 4 ;) (type $FUNCSIG$v) + (func $other1 (; 4 ;) (call $foo) (nop) ) - (func $other2 (; 5 ;) (type $FUNCSIG$v) + (func $other2 (; 5 ;) (local $0 i32) (local $1 i32) (if diff --git a/test/passes/asyncify_pass-arg=asyncify-ignore-imports.txt b/test/passes/asyncify_pass-arg=asyncify-ignore-imports.txt index 095d1b965..46f9730f4 100644 --- a/test/passes/asyncify_pass-arg=asyncify-ignore-imports.txt +++ b/test/passes/asyncify_pass-arg=asyncify-ignore-imports.txt @@ -1,7 +1,7 @@ (module - (type $f (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "import" (func $import)) (import "env" "import2" (func $import2 (result i32))) (import "env" "import3" (func $import3 (param i32))) @@ -14,11 +14,11 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $calls-import (; 3 ;) (type $f) + (func $calls-import (; 3 ;) (call $import) (nop) ) - (func $calls-import2-drop (; 4 ;) (type $f) + (func $calls-import2-drop (; 4 ;) (local $0 i32) (local.set $0 (call $import2) @@ -28,7 +28,7 @@ ) (nop) ) - (func $calls-import2-if-else (; 5 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-import2-if-else (; 5 ;) (param $x i32) (local $1 i32) (block (local.set $1 @@ -52,7 +52,7 @@ ) (nop) ) - (func $calls-indirect (; 6 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-indirect (; 6 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -141,7 +141,7 @@ ) ) (block - (call_indirect (type $f) + (call_indirect (type $none_=>_none) (local.get $1) ) (if diff --git a/test/passes/asyncify_pass-arg=asyncify-ignore-indirect.txt b/test/passes/asyncify_pass-arg=asyncify-ignore-indirect.txt index 37ab72120..b793820ac 100644 --- a/test/passes/asyncify_pass-arg=asyncify-ignore-indirect.txt +++ b/test/passes/asyncify_pass-arg=asyncify-ignore-indirect.txt @@ -1,7 +1,7 @@ (module - (type $f (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "import" (func $import)) (import "env" "import2" (func $import2 (result i32))) (import "env" "import3" (func $import3 (param i32))) @@ -14,7 +14,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $calls-import (; 3 ;) (type $f) + (func $calls-import (; 3 ;) (local $0 i32) (local $1 i32) (if @@ -110,7 +110,7 @@ ) (nop) ) - (func $calls-import2-drop (; 4 ;) (type $f) + (func $calls-import2-drop (; 4 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -260,7 +260,7 @@ ) ) ) - (func $calls-import2-if-else (; 5 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-import2-if-else (; 5 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -506,12 +506,12 @@ ) ) ) - (func $calls-indirect (; 6 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-indirect (; 6 ;) (param $x i32) (local $1 i32) (local.set $1 (local.get $x) ) - (call_indirect (type $f) + (call_indirect (type $none_=>_none) (local.get $1) ) (nop) diff --git a/test/passes/asyncify_pass-arg=asyncify-imports@env.import,env.import2.txt b/test/passes/asyncify_pass-arg=asyncify-imports@env.import,env.import2.txt index 96a6c7651..aa1efa769 100644 --- a/test/passes/asyncify_pass-arg=asyncify-imports@env.import,env.import2.txt +++ b/test/passes/asyncify_pass-arg=asyncify-imports@env.import,env.import2.txt @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (memory $0 1 2) (global $sleeping (mut i32) (i32.const 0)) (global $__asyncify_state (mut i32) (i32.const 0)) @@ -9,7 +9,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $do_sleep (; 0 ;) (type $FUNCSIG$v) + (func $do_sleep (; 0 ;) (local $0 i32) (local $1 i32) (block @@ -51,7 +51,7 @@ ) (nop) ) - (func $work (; 1 ;) (type $FUNCSIG$v) + (func $work (; 1 ;) (local $0 i32) (local $1 i32) (if @@ -173,10 +173,10 @@ ) (nop) ) - (func $stuff (; 2 ;) (type $FUNCSIG$v) + (func $stuff (; 2 ;) (nop) ) - (func $first_event (; 3 ;) (type $FUNCSIG$v) + (func $first_event (; 3 ;) (local $0 i32) (local $1 i32) (if @@ -272,7 +272,7 @@ ) (nop) ) - (func $second_event (; 4 ;) (type $FUNCSIG$v) + (func $second_event (; 4 ;) (block (call $asyncify_start_rewind (i32.const 4) @@ -283,7 +283,7 @@ ) (nop) ) - (func $never_sleep (; 5 ;) (type $FUNCSIG$v) + (func $never_sleep (; 5 ;) (block (call $stuff) (nop) @@ -366,10 +366,10 @@ ) ) (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "import" (func $import)) (import "env" "import2" (func $import2 (result i32))) (import "env" "import3" (func $import3 (param i32))) @@ -380,7 +380,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $calls-import (; 3 ;) (type $FUNCSIG$v) + (func $calls-import (; 3 ;) (local $0 i32) (local $1 i32) (if @@ -476,7 +476,7 @@ ) (nop) ) - (func $calls-import2 (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $calls-import2 (; 4 ;) (result i32) (local $temp i32) (local $1 i32) (local $2 i32) @@ -676,7 +676,7 @@ ) (i32.const 0) ) - (func $calls-import2-drop (; 5 ;) (type $FUNCSIG$v) + (func $calls-import2-drop (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -826,7 +826,7 @@ ) ) ) - (func $calls-nothing (; 6 ;) (type $FUNCSIG$v) + (func $calls-nothing (; 6 ;) (local $0 i32) (local.set $0 (i32.eqz @@ -838,7 +838,7 @@ ) (nop) ) - (func $many-locals (; 7 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $many-locals (; 7 ;) (param $x i32) (result i32) (local $y i32) (local $2 i32) (local $3 i32) @@ -1125,7 +1125,7 @@ ) (i32.const 0) ) - (func $calls-import2-if (; 8 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-import2-if (; 8 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1301,7 +1301,7 @@ ) ) ) - (func $calls-import2-if-else (; 9 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-import2-if-else (; 9 ;) (param $x i32) (local $1 i32) (block (local.set $1 @@ -1325,7 +1325,7 @@ ) (nop) ) - (func $calls-import2-if-else-oneside (; 10 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $calls-import2-if-else-oneside (; 10 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1351,7 +1351,7 @@ (i32.const 3) ) ) - (func $calls-import2-if-else-oneside2 (; 11 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $calls-import2-if-else-oneside2 (; 11 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1377,7 +1377,7 @@ (i32.const 3) ) ) - (func $calls-loop (; 12 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-loop (; 12 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1412,7 +1412,7 @@ ) (nop) ) - (func $calls-loop2 (; 13 ;) (type $FUNCSIG$v) + (func $calls-loop2 (; 13 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1571,7 +1571,7 @@ ) ) ) - (func $calls-mix (; 14 ;) (type $FUNCSIG$v) + (func $calls-mix (; 14 ;) (local $0 i32) (local $1 i32) (if @@ -1725,10 +1725,10 @@ ) (nop) ) - (func $boring (; 15 ;) (type $FUNCSIG$v) + (func $boring (; 15 ;) (nop) ) - (func $calls-mix-deep (; 16 ;) (type $FUNCSIG$v) + (func $calls-mix-deep (; 16 ;) (local $0 i32) (local $1 i32) (if @@ -1882,11 +1882,11 @@ ) (nop) ) - (func $boring-deep (; 17 ;) (type $FUNCSIG$v) + (func $boring-deep (; 17 ;) (call $boring) (nop) ) - (func $import-deep (; 18 ;) (type $FUNCSIG$v) + (func $import-deep (; 18 ;) (local $0 i32) (local $1 i32) (if diff --git a/test/passes/asyncify_pass-arg=asyncify-whitelist@foo,bar.txt b/test/passes/asyncify_pass-arg=asyncify-whitelist@foo,bar.txt index e69bc19a7..27f728dc7 100644 --- a/test/passes/asyncify_pass-arg=asyncify-whitelist@foo,bar.txt +++ b/test/passes/asyncify_pass-arg=asyncify-whitelist@foo,bar.txt @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (import "env" "import" (func $import)) (memory $0 1 2) (global $__asyncify_state (mut i32) (i32.const 0)) @@ -8,7 +9,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $foo (; 1 ;) (type $FUNCSIG$v) + (func $foo (; 1 ;) (local $0 i32) (local $1 i32) (if @@ -104,7 +105,7 @@ ) (nop) ) - (func $bar (; 2 ;) (type $FUNCSIG$v) + (func $bar (; 2 ;) (local $0 i32) (local $1 i32) (if @@ -200,15 +201,15 @@ ) (nop) ) - (func $baz (; 3 ;) (type $FUNCSIG$v) + (func $baz (; 3 ;) (call $import) (nop) ) - (func $other1 (; 4 ;) (type $FUNCSIG$v) + (func $other1 (; 4 ;) (call $foo) (nop) ) - (func $other2 (; 5 ;) (type $FUNCSIG$v) + (func $other2 (; 5 ;) (call $baz) (nop) ) diff --git a/test/passes/avoid-reinterprets.txt b/test/passes/avoid-reinterprets.txt index 33bd7e10e..b11d137f2 100644 --- a/test/passes/avoid-reinterprets.txt +++ b/test/passes/avoid-reinterprets.txt @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$f (func (result f32))) + (type $none_=>_none (func)) + (type $none_=>_f32 (func (result f32))) (memory $0 1) - (func $simple (; 0 ;) (type $FUNCSIG$v) + (func $simple (; 0 ;) (drop (f32.load (i32.const 1024) @@ -24,7 +24,7 @@ ) ) ) - (func $one (; 1 ;) (type $FUNCSIG$v) + (func $one (; 1 ;) (local $x i32) (local $1 i32) (local $2 f32) @@ -47,7 +47,7 @@ (local.get $2) ) ) - (func $one-b (; 2 ;) (type $FUNCSIG$v) + (func $one-b (; 2 ;) (local $x f32) (local $1 i32) (local $2 i32) @@ -70,7 +70,7 @@ (local.get $2) ) ) - (func $both (; 3 ;) (type $FUNCSIG$v) + (func $both (; 3 ;) (local $x i32) (local $1 i32) (local $2 f32) @@ -96,7 +96,7 @@ (local.get $2) ) ) - (func $half (; 4 ;) (type $FUNCSIG$v) + (func $half (; 4 ;) (local $x i32) (local $1 i32) (local $2 f32) @@ -122,7 +122,7 @@ (local.get $2) ) ) - (func $copy (; 5 ;) (type $FUNCSIG$v) + (func $copy (; 5 ;) (local $x i32) (local $y i32) (local $2 i32) @@ -149,14 +149,14 @@ (local.get $3) ) ) - (func $partial1 (; 6 ;) (type $FUNCSIG$f) (result f32) + (func $partial1 (; 6 ;) (result f32) (f32.reinterpret_i32 (i32.load16_u (i32.const 3) ) ) ) - (func $partial2 (; 7 ;) (type $FUNCSIG$f) (result f32) + (func $partial2 (; 7 ;) (result f32) (f32.reinterpret_i32 (i32.load8_u (i32.const 3) diff --git a/test/passes/coalesce-locals-learning.txt b/test/passes/coalesce-locals-learning.txt index d3640836c..ea6ce6d05 100644 --- a/test/passes/coalesce-locals-learning.txt +++ b/test/passes/coalesce-locals-learning.txt @@ -1,25 +1,25 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $2 (func)) - (type $3 (func (param i32 f32))) - (type $4 (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "_emscripten_autodebug_i32" (func $_emscripten_autodebug_i32 (param i32 i32) (result i32))) (memory $0 10) - (func $nothing-to-do (; 1 ;) (type $2) + (func $nothing-to-do (; 1 ;) (local $0 i32) (nop) ) - (func $merge (; 2 ;) (type $2) + (func $merge (; 2 ;) (local $0 i32) (nop) ) - (func $leave-type (; 3 ;) (type $2) + (func $leave-type (; 3 ;) (local $0 i32) (local $1 f32) (nop) ) - (func $leave-interfere (; 4 ;) (type $2) + (func $leave-interfere (; 4 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -35,7 +35,7 @@ (local.get $1) ) ) - (func $almost-interfere (; 5 ;) (type $2) + (func $almost-interfere (; 5 ;) (local $0 i32) (local.set $0 (i32.const 0) @@ -50,7 +50,7 @@ (local.get $0) ) ) - (func $redundant-copy (; 6 ;) (type $2) + (func $redundant-copy (; 6 ;) (local $0 i32) (local.set $0 (i32.const 0) @@ -60,7 +60,7 @@ (local.get $0) ) ) - (func $ineffective-store (; 7 ;) (type $2) + (func $ineffective-store (; 7 ;) (local $0 i32) (drop (i32.const 0) @@ -72,7 +72,7 @@ (local.get $0) ) ) - (func $block (; 8 ;) (type $2) + (func $block (; 8 ;) (local $0 i32) (block $block0 (local.set $0 @@ -83,7 +83,7 @@ (local.get $0) ) ) - (func $see-both-sides (; 9 ;) (type $2) + (func $see-both-sides (; 9 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -101,7 +101,7 @@ (local.get $1) ) ) - (func $see-br-and-ignore-dead (; 10 ;) (type $2) + (func $see-br-and-ignore-dead (; 10 ;) (local $0 i32) (local.set $0 (i32.const 0) @@ -122,7 +122,7 @@ (local.get $0) ) ) - (func $see-block-body (; 11 ;) (type $2) + (func $see-block-body (; 11 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -141,7 +141,7 @@ (local.get $0) ) ) - (func $zero-init (; 12 ;) (type $2) + (func $zero-init (; 12 ;) (local $0 i32) (local $1 i32) (drop @@ -151,7 +151,7 @@ (local.get $1) ) ) - (func $multi (; 13 ;) (type $2) + (func $multi (; 13 ;) (local $0 i32) (local $1 i32) (drop @@ -161,7 +161,7 @@ (local.get $1) ) ) - (func $if-else (; 14 ;) (type $2) + (func $if-else (; 14 ;) (local $0 i32) (local $1 i32) (if @@ -174,7 +174,7 @@ ) ) ) - (func $if-else-parallel (; 15 ;) (type $2) + (func $if-else-parallel (; 15 ;) (local $0 i32) (if (i32.const 0) @@ -196,7 +196,7 @@ ) ) ) - (func $if-else-after (; 16 ;) (type $2) + (func $if-else-after (; 16 ;) (local $0 i32) (local $1 i32) (if @@ -215,7 +215,7 @@ (local.get $1) ) ) - (func $if-else-through (; 17 ;) (type $2) + (func $if-else-through (; 17 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -240,7 +240,7 @@ (local.get $1) ) ) - (func $if-through (; 18 ;) (type $2) + (func $if-through (; 18 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -262,7 +262,7 @@ (local.get $1) ) ) - (func $if-through2 (; 19 ;) (type $2) + (func $if-through2 (; 19 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -281,7 +281,7 @@ (local.get $1) ) ) - (func $if-through3 (; 20 ;) (type $2) + (func $if-through3 (; 20 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -299,7 +299,7 @@ ) ) ) - (func $if2 (; 21 ;) (type $2) + (func $if2 (; 21 ;) (local $0 i32) (local $1 i32) (if @@ -316,7 +316,7 @@ ) ) ) - (func $if3 (; 22 ;) (type $2) + (func $if3 (; 22 ;) (local $0 i32) (local $1 i32) (if @@ -334,7 +334,7 @@ (local.get $1) ) ) - (func $if4 (; 23 ;) (type $2) + (func $if4 (; 23 ;) (local $0 i32) (if (i32.const 0) @@ -354,7 +354,7 @@ (local.get $0) ) ) - (func $if5 (; 24 ;) (type $2) + (func $if5 (; 24 ;) (local $0 i32) (local $1 i32) (if @@ -372,7 +372,7 @@ (local.get $1) ) ) - (func $loop (; 25 ;) (type $2) + (func $loop (; 25 ;) (local $0 i32) (local $1 i32) (block $out @@ -390,7 +390,7 @@ ) ) ) - (func $interfere-in-dead (; 26 ;) (type $2) + (func $interfere-in-dead (; 26 ;) (local $0 i32) (block $block (br $block) @@ -402,7 +402,7 @@ ) ) ) - (func $interfere-in-dead2 (; 27 ;) (type $2) + (func $interfere-in-dead2 (; 27 ;) (local $0 i32) (block $block (unreachable) @@ -414,7 +414,7 @@ ) ) ) - (func $interfere-in-dead3 (; 28 ;) (type $2) + (func $interfere-in-dead3 (; 28 ;) (local $0 i32) (block $block (return) @@ -426,7 +426,7 @@ ) ) ) - (func $params (; 29 ;) (type $3) (param $0 i32) (param $1 f32) + (func $params (; 29 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -440,7 +440,7 @@ (local.get $4) ) ) - (func $interfere-in-dead4 (; 30 ;) (type $2) + (func $interfere-in-dead4 (; 30 ;) (local $0 i32) (local $1 i32) (block $block @@ -455,7 +455,7 @@ ) ) ) - (func $switch (; 31 ;) (type $2) + (func $switch (; 31 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -481,7 +481,7 @@ (local.get $2) ) ) - (func $greedy-can-be-happy (; 32 ;) (type $2) + (func $greedy-can-be-happy (; 32 ;) (local $0 i32) (local $1 i32) (if @@ -584,7 +584,7 @@ ) ) ) - (func $greedy-can-be-sad (; 33 ;) (type $2) + (func $greedy-can-be-sad (; 33 ;) (local $0 i32) (local $1 i32) (if @@ -687,7 +687,7 @@ ) ) ) - (func $_memcpy (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_memcpy (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.ge_s @@ -847,7 +847,7 @@ (local.get $3) ) ) - (func $this-is-effective-i-tell-you (; 35 ;) (type $4) (param $0 i32) + (func $this-is-effective-i-tell-you (; 35 ;) (param $0 i32) (if (i32.const -1) (block $block1 diff --git a/test/passes/coalesce-locals.txt b/test/passes/coalesce-locals.txt index cb0d58fa8..8e8fb14be 100644 --- a/test/passes/coalesce-locals.txt +++ b/test/passes/coalesce-locals.txt @@ -1,32 +1,32 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $2 (func)) - (type $3 (func (param i32 f32))) - (type $4 (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$jdi (func (param f64 i32) (result i64))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$d (func (result f64))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $f64_i32_=>_i64 (func (param f64 i32) (result i64))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $none_=>_f64 (func (result f64))) (import "env" "_emscripten_autodebug_i32" (func $_emscripten_autodebug_i32 (param i32 i32) (result i32))) (import "env" "get" (func $get (result i32))) (import "env" "set" (func $set (param i32))) (memory $0 10) - (func $nothing-to-do (; 3 ;) (type $2) + (func $nothing-to-do (; 3 ;) (local $0 i32) (nop) ) - (func $merge (; 4 ;) (type $2) + (func $merge (; 4 ;) (local $0 i32) (nop) ) - (func $leave-type (; 5 ;) (type $2) + (func $leave-type (; 5 ;) (local $0 i32) (local $1 f32) (nop) ) - (func $leave-interfere (; 6 ;) (type $2) + (func $leave-interfere (; 6 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -42,7 +42,7 @@ (local.get $1) ) ) - (func $almost-interfere (; 7 ;) (type $2) + (func $almost-interfere (; 7 ;) (local $0 i32) (local.set $0 (i32.const 0) @@ -57,7 +57,7 @@ (local.get $0) ) ) - (func $redundant-copy (; 8 ;) (type $2) + (func $redundant-copy (; 8 ;) (local $0 i32) (local.set $0 (i32.const 0) @@ -67,7 +67,7 @@ (local.get $0) ) ) - (func $ineffective-store (; 9 ;) (type $2) + (func $ineffective-store (; 9 ;) (local $0 i32) (drop (i32.const 0) @@ -79,7 +79,7 @@ (local.get $0) ) ) - (func $block (; 10 ;) (type $2) + (func $block (; 10 ;) (local $0 i32) (block $block0 (local.set $0 @@ -90,7 +90,7 @@ (local.get $0) ) ) - (func $see-both-sides (; 11 ;) (type $2) + (func $see-both-sides (; 11 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -108,7 +108,7 @@ (local.get $1) ) ) - (func $see-br-and-ignore-dead (; 12 ;) (type $2) + (func $see-br-and-ignore-dead (; 12 ;) (local $0 i32) (local.set $0 (i32.const 0) @@ -129,7 +129,7 @@ (local.get $0) ) ) - (func $see-block-body (; 13 ;) (type $2) + (func $see-block-body (; 13 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -148,7 +148,7 @@ (local.get $0) ) ) - (func $zero-init (; 14 ;) (type $2) + (func $zero-init (; 14 ;) (local $0 i32) (local $1 i32) (drop @@ -158,7 +158,7 @@ (local.get $1) ) ) - (func $multi (; 15 ;) (type $2) + (func $multi (; 15 ;) (local $0 i32) (local $1 i32) (drop @@ -168,7 +168,7 @@ (local.get $1) ) ) - (func $if-else (; 16 ;) (type $2) + (func $if-else (; 16 ;) (local $0 i32) (local $1 i32) (if @@ -181,7 +181,7 @@ ) ) ) - (func $if-else-parallel (; 17 ;) (type $2) + (func $if-else-parallel (; 17 ;) (local $0 i32) (if (i32.const 0) @@ -203,7 +203,7 @@ ) ) ) - (func $if-else-after (; 18 ;) (type $2) + (func $if-else-after (; 18 ;) (local $0 i32) (local $1 i32) (if @@ -222,7 +222,7 @@ (local.get $1) ) ) - (func $if-else-through (; 19 ;) (type $2) + (func $if-else-through (; 19 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -247,7 +247,7 @@ (local.get $1) ) ) - (func $if-through (; 20 ;) (type $2) + (func $if-through (; 20 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -269,7 +269,7 @@ (local.get $1) ) ) - (func $if-through2 (; 21 ;) (type $2) + (func $if-through2 (; 21 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -288,7 +288,7 @@ (local.get $1) ) ) - (func $if-through3 (; 22 ;) (type $2) + (func $if-through3 (; 22 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -306,7 +306,7 @@ ) ) ) - (func $if2 (; 23 ;) (type $2) + (func $if2 (; 23 ;) (local $0 i32) (local $1 i32) (if @@ -323,7 +323,7 @@ ) ) ) - (func $if3 (; 24 ;) (type $2) + (func $if3 (; 24 ;) (local $0 i32) (local $1 i32) (if @@ -341,7 +341,7 @@ (local.get $1) ) ) - (func $if4 (; 25 ;) (type $2) + (func $if4 (; 25 ;) (local $0 i32) (if (i32.const 0) @@ -361,7 +361,7 @@ (local.get $0) ) ) - (func $if5 (; 26 ;) (type $2) + (func $if5 (; 26 ;) (local $0 i32) (local $1 i32) (if @@ -379,7 +379,7 @@ (local.get $1) ) ) - (func $loop (; 27 ;) (type $2) + (func $loop (; 27 ;) (local $0 i32) (local $1 i32) (loop $in @@ -395,7 +395,7 @@ (br $in) ) ) - (func $interfere-in-dead (; 28 ;) (type $2) + (func $interfere-in-dead (; 28 ;) (local $0 i32) (block $block (br $block) @@ -407,7 +407,7 @@ ) ) ) - (func $interfere-in-dead2 (; 29 ;) (type $2) + (func $interfere-in-dead2 (; 29 ;) (local $0 i32) (block $block (unreachable) @@ -419,7 +419,7 @@ ) ) ) - (func $interfere-in-dead3 (; 30 ;) (type $2) + (func $interfere-in-dead3 (; 30 ;) (local $0 i32) (block $block (return) @@ -431,7 +431,7 @@ ) ) ) - (func $params (; 31 ;) (type $3) (param $0 i32) (param $1 f32) + (func $params (; 31 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -445,7 +445,7 @@ (local.get $4) ) ) - (func $interfere-in-dead4 (; 32 ;) (type $2) + (func $interfere-in-dead4 (; 32 ;) (local $0 i32) (local $1 i32) (block $block @@ -460,7 +460,7 @@ ) ) ) - (func $switch (; 33 ;) (type $2) + (func $switch (; 33 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -486,7 +486,7 @@ (local.get $2) ) ) - (func $greedy-can-be-happy (; 34 ;) (type $2) + (func $greedy-can-be-happy (; 34 ;) (local $0 i32) (local $1 i32) (if @@ -589,7 +589,7 @@ ) ) ) - (func $greedy-can-be-sad (; 35 ;) (type $2) + (func $greedy-can-be-sad (; 35 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -693,7 +693,7 @@ ) ) ) - (func $_memcpy (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_memcpy (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.ge_s @@ -853,7 +853,7 @@ (local.get $3) ) ) - (func $this-is-effective-i-tell-you (; 37 ;) (type $4) (param $0 i32) + (func $this-is-effective-i-tell-you (; 37 ;) (param $0 i32) (if (i32.const -1) (block $block1 @@ -871,7 +871,7 @@ (local.get $0) ) ) - (func $prefer-remove-copies1 (; 38 ;) (type $2) + (func $prefer-remove-copies1 (; 38 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -888,7 +888,7 @@ (local.get $1) ) ) - (func $prefer-remove-copies2 (; 39 ;) (type $2) + (func $prefer-remove-copies2 (; 39 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -905,7 +905,7 @@ (local.get $0) ) ) - (func $in-unreachable (; 40 ;) (type $2) + (func $in-unreachable (; 40 ;) (local $0 i32) (block $x (return) @@ -958,7 +958,7 @@ ) ) ) - (func $nop-in-unreachable (; 41 ;) (type $2) + (func $nop-in-unreachable (; 41 ;) (local $0 i32) (block $block (unreachable) @@ -968,7 +968,7 @@ ) ) ) - (func $loop-backedge (; 42 ;) (type $2) + (func $loop-backedge (; 42 ;) (local $0 i32) (local $1 i32) (local.set $0 @@ -1005,7 +1005,7 @@ ) ) ) - (func $if-copy1 (; 43 ;) (type $2) + (func $if-copy1 (; 43 ;) (local $0 i32) (local $1 i32) (loop $top @@ -1025,7 +1025,7 @@ (br $top) ) ) - (func $if-copy2 (; 44 ;) (type $2) + (func $if-copy2 (; 44 ;) (local $0 i32) (local $1 i32) (loop $top @@ -1045,7 +1045,7 @@ (br $top) ) ) - (func $if-copy3 (; 45 ;) (type $2) + (func $if-copy3 (; 45 ;) (local $0 i32) (local $1 i32) (loop $top @@ -1065,7 +1065,7 @@ (br $top) ) ) - (func $if-copy4 (; 46 ;) (type $2) + (func $if-copy4 (; 46 ;) (local $0 i32) (local $1 i32) (loop $top @@ -1085,7 +1085,7 @@ (br $top) ) ) - (func $if-copy-tee (; 47 ;) (type $2) + (func $if-copy-tee (; 47 ;) (local $0 i32) (local $1 i32) (loop $top @@ -1107,7 +1107,7 @@ (br $top) ) ) - (func $tee_br (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $tee_br (; 48 ;) (param $0 i32) (result i32) (block $b (return (br $b) @@ -1115,7 +1115,7 @@ ) (i32.const 1) ) - (func $unused-tee-with-child-if-no-else (; 49 ;) (type $4) (param $0 i32) + (func $unused-tee-with-child-if-no-else (; 49 ;) (param $0 i32) (loop $label$0 (drop (if @@ -1125,7 +1125,7 @@ ) ) ) - (func $tee_if_with_unreachable_else (; 50 ;) (type $FUNCSIG$jdi) (param $0 f64) (param $1 i32) (result i64) + (func $tee_if_with_unreachable_else (; 50 ;) (param $0 f64) (param $1 i32) (result i64) (call $tee_if_with_unreachable_else (local.tee $0 (if (result f64) @@ -1140,7 +1140,7 @@ ) ) ) - (func $tee_if_with_unreachable_true (; 51 ;) (type $FUNCSIG$jdi) (param $0 f64) (param $1 i32) (result i64) + (func $tee_if_with_unreachable_true (; 51 ;) (param $0 f64) (param $1 i32) (result i64) (call $tee_if_with_unreachable_else (local.tee $0 (if (result f64) @@ -1155,7 +1155,7 @@ ) ) ) - (func $pick (; 52 ;) (type $2) + (func $pick (; 52 ;) (local $0 i32) (nop) (if @@ -1167,7 +1167,7 @@ (nop) (nop) ) - (func $pick-2 (; 53 ;) (type $2) + (func $pick-2 (; 53 ;) (local $0 i32) (nop) (if @@ -1179,7 +1179,7 @@ (nop) (nop) ) - (func $many (; 54 ;) (type $2) + (func $many (; 54 ;) (local $0 i32) (nop) (nop) @@ -1219,7 +1219,7 @@ ) (nop) ) - (func $loop-copies (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $loop-copies (; 55 ;) (param $0 i32) (param $1 i32) (loop $loop (local.set $0 (local.get $1) @@ -1232,7 +1232,7 @@ ) ) ) - (func $proper-type (; 56 ;) (type $FUNCSIG$d) (result f64) + (func $proper-type (; 56 ;) (result f64) (local $0 f64) (local $1 i32) (drop @@ -1244,7 +1244,7 @@ ) (local.get $0) ) - (func $reuse-param (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $reuse-param (; 57 ;) (param $0 i32) (param $1 i32) (result i32) (i32.add (local.tee $0 (i32.xor diff --git a/test/passes/code-folding_enable-threads.txt b/test/passes/code-folding_enable-threads.txt index e006bbd8b..c9abd2a45 100644 --- a/test/passes/code-folding_enable-threads.txt +++ b/test/passes/code-folding_enable-threads.txt @@ -1,16 +1,16 @@ (module - (type $13 (func (param f32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$f (func (result f32))) + (type $none_=>_none (func)) + (type $none_=>_f32 (func (result f32))) + (type $f32_=>_none (func (param f32))) (memory $0 1 1) (table $0 282 282 funcref) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (func $0 (; 0 ;) (block $label$1 (if (i32.const 1) (block (block $label$3 - (call_indirect (type $13) + (call_indirect (type $f32_=>_none) (block $label$4 (br $label$3) ) @@ -22,7 +22,7 @@ ) ) ) - (func $negative-zero (; 1 ;) (type $FUNCSIG$f) (result f32) + (func $negative-zero (; 1 ;) (result f32) (if (result f32) (i32.const 0) (block $label$0 (result f32) @@ -33,7 +33,7 @@ ) ) ) - (func $negative-zero-b (; 2 ;) (type $FUNCSIG$f) (result f32) + (func $negative-zero-b (; 2 ;) (result f32) (drop (i32.const 0) ) @@ -41,7 +41,7 @@ (f32.const -0) ) ) - (func $negative-zero-c (; 3 ;) (type $FUNCSIG$f) (result f32) + (func $negative-zero-c (; 3 ;) (result f32) (drop (i32.const 0) ) @@ -49,7 +49,7 @@ (f32.const 0) ) ) - (func $break-target-outside-of-return-merged-code (; 4 ;) (type $FUNCSIG$v) + (func $break-target-outside-of-return-merged-code (; 4 ;) (block $label$A (if (unreachable) @@ -80,7 +80,7 @@ ) ) ) - (func $break-target-inside-all-good (; 5 ;) (type $FUNCSIG$v) + (func $break-target-inside-all-good (; 5 ;) (block $folding-inner0 (block $label$A (if @@ -106,7 +106,7 @@ ) (return) ) - (func $leave-inner-block-type (; 6 ;) (type $FUNCSIG$v) + (func $leave-inner-block-type (; 6 ;) (block $label$1 (drop (block $label$2 @@ -124,10 +124,10 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 (shared 1 1)) (export "func_2224" (func $0)) - (func $0 (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $0 (; 0 ;) (result i32) (local $var$0 i32) (if (result i32) (i32.const 0) @@ -141,10 +141,10 @@ ) ) (module - (type $0 (func)) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (global $global$0 (mut i32) (i32.const 10)) - (func $determinism (; 0 ;) (type $0) + (func $determinism (; 0 ;) (block $folding-inner0 (block (block $label$1 @@ -182,7 +182,7 @@ ) (unreachable) ) - (func $careful-of-the-switch (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $careful-of-the-switch (; 1 ;) (param $0 i32) (block $label$1 (block $label$3 (block $label$5 diff --git a/test/passes/code-pushing_ignore-implicit-traps.txt b/test/passes/code-pushing_ignore-implicit-traps.txt index 966a4c0ed..2ca2ada09 100644 --- a/test/passes/code-pushing_ignore-implicit-traps.txt +++ b/test/passes/code-pushing_ignore-implicit-traps.txt @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (memory $0 1) - (func $push1 (; 0 ;) (type $FUNCSIG$v) + (func $push1 (; 0 ;) (local $x i32) (block $out (br_if $out @@ -16,7 +16,7 @@ ) ) ) - (func $push2 (; 1 ;) (type $FUNCSIG$v) + (func $push2 (; 1 ;) (local $x i32) (local $y i32) (block $out @@ -37,7 +37,7 @@ ) ) ) - (func $push1-twice (; 2 ;) (type $FUNCSIG$v) + (func $push1-twice (; 2 ;) (local $x i32) (block $out (br_if $out @@ -54,7 +54,7 @@ ) ) ) - (func $push1-twiceb (; 3 ;) (type $FUNCSIG$v) + (func $push1-twiceb (; 3 ;) (local $x i32) (block $out (br_if $out @@ -72,7 +72,7 @@ ) ) ) - (func $push2-twice (; 4 ;) (type $FUNCSIG$v) + (func $push2-twice (; 4 ;) (local $x i32) (local $y i32) (block $out @@ -96,7 +96,7 @@ ) ) ) - (func $ignore-last (; 5 ;) (type $FUNCSIG$v) + (func $ignore-last (; 5 ;) (local $x i32) (block $out (local.set $x @@ -107,7 +107,7 @@ ) ) ) - (func $ignore-last2 (; 6 ;) (type $FUNCSIG$v) + (func $ignore-last2 (; 6 ;) (local $x i32) (block $out (local.set $x @@ -120,7 +120,7 @@ ) ) ) - (func $push-if (; 7 ;) (type $FUNCSIG$v) + (func $push-if (; 7 ;) (local $x i32) (block $out (if @@ -135,7 +135,7 @@ ) ) ) - (func $push-dropped (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $push-dropped (; 8 ;) (result i32) (local $x i32) (block $out (result i32) (drop @@ -153,7 +153,7 @@ (i32.const 4) ) ) - (func $push-past-stuff (; 9 ;) (type $FUNCSIG$v) + (func $push-past-stuff (; 9 ;) (local $x i32) (block $out (call $push-past-stuff) @@ -171,7 +171,7 @@ ) ) ) - (func $fail-then-push (; 10 ;) (type $FUNCSIG$v) + (func $fail-then-push (; 10 ;) (local $x i32) (local $y i32) (block $out @@ -198,7 +198,7 @@ ) ) ) - (func $used (; 11 ;) (type $FUNCSIG$v) + (func $used (; 11 ;) (local $x i32) (block $out (local.set $x @@ -212,7 +212,7 @@ ) ) ) - (func $not-sfa (; 12 ;) (type $FUNCSIG$v) + (func $not-sfa (; 12 ;) (local $x i32) (local.set $x (i32.const 1) @@ -229,7 +229,7 @@ ) ) ) - (func $not-sfa2 (; 13 ;) (type $FUNCSIG$v) + (func $not-sfa2 (; 13 ;) (local $x i32) (drop (local.get $x) @@ -246,7 +246,7 @@ ) ) ) - (func $used-out (; 14 ;) (type $FUNCSIG$v) + (func $used-out (; 14 ;) (local $x i32) (block $out (local.set $x @@ -263,7 +263,7 @@ (local.get $x) ) ) - (func $value-might-interfere (; 15 ;) (type $FUNCSIG$v) + (func $value-might-interfere (; 15 ;) (local $x i32) (block $out (br_if $out @@ -279,7 +279,7 @@ ) ) ) - (func $value-interferes (; 16 ;) (type $FUNCSIG$v) + (func $value-interferes (; 16 ;) (local $x i32) (block $out (local.set $x @@ -299,7 +299,7 @@ ) ) ) - (func $value-interferes-accumulation (; 17 ;) (type $FUNCSIG$v) + (func $value-interferes-accumulation (; 17 ;) (local $x i32) (block $out (local.set $x @@ -321,7 +321,7 @@ ) ) ) - (func $value-interferes-in-pushpoint (; 18 ;) (type $FUNCSIG$v) + (func $value-interferes-in-pushpoint (; 18 ;) (local $x i32) (block $out (local.set $x @@ -338,7 +338,7 @@ ) ) ) - (func $values-might-interfere (; 19 ;) (type $FUNCSIG$v) + (func $values-might-interfere (; 19 ;) (local $x i32) (local $y i32) (block $out @@ -359,7 +359,7 @@ ) ) ) - (func $unpushed-interferes (; 20 ;) (type $FUNCSIG$v) + (func $unpushed-interferes (; 20 ;) (local $x i32) (local $y i32) (block $out @@ -383,7 +383,7 @@ (local.get $y) ) ) - (func $unpushed-ignorable (; 21 ;) (type $FUNCSIG$v) + (func $unpushed-ignorable (; 21 ;) (local $x i32) (local $y i32) (block $out @@ -407,7 +407,7 @@ (local.get $x) ) ) - (func $unpushed-ignorable-side-effect (; 22 ;) (type $FUNCSIG$v) + (func $unpushed-ignorable-side-effect (; 22 ;) (local $x i32) (local $y i32) (block $out @@ -428,7 +428,7 @@ ) ) ) - (func $unpushed-side-effect-into-drop (; 23 ;) (type $FUNCSIG$v) + (func $unpushed-side-effect-into-drop (; 23 ;) (local $x i32) (block $out (local.set $x @@ -442,7 +442,7 @@ ) ) ) - (func $unpushed-side-effect-into-if (; 24 ;) (type $FUNCSIG$v) + (func $unpushed-side-effect-into-if (; 24 ;) (local $x i32) (block $out (local.set $x diff --git a/test/passes/const-hoisting.txt b/test/passes/const-hoisting.txt index e6318acf3..1c5665d76 100644 --- a/test/passes/const-hoisting.txt +++ b/test/passes/const-hoisting.txt @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$v (func)) - (func $10-of-each (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $10-of-each (; 0 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -420,7 +420,7 @@ ) ) ) - (func $floats-10-times (; 1 ;) (type $FUNCSIG$v) + (func $floats-10-times (; 1 ;) (local $0 f32) (local $1 f64) (block @@ -494,7 +494,7 @@ ) ) ) - (func $too-few (; 2 ;) (type $FUNCSIG$v) + (func $too-few (; 2 ;) (drop (i32.const 8192) ) @@ -511,7 +511,7 @@ (i32.const 8192) ) ) - (func $just-enough (; 3 ;) (type $FUNCSIG$v) + (func $just-enough (; 3 ;) (local $0 i32) (block (local.set $0 @@ -539,7 +539,7 @@ ) ) ) - (func $too-few-b (; 4 ;) (type $FUNCSIG$v) + (func $too-few-b (; 4 ;) (drop (i32.const 1048576) ) @@ -550,7 +550,7 @@ (i32.const 1048576) ) ) - (func $enough-b (; 5 ;) (type $FUNCSIG$v) + (func $enough-b (; 5 ;) (local $0 i32) (block (local.set $0 @@ -572,7 +572,7 @@ ) ) ) - (func $too-few-c (; 6 ;) (type $FUNCSIG$v) + (func $too-few-c (; 6 ;) (drop (f32.const 0) ) @@ -583,7 +583,7 @@ (f32.const 0) ) ) - (func $enough-c (; 7 ;) (type $FUNCSIG$v) + (func $enough-c (; 7 ;) (local $0 f32) (block (local.set $0 @@ -605,12 +605,12 @@ ) ) ) - (func $too-few-d (; 8 ;) (type $FUNCSIG$v) + (func $too-few-d (; 8 ;) (drop (f64.const 0) ) ) - (func $enough-d (; 9 ;) (type $FUNCSIG$v) + (func $enough-d (; 9 ;) (local $0 f64) (block (local.set $0 diff --git a/test/passes/converge_O3_metrics.bin.txt b/test/passes/converge_O3_metrics.bin.txt index c8c1f8edb..c950acfac 100644 --- a/test/passes/converge_O3_metrics.bin.txt +++ b/test/passes/converge_O3_metrics.bin.txt @@ -24,11 +24,12 @@ total loop : 1 store : 5 (module - (type $0 (func (param i32 i32) (result i32))) - (type $1 (func (param i32 i32 i32) (result i32))) - (type $2 (func (param i32) (result i32))) - (type $6 (func (param i32 i32 i32 i32 i32 i32 i32) (result i32))) - (type $7 (func (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $1 256 256)) (data (i32.const 2948) "\03") (data (i32.const 6828) "\04") @@ -44,10 +45,10 @@ total (global $global$0 (mut i32) (i32.const 1)) (export "_main" (func $_main)) (export "_malloc" (func $_malloc)) - (func $b0 (; 1 ;) (; has Stack IR ;) (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (result i32) + (func $b0 (; 1 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (result i32) (i32.const 0) ) - (func $_malloc (; 2 ;) (; has Stack IR ;) (type $2) (param $0 i32) (result i32) + (func $_malloc (; 2 ;) (; has Stack IR ;) (param $0 i32) (result i32) (i32.const 0) ) (func $___stdio_write (; 3 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) @@ -81,7 +82,7 @@ total ) (i32.const 1) ) - (func $_main (; 4 ;) (; has Stack IR ;) (type $7) (result i32) + (func $_main (; 4 ;) (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) (local.set $1 @@ -125,7 +126,7 @@ total ) (block $label$2 (br_if $label$2 - (call_indirect (type $1) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 10888) (local.get $0) @@ -144,7 +145,7 @@ total (call $__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE3putEc) (i32.const 0) ) - (func $___stdout_write (; 5 ;) (; has Stack IR ;) (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $___stdout_write (; 5 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (global.set $global$0 (i32.const 32) ) @@ -182,7 +183,7 @@ total ) ) (i32.const 0) - (call_indirect (type $0) + (call_indirect (type $i32_i32_=>_i32) (local.get $1) (i32.const 10) (i32.add @@ -198,13 +199,13 @@ total ) ) ) - (func $__ZNSt3__211__stdoutbufIcE8overflowEi (; 7 ;) (; has Stack IR ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $__ZNSt3__211__stdoutbufIcE8overflowEi (; 7 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) (i32.store8 (i32.const 0) (local.get $1) ) (drop - (call_indirect (type $1) + (call_indirect (type $i32_i32_i32_=>_i32) (i32.const 0) (i32.const 0) (i32.const 1) @@ -223,9 +224,9 @@ total ) (i32.const 0) ) - (func $__ZNSt3__211__stdoutbufIcE6xsputnEPKci (; 8 ;) (; has Stack IR ;) (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $__ZNSt3__211__stdoutbufIcE6xsputnEPKci (; 8 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop - (call_indirect (type $1) + (call_indirect (type $i32_i32_i32_=>_i32) (i32.const 0) (local.get $1) (local.get $2) @@ -268,11 +269,12 @@ total loop : 1 store : 5 (module - (type $0 (func (param i32 i32) (result i32))) - (type $1 (func (param i32 i32 i32) (result i32))) - (type $2 (func (param i32) (result i32))) - (type $6 (func (param i32 i32 i32 i32 i32 i32 i32) (result i32))) - (type $7 (func (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $1 256 256)) (data (i32.const 2948) "\03") (data (i32.const 6828) "\04") @@ -288,10 +290,10 @@ total (global $global$0 (mut i32) (i32.const 1)) (export "_main" (func $_main)) (export "_malloc" (func $_malloc)) - (func $b0 (; 1 ;) (; has Stack IR ;) (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (result i32) + (func $b0 (; 1 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (result i32) (i32.const 0) ) - (func $_malloc (; 2 ;) (; has Stack IR ;) (type $2) (param $0 i32) (result i32) + (func $_malloc (; 2 ;) (; has Stack IR ;) (param $0 i32) (result i32) (i32.const 0) ) (func $___stdio_write (; 3 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) @@ -325,7 +327,7 @@ total ) (i32.const 1) ) - (func $_main (; 4 ;) (; has Stack IR ;) (type $7) (result i32) + (func $_main (; 4 ;) (; has Stack IR ;) (result i32) (local $0 i32) (local $1 i32) (local.set $1 @@ -369,7 +371,7 @@ total ) (block $label$2 (br_if $label$2 - (call_indirect (type $1) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (i32.const 10888) (local.get $0) @@ -388,7 +390,7 @@ total (call $__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE3putEc) (i32.const 0) ) - (func $___stdout_write (; 5 ;) (; has Stack IR ;) (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $___stdout_write (; 5 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (global.set $global$0 (i32.const 32) ) @@ -426,7 +428,7 @@ total ) ) (i32.const 0) - (call_indirect (type $0) + (call_indirect (type $i32_i32_=>_i32) (local.get $1) (i32.const 10) (i32.add @@ -442,13 +444,13 @@ total ) ) ) - (func $__ZNSt3__211__stdoutbufIcE8overflowEi (; 7 ;) (; has Stack IR ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $__ZNSt3__211__stdoutbufIcE8overflowEi (; 7 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) (i32.store8 (i32.const 0) (local.get $1) ) (drop - (call_indirect (type $1) + (call_indirect (type $i32_i32_i32_=>_i32) (i32.const 0) (i32.const 0) (i32.const 1) @@ -467,9 +469,9 @@ total ) (i32.const 0) ) - (func $__ZNSt3__211__stdoutbufIcE6xsputnEPKci (; 8 ;) (; has Stack IR ;) (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $__ZNSt3__211__stdoutbufIcE6xsputnEPKci (; 8 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop - (call_indirect (type $1) + (call_indirect (type $i32_i32_i32_=>_i32) (i32.const 0) (local.get $1) (local.get $2) diff --git a/test/passes/dae-optimizing.txt b/test/passes/dae-optimizing.txt index ddc82d7f3..e20cb2d1c 100644 --- a/test/passes/dae-optimizing.txt +++ b/test/passes/dae-optimizing.txt @@ -1,7 +1,7 @@ (module - (type $0 (func (param f32) (result f32))) - (type $1 (func (param f64 f32 f32 f64 f32 i64 f64) (result i32))) - (type $2 (func (param f64 f32 f32 f64 f32 i32 i32 f64) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $f64_f32_f32_f64_f32_i32_i32_f64_=>_i32 (func (param f64 f32 f32 f64 f32 i32 i32 f64) (result i32))) + (type $none_=>_f32 (func (result f32))) (global $global$0 (mut i32) (i32.const 10)) (func $0 (; 0 ;) (result i32) (local $0 i32) @@ -37,7 +37,7 @@ (func $1 (; 1 ;) (result f32) (f32.const 0) ) - (func $2 (; 2 ;) (type $2) (param $0 f64) (param $1 f32) (param $2 f32) (param $3 f64) (param $4 f32) (param $5 i32) (param $6 i32) (param $7 f64) (result i32) + (func $2 (; 2 ;) (param $0 f64) (param $1 f32) (param $2 f32) (param $3 f64) (param $4 f32) (param $5 i32) (param $6 i32) (param $7 f64) (result i32) (call $0) ) ) diff --git a/test/passes/dae_enable-tail-call.txt b/test/passes/dae_enable-tail-call.txt index 1854f8a33..19722c9de 100644 --- a/test/passes/dae_enable-tail-call.txt +++ b/test/passes/dae_enable-tail-call.txt @@ -1,9 +1,8 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vid (func (param i32 f64))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $f64_=>_none (func (param f64))) (table $0 2 2 funcref) (elem (i32.const 0) $a9 $c8) (export "a8" (func $a8)) @@ -14,7 +13,7 @@ ) (nop) ) - (func $b (; 1 ;) (type $FUNCSIG$v) + (func $b (; 1 ;) (call $a) ) (func $a1 (; 2 ;) @@ -24,23 +23,23 @@ ) (unreachable) ) - (func $b1 (; 3 ;) (type $FUNCSIG$v) + (func $b1 (; 3 ;) (call $a1) ) - (func $b11 (; 4 ;) (type $FUNCSIG$v) + (func $b11 (; 4 ;) (call $a1) ) - (func $a2 (; 5 ;) (type $FUNCSIG$vi) (param $x i32) + (func $a2 (; 5 ;) (param $x i32) (drop (local.get $x) ) ) - (func $b2 (; 6 ;) (type $FUNCSIG$v) + (func $b2 (; 6 ;) (call $a2 (i32.const 3) ) ) - (func $b22 (; 7 ;) (type $FUNCSIG$v) + (func $b22 (; 7 ;) (call $a2 (i32.const 4) ) @@ -51,21 +50,21 @@ (i32.const -1) ) ) - (func $b3 (; 9 ;) (type $FUNCSIG$v) + (func $b3 (; 9 ;) (call $a3) ) - (func $b33 (; 10 ;) (type $FUNCSIG$v) + (func $b33 (; 10 ;) (call $a3) ) - (func $a4 (; 11 ;) (type $FUNCSIG$vi) (param $x i32) + (func $a4 (; 11 ;) (param $x i32) (nop) ) - (func $b4 (; 12 ;) (type $FUNCSIG$v) + (func $b4 (; 12 ;) (call $a4 (unreachable) ) ) - (func $b43 (; 13 ;) (type $FUNCSIG$v) + (func $b43 (; 13 ;) (call $a4 (i32.const 4) ) @@ -90,7 +89,7 @@ ) ) ) - (func $b5 (; 15 ;) (type $FUNCSIG$v) + (func $b5 (; 15 ;) (call $a5) ) (func $a6 (; 16 ;) (param $0 i32) @@ -107,7 +106,7 @@ ) ) ) - (func $b6 (; 17 ;) (type $FUNCSIG$v) + (func $b6 (; 17 ;) (call $a6 (unreachable) ) @@ -126,23 +125,23 @@ ) ) ) - (func $b7 (; 19 ;) (type $FUNCSIG$v) + (func $b7 (; 19 ;) (call $a7 (unreachable) ) ) - (func $a8 (; 20 ;) (type $FUNCSIG$vi) (param $x i32) + (func $a8 (; 20 ;) (param $x i32) (nop) ) - (func $b8 (; 21 ;) (type $FUNCSIG$v) + (func $b8 (; 21 ;) (call $a8 (i32.const 1) ) ) - (func $a9 (; 22 ;) (type $FUNCSIG$vi) (param $x i32) + (func $a9 (; 22 ;) (param $x i32) (nop) ) - (func $b9 (; 23 ;) (type $FUNCSIG$v) + (func $b9 (; 23 ;) (call $a9 (i32.const 1) ) @@ -162,7 +161,7 @@ (call $a11) (call $a11) ) - (func $a12 (; 26 ;) (type $FUNCSIG$vi) (param $x i32) + (func $a12 (; 26 ;) (param $x i32) (drop (local.get $x) ) @@ -173,7 +172,7 @@ (i32.const 2) ) ) - (func $c1 (; 27 ;) (type $FUNCSIG$v) + (func $c1 (; 27 ;) (local $x i32) (call $c2) (call $c3) @@ -203,7 +202,7 @@ (i32.const 2) ) ) - (func $c4 (; 30 ;) (type $FUNCSIG$i) (result i32) + (func $c4 (; 30 ;) (result i32) (i32.const 3) ) (func $c5 (; 31 ;) (param $x i32) @@ -220,15 +219,14 @@ ) (return) ) - (func $c8 (; 34 ;) (type $FUNCSIG$i) (result i32) + (func $c8 (; 34 ;) (result i32) (i32.const 5) ) ) (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) (export "a" (func $0)) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (func $0 (; 0 ;) (call $b) ) (func $b (; 1 ;) @@ -244,8 +242,9 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (func $foo (; 0 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (func $foo (; 0 ;) (param $x i32) (result i32) (drop (return_call $bar) ) @@ -260,9 +259,8 @@ ) ) (module - (type $T (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) (table $0 1 1 funcref) (func $foo (; 0 ;) (result i32) (local $0 i32) @@ -270,12 +268,12 @@ (i32.const 42) ) (drop - (return_call_indirect (type $T) + (return_call_indirect (type $none_=>_i32) (i32.const 0) ) ) ) - (func $bar (; 1 ;) (type $FUNCSIG$v) + (func $bar (; 1 ;) (drop (call $foo) ) diff --git a/test/passes/dce_all-features.txt b/test/passes/dce_all-features.txt index 109f759c2..4081ed98e 100644 --- a/test/passes/dce_all-features.txt +++ b/test/passes/dce_all-features.txt @@ -1,19 +1,19 @@ (module - (type $ii (func (param i32 i32))) - (type $1 (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$jjj (func (param i64 i64) (result i64))) - (type $FUNCSIG$vfj (func (param f32 i64))) - (type $FUNCSIG$ifj (func (param f32 i64) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $f32_i64_=>_none (func (param f32 i64))) + (type $f32_i64_=>_i32 (func (param f32 i64) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (memory $0 10) (table $0 1 1 funcref) (elem (i32.const 0) $call-me) (global $x (mut i32) (i32.const 0)) - (func $call-me (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $call-me (; 0 ;) (param $0 i32) (param $1 i32) (nop) ) - (func $code-to-kill (; 1 ;) (type $1) + (func $code-to-kill (; 1 ;) (local $x i32) (block $out (br $out) @@ -264,20 +264,20 @@ (i32.const 1337) ) ) - (func $killer (; 2 ;) (type $1) + (func $killer (; 2 ;) (unreachable) ) - (func $target (; 3 ;) (type $1) + (func $target (; 3 ;) (drop (i32.const 2000) ) ) - (func $typed-block-none-then-unreachable (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $typed-block-none-then-unreachable (; 4 ;) (result i32) (return (i32.const 0) ) ) - (func $typed-block-remove-br-changes-type (; 5 ;) (type $FUNCSIG$ii) (param $$$0 i32) (result i32) + (func $typed-block-remove-br-changes-type (; 5 ;) (param $$$0 i32) (result i32) (block $switch$7 (block $switch-default$10 (block $switch-case$9 @@ -296,46 +296,46 @@ ) ) ) - (func $global (; 6 ;) (type $1) + (func $global (; 6 ;) (unreachable) ) - (func $ret (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $ret (; 7 ;) (result i32) (return (i32.const 0) ) ) - (func $unreachable-br (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $unreachable-br (; 8 ;) (result i32) (block $out (result i32) (br $out (i32.const 0) ) ) ) - (func $unreachable-br-loop (; 9 ;) (type $FUNCSIG$i) (result i32) + (func $unreachable-br-loop (; 9 ;) (result i32) (loop $out (br $out) ) ) - (func $unreachable-block-ends-switch (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $unreachable-block-ends-switch (; 10 ;) (result i32) (block $label$3 (nop) (unreachable) ) ) - (func $unreachable-block-ends-br_if (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $unreachable-block-ends-br_if (; 11 ;) (result i32) (block $label$2 (nop) (unreachable) ) ) - (func $unreachable-brs-3 (; 12 ;) (type $FUNCSIG$i) (result i32) + (func $unreachable-brs-3 (; 12 ;) (result i32) (block $label$0 (result i32) (br $label$0 (i32.const 18) ) ) ) - (func $unreachable-brs-4 (; 13 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $unreachable-brs-4 (; 13 ;) (param $var$0 i32) (result i32) (drop (i32.const 1) ) @@ -346,7 +346,7 @@ (unreachable) ) ) - (func $call-unreach (; 14 ;) (type $FUNCSIG$jjj) (param $var$0 i64) (param $var$1 i64) (result i64) + (func $call-unreach (; 14 ;) (param $var$0 i64) (param $var$1 i64) (result i64) (local $2 i64) (if (result i64) (i64.eqz @@ -377,13 +377,13 @@ ) ) ) - (func $br-gone-means-block-type-changes-then-refinalize-at-end-is-too-late (; 15 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $br-gone-means-block-type-changes-then-refinalize-at-end-is-too-late (; 15 ;) (param $var$0 i32) (result i32) (block $block (nop) (unreachable) ) ) - (func $br-with-unreachable-value-should-not-give-a-block-a-value (; 16 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $br-with-unreachable-value-should-not-give-a-block-a-value (; 16 ;) (param $var$0 i32) (result i32) (block $label$0 (result i32) (block $block (drop @@ -396,39 +396,39 @@ ) ) ) - (func $replace-br-value-of-i32-with-unreachable (; 17 ;) (type $FUNCSIG$i) (result i32) + (func $replace-br-value-of-i32-with-unreachable (; 17 ;) (result i32) (block $label$1 (nop) (unreachable) ) ) - (func $shorten-block-requires-sync-refinalize (; 18 ;) (type $ii) (param $var$0 i32) (param $var$1 i32) + (func $shorten-block-requires-sync-refinalize (; 18 ;) (param $var$0 i32) (param $var$1 i32) (unreachable) ) - (func $block-with-type-but-is-unreachable (; 19 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $block-with-type-but-is-unreachable (; 19 ;) (param $var$0 i32) (result i32) (block $block (nop) (unreachable) ) ) - (func $if-with-type-but-is-unreachable (; 20 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $if-with-type-but-is-unreachable (; 20 ;) (param $var$0 i32) (result i32) (if (local.get $var$0) (unreachable) (unreachable) ) ) - (func $unreachable-loop (; 21 ;) (type $1) + (func $unreachable-loop (; 21 ;) (unreachable) ) - (func $br-block-from-unary (; 22 ;) (type $FUNCSIG$i) (result i32) + (func $br-block-from-unary (; 22 ;) (result i32) (block $label$6 (result i32) (br $label$6 (i32.const 8) ) ) ) - (func $replace-unary-with-br-child (; 23 ;) (type $1) + (func $replace-unary-with-br-child (; 23 ;) (drop (block $label$6 (result i32) (br $label$6 @@ -437,13 +437,13 @@ ) ) ) - (func $br_if-unreach-then-br_if-normal (; 24 ;) (type $1) + (func $br_if-unreach-then-br_if-normal (; 24 ;) (block $out (nop) (unreachable) ) ) - (func $replace-with-unreachable-affects-parent (; 25 ;) (type $FUNCSIG$vfj) (param $var$0 f32) (param $var$1 i64) + (func $replace-with-unreachable-affects-parent (; 25 ;) (param $var$0 f32) (param $var$1 i64) (drop (i64.const 0) ) @@ -459,7 +459,7 @@ (unreachable) ) ) - (func $replace-block-changes-later-when-if-goes (; 26 ;) (type $1) + (func $replace-block-changes-later-when-if-goes (; 26 ;) (block $top (global.set $x (i32.const 0) @@ -475,14 +475,14 @@ ) ) ) - (func $helper (; 27 ;) (type $FUNCSIG$ifj) (param $var$0 f32) (param $var$1 i64) (result i32) + (func $helper (; 27 ;) (param $var$0 f32) (param $var$1 i64) (result i32) (i32.const 0) ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (global $global (mut f64) (f64.const 0)) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (func $0 (; 0 ;) (if (i32.const 0) (unreachable) @@ -491,8 +491,8 @@ ) ) (module - (type $FUNCSIG$v (func)) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $0 (; 0 ;) (local $local f64) (if (i32.const 0) @@ -502,11 +502,11 @@ ) ) (module - (type $FUNCSIG$v (func)) - (func $foo (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $foo (; 0 ;) (nop) ) - (func $try_unreachable (; 1 ;) (type $FUNCSIG$v) + (func $try_unreachable (; 1 ;) (try (unreachable) (catch @@ -514,7 +514,7 @@ ) (call $foo) ) - (func $catch_unreachable (; 2 ;) (type $FUNCSIG$v) + (func $catch_unreachable (; 2 ;) (try (nop) (catch @@ -523,7 +523,7 @@ ) (call $foo) ) - (func $both_unreachable (; 3 ;) (type $FUNCSIG$v) + (func $both_unreachable (; 3 ;) (try (unreachable) (catch @@ -533,11 +533,11 @@ ) ) (module - (type $FUNCSIG$v (func)) - (func $foo (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $foo (; 0 ;) (nop) ) - (func $push_unreachable (; 1 ;) (type $FUNCSIG$v) + (func $push_unreachable (; 1 ;) (push (unreachable) ) diff --git a/test/passes/dce_vacuum.bin.txt b/test/passes/dce_vacuum.bin.txt index fbb38f408..8a7f18688 100644 --- a/test/passes/dce_vacuum.bin.txt +++ b/test/passes/dce_vacuum.bin.txt @@ -1,9 +1,9 @@ (module - (type $0 (func (param f32 f32) (result f32))) - (type $1 (func (param f64 f64) (result f64))) + (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (export "f32.compute_radix" (func $0)) (export "f64.compute_radix" (func $1)) - (func $0 (; 0 ;) (type $0) (param $0 f32) (param $1 f32) (result f32) + (func $0 (; 0 ;) (param $0 f32) (param $1 f32) (result f32) (block $label$1 (loop $label$2 (br_if $label$2 @@ -46,7 +46,7 @@ ) ) ) - (func $1 (; 1 ;) (type $1) (param $0 f64) (param $1 f64) (result f64) + (func $1 (; 1 ;) (param $0 f64) (param $1 f64) (result f64) (block $label$1 (result f64) (loop $label$2 (br_if $label$2 diff --git a/test/passes/dce_vacuum.txt b/test/passes/dce_vacuum.txt index 43fca1d4f..13fe8d613 100644 --- a/test/passes/dce_vacuum.txt +++ b/test/passes/dce_vacuum.txt @@ -1,16 +1,16 @@ (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$fff (func (param f32 f32) (result f32))) - (type $FUNCSIG$jj (func (param i64) (result i64))) - (func $__Z12serveroptionPc (; 0 ;) (type $FUNCSIG$i) (result i32) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) + (func $__Z12serveroptionPc (; 0 ;) (result i32) (return (i32.const 0) ) ) - (func $drop-unreachable (; 1 ;) (type $FUNCSIG$fff) (param $var$0 f32) (param $var$1 f32) (result f32) + (func $drop-unreachable (; 1 ;) (param $var$0 f32) (param $var$1 f32) (result f32) (unreachable) ) - (func $set-unreachable (; 2 ;) (type $FUNCSIG$jj) (param $var$0 i64) (result i64) + (func $set-unreachable (; 2 ;) (param $var$0 i64) (result i64) (local $var$1 i64) (local $var$2 i64) (if diff --git a/test/passes/directize_enable-tail-call.txt b/test/passes/directize_enable-tail-call.txt index 2a74aff68..6373d118c 100644 --- a/test/passes/directize_enable-tail-call.txt +++ b/test/passes/directize_enable-tail-call.txt @@ -1,11 +1,11 @@ (module - (type $ii (func (param i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (table $0 5 5 funcref) (elem (i32.const 1) $foo) - (func $foo (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (unreachable) ) - (func $bar (; 1 ;) (type $ii) (param $x i32) (param $y i32) + (func $bar (; 1 ;) (param $x i32) (param $y i32) (call $foo (local.get $x) (local.get $y) @@ -13,13 +13,13 @@ ) ) (module - (type $ii (func (param i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (table $0 5 5 funcref) (elem (i32.const 4) $foo) - (func $foo (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (unreachable) ) - (func $bar (; 1 ;) (type $ii) (param $x i32) (param $y i32) + (func $bar (; 1 ;) (param $x i32) (param $y i32) (call $foo (local.get $x) (local.get $y) @@ -27,13 +27,13 @@ ) ) (module - (type $ii (func (param i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (table $0 5 5 funcref) (elem (i32.const 0) $foo) - (func $foo (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (unreachable) ) - (func $bar (; 1 ;) (type $ii) (param $x i32) (param $y i32) + (func $bar (; 1 ;) (param $x i32) (param $y i32) (call $foo (local.get $x) (local.get $y) @@ -41,13 +41,13 @@ ) ) (module - (type $ii (func (param i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (table $0 5 5 funcref) (elem (i32.const 0) $foo $foo $foo $foo $foo) - (func $foo (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (unreachable) ) - (func $bar (; 1 ;) (type $ii) (param $x i32) (param $y i32) + (func $bar (; 1 ;) (param $x i32) (param $y i32) (call $foo (local.get $x) (local.get $y) @@ -55,14 +55,14 @@ ) ) (module - (type $ii (func (param i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (import "env" "table" (table $0 5 5 funcref)) (elem (i32.const 1) $foo) - (func $foo (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (unreachable) ) - (func $bar (; 1 ;) (type $ii) (param $x i32) (param $y i32) - (call_indirect (type $ii) + (func $bar (; 1 ;) (param $x i32) (param $y i32) + (call_indirect (type $i32_i32_=>_none) (local.get $x) (local.get $y) (i32.const 1) @@ -70,15 +70,15 @@ ) ) (module - (type $ii (func (param i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (table $0 5 5 funcref) (elem (i32.const 1) $foo) (export "tab" (table $0)) - (func $foo (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (unreachable) ) - (func $bar (; 1 ;) (type $ii) (param $x i32) (param $y i32) - (call_indirect (type $ii) + (func $bar (; 1 ;) (param $x i32) (param $y i32) + (call_indirect (type $i32_i32_=>_none) (local.get $x) (local.get $y) (i32.const 1) @@ -86,15 +86,15 @@ ) ) (module - (type $ii (func (param i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (table $0 5 5 funcref) (elem (global.get $g) $foo) (global $g (mut i32) (i32.const 1)) - (func $foo (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (unreachable) ) - (func $bar (; 1 ;) (type $ii) (param $x i32) (param $y i32) - (call_indirect (type $ii) + (func $bar (; 1 ;) (param $x i32) (param $y i32) + (call_indirect (type $i32_i32_=>_none) (local.get $x) (local.get $y) (i32.const 1) @@ -102,15 +102,15 @@ ) ) (module - (type $ii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (table $0 5 5 funcref) (elem (i32.const 1) $foo) - (func $foo (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (unreachable) ) - (func $bar (; 1 ;) (type $FUNCSIG$viii) (param $x i32) (param $y i32) (param $z i32) - (call_indirect (type $ii) + (func $bar (; 1 ;) (param $x i32) (param $y i32) (param $z i32) + (call_indirect (type $i32_i32_=>_none) (local.get $x) (local.get $y) (local.get $z) @@ -118,13 +118,13 @@ ) ) (module - (type $ii (func (param i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (table $0 5 5 funcref) (elem (i32.const 1) $foo) - (func $foo (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (unreachable) ) - (func $bar (; 1 ;) (type $ii) (param $x i32) (param $y i32) + (func $bar (; 1 ;) (param $x i32) (param $y i32) (block (drop (local.get $x) @@ -137,13 +137,13 @@ ) ) (module - (type $ii (func (param i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (table $0 5 5 funcref) (elem (i32.const 1) $foo) - (func $foo (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (unreachable) ) - (func $bar (; 1 ;) (type $ii) (param $x i32) (param $y i32) + (func $bar (; 1 ;) (param $x i32) (param $y i32) (block (drop (local.get $x) @@ -156,14 +156,14 @@ ) ) (module - (type $ii (func (param i32 i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (table $0 5 5 funcref) (elem (i32.const 1) $foo) - (func $foo (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $foo (; 0 ;) (param $0 i32) (unreachable) ) - (func $bar (; 1 ;) (type $ii) (param $x i32) (param $y i32) + (func $bar (; 1 ;) (param $x i32) (param $y i32) (block (drop (local.get $x) @@ -176,15 +176,15 @@ ) ) (module - (type $FUNCSIG$vi (func (param i32))) - (func $foo (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) + (type $i32_=>_none (func (param i32))) + (func $foo (; 0 ;) (param $0 i32) (unreachable) ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (table $0 8 8 funcref) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (func $0 (; 0 ;) (block $block (nop) (block @@ -196,13 +196,13 @@ ) ) (module - (type $ii (func (param i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (table $0 5 5 funcref) (elem (i32.const 1) $foo) - (func $foo (; 0 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $foo (; 0 ;) (param $0 i32) (param $1 i32) (unreachable) ) - (func $bar (; 1 ;) (type $ii) (param $x i32) (param $y i32) + (func $bar (; 1 ;) (param $x i32) (param $y i32) (return_call $foo (local.get $x) (local.get $y) diff --git a/test/passes/directize_enable-tail-call.wast b/test/passes/directize_enable-tail-call.wast index e111cf615..adebca6b6 100644 --- a/test/passes/directize_enable-tail-call.wast +++ b/test/passes/directize_enable-tail-call.wast @@ -181,6 +181,7 @@ ) ;; change types (module + (type (func)) (table $0 8 8 funcref) (func $0 (block ;; the type of this block will change diff --git a/test/passes/duplicate-function-elimination_optimize-level=1.txt b/test/passes/duplicate-function-elimination_optimize-level=1.txt index baebf9ea8..48547bbcf 100644 --- a/test/passes/duplicate-function-elimination_optimize-level=1.txt +++ b/test/passes/duplicate-function-elimination_optimize-level=1.txt @@ -1,176 +1,172 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (nop) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (nop) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (i32.const 0) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.const 1) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) (table $0 3 3 funcref) (elem (i32.const 0) $keep2 $keep2 $caller) (export "keep2" (func $keep2)) (export "other" (func $keep2)) (start $keep2) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (nop) ) - (func $caller (; 1 ;) (type $0) + (func $caller (; 1 ;) (call $keep2) (call $keep2) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2-after-two-passes (; 0 ;) (type $0) + (func $keep2-after-two-passes (; 0 ;) (nop) ) - (func $keep-caller (; 1 ;) (type $0) + (func $keep-caller (; 1 ;) (call $keep2-after-two-passes) ) - (func $other-caller (; 2 ;) (type $0) + (func $other-caller (; 2 ;) (call $keep2-after-two-passes) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep-4 (; 0 ;) (type $0) + (func $keep-4 (; 0 ;) (nop) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (unreachable) ) - (func $keep-caller (; 2 ;) (type $0) + (func $keep-caller (; 2 ;) (call $keep-4) ) - (func $other-caller (; 3 ;) (type $0) + (func $other-caller (; 3 ;) (call $other) ) ) (module - (type $T (func (result i32))) - (type $S (func (result i32))) - (type $2 (func)) - (type $3 (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 0) - (func $keep4-similar-but-func-sig-differs (; 0 ;) (type $2) + (func $keep4-similar-but-func-sig-differs (; 0 ;) (drop (i32.const 0) ) ) - (func $other1 (; 1 ;) (type $3) (param $i i32) + (func $other1 (; 1 ;) (param $i i32) (drop (i32.const 0) ) ) - (func $other2 (; 2 ;) (type $T) (result i32) - (i32.const 0) - ) - (func $other3 (; 3 ;) (type $S) (result i32) + (func $other2 (; 2 ;) (result i32) (i32.const 0) ) ) (module - (type $S (func (result i32))) - (type $1 (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 0) - (func $keep2-similar-but-func-sig-differs (; 0 ;) (type $1) (param $i i32) + (func $keep2-similar-but-func-sig-differs (; 0 ;) (param $i i32) (drop (i32.const 0) ) ) - (func $other2 (; 1 ;) (type $S) (result i32) + (func $other2 (; 1 ;) (result i32) (i32.const 0) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (nop) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (nop) (nop) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (block $block0 ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $block0 ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $block0 (nop) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (block $block0 (nop) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $block0 (nop) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $block0 (nop) (unreachable) @@ -178,31 +174,31 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $block0 (nop) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $block0 (unreachable) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase-since-block-names-do-not-matter (; 0 ;) (type $0) + (func $erase-since-block-names-do-not-matter (; 0 ;) (block $foo ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase-since-block-names-do-not-matter (; 0 ;) (type $0) + (func $erase-since-block-names-do-not-matter (; 0 ;) (block $foo (br $foo) (br_table $foo $foo @@ -212,9 +208,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $foo (block $block (drop @@ -224,7 +220,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $bar (block $block (drop @@ -236,16 +232,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $foo (br_if $foo (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $bar (br_if $bar (i32.const 1) @@ -254,9 +250,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (block $foo (br_if $foo (i32.const 0) @@ -265,16 +261,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $foo (br_table $foo $foo (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $bar (br_table $bar $bar (i32.const 1) @@ -283,18 +279,18 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (loop $bar (nop) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (block $foo (result i32) (br_table $foo $foo @@ -304,7 +300,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (block $bar (result i32) (br_table $bar $bar @@ -316,9 +312,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $foo (block $bar (br_table $foo $bar @@ -329,9 +325,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (block $foo (block $bar (br_table $foo $bar @@ -340,7 +336,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $bar (block $foo (br_table $foo $bar @@ -351,91 +347,85 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (call $erase) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2-but-in-theory-we-could-erase (; 0 ;) (type $0) + (func $keep2-but-in-theory-we-could-erase (; 0 ;) (call $keep2-but-in-theory-we-could-erase) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (call $other) ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "i" (func $i)) (import "env" "j" (func $j)) (memory $0 0) - (func $erase (; 2 ;) (type $FUNCSIG$v) + (func $erase (; 2 ;) (call $i) ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "i" (func $i)) (import "env" "j" (func $j)) (memory $0 0) - (func $keep2 (; 2 ;) (type $FUNCSIG$v) + (func $keep2 (; 2 ;) (call $i) ) - (func $other (; 3 ;) (type $FUNCSIG$v) + (func $other (; 3 ;) (call $j) ) ) (module - (type $T (func)) + (type $none_=>_none (func)) (memory $0 0) (table $0 2 2 funcref) (elem (i32.const 0) $erase $erase) - (func $erase (; 0 ;) (type $T) - (call_indirect (type $T) + (func $erase (; 0 ;) + (call_indirect (type $none_=>_none) (i32.const 0) ) ) ) (module - (type $T (func)) + (type $none_=>_none (func)) (memory $0 0) (table $0 2 2 funcref) (elem (i32.const 0) $keep2 $other) - (func $keep2 (; 0 ;) (type $T) - (call_indirect (type $T) + (func $keep2 (; 0 ;) + (call_indirect (type $none_=>_none) (i32.const 0) ) ) - (func $other (; 1 ;) (type $T) - (call_indirect (type $T) + (func $other (; 1 ;) + (call_indirect (type $none_=>_none) (i32.const 1) ) ) ) (module - (type $T (func)) - (type $S (func)) + (type $none_=>_none (func)) (memory $0 0) (table $0 2 2 funcref) - (elem (i32.const 0) $keep2 $other) - (func $keep2 (; 0 ;) (type $T) - (call_indirect (type $T) - (i32.const 0) - ) - ) - (func $other (; 1 ;) (type $T) - (call_indirect (type $S) + (elem (i32.const 0) $keep2 $keep2) + (func $keep2 (; 0 ;) + (call_indirect (type $none_=>_none) (i32.const 0) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase-even-locals-with-different-names (; 0 ;) (type $0) + (func $erase-even-locals-with-different-names (; 0 ;) (local $i i32) (drop (local.get $i) @@ -443,15 +433,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (local $i i32) (drop (local.get $i) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (local $j i64) (drop (local.get $j) @@ -459,9 +449,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase-even-locals-with-different-names (; 0 ;) (type $0) + (func $erase-even-locals-with-different-names (; 0 ;) (local $i i32) (local.set $i (i32.const 0) @@ -469,15 +459,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (local $i i32) (local.set $i (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (local $j i64) (local.set $j (i64.const 0) @@ -485,15 +475,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (local $i i32) (local.set $i (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (local $j i32) (local.set $j (i32.const 1) @@ -501,9 +491,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (i32.load (i32.const 0) @@ -517,16 +507,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.load offset=3 (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.load16_s offset=3 (i32.const 0) @@ -535,16 +525,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.load16_s offset=3 (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.load16_s offset=3 align=1 (i32.const 0) @@ -553,16 +543,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.load16_s (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.load16_s offset=3 (i32.const 0) @@ -571,16 +561,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.load16_s offset=3 (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.load16_s offset=3 (i32.const 1) @@ -589,16 +579,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.load16_u offset=3 (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.load16_s offset=3 (i32.const 0) @@ -607,9 +597,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (i32.store (i32.const 0) (i32.const 100) @@ -621,15 +611,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (i32.store offset=3 (i32.const 0) (i32.const 100) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 100) @@ -637,15 +627,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (i32.store16 offset=3 align=1 (i32.const 0) (i32.const 100) @@ -653,15 +643,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (i32.store16 (i32.const 0) (i32.const 100) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 100) @@ -669,15 +659,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (i32.store16 offset=3 (i32.const 1) (i32.const 100) @@ -685,15 +675,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 101) @@ -701,93 +691,93 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i64.const 0) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.const 0) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f64.const 0) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i64.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i64.const 1) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.const 0.10000000149011612) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.const -0.10000000149011612) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f64.const 0.1) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f64.const 0.2) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (f32.abs (f32.const 0) @@ -796,16 +786,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.abs (f32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.abs (f32.const 1) @@ -814,16 +804,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.abs (f32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.neg (f32.const 0) @@ -832,9 +822,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (f32.add (f32.const 0) @@ -844,9 +834,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.add (f32.const 0) @@ -854,7 +844,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.add (f32.const 0) @@ -864,9 +854,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.add (f32.const 0) @@ -874,7 +864,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.add (f32.const 1) @@ -884,9 +874,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.add (f32.const 0) @@ -894,7 +884,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.sub (f32.const 0) @@ -904,9 +894,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (select (i32.const 0) @@ -917,9 +907,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep (; 0 ;) (type $0) + (func $keep (; 0 ;) (drop (select (i32.const 0) @@ -928,7 +918,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (select (i32.const 1) @@ -939,9 +929,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep (; 0 ;) (type $0) + (func $keep (; 0 ;) (drop (select (i32.const 0) @@ -950,7 +940,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (select (i32.const 0) @@ -961,9 +951,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep (; 0 ;) (type $0) + (func $keep (; 0 ;) (drop (select (i32.const 0) @@ -972,7 +962,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (select (i32.const 0) @@ -983,48 +973,48 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (return) ) ) (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 0) - (func $erase (; 0 ;) (type $0) (result i32) + (func $erase (; 0 ;) (result i32) (return (i32.const 0) ) ) ) (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 0) - (func $keep (; 0 ;) (type $0) (result i32) + (func $keep (; 0 ;) (result i32) (return (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) (result i32) + (func $other (; 1 ;) (result i32) (return (i32.const 1) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (memory.size) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (memory.grow (i32.const 10) @@ -1033,16 +1023,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep (; 0 ;) (type $0) + (func $keep (; 0 ;) (drop (memory.grow (i32.const 10) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (memory.grow (i32.const 11) @@ -1051,14 +1041,14 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep (; 0 ;) (type $0) + (func $keep (; 0 ;) (drop (memory.size) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (memory.grow (i32.const 10) diff --git a/test/passes/duplicate-function-elimination_optimize-level=2.txt b/test/passes/duplicate-function-elimination_optimize-level=2.txt index 0eb2d00cc..b38d52a16 100644 --- a/test/passes/duplicate-function-elimination_optimize-level=2.txt +++ b/test/passes/duplicate-function-elimination_optimize-level=2.txt @@ -1,173 +1,169 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (nop) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (nop) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (i32.const 0) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.const 1) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) (table $0 3 3 funcref) (elem (i32.const 0) $keep2 $keep2 $caller) (export "keep2" (func $keep2)) (export "other" (func $keep2)) (start $keep2) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (nop) ) - (func $caller (; 1 ;) (type $0) + (func $caller (; 1 ;) (call $keep2) (call $keep2) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2-after-two-passes (; 0 ;) (type $0) + (func $keep2-after-two-passes (; 0 ;) (nop) ) - (func $keep-caller (; 1 ;) (type $0) + (func $keep-caller (; 1 ;) (call $keep2-after-two-passes) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep-4 (; 0 ;) (type $0) + (func $keep-4 (; 0 ;) (nop) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (unreachable) ) - (func $keep-caller (; 2 ;) (type $0) + (func $keep-caller (; 2 ;) (call $keep-4) ) - (func $other-caller (; 3 ;) (type $0) + (func $other-caller (; 3 ;) (call $other) ) ) (module - (type $T (func (result i32))) - (type $S (func (result i32))) - (type $2 (func)) - (type $3 (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 0) - (func $keep4-similar-but-func-sig-differs (; 0 ;) (type $2) + (func $keep4-similar-but-func-sig-differs (; 0 ;) (drop (i32.const 0) ) ) - (func $other1 (; 1 ;) (type $3) (param $i i32) + (func $other1 (; 1 ;) (param $i i32) (drop (i32.const 0) ) ) - (func $other2 (; 2 ;) (type $T) (result i32) - (i32.const 0) - ) - (func $other3 (; 3 ;) (type $S) (result i32) + (func $other2 (; 2 ;) (result i32) (i32.const 0) ) ) (module - (type $S (func (result i32))) - (type $1 (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 0) - (func $keep2-similar-but-func-sig-differs (; 0 ;) (type $1) (param $i i32) + (func $keep2-similar-but-func-sig-differs (; 0 ;) (param $i i32) (drop (i32.const 0) ) ) - (func $other2 (; 1 ;) (type $S) (result i32) + (func $other2 (; 1 ;) (result i32) (i32.const 0) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (nop) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (nop) (nop) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (block $block0 ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $block0 ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $block0 (nop) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (block $block0 (nop) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $block0 (nop) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $block0 (nop) (unreachable) @@ -175,31 +171,31 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $block0 (nop) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $block0 (unreachable) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase-since-block-names-do-not-matter (; 0 ;) (type $0) + (func $erase-since-block-names-do-not-matter (; 0 ;) (block $foo ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase-since-block-names-do-not-matter (; 0 ;) (type $0) + (func $erase-since-block-names-do-not-matter (; 0 ;) (block $foo (br $foo) (br_table $foo $foo @@ -209,9 +205,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $foo (block $block (drop @@ -221,7 +217,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $bar (block $block (drop @@ -233,16 +229,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $foo (br_if $foo (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $bar (br_if $bar (i32.const 1) @@ -251,9 +247,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (block $foo (br_if $foo (i32.const 0) @@ -262,16 +258,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $foo (br_table $foo $foo (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $bar (br_table $bar $bar (i32.const 1) @@ -280,18 +276,18 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (loop $bar (nop) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (block $foo (result i32) (br_table $foo $foo @@ -301,7 +297,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (block $bar (result i32) (br_table $bar $bar @@ -313,9 +309,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (block $foo (block $bar (br_table $foo $bar @@ -326,9 +322,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (block $foo (block $bar (br_table $foo $bar @@ -337,7 +333,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (block $bar (block $foo (br_table $foo $bar @@ -348,91 +344,85 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (call $erase) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2-but-in-theory-we-could-erase (; 0 ;) (type $0) + (func $keep2-but-in-theory-we-could-erase (; 0 ;) (call $keep2-but-in-theory-we-could-erase) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (call $other) ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "i" (func $i)) (import "env" "j" (func $j)) (memory $0 0) - (func $erase (; 2 ;) (type $FUNCSIG$v) + (func $erase (; 2 ;) (call $i) ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "i" (func $i)) (import "env" "j" (func $j)) (memory $0 0) - (func $keep2 (; 2 ;) (type $FUNCSIG$v) + (func $keep2 (; 2 ;) (call $i) ) - (func $other (; 3 ;) (type $FUNCSIG$v) + (func $other (; 3 ;) (call $j) ) ) (module - (type $T (func)) + (type $none_=>_none (func)) (memory $0 0) (table $0 2 2 funcref) (elem (i32.const 0) $erase $erase) - (func $erase (; 0 ;) (type $T) - (call_indirect (type $T) + (func $erase (; 0 ;) + (call_indirect (type $none_=>_none) (i32.const 0) ) ) ) (module - (type $T (func)) + (type $none_=>_none (func)) (memory $0 0) (table $0 2 2 funcref) (elem (i32.const 0) $keep2 $other) - (func $keep2 (; 0 ;) (type $T) - (call_indirect (type $T) + (func $keep2 (; 0 ;) + (call_indirect (type $none_=>_none) (i32.const 0) ) ) - (func $other (; 1 ;) (type $T) - (call_indirect (type $T) + (func $other (; 1 ;) + (call_indirect (type $none_=>_none) (i32.const 1) ) ) ) (module - (type $T (func)) - (type $S (func)) + (type $none_=>_none (func)) (memory $0 0) (table $0 2 2 funcref) - (elem (i32.const 0) $keep2 $other) - (func $keep2 (; 0 ;) (type $T) - (call_indirect (type $T) - (i32.const 0) - ) - ) - (func $other (; 1 ;) (type $T) - (call_indirect (type $S) + (elem (i32.const 0) $keep2 $keep2) + (func $keep2 (; 0 ;) + (call_indirect (type $none_=>_none) (i32.const 0) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase-even-locals-with-different-names (; 0 ;) (type $0) + (func $erase-even-locals-with-different-names (; 0 ;) (local $i i32) (drop (local.get $i) @@ -440,15 +430,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (local $i i32) (drop (local.get $i) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (local $j i64) (drop (local.get $j) @@ -456,9 +446,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase-even-locals-with-different-names (; 0 ;) (type $0) + (func $erase-even-locals-with-different-names (; 0 ;) (local $i i32) (local.set $i (i32.const 0) @@ -466,15 +456,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (local $i i32) (local.set $i (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (local $j i64) (local.set $j (i64.const 0) @@ -482,15 +472,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (local $i i32) (local.set $i (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (local $j i32) (local.set $j (i32.const 1) @@ -498,9 +488,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (i32.load (i32.const 0) @@ -514,16 +504,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.load offset=3 (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.load16_s offset=3 (i32.const 0) @@ -532,16 +522,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.load16_s offset=3 (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.load16_s offset=3 align=1 (i32.const 0) @@ -550,16 +540,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.load16_s (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.load16_s offset=3 (i32.const 0) @@ -568,16 +558,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.load16_s offset=3 (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.load16_s offset=3 (i32.const 1) @@ -586,16 +576,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.load16_u offset=3 (i32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i32.load16_s offset=3 (i32.const 0) @@ -604,9 +594,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (i32.store (i32.const 0) (i32.const 100) @@ -618,15 +608,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (i32.store offset=3 (i32.const 0) (i32.const 100) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 100) @@ -634,15 +624,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (i32.store16 offset=3 align=1 (i32.const 0) (i32.const 100) @@ -650,15 +640,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (i32.store16 (i32.const 0) (i32.const 100) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 100) @@ -666,15 +656,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (i32.store16 offset=3 (i32.const 1) (i32.const 100) @@ -682,15 +672,15 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 10) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (i32.store16 offset=3 (i32.const 0) (i32.const 101) @@ -698,93 +688,93 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i64.const 0) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.const 0) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f64.const 0) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (i64.const 0) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (i64.const 1) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.const 0.10000000149011612) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.const -0.10000000149011612) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f64.const 0.1) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f64.const 0.2) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (f32.abs (f32.const 0) @@ -793,16 +783,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.abs (f32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.abs (f32.const 1) @@ -811,16 +801,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.abs (f32.const 0) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.neg (f32.const 0) @@ -829,9 +819,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (f32.add (f32.const 0) @@ -841,9 +831,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.add (f32.const 0) @@ -851,7 +841,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.add (f32.const 0) @@ -861,9 +851,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.add (f32.const 0) @@ -871,7 +861,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.add (f32.const 1) @@ -881,9 +871,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep2 (; 0 ;) (type $0) + (func $keep2 (; 0 ;) (drop (f32.add (f32.const 0) @@ -891,7 +881,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (f32.sub (f32.const 0) @@ -901,9 +891,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (select (i32.const 0) @@ -914,9 +904,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep (; 0 ;) (type $0) + (func $keep (; 0 ;) (drop (select (i32.const 0) @@ -925,7 +915,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (select (i32.const 1) @@ -936,9 +926,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep (; 0 ;) (type $0) + (func $keep (; 0 ;) (drop (select (i32.const 0) @@ -947,7 +937,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (select (i32.const 0) @@ -958,9 +948,9 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep (; 0 ;) (type $0) + (func $keep (; 0 ;) (drop (select (i32.const 0) @@ -969,7 +959,7 @@ ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (select (i32.const 0) @@ -980,48 +970,48 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (return) ) ) (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 0) - (func $erase (; 0 ;) (type $0) (result i32) + (func $erase (; 0 ;) (result i32) (return (i32.const 0) ) ) ) (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 0) - (func $keep (; 0 ;) (type $0) (result i32) + (func $keep (; 0 ;) (result i32) (return (i32.const 0) ) ) - (func $other (; 1 ;) (type $0) (result i32) + (func $other (; 1 ;) (result i32) (return (i32.const 1) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (memory.size) ) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $erase (; 0 ;) (type $0) + (func $erase (; 0 ;) (drop (memory.grow (i32.const 10) @@ -1030,16 +1020,16 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep (; 0 ;) (type $0) + (func $keep (; 0 ;) (drop (memory.grow (i32.const 10) ) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (memory.grow (i32.const 11) @@ -1048,14 +1038,14 @@ ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $keep (; 0 ;) (type $0) + (func $keep (; 0 ;) (drop (memory.size) ) ) - (func $other (; 1 ;) (type $0) + (func $other (; 1 ;) (drop (memory.grow (i32.const 10) diff --git a/test/passes/duplicate-import-elimination.txt b/test/passes/duplicate-import-elimination.txt index ee90ebfba..d0362d251 100644 --- a/test/passes/duplicate-import-elimination.txt +++ b/test/passes/duplicate-import-elimination.txt @@ -1,13 +1,13 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (import "env" "waka" (func $foo)) (import "env" "waka" (func $wrong (param i32))) (table $0 2 2 funcref) (elem (i32.const 0) $foo $foo) (export "baz" (func $0)) (start $foo) - (func $0 (; 2 ;) (type $FUNCSIG$v) + (func $0 (; 2 ;) (call $foo) (call $foo) (call $wrong diff --git a/test/passes/emit-js-wrapper=a.js.txt b/test/passes/emit-js-wrapper=a.js.txt index 2044d0f48..086096889 100644 --- a/test/passes/emit-js-wrapper=a.js.txt +++ b/test/passes/emit-js-wrapper=a.js.txt @@ -1,9 +1,11 @@ (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vijfd (func (param i32 i64 f32 f64))) - (type $FUNCSIG$vifd (func (param i32 f32 f64))) - (type $FUNCSIG$jifd (func (param i32 f32 f64) (result i64))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_f32_f64_=>_none (func (param i32 i32 i32 f32 f64))) + (type $i32_i64_f32_f64_=>_none (func (param i32 i64 f32 f64))) + (type $i32_f32_f64_=>_none (func (param i32 f32 f64))) + (type $i32_f32_f64_=>_i32 (func (param i32 f32 f64) (result i32))) + (type $i32_f32_f64_=>_i64 (func (param i32 f32 f64) (result i64))) (import "env" "setTempRet0" (func $setTempRet0 (param i32))) (memory $0 256 256) (export "add" (func $add)) @@ -11,19 +13,19 @@ (export "types" (func $legalstub$types)) (export "types2" (func $types2)) (export "types3" (func $legalstub$types3)) - (func $add (; 1 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $add (; 1 ;) (param $x i32) (param $y i32) (result i32) (i32.add (local.get $x) (local.get $y) ) ) - (func $unexported (; 2 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $unexported (; 2 ;) (param $x i32) (param $y i32) (result i32) (i32.add (local.get $x) (local.get $y) ) ) - (func $no-return (; 3 ;) (type $FUNCSIG$vi) (param $x i32) + (func $no-return (; 3 ;) (param $x i32) (drop (i32.add (local.get $x) @@ -31,13 +33,13 @@ ) ) ) - (func $types (; 4 ;) (type $FUNCSIG$vijfd) (param $x i32) (param $y i64) (param $z f32) (param $w f64) + (func $types (; 4 ;) (param $x i32) (param $y i64) (param $z f32) (param $w f64) (nop) ) - (func $types2 (; 5 ;) (type $FUNCSIG$vifd) (param $x i32) (param $z f32) (param $w f64) + (func $types2 (; 5 ;) (param $x i32) (param $z f32) (param $w f64) (nop) ) - (func $types3 (; 6 ;) (type $FUNCSIG$jifd) (param $x i32) (param $z f32) (param $w f64) (result i64) + (func $types3 (; 6 ;) (param $x i32) (param $z f32) (param $w f64) (result i64) (i64.const 1) ) (func $legalstub$types (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f32) (param $4 f64) diff --git a/test/passes/emit-spec-wrapper=a.wat.txt b/test/passes/emit-spec-wrapper=a.wat.txt index a834c54b3..8571eba22 100644 --- a/test/passes/emit-spec-wrapper=a.wat.txt +++ b/test/passes/emit-spec-wrapper=a.wat.txt @@ -1,28 +1,28 @@ (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vijfd (func (param i32 i64 f32 f64))) - (type $FUNCSIG$vifd (func (param i32 f32 f64))) - (type $FUNCSIG$jifd (func (param i32 f32 f64) (result i64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i64_f32_f64_=>_none (func (param i32 i64 f32 f64))) + (type $i32_f32_f64_=>_none (func (param i32 f32 f64))) + (type $i32_f32_f64_=>_i64 (func (param i32 f32 f64) (result i64))) (memory $0 256 256) (export "add" (func $add)) (export "no_return" (func $no-return)) (export "types" (func $types)) (export "types2" (func $types2)) (export "types3" (func $types3)) - (func $add (; 0 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $add (; 0 ;) (param $x i32) (param $y i32) (result i32) (i32.add (local.get $x) (local.get $y) ) ) - (func $unexported (; 1 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $unexported (; 1 ;) (param $x i32) (param $y i32) (result i32) (i32.add (local.get $x) (local.get $y) ) ) - (func $no-return (; 2 ;) (type $FUNCSIG$vi) (param $x i32) + (func $no-return (; 2 ;) (param $x i32) (drop (i32.add (local.get $x) @@ -30,13 +30,13 @@ ) ) ) - (func $types (; 3 ;) (type $FUNCSIG$vijfd) (param $x i32) (param $y i64) (param $z f32) (param $w f64) + (func $types (; 3 ;) (param $x i32) (param $y i64) (param $z f32) (param $w f64) (nop) ) - (func $types2 (; 4 ;) (type $FUNCSIG$vifd) (param $x i32) (param $z f32) (param $w f64) + (func $types2 (; 4 ;) (param $x i32) (param $z f32) (param $w f64) (nop) ) - (func $types3 (; 5 ;) (type $FUNCSIG$jifd) (param $x i32) (param $z f32) (param $w f64) (result i64) + (func $types3 (; 5 ;) (param $x i32) (param $z f32) (param $w f64) (result i64) (i64.const 1) ) ) diff --git a/test/passes/extract-function_pass-arg=extract@foo.txt b/test/passes/extract-function_pass-arg=extract@foo.txt index 3962d3449..a358743b5 100644 --- a/test/passes/extract-function_pass-arg=extract@foo.txt +++ b/test/passes/extract-function_pass-arg=extract@foo.txt @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "bar" (func $bar)) (import "env" "other" (func $other)) (export "foo" (func $foo)) - (func $foo (; 2 ;) (type $FUNCSIG$v) + (func $foo (; 2 ;) (call $bar) ) ) diff --git a/test/passes/flatten.bin.txt b/test/passes/flatten.bin.txt index d0e2fa944..554c6d6f9 100644 --- a/test/passes/flatten.bin.txt +++ b/test/passes/flatten.bin.txt @@ -1,14 +1,14 @@ (module - (type $0 (func (result i32))) - (type $1 (func (result i64))) - (type $2 (func (result f32))) - (type $3 (func (result f64))) - (type $4 (func (param i32) (result i32))) - (type $5 (func (param i64) (result i64))) - (type $6 (func (param f32) (result f32))) - (type $7 (func (param f64) (result f64))) - (type $8 (func (param i64 f32 f64 i32 i32))) - (type $9 (func (param i64 f32 f64 i32 i32) (result f64))) + (type $i64_f32_f64_i32_i32_=>_none (func (param i64 f32 f64 i32 i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $none_=>_f32 (func (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) + (type $none_=>_f64 (func (result f64))) + (type $i64_f32_f64_i32_i32_=>_f64 (func (param i64 f32 f64 i32 i32) (result f64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (export "type-local-i32" (func $0)) (export "type-local-i64" (func $1)) (export "type-local-f32" (func $2)) @@ -19,7 +19,7 @@ (export "type-param-f64" (func $7)) (export "type-mixed" (func $8)) (export "read" (func $9)) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (local $0 i32) (local $1 i32) (local.set $1 @@ -29,7 +29,7 @@ (local.get $1) ) ) - (func $1 (; 1 ;) (type $1) (result i64) + (func $1 (; 1 ;) (result i64) (local $0 i64) (local $1 i64) (local.set $1 @@ -39,7 +39,7 @@ (local.get $1) ) ) - (func $2 (; 2 ;) (type $2) (result f32) + (func $2 (; 2 ;) (result f32) (local $0 f32) (local $1 f32) (local.set $1 @@ -49,7 +49,7 @@ (local.get $1) ) ) - (func $3 (; 3 ;) (type $3) (result f64) + (func $3 (; 3 ;) (result f64) (local $0 f64) (local $1 f64) (local.set $1 @@ -59,7 +59,7 @@ (local.get $1) ) ) - (func $4 (; 4 ;) (type $4) (param $0 i32) (result i32) + (func $4 (; 4 ;) (param $0 i32) (result i32) (local $1 i32) (local.set $1 (local.get $0) @@ -68,7 +68,7 @@ (local.get $1) ) ) - (func $5 (; 5 ;) (type $5) (param $0 i64) (result i64) + (func $5 (; 5 ;) (param $0 i64) (result i64) (local $1 i64) (local.set $1 (local.get $0) @@ -77,7 +77,7 @@ (local.get $1) ) ) - (func $6 (; 6 ;) (type $6) (param $0 f32) (result f32) + (func $6 (; 6 ;) (param $0 f32) (result f32) (local $1 f32) (local.set $1 (local.get $0) @@ -86,7 +86,7 @@ (local.get $1) ) ) - (func $7 (; 7 ;) (type $7) (param $0 f64) (result f64) + (func $7 (; 7 ;) (param $0 f64) (result f64) (local $1 f64) (local.set $1 (local.get $0) @@ -95,7 +95,7 @@ (local.get $1) ) ) - (func $8 (; 8 ;) (type $8) (param $0 i64) (param $1 f32) (param $2 f64) (param $3 i32) (param $4 i32) + (func $8 (; 8 ;) (param $0 i64) (param $1 f32) (param $2 f64) (param $3 i32) (param $4 i32) (local $5 i64) (local $6 i64) (local $7 f32) @@ -107,7 +107,7 @@ ) (unreachable) ) - (func $9 (; 9 ;) (type $9) (param $0 i64) (param $1 f32) (param $2 f64) (param $3 i32) (param $4 i32) (result f64) + (func $9 (; 9 ;) (param $0 i64) (param $1 f32) (param $2 f64) (param $3 i32) (param $4 i32) (result f64) (local $5 i64) (local $6 i64) (local $7 f32) diff --git a/test/passes/flatten.txt b/test/passes/flatten.txt index 5fc0a1032..b4cb5289a 100644 --- a/test/passes/flatten.txt +++ b/test/passes/flatten.txt @@ -1,15 +1,15 @@ (module - (type $ii (func (param i32 i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $3 (func (param i32) (result i32))) - (type $4 (func (param i64 i64) (result i64))) - (type $FUNCSIG$f (func (result f32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_f32 (func (result f32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (memory $0 10) (table $0 1 1 funcref) (elem (i32.const 0) $call-me) (global $x (mut i32) (i32.const 0)) - (func $a1 (; 0 ;) (type $1) + (func $a1 (; 0 ;) (local $0 i32) (local.set $0 (i32.add @@ -22,7 +22,7 @@ ) (nop) ) - (func $a2 (; 1 ;) (type $2) (result i32) + (func $a2 (; 1 ;) (result i32) (local $0 i32) (local.set $0 (i32.add @@ -34,7 +34,7 @@ (local.get $0) ) ) - (func $a3 (; 2 ;) (type $2) (result i32) + (func $a3 (; 2 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -56,7 +56,7 @@ (local.get $2) ) ) - (func $a4 (; 3 ;) (type $1) + (func $a4 (; 3 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -79,7 +79,7 @@ ) (nop) ) - (func $a5 (; 4 ;) (type $2) (result i32) + (func $a5 (; 4 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -111,7 +111,7 @@ (local.get $4) ) ) - (func $a6 (; 5 ;) (type $2) (result i32) + (func $a6 (; 5 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -158,7 +158,7 @@ (local.get $7) ) ) - (func $a7 (; 6 ;) (type $2) (result i32) + (func $a7 (; 6 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -215,7 +215,7 @@ (local.get $9) ) ) - (func $a8 (; 7 ;) (type $2) (result i32) + (func $a8 (; 7 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -290,7 +290,7 @@ (local.get $10) ) ) - (func $a9 (; 8 ;) (type $2) (result i32) + (func $a9 (; 8 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -336,7 +336,7 @@ (local.get $6) ) ) - (func $a10 (; 9 ;) (type $2) (result i32) + (func $a10 (; 9 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -438,7 +438,7 @@ (local.get $10) ) ) - (func $a11 (; 10 ;) (type $1) + (func $a11 (; 10 ;) (if (i32.const 0) (block @@ -450,7 +450,7 @@ ) (nop) ) - (func $a12 (; 11 ;) (type $2) (result i32) + (func $a12 (; 11 ;) (result i32) (local $0 i32) (local $1 i32) (if @@ -469,7 +469,7 @@ (local.get $1) ) ) - (func $a13 (; 12 ;) (type $2) (result i32) + (func $a13 (; 12 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -510,7 +510,7 @@ (local.get $4) ) ) - (func $a14 (; 13 ;) (type $2) (result i32) + (func $a14 (; 13 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -538,7 +538,7 @@ (local.get $2) ) ) - (func $a15 (; 14 ;) (type $1) + (func $a15 (; 14 ;) (local $0 i32) (local $1 f32) (local $2 f32) @@ -571,7 +571,7 @@ ) (unreachable) ) - (func $a16 (; 15 ;) (type $2) (result i32) + (func $a16 (; 15 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -628,7 +628,7 @@ (local.get $7) ) ) - (func $a17 (; 16 ;) (type $FUNCSIG$f) (result f32) + (func $a17 (; 16 ;) (result f32) (local $var$0 f32) (local $1 f32) (local $2 f32) @@ -664,7 +664,7 @@ (local.get $5) ) ) - (func $a18 (; 17 ;) (type $2) (result i32) + (func $a18 (; 17 ;) (result i32) (local $0 i32) (local $1 i32) (block $label$1 @@ -691,7 +691,7 @@ (local.get $1) ) ) - (func $a19 (; 18 ;) (type $FUNCSIG$f) (result f32) + (func $a19 (; 18 ;) (result f32) (block $label$0 (block $label$1 (unreachable) @@ -712,10 +712,10 @@ ) (unreachable) ) - (func $call-me (; 19 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $call-me (; 19 ;) (param $0 i32) (param $1 i32) (nop) ) - (func $code-to-kill (; 20 ;) (type $1) + (func $code-to-kill (; 20 ;) (local $x i32) (local $1 i32) (local $2 i32) @@ -1119,7 +1119,7 @@ (i32.const -1) (block (unreachable) - (call_indirect (type $ii) + (call_indirect (type $i32_i32_=>_none) (i32.const 123) (i32.const 456) (unreachable) @@ -1132,7 +1132,7 @@ (i32.const -2) (block (unreachable) - (call_indirect (type $ii) + (call_indirect (type $i32_i32_=>_none) (i32.const 139) (unreachable) (i32.const 0) @@ -1146,7 +1146,7 @@ (block (unreachable) (unreachable) - (call_indirect (type $ii) + (call_indirect (type $i32_i32_=>_none) (i32.const 246) (unreachable) (unreachable) @@ -1161,7 +1161,7 @@ (unreachable) (unreachable) (unreachable) - (call_indirect (type $ii) + (call_indirect (type $i32_i32_=>_none) (unreachable) (unreachable) (unreachable) @@ -1342,7 +1342,7 @@ ) (nop) ) - (func $killer (; 21 ;) (type $1) + (func $killer (; 21 ;) (block (unreachable) (unreachable) @@ -1353,13 +1353,13 @@ ) (unreachable) ) - (func $target (; 22 ;) (type $1) + (func $target (; 22 ;) (drop (i32.const 2000) ) (nop) ) - (func $typed-block-none-then-unreachable (; 23 ;) (type $2) (result i32) + (func $typed-block-none-then-unreachable (; 23 ;) (result i32) (local $0 i32) (local $1 i32) (block $top-typed @@ -1384,7 +1384,7 @@ (local.get $1) ) ) - (func $typed-block-remove-br-changes-type (; 24 ;) (type $3) (param $$$0 i32) (result i32) + (func $typed-block-remove-br-changes-type (; 24 ;) (param $$$0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1434,7 +1434,7 @@ (local.get $4) ) ) - (func $global (; 25 ;) (type $1) + (func $global (; 25 ;) (local $0 i32) (block (unreachable) @@ -1453,7 +1453,7 @@ ) (unreachable) ) - (func $ret (; 26 ;) (type $2) (result i32) + (func $ret (; 26 ;) (result i32) (local $0 i32) (local $1 i32) (block @@ -1473,7 +1473,7 @@ (local.get $1) ) ) - (func $unreachable-br (; 27 ;) (type $2) (result i32) + (func $unreachable-br (; 27 ;) (result i32) (local $0 i32) (local $1 i32) (block $out @@ -1491,14 +1491,14 @@ (local.get $1) ) ) - (func $unreachable-br-loop (; 28 ;) (type $2) (result i32) + (func $unreachable-br-loop (; 28 ;) (result i32) (loop $out (br $out) (unreachable) ) (unreachable) ) - (func $unreachable-block-ends-switch (; 29 ;) (type $2) (result i32) + (func $unreachable-block-ends-switch (; 29 ;) (result i32) (local $0 i32) (local $1 i32) (block $label$0 @@ -1524,7 +1524,7 @@ (local.get $1) ) ) - (func $unreachable-block-ends-br_if (; 30 ;) (type $2) (result i32) + (func $unreachable-block-ends-br_if (; 30 ;) (result i32) (local $0 i32) (local $1 i32) (block $label$0 @@ -1550,7 +1550,7 @@ (local.get $1) ) ) - (func $unreachable-brs-3 (; 31 ;) (type $2) (result i32) + (func $unreachable-brs-3 (; 31 ;) (result i32) (local $0 i32) (local $1 i32) (block $label$0 @@ -1574,7 +1574,7 @@ (local.get $1) ) ) - (func $unreachable-brs-4 (; 32 ;) (type $3) (param $var$0 i32) (result i32) + (func $unreachable-brs-4 (; 32 ;) (param $var$0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1623,7 +1623,7 @@ (local.get $5) ) ) - (func $call-unreach (; 33 ;) (type $4) (param $var$0 i64) (param $var$1 i64) (result i64) + (func $call-unreach (; 33 ;) (param $var$0 i64) (param $var$1 i64) (result i64) (local $2 i64) (local $3 i64) (local $4 i32) @@ -1724,7 +1724,7 @@ (local.get $17) ) ) - (func $test-flatten (; 34 ;) (type $1) + (func $test-flatten (; 34 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2147,7 +2147,7 @@ ) (nop) ) - (func $flatten-return-value (; 35 ;) (type $2) (result i32) + (func $flatten-return-value (; 35 ;) (result i32) (local $0 i32) (local $1 i32) (block @@ -2173,7 +2173,7 @@ (local.get $1) ) ) - (func $unbug (; 36 ;) (type $1) + (func $unbug (; 36 ;) (local $12 i32) (local $432 i32) (local $430 i32) @@ -2311,7 +2311,7 @@ ) (nop) ) - (func $outer-block-typed (; 37 ;) (type $3) (param $var$0 i32) (result i32) + (func $outer-block-typed (; 37 ;) (param $var$0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2343,7 +2343,7 @@ (local.get $5) ) ) - (func $nested-br_if-with-value (; 38 ;) (type $2) (result i32) + (func $nested-br_if-with-value (; 38 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2387,7 +2387,7 @@ (local.get $6) ) ) - (func $switch-unreachable (; 39 ;) (type $1) + (func $switch-unreachable (; 39 ;) (block $label$3 (unreachable) (br_table $label$3 @@ -2397,7 +2397,7 @@ ) (nop) ) - (func $br_if_order (; 40 ;) (type $3) (param $x i32) (result i32) + (func $br_if_order (; 40 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2458,7 +2458,7 @@ (local.get $9) ) ) - (func $tees (; 41 ;) (type $ii) (param $x i32) (param $y i32) + (func $tees (; 41 ;) (param $x i32) (param $y i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2498,7 +2498,7 @@ ) (unreachable) ) - (func $return (; 42 ;) (type $3) (param $x i32) (result i32) + (func $return (; 42 ;) (param $x i32) (result i32) (local $1 i32) (local.set $1 (i32.sub diff --git a/test/passes/flatten_dfo_O3_enable-threads.txt b/test/passes/flatten_dfo_O3_enable-threads.txt index 16e12cc6e..6afaaa01f 100644 --- a/test/passes/flatten_dfo_O3_enable-threads.txt +++ b/test/passes/flatten_dfo_O3_enable-threads.txt @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$dji (func (param i64 i32) (result f64))) - (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i64_i32_=>_f64 (func (param i64 i32) (result f64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (memory $0 (shared 1 1)) (export "one" (func $0)) (export "two" (func $1)) @@ -11,7 +11,7 @@ (export "bad1" (func $3)) (export "only-dfo" (func $4)) (export "dfo-tee-get" (func $5)) - (func $0 (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $0 (; 0 ;) (; has Stack IR ;) (block $label$3 (br_if $label$3 (i32.load @@ -21,10 +21,10 @@ ) (unreachable) ) - (func $1 (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $1 (; 1 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) (i32.const 0) ) - (func $2 (; 2 ;) (; has Stack IR ;) (type $FUNCSIG$dji) (param $0 i64) (param $1 i32) (result f64) + (func $2 (; 2 ;) (; has Stack IR ;) (param $0 i64) (param $1 i32) (result f64) (loop $label$8 (br_if $label$8 (local.get $1) @@ -32,19 +32,19 @@ ) (unreachable) ) - (func $3 (; 3 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $3 (; 3 ;) (; has Stack IR ;) (i32.store (i32.const 1) (i32.const -16384) ) ) - (func $4 (; 4 ;) (; has Stack IR ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $4 (; 4 ;) (; has Stack IR ;) (param $0 f64) (result f64) (local $1 i32) (loop $label$1 (br $label$1) ) ) - (func $5 (; 5 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) + (func $5 (; 5 ;) (; has Stack IR ;) (result i32) (i32.const 1) ) ) diff --git a/test/passes/flatten_i64-to-i32-lowering.txt b/test/passes/flatten_i64-to-i32-lowering.txt index 809982880..a151142dc 100644 --- a/test/passes/flatten_i64-to-i32-lowering.txt +++ b/test/passes/flatten_i64-to-i32-lowering.txt @@ -1,10 +1,11 @@ (module - (type $FUNCSIG$j (func (result i32))) - (type $FUNCSIG$v (func)) - (import "env" "func" (func $import (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i64 (func (result i64))) + (import "env" "func" (func $import (result i64))) (memory $0 1 1) (global $i64toi32_i32$HIGH_BITS (mut i32) (i32.const 0)) - (func $defined (; 1 ;) (type $FUNCSIG$j) (result i32) + (func $defined (; 1 ;) (result i32) (local $0 i32) (local $0$hi i32) (local $i64toi32_i32$0 i32) @@ -80,7 +81,7 @@ ) ) ) - (func $unreachable-select-i64 (; 2 ;) (type $FUNCSIG$j) (result i32) + (func $unreachable-select-i64 (; 2 ;) (result i32) (local $i64toi32_i32$0 i32) (unreachable) (block @@ -99,7 +100,7 @@ ) (unreachable) ) - (func $unreachable-select-i64-b (; 3 ;) (type $FUNCSIG$j) (result i32) + (func $unreachable-select-i64-b (; 3 ;) (result i32) (local $i64toi32_i32$0 i32) (unreachable) (block @@ -118,7 +119,7 @@ ) (unreachable) ) - (func $unreachable-select-i64-c (; 4 ;) (type $FUNCSIG$j) (result i32) + (func $unreachable-select-i64-c (; 4 ;) (result i32) (local $i64toi32_i32$0 i32) (local $i64toi32_i32$1 i32) (unreachable) @@ -143,7 +144,7 @@ ) (unreachable) ) - (func $mem (; 5 ;) (type $FUNCSIG$v) + (func $mem (; 5 ;) (local $0 i32) (local $0$hi i32) (local $1 i32) @@ -418,8 +419,8 @@ ) ) (module - (type $FUNCSIG$vj (func (param i32 i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) (global $f (mut i32) (i32.const -1412567121)) (global $g (mut i32) (global.get $f)) (global $f$hi (mut i32) (i32.const 305419896)) @@ -427,10 +428,10 @@ (global $i64toi32_i32$HIGH_BITS (mut i32) (i32.const 0)) (export "exp" (func $1)) (export "unreach" (func $2)) - (func $call (; 0 ;) (type $FUNCSIG$vj) (param $0 i32) (param $0$hi i32) + (func $call (; 0 ;) (param $0 i32) (param $0$hi i32) (nop) ) - (func $1 (; 1 ;) (type $FUNCSIG$v) + (func $1 (; 1 ;) (local $0 i32) (local $0$hi i32) (local $i64toi32_i32$0 i32) @@ -475,7 +476,7 @@ ) (nop) ) - (func $2 (; 2 ;) (type $FUNCSIG$v) + (func $2 (; 2 ;) (local $0 i32) (local $0$hi i32) (local $1 i32) @@ -515,18 +516,18 @@ ) ) (module - (type $FUNCSIG$vj (func (param i32 i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) (global $f (mut i32) (i32.const -1412567121)) (global $g (mut i32) (global.get $f)) (global $f$hi (mut i32) (i32.const 305419896)) (global $g$hi (mut i32) (global.get $f$hi)) (global $i64toi32_i32$HIGH_BITS (mut i32) (i32.const 0)) (export "exp" (func $1)) - (func $call (; 0 ;) (type $FUNCSIG$vj) (param $0 i32) (param $0$hi i32) + (func $call (; 0 ;) (param $0 i32) (param $0$hi i32) (nop) ) - (func $1 (; 1 ;) (type $FUNCSIG$v) + (func $1 (; 1 ;) (local $0 i32) (local $0$hi i32) (local $i64toi32_i32$0 i32) diff --git a/test/passes/flatten_local-cse.txt b/test/passes/flatten_local-cse.txt index aae715bb0..4c1e08b8d 100644 --- a/test/passes/flatten_local-cse.txt +++ b/test/passes/flatten_local-cse.txt @@ -1,11 +1,11 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$fddi (func (param f64 f64 i32) (result f32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $f64_f64_i32_=>_f32 (func (param f64 f64 i32) (result f32))) (memory $0 100 100) - (func $basics (; 0 ;) (type $FUNCSIG$v) + (func $basics (; 0 ;) (local $x i32) (local $y i32) (local $2 i32) @@ -139,7 +139,7 @@ ) (nop) ) - (func $recursive1 (; 1 ;) (type $FUNCSIG$v) + (func $recursive1 (; 1 ;) (local $x i32) (local $y i32) (local $2 i32) @@ -184,7 +184,7 @@ ) (nop) ) - (func $recursive2 (; 2 ;) (type $FUNCSIG$v) + (func $recursive2 (; 2 ;) (local $x i32) (local $y i32) (local $2 i32) @@ -229,7 +229,7 @@ ) (nop) ) - (func $self (; 3 ;) (type $FUNCSIG$v) + (func $self (; 3 ;) (local $x i32) (local $y i32) (local $2 i32) @@ -266,7 +266,7 @@ ) (nop) ) - (func $loads (; 4 ;) (type $FUNCSIG$v) + (func $loads (; 4 ;) (local $0 i32) (local $1 i32) (block @@ -291,7 +291,7 @@ ) (nop) ) - (func $8 (; 5 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $8 (; 5 ;) (param $var$0 i32) (result i32) (local $var$1 i32) (local $var$2 i32) (local $var$3 i32) @@ -411,7 +411,7 @@ (local.get $20) ) ) - (func $loop1 (; 6 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop1 (; 6 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -463,7 +463,7 @@ (local.get $7) ) ) - (func $loop2 (; 7 ;) (type $FUNCSIG$iiii) (param $x i32) (param $y i32) (param $z i32) (result i32) + (func $loop2 (; 7 ;) (param $x i32) (param $y i32) (param $z i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -531,7 +531,7 @@ (local.get $10) ) ) - (func $loop3 (; 8 ;) (type $FUNCSIG$iiii) (param $x i32) (param $y i32) (param $z i32) (result i32) + (func $loop3 (; 8 ;) (param $x i32) (param $y i32) (param $z i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -591,7 +591,7 @@ (local.get $9) ) ) - (func $handle-removing (; 9 ;) (type $FUNCSIG$fddi) (param $var$0 f64) (param $var$1 f64) (param $var$2 i32) (result f32) + (func $handle-removing (; 9 ;) (param $var$0 f64) (param $var$1 f64) (param $var$2 i32) (result f32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -634,14 +634,14 @@ ) ) (module - (type $0 (func)) - (type $1 (func (param i32 f64) (result i32))) - (type $2 (func (param i64 f32 i32))) + (type $none_=>_none (func)) + (type $i64_f32_i32_=>_none (func (param i64 f32 i32))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (table $0 23 23 funcref) (global $global$0 (mut i32) (i32.const 10)) (export "func_1_invoker" (func $1)) (export "func_6" (func $2)) - (func $0 (; 0 ;) (type $2) (param $var$0 i64) (param $var$1 f32) (param $var$2 i32) + (func $0 (; 0 ;) (param $var$0 i64) (param $var$1 f32) (param $var$2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -689,7 +689,7 @@ ) (nop) ) - (func $1 (; 1 ;) (type $0) + (func $1 (; 1 ;) (call $0 (i64.const 1125899906842624) (f32.const -nan:0x7fc91a) @@ -697,7 +697,7 @@ ) (nop) ) - (func $2 (; 2 ;) (type $1) (param $var$0 i32) (param $var$1 f64) (result i32) + (func $2 (; 2 ;) (param $var$0 i32) (param $var$1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -728,9 +728,9 @@ ) ) (module - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) (import "env" "out" (func $out (param i32))) - (func $each-pass-must-clear (; 1 ;) (type $FUNCSIG$vi) (param $var$0 i32) + (func $each-pass-must-clear (; 1 ;) (param $var$0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -763,10 +763,10 @@ ) ) (module - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $none_=>_i64 (func (result i64))) (global $glob (mut i32) (i32.const 1)) - (func $i64-shifts (; 0 ;) (type $FUNCSIG$j) (result i64) + (func $i64-shifts (; 0 ;) (result i64) (local $temp i64) (local $1 i64) (local $2 i64) @@ -809,7 +809,7 @@ (local.get $temp) ) ) - (func $global (; 1 ;) (type $FUNCSIG$v) + (func $global (; 1 ;) (local $x i32) (local $y i32) (local $2 i32) diff --git a/test/passes/flatten_local-cse_Os.txt b/test/passes/flatten_local-cse_Os.txt index c45e7945f..76804e2ba 100644 --- a/test/passes/flatten_local-cse_Os.txt +++ b/test/passes/flatten_local-cse_Os.txt @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (export "div16_internal" (func $0)) - (func $0 (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $0 (; 0 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32) (i32.add (local.tee $0 (i32.xor diff --git a/test/passes/flatten_rereloop.txt b/test/passes/flatten_rereloop.txt index cdf242fd9..654c844a6 100644 --- a/test/passes/flatten_rereloop.txt +++ b/test/passes/flatten_rereloop.txt @@ -1,13 +1,13 @@ (module - (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$fi (func (param i32) (result f32))) - (type $FUNCSIG$f (func (result f32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_f32 (func (result f32))) + (type $i32_=>_f32 (func (param i32) (result f32))) + (type $none_=>_f64 (func (result f64))) (memory $0 1) (global $global (mut i32) (i32.const 0)) - (func $0 (; 0 ;) (type $FUNCSIG$d) (result f64) + (func $0 (; 0 ;) (result f64) (local $0 f64) (local $1 f64) (local $2 i32) @@ -33,7 +33,7 @@ ) ) ) - (func $1 (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $1 (; 1 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -95,7 +95,7 @@ ) (unreachable) ) - (func $skip-empty (; 2 ;) (type $FUNCSIG$v) + (func $skip-empty (; 2 ;) (local $0 i32) (block $block$2$break (block @@ -108,7 +108,7 @@ (return) ) ) - (func $skip-empty-2 (; 3 ;) (type $FUNCSIG$v) + (func $skip-empty-2 (; 3 ;) (local $0 i32) (block $block$5$break (block @@ -137,7 +137,7 @@ ) ) ) - (func $skip-empty-3 (; 4 ;) (type $FUNCSIG$v) + (func $skip-empty-3 (; 4 ;) (local $0 i32) (block $block$5$break (block @@ -166,7 +166,7 @@ ) ) ) - (func $skip-empty-4 (; 5 ;) (type $FUNCSIG$vi) (param $x i32) + (func $skip-empty-4 (; 5 ;) (param $x i32) (local $1 i32) (local $2 i32) (block $block$2$break @@ -181,7 +181,7 @@ (return) ) ) - (func $skipping (; 6 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $skipping (; 6 ;) (param $0 i32) (result f32) (local $1 f32) (local $2 f32) (local $3 f32) @@ -215,7 +215,7 @@ ) ) ) - (func $merging (; 7 ;) (type $FUNCSIG$v) + (func $merging (; 7 ;) (local $0 i32) (block (block @@ -223,7 +223,7 @@ (return) ) ) - (func $unswitch (; 8 ;) (type $FUNCSIG$v) + (func $unswitch (; 8 ;) (local $0 i32) (block $block$2$break (block @@ -236,7 +236,7 @@ (return) ) ) - (func $skip-only-empty (; 9 ;) (type $FUNCSIG$v) + (func $skip-only-empty (; 9 ;) (local $0 i32) (block $block$3$break (block @@ -258,7 +258,7 @@ (return) ) ) - (func $skip-only-one-branch-out (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $skip-only-one-branch-out (; 10 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -288,7 +288,7 @@ ) ) ) - (func $multipass-for-skips (; 11 ;) (type $FUNCSIG$f) (result f32) + (func $multipass-for-skips (; 11 ;) (result f32) (local $0 f32) (local $1 f32) (local $2 f32) @@ -338,7 +338,7 @@ ) ) ) - (func $branch-merge-vs-replace (; 12 ;) (type $FUNCSIG$v) + (func $branch-merge-vs-replace (; 12 ;) (local $0 i32) (block ) @@ -352,7 +352,7 @@ ) ) ) - (func $unswitch-amount (; 13 ;) (type $FUNCSIG$v) + (func $unswitch-amount (; 13 ;) (local $0 i32) (block $block$2$break (block @@ -392,15 +392,15 @@ ) ) (module - (type $0 (func)) - (type $1 (func (result i32))) - (type $2 (func (param i32) (result i32))) - (type $3 (func (param i32))) - (func $trivial (; 0 ;) (type $0) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (func $trivial (; 0 ;) (local $0 i32) (return) ) - (func $trivial2 (; 1 ;) (type $0) + (func $trivial2 (; 1 ;) (local $0 i32) (block (block @@ -410,11 +410,11 @@ (return) ) ) - (func $return-void (; 2 ;) (type $0) + (func $return-void (; 2 ;) (local $0 i32) (return) ) - (func $return-val (; 3 ;) (type $1) (result i32) + (func $return-val (; 3 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -422,7 +422,7 @@ (i32.const 1) ) ) - (func $ifs (; 4 ;) (type $2) (param $x i32) (result i32) + (func $ifs (; 4 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -506,7 +506,7 @@ ) ) ) - (func $loops (; 5 ;) (type $3) (param $x i32) + (func $loops (; 5 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -590,7 +590,7 @@ ) ) ) - (func $br-out (; 6 ;) (type $3) (param $x i32) + (func $br-out (; 6 ;) (param $x i32) (local $1 i32) (block $block$2$break (call $br-out @@ -604,7 +604,7 @@ (return) ) ) - (func $unreachable (; 7 ;) (type $3) (param $x i32) + (func $unreachable (; 7 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -675,7 +675,7 @@ ) ) ) - (func $empty-blocks (; 8 ;) (type $3) (param $x i32) + (func $empty-blocks (; 8 ;) (param $x i32) (local $1 i32) (block $block$2$break (block @@ -688,7 +688,7 @@ (return) ) ) - (func $before-and-after (; 9 ;) (type $3) (param $x i32) + (func $before-and-after (; 9 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -947,7 +947,7 @@ ) ) ) - (func $switch (; 10 ;) (type $3) (param $x i32) + (func $switch (; 10 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1020,7 +1020,7 @@ ) ) ) - (func $no-return (; 11 ;) (type $0) + (func $no-return (; 11 ;) (local $0 i32) (block $block$6$break (block @@ -1049,7 +1049,7 @@ (return) ) ) - (func $if-br-wat (; 12 ;) (type $3) (param $x i32) + (func $if-br-wat (; 12 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1121,7 +1121,7 @@ ) ) ) - (func $switcher-to-nowhere (; 13 ;) (type $2) (param $0 i32) (result i32) + (func $switcher-to-nowhere (; 13 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) diff --git a/test/passes/flatten_simplify-locals-nonesting_dfo_O3.txt b/test/passes/flatten_simplify-locals-nonesting_dfo_O3.txt index 24e5c6011..825dcd1a5 100644 --- a/test/passes/flatten_simplify-locals-nonesting_dfo_O3.txt +++ b/test/passes/flatten_simplify-locals-nonesting_dfo_O3.txt @@ -1,27 +1,27 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$iidd (func (param i32 f64 f64) (result i32))) - (type $FUNCSIG$vj (func (param i64))) - (type $FUNCSIG$id (func (param f64) (result i32))) + (type $none_=>_none (func)) + (type $i64_=>_none (func (param i64))) + (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $none_=>_f64 (func (result f64))) (export "if-select" (func $0)) (export "unreachable-body-update-zext" (func $1)) (export "ssa-const" (func $2)) (export "if-nothing" (func $3)) (export "only-dfo" (func $4)) - (func $0 (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $0 (; 0 ;) (; has Stack IR ;) (nop) ) - (func $1 (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$d) (result f64) + (func $1 (; 1 ;) (; has Stack IR ;) (result f64) (unreachable) ) - (func $2 (; 2 ;) (; has Stack IR ;) (type $FUNCSIG$iidd) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + (func $2 (; 2 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) (unreachable) ) - (func $3 (; 3 ;) (; has Stack IR ;) (type $FUNCSIG$vj) (param $0 i64) + (func $3 (; 3 ;) (; has Stack IR ;) (param $0 i64) (unreachable) ) - (func $4 (; 4 ;) (; has Stack IR ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $4 (; 4 ;) (; has Stack IR ;) (param $0 f64) (result i32) (local $1 i32) (loop $label$1 (if diff --git a/test/passes/flatten_simplify-locals-nonesting_souperify-single-use_enable-threads.txt b/test/passes/flatten_simplify-locals-nonesting_souperify-single-use_enable-threads.txt index 499ddc8d9..2116e0e42 100644 --- a/test/passes/flatten_simplify-locals-nonesting_souperify-single-use_enable-threads.txt +++ b/test/passes/flatten_simplify-locals-nonesting_souperify-single-use_enable-threads.txt @@ -1432,22 +1432,22 @@ blockpc %0 1 %10 1:i1 infer %4 (module - (type $FUNCSIG$ijjj (func (param i64 i64 i64) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$jjjj (func (param i64 i64 i64) (result i64))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$vjjif (func (param i64 i64 i32 f32))) - (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_f64 (func (result f64))) + (type $none_=>_none (func)) + (type $i64_i64_i64_=>_i32 (func (param i64 i64 i64) (result i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i64_i64_i32_f32_=>_none (func (param i64 i64 i32 f32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i64_i64_i64_=>_i64 (func (param i64 i64 i64) (result i64))) (memory $0 (shared 1 1)) (export "replaced-print-internal" (func $55)) - (func $figure-1a (; 0 ;) (type $FUNCSIG$ijjj) (param $a i64) (param $x i64) (param $y i64) (result i32) + (func $figure-1a (; 0 ;) (param $a i64) (param $x i64) (param $y i64) (result i32) (local $i i32) (local $j i32) (local $r i32) @@ -1505,7 +1505,7 @@ infer %4 (local.get $16) ) ) - (func $figure-1b (; 1 ;) (type $FUNCSIG$ijjj) (param $a i64) (param $x i64) (param $y i64) (result i32) + (func $figure-1b (; 1 ;) (param $a i64) (param $x i64) (param $y i64) (result i32) (local $i i32) (local $j i32) (local $r i32) @@ -1581,7 +1581,7 @@ infer %4 ) (unreachable) ) - (func $figure-3-if (; 2 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $figure-3-if (; 2 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1645,7 +1645,7 @@ infer %4 (local.get $9) ) ) - (func $flips (; 3 ;) (type $FUNCSIG$v) + (func $flips (; 3 ;) (local $x i32) (local $y i32) (local $2 i32) @@ -1704,7 +1704,7 @@ infer %4 ) (nop) ) - (func $various-conditions-1 (; 4 ;) (type $FUNCSIG$vi) (param $x i32) + (func $various-conditions-1 (; 4 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1727,7 +1727,7 @@ infer %4 ) (nop) ) - (func $various-conditions-2 (; 5 ;) (type $FUNCSIG$vi) (param $x i32) + (func $various-conditions-2 (; 5 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1757,7 +1757,7 @@ infer %4 ) (nop) ) - (func $various-conditions-3 (; 6 ;) (type $FUNCSIG$vi) (param $x i32) + (func $various-conditions-3 (; 6 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1784,7 +1784,7 @@ infer %4 ) (nop) ) - (func $various-conditions-4 (; 7 ;) (type $FUNCSIG$vi) (param $x i32) + (func $various-conditions-4 (; 7 ;) (param $x i32) (local $1 i32) (local $2 i32) (block @@ -1806,7 +1806,7 @@ infer %4 ) (unreachable) ) - (func $unaries (; 8 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $unaries (; 8 ;) (param $x i32) (param $y i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1864,7 +1864,7 @@ infer %4 ) (nop) ) - (func $unary-condition (; 9 ;) (type $FUNCSIG$vi) (param $x i32) + (func $unary-condition (; 9 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1900,7 +1900,7 @@ infer %4 ) (nop) ) - (func $unary-condition-2 (; 10 ;) (type $FUNCSIG$vi) (param $x i32) + (func $unary-condition-2 (; 10 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1936,7 +1936,7 @@ infer %4 ) (nop) ) - (func $if-else-cond (; 11 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $if-else-cond (; 11 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2000,7 +2000,7 @@ infer %4 (local.get $9) ) ) - (func $trivial-ret (; 12 ;) (type $FUNCSIG$i) (result i32) + (func $trivial-ret (; 12 ;) (result i32) (local $0 i32) (local.set $0 (i32.add @@ -2012,12 +2012,12 @@ infer %4 (local.get $0) ) ) - (func $trivial-const (; 13 ;) (type $FUNCSIG$i) (result i32) + (func $trivial-const (; 13 ;) (result i32) (return (i32.const 0) ) ) - (func $trivial-const-block (; 14 ;) (type $FUNCSIG$i) (result i32) + (func $trivial-const-block (; 14 ;) (result i32) (local $0 i32) (local $1 i32) (block @@ -2031,7 +2031,7 @@ infer %4 (local.get $1) ) ) - (func $bad-phi-value (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $bad-phi-value (; 15 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2068,7 +2068,7 @@ infer %4 (local.get $3) ) ) - (func $bad-phi-value-2 (; 16 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $bad-phi-value-2 (; 16 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2117,7 +2117,7 @@ infer %4 (local.get $x) ) ) - (func $select (; 17 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $select (; 17 ;) (param $x i32) (result i32) (local $1 i32) (local.set $1 (select @@ -2131,7 +2131,7 @@ infer %4 ) (unreachable) ) - (func $select-2 (; 18 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $select-2 (; 18 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2174,7 +2174,7 @@ infer %4 ) (unreachable) ) - (func $block-phi-1 (; 19 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $block-phi-1 (; 19 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2225,7 +2225,7 @@ infer %4 (local.get $10) ) ) - (func $block-phi-2 (; 20 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $block-phi-2 (; 20 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2262,7 +2262,7 @@ infer %4 (local.get $6) ) ) - (func $zero_init-phi-bad_type (; 21 ;) (type $FUNCSIG$d) (result f64) + (func $zero_init-phi-bad_type (; 21 ;) (result f64) (local $x f64) (local $1 f64) (local $2 f64) @@ -2286,7 +2286,7 @@ infer %4 (local.get $x) ) ) - (func $phi-bad-type (; 22 ;) (type $FUNCSIG$d) (result f64) + (func $phi-bad-type (; 22 ;) (result f64) (local $0 f64) (local $1 f64) (local $2 f64) @@ -2309,7 +2309,7 @@ infer %4 (local.get $0) ) ) - (func $phi-one-side-i1 (; 23 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $phi-one-side-i1 (; 23 ;) (param $x i32) (param $y i32) (result i32) (local $i i32) (local $3 i32) (local $4 i32) @@ -2370,7 +2370,7 @@ infer %4 (local.get $i) ) ) - (func $call (; 24 ;) (type $FUNCSIG$i) (result i32) + (func $call (; 24 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2409,7 +2409,7 @@ infer %4 ) (unreachable) ) - (func $in-unreachable-1 (; 25 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-1 (; 25 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2454,7 +2454,7 @@ infer %4 (local.get $5) ) ) - (func $in-unreachable-2 (; 26 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-2 (; 26 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2495,7 +2495,7 @@ infer %4 (local.get $4) ) ) - (func $in-unreachable-3 (; 27 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-3 (; 27 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2545,7 +2545,7 @@ infer %4 (local.get $5) ) ) - (func $in-unreachable-4 (; 28 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-4 (; 28 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2597,7 +2597,7 @@ infer %4 (local.get $5) ) ) - (func $in-unreachable-br_if (; 29 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-br_if (; 29 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2651,7 +2651,7 @@ infer %4 (local.get $6) ) ) - (func $in-unreachable-big (; 30 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $in-unreachable-big (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2733,7 +2733,7 @@ infer %4 ) (nop) ) - (func $in-unreachable-operations (; 31 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-operations (; 31 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (block $block @@ -2766,7 +2766,7 @@ infer %4 ) (unreachable) ) - (func $merge-with-one-less (; 32 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $merge-with-one-less (; 32 ;) (param $var$0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2835,7 +2835,7 @@ infer %4 (local.get $6) ) ) - (func $deep (; 33 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $deep (; 33 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3134,7 +3134,7 @@ infer %4 (local.get $x) ) ) - (func $two-pcs (; 34 ;) (type $FUNCSIG$jjjj) (param $x i64) (param $y i64) (param $t i64) (result i64) + (func $two-pcs (; 34 ;) (param $x i64) (param $y i64) (param $t i64) (result i64) (local $3 i64) (local $4 i64) (local $5 i32) @@ -3259,7 +3259,7 @@ infer %4 (local.get $23) ) ) - (func $loop-1 (; 35 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-1 (; 35 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3296,7 +3296,7 @@ infer %4 (local.get $5) ) ) - (func $loop-2 (; 36 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-2 (; 36 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3357,7 +3357,7 @@ infer %4 (local.get $9) ) ) - (func $loop-3 (; 37 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-3 (; 37 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3424,7 +3424,7 @@ infer %4 (local.get $10) ) ) - (func $loop-4 (; 38 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-4 (; 38 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3480,7 +3480,7 @@ infer %4 (local.get $8) ) ) - (func $loop-5 (; 39 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-5 (; 39 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3540,7 +3540,7 @@ infer %4 (local.get $8) ) ) - (func $loop-6 (; 40 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-6 (; 40 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3600,7 +3600,7 @@ infer %4 (local.get $9) ) ) - (func $loop-7 (; 41 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-7 (; 41 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3660,7 +3660,7 @@ infer %4 (local.get $8) ) ) - (func $loop-8 (; 42 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-8 (; 42 ;) (param $x i32) (param $y i32) (result i32) (local $z i32) (local $w i32) (local $4 i32) @@ -3745,7 +3745,7 @@ infer %4 (local.get $14) ) ) - (func $loop-9 (; 43 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-9 (; 43 ;) (param $x i32) (param $y i32) (result i32) (local $t i32) (local $3 i32) (local $4 i32) @@ -3809,7 +3809,7 @@ infer %4 (local.get $10) ) ) - (func $loop-10 (; 44 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-10 (; 44 ;) (param $x i32) (param $y i32) (result i32) (local $t i32) (local $3 i32) (local $4 i32) @@ -3873,7 +3873,7 @@ infer %4 (local.get $10) ) ) - (func $loop-multicond-1 (; 45 ;) (type $FUNCSIG$iiii) (param $x i32) (param $y i32) (param $z i32) (result i32) + (func $loop-multicond-1 (; 45 ;) (param $x i32) (param $y i32) (param $z i32) (result i32) (local $t i32) (local $4 i32) (local $5 i32) @@ -3944,7 +3944,7 @@ infer %4 (local.get $10) ) ) - (func $loop-multicond-2 (; 46 ;) (type $FUNCSIG$iiii) (param $x i32) (param $y i32) (param $z i32) (result i32) + (func $loop-multicond-2 (; 46 ;) (param $x i32) (param $y i32) (param $z i32) (result i32) (local $t i32) (local $4 i32) (local $5 i32) @@ -4036,7 +4036,7 @@ infer %4 (local.get $16) ) ) - (func $loop-block-1 (; 47 ;) (type $FUNCSIG$iiii) (param $x i32) (param $y i32) (param $z i32) (result i32) + (func $loop-block-1 (; 47 ;) (param $x i32) (param $y i32) (param $z i32) (result i32) (local $t i32) (local $4 i32) (local $5 i32) @@ -4130,7 +4130,7 @@ infer %4 (local.get $16) ) ) - (func $loop-block-2 (; 48 ;) (type $FUNCSIG$iiii) (param $x i32) (param $y i32) (param $z i32) (result i32) + (func $loop-block-2 (; 48 ;) (param $x i32) (param $y i32) (param $z i32) (result i32) (local $t i32) (local $4 i32) (local $5 i32) @@ -4227,7 +4227,7 @@ infer %4 (local.get $16) ) ) - (func $bad-phi-type (; 49 ;) (type $FUNCSIG$vjjif) (param $var$0 i64) (param $var$1 i64) (param $var$2 i32) (param $var$3 f32) + (func $bad-phi-type (; 49 ;) (param $var$0 i64) (param $var$1 i64) (param $var$2 i32) (param $var$3 f32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4290,7 +4290,7 @@ infer %4 ) (nop) ) - (func $loop-unreachable (; 50 ;) (type $FUNCSIG$v) + (func $loop-unreachable (; 50 ;) (local $var$0 i32) (local $var$1 f64) (local $2 i32) @@ -4375,7 +4375,7 @@ infer %4 ) (unreachable) ) - (func $phi-value-turns-bad (; 51 ;) (type $FUNCSIG$d) (result f64) + (func $phi-value-turns-bad (; 51 ;) (result f64) (local $var$0 i32) (local $var$1 i32) (local $var$2 f32) @@ -4460,7 +4460,7 @@ infer %4 (local.get $16) ) ) - (func $multi-use (; 52 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $multi-use (; 52 ;) (param $x i32) (result i32) (local $temp i32) (local $2 i32) (local $3 i32) @@ -4494,7 +4494,7 @@ infer %4 (local.get $8) ) ) - (func $multi-use-2 (; 53 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $multi-use-2 (; 53 ;) (param $x i32) (result i32) (local $temp i32) (local $2 i32) (local $3 i32) @@ -4539,7 +4539,7 @@ infer %4 (local.get $10) ) ) - (func $many-single-uses-with-param (; 54 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $many-single-uses-with-param (; 54 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4582,7 +4582,7 @@ infer %4 ) (unreachable) ) - (func $55 (; 55 ;) (type $FUNCSIG$vi) (param $var$0 i32) + (func $55 (; 55 ;) (param $var$0 i32) (local $var$1 i32) (local $var$2 i32) (local $var$3 i32) @@ -4669,7 +4669,7 @@ infer %4 ) (nop) ) - (func $multiple-uses-to-non-expression (; 56 ;) (type $FUNCSIG$vi) (param $x i32) + (func $multiple-uses-to-non-expression (; 56 ;) (param $x i32) (local $temp i32) (local $2 i32) (local $3 i32) @@ -4707,7 +4707,7 @@ infer %4 ) (nop) ) - (func $nested-phi-forwarding (; 57 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $nested-phi-forwarding (; 57 ;) (param $var$0 i32) (result i32) (local $var$1 i32) (local $var$2 i32) (local $3 i32) @@ -4799,7 +4799,7 @@ infer %4 (local.get $9) ) ) - (func $zext-numGets (; 58 ;) (type $FUNCSIG$vii) (param $var$0 i32) (param $var$1 i32) + (func $zext-numGets (; 58 ;) (param $var$0 i32) (param $var$1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4853,7 +4853,7 @@ infer %4 ) (nop) ) - (func $zext-numGets-hasAnotherUse (; 59 ;) (type $FUNCSIG$vii) (param $var$0 i32) (param $var$1 i32) + (func $zext-numGets-hasAnotherUse (; 59 ;) (param $var$0 i32) (param $var$1 i32) (local $temp i32) (local $3 i32) (local $4 i32) @@ -4920,7 +4920,7 @@ infer %4 ) (nop) ) - (func $flipped-needs-right-origin (; 60 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $flipped-needs-right-origin (; 60 ;) (param $var$0 i32) (result i32) (local $var$1 i32) (local $2 i32) (local $3 i32) @@ -4977,7 +4977,7 @@ infer %4 (local.get $7) ) ) - (func $non-expr-nodes-may-have-multiple-uses-too-its-the-ORIGIN (; 61 ;) (type $FUNCSIG$iiii) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32) + (func $non-expr-nodes-may-have-multiple-uses-too-its-the-ORIGIN (; 61 ;) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5020,7 +5020,7 @@ infer %4 (local.get $8) ) ) - (func $loop-of-set-connections (; 62 ;) (type $FUNCSIG$iiiiii) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (param $var$3 i32) (param $var$4 i32) (result i32) + (func $loop-of-set-connections (; 62 ;) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (param $var$3 i32) (param $var$4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -5058,7 +5058,7 @@ infer %4 ) (unreachable) ) - (func $conditions-in-conditions (; 63 ;) (type $FUNCSIG$iiii) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32) + (func $conditions-in-conditions (; 63 ;) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32) (local $var$3 i32) (local $var$4 i32) (local $var$5 i32) diff --git a/test/passes/flatten_simplify-locals-nonesting_souperify_enable-threads.txt b/test/passes/flatten_simplify-locals-nonesting_souperify_enable-threads.txt index fd880b07d..488ba5c4b 100644 --- a/test/passes/flatten_simplify-locals-nonesting_souperify_enable-threads.txt +++ b/test/passes/flatten_simplify-locals-nonesting_souperify_enable-threads.txt @@ -1473,22 +1473,22 @@ blockpc %0 1 %10 1:i1 infer %4 (module - (type $FUNCSIG$ijjj (func (param i64 i64 i64) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$jjjj (func (param i64 i64 i64) (result i64))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$vjjif (func (param i64 i64 i32 f32))) - (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_f64 (func (result f64))) + (type $none_=>_none (func)) + (type $i64_i64_i64_=>_i32 (func (param i64 i64 i64) (result i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i64_i64_i32_f32_=>_none (func (param i64 i64 i32 f32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i64_i64_i64_=>_i64 (func (param i64 i64 i64) (result i64))) (memory $0 (shared 1 1)) (export "replaced-print-internal" (func $56)) - (func $figure-1a (; 0 ;) (type $FUNCSIG$ijjj) (param $a i64) (param $x i64) (param $y i64) (result i32) + (func $figure-1a (; 0 ;) (param $a i64) (param $x i64) (param $y i64) (result i32) (local $i i32) (local $j i32) (local $r i32) @@ -1546,7 +1546,7 @@ infer %4 (local.get $16) ) ) - (func $figure-1b (; 1 ;) (type $FUNCSIG$ijjj) (param $a i64) (param $x i64) (param $y i64) (result i32) + (func $figure-1b (; 1 ;) (param $a i64) (param $x i64) (param $y i64) (result i32) (local $i i32) (local $j i32) (local $r i32) @@ -1622,7 +1622,7 @@ infer %4 ) (unreachable) ) - (func $figure-3-if (; 2 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $figure-3-if (; 2 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1686,10 +1686,10 @@ infer %4 (local.get $9) ) ) - (func $send-i32 (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $send-i32 (; 3 ;) (param $0 i32) (nop) ) - (func $flips (; 4 ;) (type $FUNCSIG$v) + (func $flips (; 4 ;) (local $x i32) (local $y i32) (local $z i64) @@ -1810,7 +1810,7 @@ infer %4 ) (nop) ) - (func $various-conditions-1 (; 5 ;) (type $FUNCSIG$vi) (param $x i32) + (func $various-conditions-1 (; 5 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1833,7 +1833,7 @@ infer %4 ) (nop) ) - (func $various-conditions-2 (; 6 ;) (type $FUNCSIG$vi) (param $x i32) + (func $various-conditions-2 (; 6 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1863,7 +1863,7 @@ infer %4 ) (nop) ) - (func $various-conditions-3 (; 7 ;) (type $FUNCSIG$vi) (param $x i32) + (func $various-conditions-3 (; 7 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1890,7 +1890,7 @@ infer %4 ) (nop) ) - (func $various-conditions-4 (; 8 ;) (type $FUNCSIG$vi) (param $x i32) + (func $various-conditions-4 (; 8 ;) (param $x i32) (local $1 i32) (local $2 i32) (block @@ -1912,7 +1912,7 @@ infer %4 ) (unreachable) ) - (func $unaries (; 9 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $unaries (; 9 ;) (param $x i32) (param $y i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1970,7 +1970,7 @@ infer %4 ) (nop) ) - (func $unary-condition (; 10 ;) (type $FUNCSIG$vi) (param $x i32) + (func $unary-condition (; 10 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2006,7 +2006,7 @@ infer %4 ) (nop) ) - (func $unary-condition-2 (; 11 ;) (type $FUNCSIG$vi) (param $x i32) + (func $unary-condition-2 (; 11 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2042,7 +2042,7 @@ infer %4 ) (nop) ) - (func $if-else-cond (; 12 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $if-else-cond (; 12 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2106,7 +2106,7 @@ infer %4 (local.get $9) ) ) - (func $trivial-ret (; 13 ;) (type $FUNCSIG$i) (result i32) + (func $trivial-ret (; 13 ;) (result i32) (local $0 i32) (local.set $0 (i32.add @@ -2118,12 +2118,12 @@ infer %4 (local.get $0) ) ) - (func $trivial-const (; 14 ;) (type $FUNCSIG$i) (result i32) + (func $trivial-const (; 14 ;) (result i32) (return (i32.const 0) ) ) - (func $trivial-const-block (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $trivial-const-block (; 15 ;) (result i32) (local $0 i32) (local $1 i32) (block @@ -2137,7 +2137,7 @@ infer %4 (local.get $1) ) ) - (func $bad-phi-value (; 16 ;) (type $FUNCSIG$i) (result i32) + (func $bad-phi-value (; 16 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2174,7 +2174,7 @@ infer %4 (local.get $3) ) ) - (func $bad-phi-value-2 (; 17 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $bad-phi-value-2 (; 17 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2223,7 +2223,7 @@ infer %4 (local.get $x) ) ) - (func $select (; 18 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $select (; 18 ;) (param $x i32) (result i32) (local $1 i32) (local.set $1 (select @@ -2237,7 +2237,7 @@ infer %4 ) (unreachable) ) - (func $select-2 (; 19 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $select-2 (; 19 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2280,7 +2280,7 @@ infer %4 ) (unreachable) ) - (func $block-phi-1 (; 20 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $block-phi-1 (; 20 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2331,7 +2331,7 @@ infer %4 (local.get $10) ) ) - (func $block-phi-2 (; 21 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $block-phi-2 (; 21 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2368,7 +2368,7 @@ infer %4 (local.get $6) ) ) - (func $zero_init-phi-bad_type (; 22 ;) (type $FUNCSIG$d) (result f64) + (func $zero_init-phi-bad_type (; 22 ;) (result f64) (local $x f64) (local $1 f64) (local $2 f64) @@ -2392,7 +2392,7 @@ infer %4 (local.get $x) ) ) - (func $phi-bad-type (; 23 ;) (type $FUNCSIG$d) (result f64) + (func $phi-bad-type (; 23 ;) (result f64) (local $0 f64) (local $1 f64) (local $2 f64) @@ -2415,7 +2415,7 @@ infer %4 (local.get $0) ) ) - (func $phi-one-side-i1 (; 24 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $phi-one-side-i1 (; 24 ;) (param $x i32) (param $y i32) (result i32) (local $i i32) (local $3 i32) (local $4 i32) @@ -2476,7 +2476,7 @@ infer %4 (local.get $i) ) ) - (func $call (; 25 ;) (type $FUNCSIG$i) (result i32) + (func $call (; 25 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2515,7 +2515,7 @@ infer %4 ) (unreachable) ) - (func $in-unreachable-1 (; 26 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-1 (; 26 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2560,7 +2560,7 @@ infer %4 (local.get $5) ) ) - (func $in-unreachable-2 (; 27 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-2 (; 27 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2601,7 +2601,7 @@ infer %4 (local.get $4) ) ) - (func $in-unreachable-3 (; 28 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-3 (; 28 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2651,7 +2651,7 @@ infer %4 (local.get $5) ) ) - (func $in-unreachable-4 (; 29 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-4 (; 29 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2703,7 +2703,7 @@ infer %4 (local.get $5) ) ) - (func $in-unreachable-br_if (; 30 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-br_if (; 30 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2757,7 +2757,7 @@ infer %4 (local.get $6) ) ) - (func $in-unreachable-big (; 31 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $in-unreachable-big (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2839,7 +2839,7 @@ infer %4 ) (nop) ) - (func $in-unreachable-operations (; 32 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $in-unreachable-operations (; 32 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (block $block @@ -2872,7 +2872,7 @@ infer %4 ) (unreachable) ) - (func $merge-with-one-less (; 33 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $merge-with-one-less (; 33 ;) (param $var$0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2941,7 +2941,7 @@ infer %4 (local.get $6) ) ) - (func $deep (; 34 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $deep (; 34 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3240,7 +3240,7 @@ infer %4 (local.get $x) ) ) - (func $two-pcs (; 35 ;) (type $FUNCSIG$jjjj) (param $x i64) (param $y i64) (param $t i64) (result i64) + (func $two-pcs (; 35 ;) (param $x i64) (param $y i64) (param $t i64) (result i64) (local $3 i64) (local $4 i64) (local $5 i32) @@ -3365,7 +3365,7 @@ infer %4 (local.get $23) ) ) - (func $loop-1 (; 36 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-1 (; 36 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3402,7 +3402,7 @@ infer %4 (local.get $5) ) ) - (func $loop-2 (; 37 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-2 (; 37 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3463,7 +3463,7 @@ infer %4 (local.get $9) ) ) - (func $loop-3 (; 38 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-3 (; 38 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3530,7 +3530,7 @@ infer %4 (local.get $10) ) ) - (func $loop-4 (; 39 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-4 (; 39 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3586,7 +3586,7 @@ infer %4 (local.get $8) ) ) - (func $loop-5 (; 40 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-5 (; 40 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3646,7 +3646,7 @@ infer %4 (local.get $8) ) ) - (func $loop-6 (; 41 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-6 (; 41 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3706,7 +3706,7 @@ infer %4 (local.get $9) ) ) - (func $loop-7 (; 42 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-7 (; 42 ;) (param $x i32) (param $y i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3766,7 +3766,7 @@ infer %4 (local.get $8) ) ) - (func $loop-8 (; 43 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-8 (; 43 ;) (param $x i32) (param $y i32) (result i32) (local $z i32) (local $w i32) (local $4 i32) @@ -3851,7 +3851,7 @@ infer %4 (local.get $14) ) ) - (func $loop-9 (; 44 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-9 (; 44 ;) (param $x i32) (param $y i32) (result i32) (local $t i32) (local $3 i32) (local $4 i32) @@ -3915,7 +3915,7 @@ infer %4 (local.get $10) ) ) - (func $loop-10 (; 45 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $loop-10 (; 45 ;) (param $x i32) (param $y i32) (result i32) (local $t i32) (local $3 i32) (local $4 i32) @@ -3979,7 +3979,7 @@ infer %4 (local.get $10) ) ) - (func $loop-multicond-1 (; 46 ;) (type $FUNCSIG$iiii) (param $x i32) (param $y i32) (param $z i32) (result i32) + (func $loop-multicond-1 (; 46 ;) (param $x i32) (param $y i32) (param $z i32) (result i32) (local $t i32) (local $4 i32) (local $5 i32) @@ -4050,7 +4050,7 @@ infer %4 (local.get $10) ) ) - (func $loop-multicond-2 (; 47 ;) (type $FUNCSIG$iiii) (param $x i32) (param $y i32) (param $z i32) (result i32) + (func $loop-multicond-2 (; 47 ;) (param $x i32) (param $y i32) (param $z i32) (result i32) (local $t i32) (local $4 i32) (local $5 i32) @@ -4142,7 +4142,7 @@ infer %4 (local.get $16) ) ) - (func $loop-block-1 (; 48 ;) (type $FUNCSIG$iiii) (param $x i32) (param $y i32) (param $z i32) (result i32) + (func $loop-block-1 (; 48 ;) (param $x i32) (param $y i32) (param $z i32) (result i32) (local $t i32) (local $4 i32) (local $5 i32) @@ -4236,7 +4236,7 @@ infer %4 (local.get $16) ) ) - (func $loop-block-2 (; 49 ;) (type $FUNCSIG$iiii) (param $x i32) (param $y i32) (param $z i32) (result i32) + (func $loop-block-2 (; 49 ;) (param $x i32) (param $y i32) (param $z i32) (result i32) (local $t i32) (local $4 i32) (local $5 i32) @@ -4333,7 +4333,7 @@ infer %4 (local.get $16) ) ) - (func $bad-phi-type (; 50 ;) (type $FUNCSIG$vjjif) (param $var$0 i64) (param $var$1 i64) (param $var$2 i32) (param $var$3 f32) + (func $bad-phi-type (; 50 ;) (param $var$0 i64) (param $var$1 i64) (param $var$2 i32) (param $var$3 f32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4396,7 +4396,7 @@ infer %4 ) (nop) ) - (func $loop-unreachable (; 51 ;) (type $FUNCSIG$v) + (func $loop-unreachable (; 51 ;) (local $var$0 i32) (local $var$1 f64) (local $2 i32) @@ -4481,7 +4481,7 @@ infer %4 ) (unreachable) ) - (func $phi-value-turns-bad (; 52 ;) (type $FUNCSIG$d) (result f64) + (func $phi-value-turns-bad (; 52 ;) (result f64) (local $var$0 i32) (local $var$1 i32) (local $var$2 f32) @@ -4566,7 +4566,7 @@ infer %4 (local.get $16) ) ) - (func $multi-use (; 53 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $multi-use (; 53 ;) (param $x i32) (result i32) (local $temp i32) (local $2 i32) (local $3 i32) @@ -4600,7 +4600,7 @@ infer %4 (local.get $8) ) ) - (func $multi-use-2 (; 54 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $multi-use-2 (; 54 ;) (param $x i32) (result i32) (local $temp i32) (local $2 i32) (local $3 i32) @@ -4645,7 +4645,7 @@ infer %4 (local.get $10) ) ) - (func $many-single-uses-with-param (; 55 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $many-single-uses-with-param (; 55 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4688,7 +4688,7 @@ infer %4 ) (unreachable) ) - (func $56 (; 56 ;) (type $FUNCSIG$vi) (param $var$0 i32) + (func $56 (; 56 ;) (param $var$0 i32) (local $var$1 i32) (local $var$2 i32) (local $var$3 i32) @@ -4775,7 +4775,7 @@ infer %4 ) (nop) ) - (func $multiple-uses-to-non-expression (; 57 ;) (type $FUNCSIG$vi) (param $x i32) + (func $multiple-uses-to-non-expression (; 57 ;) (param $x i32) (local $temp i32) (local $2 i32) (local $3 i32) @@ -4813,7 +4813,7 @@ infer %4 ) (nop) ) - (func $nested-phi-forwarding (; 58 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $nested-phi-forwarding (; 58 ;) (param $var$0 i32) (result i32) (local $var$1 i32) (local $var$2 i32) (local $3 i32) @@ -4905,7 +4905,7 @@ infer %4 (local.get $9) ) ) - (func $zext-numGets (; 59 ;) (type $FUNCSIG$vii) (param $var$0 i32) (param $var$1 i32) + (func $zext-numGets (; 59 ;) (param $var$0 i32) (param $var$1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4959,7 +4959,7 @@ infer %4 ) (nop) ) - (func $zext-numGets-hasAnotherUse (; 60 ;) (type $FUNCSIG$vii) (param $var$0 i32) (param $var$1 i32) + (func $zext-numGets-hasAnotherUse (; 60 ;) (param $var$0 i32) (param $var$1 i32) (local $temp i32) (local $3 i32) (local $4 i32) @@ -5026,7 +5026,7 @@ infer %4 ) (nop) ) - (func $flipped-needs-right-origin (; 61 ;) (type $FUNCSIG$ii) (param $var$0 i32) (result i32) + (func $flipped-needs-right-origin (; 61 ;) (param $var$0 i32) (result i32) (local $var$1 i32) (local $2 i32) (local $3 i32) @@ -5083,7 +5083,7 @@ infer %4 (local.get $7) ) ) - (func $non-expr-nodes-may-have-multiple-uses-too-its-the-ORIGIN (; 62 ;) (type $FUNCSIG$iiii) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32) + (func $non-expr-nodes-may-have-multiple-uses-too-its-the-ORIGIN (; 62 ;) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5126,7 +5126,7 @@ infer %4 (local.get $8) ) ) - (func $loop-of-set-connections (; 63 ;) (type $FUNCSIG$iiiiii) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (param $var$3 i32) (param $var$4 i32) (result i32) + (func $loop-of-set-connections (; 63 ;) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (param $var$3 i32) (param $var$4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -5164,7 +5164,7 @@ infer %4 ) (unreachable) ) - (func $conditions-in-conditions (; 64 ;) (type $FUNCSIG$iiii) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32) + (func $conditions-in-conditions (; 64 ;) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32) (local $var$3 i32) (local $var$4 i32) (local $var$5 i32) diff --git a/test/passes/fpcast-emu.txt b/test/passes/fpcast-emu.txt index 012b58708..bfae4622e 100644 --- a/test/passes/fpcast-emu.txt +++ b/test/passes/fpcast-emu.txt @@ -1,16 +1,17 @@ (module - (type $vijfd (func (param i32 i64 f32 f64))) - (type $jii (func (param i32 i32) (result i64))) - (type $fjj (func (param i64 i64) (result f32))) - (type $dff (func (param f32 f32) (result f64))) - (type $idd (func (param f64 f64) (result i32))) - (type $FUNCSIG$fijfd (func (param i32 i64 f32 f64) (result f32))) - (type $FUNCSIG$jjjjjjjjjjjjjjjjj (func (param i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64) (result i64))) - (type $FUNCSIG$vijfd (func (param i32 i64 f32 f64))) - (type $FUNCSIG$jii (func (param i32 i32) (result i64))) - (type $FUNCSIG$fjj (func (param i64 i64) (result f32))) - (type $FUNCSIG$dff (func (param f32 f32) (result f64))) - (type $FUNCSIG$idd (func (param f64 f64) (result i32))) + (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64 (func (param i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64) (result i64))) + (type $i32_i32_i64_f32_f64_=>_none (func (param i32 i32 i64 f32 f64))) + (type $i32_i64_f32_f64_=>_none (func (param i32 i64 f32 f64))) + (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) + (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) + (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i32_=>_i64 (func (param i32 i32 i32) (result i64))) + (type $i32_i32_i64_f32_f64_=>_f32 (func (param i32 i32 i64 f32 f64) (result f32))) + (type $i32_i64_i64_=>_f32 (func (param i32 i64 i64) (result f32))) + (type $i32_i64_f32_f64_=>_f32 (func (param i32 i64 f32 f64) (result f32))) + (type $i64_i64_=>_f32 (func (param i64 i64) (result f32))) + (type $i32_f32_f32_=>_f64 (func (param i32 f32 f32) (result f64))) + (type $f32_f32_=>_f64 (func (param f32 f32) (result f64))) (import "env" "imported_func" (func $imported-func (param i32 i64 f32 f64) (result f32))) (table $0 10 10 funcref) (elem (i32.const 0) $byn$fpcast-emu$a $byn$fpcast-emu$b $byn$fpcast-emu$c $byn$fpcast-emu$d $byn$fpcast-emu$e $byn$fpcast-emu$e $byn$fpcast-emu$imported-func) @@ -20,9 +21,9 @@ (export "dynCall_dff" (func $dynCall_dff)) (export "dynCall_idd" (func $dynCall_idd)) (export "dynCall_fijfd" (func $dynCall_fijfd)) - (func $a (; 1 ;) (type $vijfd) (param $x i32) (param $y i64) (param $z f32) (param $w f64) + (func $a (; 1 ;) (param $x i32) (param $y i64) (param $z f32) (param $w f64) (drop - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (i64.extend_i32_u (i32.const 1) ) @@ -51,8 +52,8 @@ ) ) ) - (func $b (; 2 ;) (type $jii) (param $x i32) (param $y i32) (result i64) - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (func $b (; 2 ;) (param $x i32) (param $y i32) (result i64) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (i64.extend_i32_u (i32.const 1) ) @@ -76,10 +77,10 @@ (i32.const 1337) ) ) - (func $c (; 3 ;) (type $fjj) (param $x i64) (param $y i64) (result f32) + (func $c (; 3 ;) (param $x i64) (param $y i64) (result f32) (f32.reinterpret_i32 (i32.wrap_i64 - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (i64.const 1) (i64.const 2) (i64.const 0) @@ -101,9 +102,9 @@ ) ) ) - (func $d (; 4 ;) (type $dff) (param $x f32) (param $y f32) (result f64) + (func $d (; 4 ;) (param $x f32) (param $y f32) (result f64) (f64.reinterpret_i64 - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (i64.extend_i32_u (i32.reinterpret_f32 (f32.const 1) @@ -132,9 +133,9 @@ ) ) ) - (func $e (; 5 ;) (type $idd) (param $x f64) (param $y f64) (result i32) + (func $e (; 5 ;) (param $x f64) (param $y f64) (result i32) (i32.wrap_i64 - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (i64.reinterpret_f64 (f64.const 1) ) @@ -161,7 +162,7 @@ ) (func $dynCall_vijfd (; 6 ;) (param $fptr i32) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (drop - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (i64.extend_i32_u (local.get $0) ) @@ -191,7 +192,7 @@ ) ) (func $dynCall_jii (; 7 ;) (param $fptr i32) (param $0 i32) (param $1 i32) (result i64) - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (i64.extend_i32_u (local.get $0) ) @@ -218,7 +219,7 @@ (func $dynCall_fjj (; 8 ;) (param $fptr i32) (param $0 i64) (param $1 i64) (result f32) (f32.reinterpret_i32 (i32.wrap_i64 - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (local.get $0) (local.get $1) (i64.const 0) @@ -242,7 +243,7 @@ ) (func $dynCall_dff (; 9 ;) (param $fptr i32) (param $0 f32) (param $1 f32) (result f64) (f64.reinterpret_i64 - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (i64.extend_i32_u (i32.reinterpret_f32 (local.get $0) @@ -273,7 +274,7 @@ ) (func $dynCall_idd (; 10 ;) (param $fptr i32) (param $0 f64) (param $1 f64) (result i32) (i32.wrap_i64 - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (i64.reinterpret_f64 (local.get $0) ) @@ -301,7 +302,7 @@ (func $dynCall_fijfd (; 11 ;) (param $fptr i32) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result f32) (f32.reinterpret_i32 (i32.wrap_i64 - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (i64.extend_i32_u (local.get $0) ) @@ -331,7 +332,7 @@ ) ) ) - (func $byn$fpcast-emu$a (; 12 ;) (type $FUNCSIG$jjjjjjjjjjjjjjjjj) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) + (func $byn$fpcast-emu$a (; 12 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) (call $a (i32.wrap_i64 (local.get $0) @@ -348,7 +349,7 @@ ) (i64.const 0) ) - (func $byn$fpcast-emu$b (; 13 ;) (type $FUNCSIG$jjjjjjjjjjjjjjjjj) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) + (func $byn$fpcast-emu$b (; 13 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) (call $b (i32.wrap_i64 (local.get $0) @@ -358,7 +359,7 @@ ) ) ) - (func $byn$fpcast-emu$c (; 14 ;) (type $FUNCSIG$jjjjjjjjjjjjjjjjj) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) + (func $byn$fpcast-emu$c (; 14 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) (i64.extend_i32_u (i32.reinterpret_f32 (call $c @@ -368,7 +369,7 @@ ) ) ) - (func $byn$fpcast-emu$d (; 15 ;) (type $FUNCSIG$jjjjjjjjjjjjjjjjj) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) + (func $byn$fpcast-emu$d (; 15 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) (i64.reinterpret_f64 (call $d (f32.reinterpret_i32 @@ -384,7 +385,7 @@ ) ) ) - (func $byn$fpcast-emu$e (; 16 ;) (type $FUNCSIG$jjjjjjjjjjjjjjjjj) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) + (func $byn$fpcast-emu$e (; 16 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) (i64.extend_i32_u (call $e (f64.reinterpret_i64 @@ -396,7 +397,7 @@ ) ) ) - (func $byn$fpcast-emu$imported-func (; 17 ;) (type $FUNCSIG$jjjjjjjjjjjjjjjjj) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) + (func $byn$fpcast-emu$imported-func (; 17 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) (i64.extend_i32_u (i32.reinterpret_f32 (call $imported-func @@ -418,19 +419,18 @@ ) ) (module - (type $0 (func (param i64))) - (type $1 (func (param f32) (result i64))) - (type $FUNCSIG$jjjjjjjjjjjjjjjjj (func (param i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64) (result i64))) + (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64 (func (param i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) (table $0 42 42 funcref) (global $global$0 (mut i32) (i32.const 10)) (export "func_106" (func $0)) - (func $0 (; 0 ;) (type $1) (param $0 f32) (result i64) + (func $0 (; 0 ;) (param $0 f32) (result i64) (block $label$1 (result i64) (loop $label$2 (global.set $global$0 (i32.const 0) ) - (call_indirect (type $FUNCSIG$jjjjjjjjjjjjjjjjj) + (call_indirect (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64) (br $label$1 (i64.const 4294967295) ) @@ -456,26 +456,26 @@ ) ) (module - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vd (func (param f64))) - (type $FUNCSIG$jjjjjjjjjjjjjjjjj (func (param i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64) (result i64))) + (type $f32_=>_none (func (param f32))) + (type $i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_i64_=>_i64 (func (param i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64) (result i64))) + (type $f64_=>_none (func (param f64))) (table $0 42 42 funcref) (elem (i32.const 0) $byn$fpcast-emu$a $byn$fpcast-emu$b) (export "dynCall_vf" (func $dynCall_vf)) (export "dynCall_vd" (func $min_vd)) - (func $a (; 0 ;) (type $FUNCSIG$vf) (param $0 f32) + (func $a (; 0 ;) (param $0 f32) (nop) ) - (func $b (; 1 ;) (type $FUNCSIG$vd) (param $0 f64) + (func $b (; 1 ;) (param $0 f64) (nop) ) - (func $dynCall_vf (; 2 ;) (type $FUNCSIG$vf) (param $0 f32) + (func $dynCall_vf (; 2 ;) (param $0 f32) (nop) ) - (func $min_vd (; 3 ;) (type $FUNCSIG$vf) (param $0 f32) + (func $min_vd (; 3 ;) (param $0 f32) (nop) ) - (func $byn$fpcast-emu$a (; 4 ;) (type $FUNCSIG$jjjjjjjjjjjjjjjjj) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) + (func $byn$fpcast-emu$a (; 4 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) (call $a (f32.reinterpret_i32 (i32.wrap_i64 @@ -485,7 +485,7 @@ ) (i64.const 0) ) - (func $byn$fpcast-emu$b (; 5 ;) (type $FUNCSIG$jjjjjjjjjjjjjjjjj) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) + (func $byn$fpcast-emu$b (; 5 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (result i64) (call $b (f64.reinterpret_i64 (local.get $0) diff --git a/test/passes/func-metrics.txt b/test/passes/func-metrics.txt index a6e9b0c92..d2be75ca2 100644 --- a/test/passes/func-metrics.txt +++ b/test/passes/func-metrics.txt @@ -32,24 +32,24 @@ func: ifs drop : 6 if : 4 (module - (type $0 (func (param i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (memory $0 256 256) (data (i32.const 0) "\ff\ef\0f\1f 0@P\99") (table $0 256 256 funcref) (elem (i32.const 0) $ifs $ifs $ifs) (global $glob i32 (i32.const 1337)) - (func $empty (; 0 ;) (type $FUNCSIG$v) + (func $empty (; 0 ;) (nop) ) - (func $small (; 1 ;) (type $FUNCSIG$v) + (func $small (; 1 ;) (nop) (drop (i32.const 100421) ) (return) ) - (func $ifs (; 2 ;) (type $0) (param $x i32) + (func $ifs (; 2 ;) (param $x i32) (local $y f32) (block $block0 (if @@ -130,11 +130,11 @@ export: b (func_b) [removable-bytes-without-it]: 18 [total] : 0 (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "waka" (func $waka)) (export "a" (func $func_a)) (export "b" (func $func_b)) - (func $func_a (; 1 ;) (type $FUNCSIG$v) + (func $func_a (; 1 ;) (call $waka) (call $waka) (call $waka) @@ -143,7 +143,7 @@ export: b (func_b) (call $func_b) (call $func_c) ) - (func $func_b (; 2 ;) (type $FUNCSIG$v) + (func $func_b (; 2 ;) (call $waka) (call $waka) (call $waka) @@ -155,7 +155,7 @@ export: b (func_b) (call $waka) (call $waka) ) - (func $func_c (; 3 ;) (type $FUNCSIG$v) + (func $func_c (; 3 ;) (call $waka) (call $waka) (call $waka) @@ -193,11 +193,11 @@ start: func_a [removable-bytes-without-it]: 3 [total] : 0 (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "waka" (func $waka)) (export "a" (func $func_a)) (start $func_a) - (func $func_a (; 1 ;) (type $FUNCSIG$v) + (func $func_a (; 1 ;) (call $waka) (call $waka) (call $waka) @@ -222,10 +222,10 @@ start: func_a [removable-bytes-without-it]: 67 [total] : 0 (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "waka" (func $waka)) (start $func_a) - (func $func_a (; 1 ;) (type $FUNCSIG$v) + (func $func_a (; 1 ;) (call $waka) (call $waka) (call $waka) @@ -250,11 +250,11 @@ export: stackSave (0) [removable-bytes-without-it]: 66 [total] : 0 (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "STACKTOP" (global $gimport$0 i32)) (global $global$0 (mut i32) (global.get $gimport$0)) (export "stackSave" (func $0)) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (global.get $global$0) ) ) diff --git a/test/passes/fuzz-exec_O.txt b/test/passes/fuzz-exec_O.txt index 4dc97d94f..726ee4c10 100644 --- a/test/passes/fuzz-exec_O.txt +++ b/test/passes/fuzz-exec_O.txt @@ -1,12 +1,12 @@ [fuzz-exec] calling func_0 [fuzz-exec] calling func_1 (module - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) (memory $0 1 1) (export "func_0" (func $func_0)) (export "func_1" (func $func_1)) - (func $func_0 (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$j) (result i64) + (func $func_0 (; 0 ;) (; has Stack IR ;) (result i64) (block $label$0 (result i64) (br_if $label$0 (i64.const 1234) @@ -16,7 +16,7 @@ ) ) ) - (func $func_1 (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) + (func $func_1 (; 1 ;) (; has Stack IR ;) (result i32) (i32.load16_s offset=22 align=1 (i32.const -1) ) diff --git a/test/passes/fuzz-exec_enable-sign-ext.txt b/test/passes/fuzz-exec_enable-sign-ext.txt index 68a2d078f..6ed9edfd8 100644 --- a/test/passes/fuzz-exec_enable-sign-ext.txt +++ b/test/passes/fuzz-exec_enable-sign-ext.txt @@ -9,34 +9,34 @@ [fuzz-exec] calling e [fuzz-exec] note result: e => -2146649112 (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$j (func (result i64))) + (type $none_=>_i64 (func (result i64))) + (type $none_=>_i32 (func (result i32))) (export "a" (func $a)) (export "b" (func $b)) (export "c" (func $c)) (export "d" (func $d)) (export "e" (func $e)) - (func $a (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $a (; 0 ;) (result i32) (i32.extend8_s (i32.const 187) ) ) - (func $b (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $b (; 1 ;) (result i32) (i32.extend16_s (i32.const 33768) ) ) - (func $c (; 2 ;) (type $FUNCSIG$j) (result i64) + (func $c (; 2 ;) (result i64) (i64.extend8_s (i64.const 187) ) ) - (func $d (; 3 ;) (type $FUNCSIG$j) (result i64) + (func $d (; 3 ;) (result i64) (i64.extend16_s (i64.const 33768) ) ) - (func $e (; 4 ;) (type $FUNCSIG$j) (result i64) + (func $e (; 4 ;) (result i64) (i64.extend32_s (i64.const 2148318184) ) diff --git a/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_enable-exception-handling.txt b/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_enable-exception-handling.txt index 2a9cf6be7..8e9dfc415 100644 --- a/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_enable-exception-handling.txt +++ b/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_enable-exception-handling.txt @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (event $e0 (attr 0) (param i32)) - (func $eh (; 0 ;) (type $FUNCSIG$v) + (func $eh (; 0 ;) (local $exn exnref) try i32.const 0 @@ -19,10 +19,10 @@ ) ) (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (event $e0 (attr 0) (param i32)) - (func $eh (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $eh (; 0 ;) (; has Stack IR ;) (local $exn exnref) (try (throw $e0 diff --git a/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_optimize-level=3.txt b/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_optimize-level=3.txt index fd4f749c4..34ba64c20 100644 --- a/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_optimize-level=3.txt +++ b/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_optimize-level=3.txt @@ -1,14 +1,14 @@ (module - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $4 (func (result f64))) - (type $5 (func (result i32))) - (type $6 (func (param i32) (result i32))) - (type $7 (func (param f64) (result f64))) - (type $8 (func (result i64))) - (type $9 (func (param i32 i64))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f32_=>_none (func (param f32))) + (type $none_=>_f64 (func (result f64))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i64_=>_none (func (param i32 i64))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi)) (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) @@ -17,7 +17,7 @@ (table $0 10 funcref) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) (export "big_negative" (func $big_negative)) - (func $big_negative (; 3 ;) (type $FUNCSIG$v) + (func $big_negative (; 3 ;) (local $temp f64) f64.const -2147483648 local.set $temp @@ -30,7 +30,7 @@ f64.const -0.039625 local.set $temp ) - (func $importedDoubles (; 4 ;) (type $4) (result f64) + (func $importedDoubles (; 4 ;) (result f64) (local $temp f64) block $topmost (result f64) i32.const 8 @@ -66,7 +66,7 @@ f64.const 1.2 end ) - (func $doubleCompares (; 5 ;) (type $FUNCSIG$ddd) (param $x f64) (param $y f64) (result f64) + (func $doubleCompares (; 5 ;) (param $x f64) (param $y f64) (result f64) (local $t f64) (local $Int f64) (local $Double i32) @@ -102,13 +102,13 @@ local.get $y end ) - (func $intOps (; 6 ;) (type $5) (result i32) + (func $intOps (; 6 ;) (result i32) (local $x i32) local.get $x i32.const 0 i32.eq ) - (func $hexLiterals (; 7 ;) (type $FUNCSIG$v) + (func $hexLiterals (; 7 ;) i32.const 0 i32.const 313249263 i32.add @@ -116,7 +116,7 @@ i32.add drop ) - (func $conversions (; 8 ;) (type $FUNCSIG$v) + (func $conversions (; 8 ;) (local $i i32) (local $d f64) local.get $d @@ -131,7 +131,7 @@ f64.convert_i32_u local.set $d ) - (func $seq (; 9 ;) (type $FUNCSIG$v) + (func $seq (; 9 ;) (local $J f64) f64.const 0.1 drop @@ -142,7 +142,7 @@ f64.sub local.set $J ) - (func $switcher (; 10 ;) (type $6) (param $x i32) (result i32) + (func $switcher (; 10 ;) (param $x i32) (result i32) block $topmost (result i32) block $switch-default$3 block $switch-case$2 @@ -206,17 +206,17 @@ i32.const 0 end ) - (func $blocker (; 11 ;) (type $FUNCSIG$v) + (func $blocker (; 11 ;) block $label$break$L br $label$break$L end ) - (func $frem (; 12 ;) (type $4) (result f64) + (func $frem (; 12 ;) (result f64) f64.const 5.5 f64.const 1.2 call $f64-rem ) - (func $big_uint_div_u (; 13 ;) (type $5) (result i32) + (func $big_uint_div_u (; 13 ;) (result i32) (local $x i32) i32.const -1 i32.const 2 @@ -224,7 +224,7 @@ i32.const -1 i32.and ) - (func $fr (; 14 ;) (type $FUNCSIG$vf) (param $x f32) + (func $fr (; 14 ;) (param $x f32) (local $y f32) (local $z f64) local.get $z @@ -241,10 +241,10 @@ f32.const 0 drop ) - (func $negZero (; 15 ;) (type $4) (result f64) + (func $negZero (; 15 ;) (result f64) f64.const -0 ) - (func $abs (; 16 ;) (type $FUNCSIG$v) + (func $abs (; 16 ;) (local $x i32) (local $y f64) (local $z f32) @@ -267,7 +267,7 @@ f32.abs local.set $z ) - (func $neg (; 17 ;) (type $FUNCSIG$v) + (func $neg (; 17 ;) (local $x f32) local.get $x f32.neg @@ -276,18 +276,18 @@ i32.and i32.const 8 i32.add - call_indirect (type $FUNCSIG$vf) + call_indirect (type $f32_=>_none) ) - (func $cneg (; 18 ;) (type $FUNCSIG$vf) (param $x f32) + (func $cneg (; 18 ;) (param $x f32) local.get $x i32.const 1 i32.const 7 i32.and i32.const 8 i32.add - call_indirect (type $FUNCSIG$vf) + call_indirect (type $f32_=>_none) ) - (func $___syscall_ret (; 19 ;) (type $FUNCSIG$v) + (func $___syscall_ret (; 19 ;) (local $$0 i32) local.get $$0 i32.const 0 @@ -296,13 +296,13 @@ i32.gt_u drop ) - (func $z (; 20 ;) (type $FUNCSIG$v) + (func $z (; 20 ;) nop ) - (func $w (; 21 ;) (type $FUNCSIG$v) + (func $w (; 21 ;) nop ) - (func $block_and_after (; 22 ;) (type $5) (result i32) + (func $block_and_after (; 22 ;) (result i32) block $waka i32.const 1 drop @@ -310,46 +310,46 @@ end i32.const 0 ) - (func $loop-roundtrip (; 23 ;) (type $7) (param $0 f64) (result f64) + (func $loop-roundtrip (; 23 ;) (param $0 f64) (result f64) loop $loop-in1 (result f64) local.get $0 drop local.get $0 end ) - (func $big-i64 (; 24 ;) (type $8) (result i64) + (func $big-i64 (; 24 ;) (result i64) i64.const -9218868437227405313 ) - (func $i64-store32 (; 25 ;) (type $9) (param $0 i32) (param $1 i64) + (func $i64-store32 (; 25 ;) (param $0 i32) (param $1 i64) local.get $0 local.get $1 i64.store32 ) - (func $return-unreachable (; 26 ;) (type $5) (result i32) + (func $return-unreachable (; 26 ;) (result i32) i32.const 1 return ) - (func $unreachable-block (; 27 ;) (type $5) (result i32) + (func $unreachable-block (; 27 ;) (result i32) i32.const 1 drop i32.const 2 return ) - (func $unreachable-block-toplevel (; 28 ;) (type $5) (result i32) + (func $unreachable-block-toplevel (; 28 ;) (result i32) i32.const 1 drop i32.const 2 return ) - (func $unreachable-block0 (; 29 ;) (type $5) (result i32) + (func $unreachable-block0 (; 29 ;) (result i32) i32.const 2 return ) - (func $unreachable-block0-toplevel (; 30 ;) (type $5) (result i32) + (func $unreachable-block0-toplevel (; 30 ;) (result i32) i32.const 2 return ) - (func $unreachable-block-with-br (; 31 ;) (type $5) (result i32) + (func $unreachable-block-with-br (; 31 ;) (result i32) block $block i32.const 1 drop @@ -357,7 +357,7 @@ end i32.const 1 ) - (func $unreachable-if (; 32 ;) (type $5) (result i32) + (func $unreachable-if (; 32 ;) (result i32) i32.const 3 if i32.const 2 @@ -368,7 +368,7 @@ end unreachable ) - (func $unreachable-if-toplevel (; 33 ;) (type $5) (result i32) + (func $unreachable-if-toplevel (; 33 ;) (result i32) i32.const 3 if i32.const 2 @@ -379,7 +379,7 @@ end unreachable ) - (func $unreachable-loop (; 34 ;) (type $5) (result i32) + (func $unreachable-loop (; 34 ;) (result i32) loop $loop-in nop i32.const 1 @@ -387,14 +387,14 @@ end unreachable ) - (func $unreachable-loop0 (; 35 ;) (type $5) (result i32) + (func $unreachable-loop0 (; 35 ;) (result i32) loop $loop-in i32.const 1 return end unreachable ) - (func $unreachable-loop-toplevel (; 36 ;) (type $5) (result i32) + (func $unreachable-loop-toplevel (; 36 ;) (result i32) loop $loop-in nop i32.const 1 @@ -402,17 +402,17 @@ end unreachable ) - (func $unreachable-loop0-toplevel (; 37 ;) (type $5) (result i32) + (func $unreachable-loop0-toplevel (; 37 ;) (result i32) loop $loop-in i32.const 1 return end unreachable ) - (func $unreachable-ifs (; 38 ;) (type $FUNCSIG$v) + (func $unreachable-ifs (; 38 ;) unreachable ) - (func $unreachable-if-arm (; 39 ;) (type $FUNCSIG$v) + (func $unreachable-if-arm (; 39 ;) i32.const 1 if nop @@ -420,7 +420,7 @@ unreachable end ) - (func $local-to-stack (; 40 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack (; 40 ;) (param $x i32) (result i32) (local $temp i32) i32.const 1 call $local-to-stack @@ -428,7 +428,7 @@ call $local-to-stack drop ) - (func $local-to-stack-1 (; 41 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-1 (; 41 ;) (param $x i32) (result i32) (local $temp i32) i32.const 1 call $local-to-stack @@ -437,7 +437,7 @@ drop i32.eqz ) - (func $local-to-stack-1b (; 42 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-1b (; 42 ;) (param $x i32) (result i32) (local $temp i32) i32.const 1 call $local-to-stack @@ -447,7 +447,7 @@ i32.const 3 i32.add ) - (func $local-to-stack-1c-no (; 43 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-1c-no (; 43 ;) (param $x i32) (result i32) (local $temp i32) i32.const 1 call $local-to-stack @@ -459,7 +459,7 @@ local.get $temp i32.add ) - (func $local-to-stack-2-no (; 44 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-2-no (; 44 ;) (param $x i32) (result i32) (local $temp i32) i32.const 1 call $local-to-stack @@ -471,7 +471,7 @@ local.get $temp i32.add ) - (func $local-to-stack-3-no (; 45 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-3-no (; 45 ;) (param $x i32) (result i32) (local $temp i32) i32.const 1 if @@ -488,7 +488,7 @@ drop local.get $temp ) - (func $local-to-stack-multi-4 (; 46 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-multi-4 (; 46 ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) i32.const 1 @@ -503,7 +503,7 @@ call $local-to-stack-multi-4 drop ) - (func $local-to-stack-multi-5 (; 47 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-multi-5 (; 47 ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) i32.const 1 @@ -518,7 +518,7 @@ call $local-to-stack-multi-4 drop ) - (func $local-to-stack-multi-6-justone (; 48 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-multi-6-justone (; 48 ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) i32.const 1 @@ -537,7 +537,7 @@ local.get $temp2 i32.add ) - (func $local-to-stack-multi-7-justone (; 49 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-multi-7-justone (; 49 ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) i32.const 1 @@ -556,7 +556,7 @@ call $local-to-stack-multi-4 drop ) - (func $local-to-stack-overlapping-multi-8-no (; 50 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-overlapping-multi-8-no (; 50 ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) i32.const 1 @@ -570,7 +570,7 @@ local.get $temp1 i32.add ) - (func $local-to-stack-overlapping-multi-9-yes (; 51 ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-overlapping-multi-9-yes (; 51 ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) i32.const 1 @@ -582,7 +582,7 @@ drop i32.add ) - (func $local-to-stack-through-control-flow (; 52 ;) (type $FUNCSIG$v) + (func $local-to-stack-through-control-flow (; 52 ;) (local $temp1 i32) (local $temp2 i32) i32.const 0 @@ -602,7 +602,7 @@ drop drop ) - (func $local-to-stack-in-control-flow (; 53 ;) (type $FUNCSIG$v) + (func $local-to-stack-in-control-flow (; 53 ;) (local $temp1 i32) i32.const 0 if @@ -615,7 +615,7 @@ drop end ) - (func $remove-block (; 54 ;) (type $6) (param $x i32) (result i32) + (func $remove-block (; 54 ;) (param $x i32) (result i32) (local $temp i32) i32.const 0 call $remove-block @@ -629,16 +629,16 @@ ) ) (module - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $4 (func (result f64))) - (type $5 (func (result i32))) - (type $6 (func (param i32) (result i32))) - (type $7 (func (param f64) (result f64))) - (type $8 (func (result i64))) - (type $9 (func (param i32 i64))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f32_=>_none (func (param f32))) + (type $none_=>_f64 (func (result f64))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i64_=>_none (func (param i32 i64))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi)) (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) @@ -647,7 +647,7 @@ (table $0 10 funcref) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) (export "big_negative" (func $big_negative)) - (func $big_negative (; 3 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $big_negative (; 3 ;) (; has Stack IR ;) (local $temp f64) (block $block0 (local.set $temp @@ -667,7 +667,7 @@ ) ) ) - (func $importedDoubles (; 4 ;) (; has Stack IR ;) (type $4) (result f64) + (func $importedDoubles (; 4 ;) (; has Stack IR ;) (result f64) (local $temp f64) (block $topmost (result f64) (local.set $temp @@ -719,7 +719,7 @@ (f64.const 1.2) ) ) - (func $doubleCompares (; 5 ;) (; has Stack IR ;) (type $FUNCSIG$ddd) (param $x f64) (param $y f64) (result f64) + (func $doubleCompares (; 5 ;) (; has Stack IR ;) (param $x f64) (param $y f64) (result f64) (local $t f64) (local $Int f64) (local $Double i32) @@ -763,14 +763,14 @@ (local.get $y) ) ) - (func $intOps (; 6 ;) (; has Stack IR ;) (type $5) (result i32) + (func $intOps (; 6 ;) (; has Stack IR ;) (result i32) (local $x i32) (i32.eq (local.get $x) (i32.const 0) ) ) - (func $hexLiterals (; 7 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $hexLiterals (; 7 ;) (; has Stack IR ;) (drop (i32.add (i32.add @@ -781,7 +781,7 @@ ) ) ) - (func $conversions (; 8 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $conversions (; 8 ;) (; has Stack IR ;) (local $i i32) (local $d f64) (block $block0 @@ -805,7 +805,7 @@ ) ) ) - (func $seq (; 9 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $seq (; 9 ;) (; has Stack IR ;) (local $J f64) (local.set $J (f64.sub @@ -824,7 +824,7 @@ ) ) ) - (func $switcher (; 10 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $switcher (; 10 ;) (; has Stack IR ;) (param $x i32) (result i32) (block $topmost (result i32) (block $switch$0 (block $switch-default$3 @@ -910,18 +910,18 @@ (i32.const 0) ) ) - (func $blocker (; 11 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $blocker (; 11 ;) (; has Stack IR ;) (block $label$break$L (br $label$break$L) ) ) - (func $frem (; 12 ;) (; has Stack IR ;) (type $4) (result f64) + (func $frem (; 12 ;) (; has Stack IR ;) (result f64) (call $f64-rem (f64.const 5.5) (f64.const 1.2) ) ) - (func $big_uint_div_u (; 13 ;) (; has Stack IR ;) (type $5) (result i32) + (func $big_uint_div_u (; 13 ;) (; has Stack IR ;) (result i32) (local $x i32) (block $topmost (result i32) (local.set $x @@ -936,7 +936,7 @@ (local.get $x) ) ) - (func $fr (; 14 ;) (; has Stack IR ;) (type $FUNCSIG$vf) (param $x f32) + (func $fr (; 14 ;) (; has Stack IR ;) (param $x f32) (local $y f32) (local $z f64) (block $block0 @@ -962,10 +962,10 @@ ) ) ) - (func $negZero (; 15 ;) (; has Stack IR ;) (type $4) (result f64) + (func $negZero (; 15 ;) (; has Stack IR ;) (result f64) (f64.const -0) ) - (func $abs (; 16 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $abs (; 16 ;) (; has Stack IR ;) (local $x i32) (local $y f64) (local $z f32) @@ -1001,7 +1001,7 @@ ) ) ) - (func $neg (; 17 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $neg (; 17 ;) (; has Stack IR ;) (local $x f32) (block $block0 (local.set $x @@ -1009,7 +1009,7 @@ (local.get $x) ) ) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (local.get $x) (i32.add (i32.and @@ -1021,8 +1021,8 @@ ) ) ) - (func $cneg (; 18 ;) (; has Stack IR ;) (type $FUNCSIG$vf) (param $x f32) - (call_indirect (type $FUNCSIG$vf) + (func $cneg (; 18 ;) (; has Stack IR ;) (param $x f32) + (call_indirect (type $f32_=>_none) (local.get $x) (i32.add (i32.and @@ -1033,7 +1033,7 @@ ) ) ) - (func $___syscall_ret (; 19 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $___syscall_ret (; 19 ;) (; has Stack IR ;) (local $$0 i32) (drop (i32.gt_u @@ -1045,13 +1045,13 @@ ) ) ) - (func $z (; 20 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $z (; 20 ;) (; has Stack IR ;) (nop) ) - (func $w (; 21 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $w (; 21 ;) (; has Stack IR ;) (nop) ) - (func $block_and_after (; 22 ;) (; has Stack IR ;) (type $5) (result i32) + (func $block_and_after (; 22 ;) (; has Stack IR ;) (result i32) (block $waka (drop (i32.const 1) @@ -1060,7 +1060,7 @@ ) (i32.const 0) ) - (func $loop-roundtrip (; 23 ;) (; has Stack IR ;) (type $7) (param $0 f64) (result f64) + (func $loop-roundtrip (; 23 ;) (; has Stack IR ;) (param $0 f64) (result f64) (loop $loop-in1 (result f64) (drop (local.get $0) @@ -1068,21 +1068,21 @@ (local.get $0) ) ) - (func $big-i64 (; 24 ;) (; has Stack IR ;) (type $8) (result i64) + (func $big-i64 (; 24 ;) (; has Stack IR ;) (result i64) (i64.const -9218868437227405313) ) - (func $i64-store32 (; 25 ;) (; has Stack IR ;) (type $9) (param $0 i32) (param $1 i64) + (func $i64-store32 (; 25 ;) (; has Stack IR ;) (param $0 i32) (param $1 i64) (i64.store32 (local.get $0) (local.get $1) ) ) - (func $return-unreachable (; 26 ;) (; has Stack IR ;) (type $5) (result i32) + (func $return-unreachable (; 26 ;) (; has Stack IR ;) (result i32) (return (i32.const 1) ) ) - (func $unreachable-block (; 27 ;) (; has Stack IR ;) (type $5) (result i32) + (func $unreachable-block (; 27 ;) (; has Stack IR ;) (result i32) (f64.abs (block $block (drop @@ -1094,7 +1094,7 @@ ) ) ) - (func $unreachable-block-toplevel (; 28 ;) (; has Stack IR ;) (type $5) (result i32) + (func $unreachable-block-toplevel (; 28 ;) (; has Stack IR ;) (result i32) (block $block (drop (i32.const 1) @@ -1104,7 +1104,7 @@ ) ) ) - (func $unreachable-block0 (; 29 ;) (; has Stack IR ;) (type $5) (result i32) + (func $unreachable-block0 (; 29 ;) (; has Stack IR ;) (result i32) (f64.abs (block $block (return @@ -1113,14 +1113,14 @@ ) ) ) - (func $unreachable-block0-toplevel (; 30 ;) (; has Stack IR ;) (type $5) (result i32) + (func $unreachable-block0-toplevel (; 30 ;) (; has Stack IR ;) (result i32) (block $block (return (i32.const 2) ) ) ) - (func $unreachable-block-with-br (; 31 ;) (; has Stack IR ;) (type $5) (result i32) + (func $unreachable-block-with-br (; 31 ;) (; has Stack IR ;) (result i32) (block $block (drop (i32.const 1) @@ -1129,7 +1129,7 @@ ) (i32.const 1) ) - (func $unreachable-if (; 32 ;) (; has Stack IR ;) (type $5) (result i32) + (func $unreachable-if (; 32 ;) (; has Stack IR ;) (result i32) (f64.abs (if (i32.const 3) @@ -1142,7 +1142,7 @@ ) ) ) - (func $unreachable-if-toplevel (; 33 ;) (; has Stack IR ;) (type $5) (result i32) + (func $unreachable-if-toplevel (; 33 ;) (; has Stack IR ;) (result i32) (if (i32.const 3) (return @@ -1153,7 +1153,7 @@ ) ) ) - (func $unreachable-loop (; 34 ;) (; has Stack IR ;) (type $5) (result i32) + (func $unreachable-loop (; 34 ;) (; has Stack IR ;) (result i32) (f64.abs (loop $loop-in (nop) @@ -1163,7 +1163,7 @@ ) ) ) - (func $unreachable-loop0 (; 35 ;) (; has Stack IR ;) (type $5) (result i32) + (func $unreachable-loop0 (; 35 ;) (; has Stack IR ;) (result i32) (f64.abs (loop $loop-in (return @@ -1172,7 +1172,7 @@ ) ) ) - (func $unreachable-loop-toplevel (; 36 ;) (; has Stack IR ;) (type $5) (result i32) + (func $unreachable-loop-toplevel (; 36 ;) (; has Stack IR ;) (result i32) (loop $loop-in (nop) (return @@ -1180,14 +1180,14 @@ ) ) ) - (func $unreachable-loop0-toplevel (; 37 ;) (; has Stack IR ;) (type $5) (result i32) + (func $unreachable-loop0-toplevel (; 37 ;) (; has Stack IR ;) (result i32) (loop $loop-in (return (i32.const 1) ) ) ) - (func $unreachable-ifs (; 38 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $unreachable-ifs (; 38 ;) (; has Stack IR ;) (if (unreachable) (nop) @@ -1232,7 +1232,7 @@ (unreachable) ) ) - (func $unreachable-if-arm (; 39 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $unreachable-if-arm (; 39 ;) (; has Stack IR ;) (if (i32.const 1) (block $block @@ -1246,7 +1246,7 @@ ) ) ) - (func $local-to-stack (; 40 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack (; 40 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp i32) (local.set $temp (call $local-to-stack @@ -1260,7 +1260,7 @@ ) (local.get $temp) ) - (func $local-to-stack-1 (; 41 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-1 (; 41 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp i32) (local.set $temp (call $local-to-stack @@ -1276,7 +1276,7 @@ (local.get $temp) ) ) - (func $local-to-stack-1b (; 42 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-1b (; 42 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp i32) (local.set $temp (call $local-to-stack @@ -1293,7 +1293,7 @@ (i32.const 3) ) ) - (func $local-to-stack-1c-no (; 43 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-1c-no (; 43 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp i32) (local.set $temp (call $local-to-stack @@ -1310,7 +1310,7 @@ (local.get $temp) ) ) - (func $local-to-stack-2-no (; 44 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-2-no (; 44 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp i32) (local.set $temp (call $local-to-stack @@ -1327,7 +1327,7 @@ (local.get $temp) ) ) - (func $local-to-stack-3-no (; 45 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-3-no (; 45 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp i32) (if (i32.const 1) @@ -1349,7 +1349,7 @@ ) (local.get $temp) ) - (func $local-to-stack-multi-4 (; 46 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-multi-4 (; 46 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) (local.set $temp1 @@ -1377,7 +1377,7 @@ ) (local.get $temp1) ) - (func $local-to-stack-multi-5 (; 47 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-multi-5 (; 47 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) (local.set $temp1 @@ -1405,7 +1405,7 @@ ) (local.get $temp2) ) - (func $local-to-stack-multi-6-justone (; 48 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-multi-6-justone (; 48 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) (local.set $temp1 @@ -1436,7 +1436,7 @@ (local.get $temp2) ) ) - (func $local-to-stack-multi-7-justone (; 49 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-multi-7-justone (; 49 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) (local.set $temp1 @@ -1467,7 +1467,7 @@ ) (local.get $temp2) ) - (func $local-to-stack-overlapping-multi-8-no (; 50 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-overlapping-multi-8-no (; 50 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) (local.set $temp1 @@ -1490,7 +1490,7 @@ (local.get $temp1) ) ) - (func $local-to-stack-overlapping-multi-9-yes (; 51 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $local-to-stack-overlapping-multi-9-yes (; 51 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp1 i32) (local $temp2 i32) (local.set $temp1 @@ -1513,7 +1513,7 @@ (local.get $temp2) ) ) - (func $local-to-stack-through-control-flow (; 52 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $local-to-stack-through-control-flow (; 52 ;) (; has Stack IR ;) (local $temp1 i32) (local $temp2 i32) (local.set $temp2 @@ -1548,7 +1548,7 @@ (local.get $temp2) ) ) - (func $local-to-stack-in-control-flow (; 53 ;) (; has Stack IR ;) (type $FUNCSIG$v) + (func $local-to-stack-in-control-flow (; 53 ;) (; has Stack IR ;) (local $temp1 i32) (if (i32.const 0) @@ -1574,7 +1574,7 @@ ) ) ) - (func $remove-block (; 54 ;) (; has Stack IR ;) (type $6) (param $x i32) (result i32) + (func $remove-block (; 54 ;) (; has Stack IR ;) (param $x i32) (result i32) (local $temp i32) (i32.add (call $remove-block diff --git a/test/passes/inline-main.txt b/test/passes/inline-main.txt index f8704b7be..9f2d5d7b0 100644 --- a/test/passes/inline-main.txt +++ b/test/passes/inline-main.txt @@ -1,42 +1,42 @@ (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (export "main" (func $main)) - (func $__original_main (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $__original_main (; 0 ;) (result i32) (i32.const 0) ) - (func $main (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 1 ;) (param $0 i32) (param $1 i32) (result i32) (block $__inlined_func$__original_main (result i32) (i32.const 0) ) ) ) (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (export "main" (func $main)) - (func $__original_main (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $__original_main (; 0 ;) (result i32) (i32.const 0) ) - (func $main (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 1 ;) (param $0 i32) (param $1 i32) (result i32) (i32.const 0) ) ) (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (export "main" (func $main)) - (func $main (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (i32.const 0) ) ) (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (export "main" (func $main)) - (func $__original_main (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $__original_main (; 0 ;) (result i32) (i32.const 0) ) - (func $main (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 1 ;) (param $0 i32) (param $1 i32) (result i32) (drop (call $__original_main) ) @@ -44,26 +44,26 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) - (func $__original_main (; 0 ;) (type $FUNCSIG$i) (result i32) + (type $none_=>_i32 (func (result i32))) + (func $__original_main (; 0 ;) (result i32) (i32.const 0) ) ) (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "main" (func $main (param i32 i32) (result i32))) (export "main" (func $main)) - (func $__original_main (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $__original_main (; 1 ;) (result i32) (i32.const 0) ) ) (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "original_main" (func $__original_main (result i32))) (export "main" (func $main)) - (func $main (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $main (; 1 ;) (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) ) diff --git a/test/passes/inlining-optimizing_enable-threads.txt b/test/passes/inlining-optimizing_enable-threads.txt index 4aca378e6..ecf732ea4 100644 --- a/test/passes/inlining-optimizing_enable-threads.txt +++ b/test/passes/inlining-optimizing_enable-threads.txt @@ -1,53 +1,48 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$vfj (func (param f32 i64))) + (type $none_=>_none (func)) (table $0 1 1 funcref) (elem (i32.const 0) $tabled) (export "user" (func $user)) (export "exported" (func $exported)) (export "exported_small" (func $exported_small)) - (func $user (; 0 ;) (type $FUNCSIG$v) + (func $user (; 0 ;) (call $exported) (call $tabled) (call $multi) (call $multi) ) - (func $exported (; 1 ;) (type $FUNCSIG$v) + (func $exported (; 1 ;) (nop) (nop) ) - (func $exported_small (; 2 ;) (type $FUNCSIG$v) + (func $exported_small (; 2 ;) (nop) ) - (func $recursive (; 3 ;) (type $FUNCSIG$v) + (func $recursive (; 3 ;) (call $recursive) ) - (func $tabled (; 4 ;) (type $FUNCSIG$v) + (func $tabled (; 4 ;) (nop) (nop) ) - (func $cycle1 (; 5 ;) (type $FUNCSIG$v) + (func $cycle1 (; 5 ;) (call $cycle1) ) - (func $multi (; 6 ;) (type $FUNCSIG$v) + (func $multi (; 6 ;) (nop) (nop) ) ) (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) - (func $main (; 0 ;) (type $FUNCSIG$i) (result i32) + (type $none_=>_i32 (func (result i32))) + (func $main (; 0 ;) (result i32) (unreachable) ) ) (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$j (func (result i64))) + (type $none_=>_i64 (func (result i64))) (memory $0 (shared 1 1)) - (func $1 (; 0 ;) (type $FUNCSIG$j) (result i64) + (func $1 (; 0 ;) (result i64) (i32.atomic.store16 (i32.const 0) (i32.const 0) @@ -56,32 +51,31 @@ ) ) (module - (type $FUNCSIG$v (func)) - (func $main (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $main (; 0 ;) (call $one) (call $one) ) - (func $one (; 1 ;) (type $FUNCSIG$v) + (func $one (; 1 ;) (call $one) ) ) (module - (type $FUNCSIG$v (func)) - (func $main (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $main (; 0 ;) (call $two) (call $two) ) - (func $two (; 1 ;) (type $FUNCSIG$v) + (func $two (; 1 ;) (call $two) ) ) (module - (type $0 (func)) - (type $1 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) (memory $0 17) (table $0 89 89 funcref) (start $1) - (func $1 (; 0 ;) (type $0) + (func $1 (; 0 ;) (i32.store (i32.const 4) (i32.const 0) diff --git a/test/passes/inlining-optimizing_optimize-level=3.txt b/test/passes/inlining-optimizing_optimize-level=3.txt index b2c9657e2..01631dfdb 100644 --- a/test/passes/inlining-optimizing_optimize-level=3.txt +++ b/test/passes/inlining-optimizing_optimize-level=3.txt @@ -1,17 +1,16 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) - (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) + (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (import "env" "memory" (memory $0 256 256)) (data (i32.const 1024) "emcc_hello_world.asm.js") (import "env" "table" (table $0 18 18 funcref)) @@ -68,7 +67,7 @@ (export "dynCall_iiii" (func $dynCall_iiii)) (export "dynCall_vi" (func $dynCall_vi)) (export "___udivmoddi4" (func $___udivmoddi4)) - (func $stackAlloc (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $stackAlloc (; 18 ;) (param $0 i32) (result i32) (local $1 i32) (local.set $1 (global.get $STACKTOP) @@ -97,15 +96,15 @@ ) (local.get $1) ) - (func $stackSave (; 19 ;) (type $FUNCSIG$i) (result i32) + (func $stackSave (; 19 ;) (result i32) (global.get $STACKTOP) ) - (func $stackRestore (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $stackRestore (; 20 ;) (param $0 i32) (global.set $STACKTOP (local.get $0) ) ) - (func $establishStackSpace (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $establishStackSpace (; 21 ;) (param $0 i32) (param $1 i32) (global.set $STACKTOP (local.get $0) ) @@ -113,7 +112,7 @@ (local.get $1) ) ) - (func $setThrew (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $setThrew (; 22 ;) (param $0 i32) (param $1 i32) (if (i32.eqz (global.get $__THREW__) @@ -128,15 +127,15 @@ ) ) ) - (func $setTempRet0 (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $setTempRet0 (; 23 ;) (param $0 i32) (global.set $tempRet0 (local.get $0) ) ) - (func $getTempRet0 (; 24 ;) (type $FUNCSIG$i) (result i32) + (func $getTempRet0 (; 24 ;) (result i32) (global.get $tempRet0) ) - (func $_main (; 25 ;) (type $FUNCSIG$i) (result i32) + (func $_main (; 25 ;) (result i32) (local $0 i32) (local.set $0 (global.get $STACKTOP) @@ -165,7 +164,7 @@ ) (i32.const 0) ) - (func $_frexp (; 26 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $_frexp (; 26 ;) (param $0 f64) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -262,7 +261,7 @@ ) (local.get $0) ) - (func $_strerror (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $_strerror (; 27 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local.set $1 @@ -343,7 +342,7 @@ ) (local.get $0) ) - (func $___errno_location (; 28 ;) (type $FUNCSIG$i) (result i32) + (func $___errno_location (; 28 ;) (result i32) (if (result i32) (i32.load (i32.const 16) @@ -354,7 +353,7 @@ (i32.const 60) ) ) - (func $___stdio_close (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $___stdio_close (; 29 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local.set $1 @@ -394,7 +393,7 @@ ) (local.get $0) ) - (func $___stdout_write (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $___stdout_write (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -475,7 +474,7 @@ ) (local.get $0) ) - (func $___stdio_seek (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $___stdio_seek (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local.set $4 @@ -551,7 +550,7 @@ ) (local.get $0) ) - (func $_fflush (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $_fflush (; 32 ;) (param $0 i32) (result i32) (local $1 i32) (if (local.get $0) @@ -640,7 +639,7 @@ ) (local.get $0) ) - (func $_printf (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $_printf (; 33 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local.set $2 @@ -679,7 +678,7 @@ ) (local.get $0) ) - (func $___stdio_write (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $___stdio_write (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1025,7 +1024,7 @@ ) (local.get $2) ) - (func $_vfprintf (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_vfprintf (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1219,7 +1218,7 @@ (local.get $11) (block (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -1297,7 +1296,7 @@ ) (local.get $0) ) - (func $___fwritex (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $___fwritex (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1353,7 +1352,7 @@ ) (block $block30 (local.set $3 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $2) (local.get $0) (local.get $1) @@ -1418,7 +1417,7 @@ ) (br_if $label$break$L5 (i32.lt_u - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $2) (local.get $0) (local.get $3) @@ -1483,7 +1482,7 @@ ) (local.get $3) ) - (func $___towrite (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $___towrite (; 37 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local.set $1 @@ -1561,7 +1560,7 @@ ) ) ) - (func $_wcrtomb (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_wcrtomb (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (block $do-once (result i32) (if (result i32) (local.get $0) @@ -1735,7 +1734,7 @@ ) ) ) - (func $_wctomb (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $_wctomb (; 39 ;) (param $0 i32) (param $1 i32) (result i32) (if (result i32) (local.get $0) (call $_wcrtomb @@ -1746,7 +1745,7 @@ (i32.const 0) ) ) - (func $_memchr (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_memchr (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1977,7 +1976,7 @@ (local.get $0) ) ) - (func $___syscall_ret (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $___syscall_ret (; 41 ;) (param $0 i32) (result i32) (if (result i32) (i32.gt_u (local.get $0) @@ -1996,7 +1995,7 @@ (local.get $0) ) ) - (func $___fflush_unlocked (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $___fflush_unlocked (; 42 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2027,7 +2026,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -2075,7 +2074,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.sub (local.get $4) @@ -2118,14 +2117,14 @@ ) ) ) - (func $_cleanup (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $_cleanup (; 43 ;) (param $0 i32) (drop (i32.load offset=68 (local.get $0) ) ) ) - (func $_printf_core (; 44 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $_printf_core (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -6947,7 +6946,7 @@ ) (local.get $18) ) - (func $_pop_arg_336 (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $_pop_arg_336 (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -7347,7 +7346,7 @@ ) ) ) - (func $_fmt_u (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_fmt_u (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (if @@ -7465,7 +7464,7 @@ ) (local.get $2) ) - (func $_pad (; 47 ;) (type $FUNCSIG$viiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (func $_pad (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -7613,7 +7612,7 @@ (local.get $7) ) ) - (func $_malloc (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $_malloc (; 48 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13092,7 +13091,7 @@ (i32.const 8) ) ) - (func $_free (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $_free (; 49 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14882,10 +14881,10 @@ (i32.const -1) ) ) - (func $runPostSets (; 50 ;) (type $FUNCSIG$v) + (func $runPostSets (; 50 ;) (nop) ) - (func $_i64Subtract (; 51 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $_i64Subtract (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (global.set $tempRet0 (i32.sub (i32.sub @@ -14903,7 +14902,7 @@ (local.get $2) ) ) - (func $_i64Add (; 52 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $_i64Add (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (global.set $tempRet0 (i32.add @@ -14924,7 +14923,7 @@ ) (local.get $4) ) - (func $_memset (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_memset (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15062,7 +15061,7 @@ (local.get $2) ) ) - (func $_bitshift64Lshr (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_bitshift64Lshr (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (if (i32.lt_s (local.get $2) @@ -15112,7 +15111,7 @@ ) ) ) - (func $_bitshift64Shl (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_bitshift64Shl (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (if (i32.lt_s (local.get $2) @@ -15168,7 +15167,7 @@ ) (i32.const 0) ) - (func $_memcpy (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_memcpy (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.ge_s @@ -15315,7 +15314,7 @@ ) (local.get $3) ) - (func $___udivdi3 (; 57 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $___udivdi3 (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (call $___udivmoddi4 (local.get $0) (local.get $1) @@ -15324,7 +15323,7 @@ (i32.const 0) ) ) - (func $___uremdi3 (; 58 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $___uremdi3 (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local.set $4 (global.get $STACKTOP) @@ -15358,7 +15357,7 @@ (local.get $0) ) ) - (func $___udivmoddi4 (; 59 ;) (type $FUNCSIG$iiiiii) (param $xl i32) (param $xh i32) (param $yl i32) (param $yh i32) (param $r i32) (result i32) + (func $___udivmoddi4 (; 59 ;) (param $xl i32) (param $xh i32) (param $yl i32) (param $yh i32) (param $r i32) (result i32) (local $x64 i64) (local $y64 i64) (local.set $x64 @@ -15415,8 +15414,8 @@ (local.get $x64) ) ) - (func $dynCall_ii (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (call_indirect (type $FUNCSIG$ii) + (func $dynCall_ii (; 60 ;) (param $0 i32) (param $1 i32) (result i32) + (call_indirect (type $i32_=>_i32) (local.get $1) (i32.and (local.get $0) @@ -15424,8 +15423,8 @@ ) ) ) - (func $dynCall_iiii (; 61 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (func $dynCall_iiii (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (local.get $2) (local.get $3) @@ -15438,8 +15437,8 @@ ) ) ) - (func $dynCall_vi (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vi) + (func $dynCall_vi (; 62 ;) (param $0 i32) (param $1 i32) + (call_indirect (type $i32_=>_none) (local.get $1) (i32.add (i32.and @@ -15450,19 +15449,19 @@ ) ) ) - (func $b0 (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $b0 (; 63 ;) (param $0 i32) (result i32) (call $nullFunc_ii (i32.const 0) ) (i32.const 0) ) - (func $b1 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $b1 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (call $nullFunc_iiii (i32.const 1) ) (i32.const 0) ) - (func $b2 (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $b2 (; 65 ;) (param $0 i32) (call $nullFunc_vi (i32.const 2) ) diff --git a/test/passes/inlining_enable-tail-call.txt b/test/passes/inlining_enable-tail-call.txt index 3119de526..673fda474 100644 --- a/test/passes/inlining_enable-tail-call.txt +++ b/test/passes/inlining_enable-tail-call.txt @@ -1,13 +1,10 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$vfj (func (param f32 i64))) + (type $none_=>_none (func)) (table $0 1 1 funcref) (elem (i32.const 0) $tabled) (export "user" (func $user)) (export "exported" (func $exported)) - (func $user (; 0 ;) (type $FUNCSIG$v) + (func $user (; 0 ;) (local $x i32) (local $y f64) (local $2 f32) @@ -137,16 +134,16 @@ ) ) ) - (func $exported (; 1 ;) (type $FUNCSIG$v) + (func $exported (; 1 ;) (nop) ) - (func $recursive (; 2 ;) (type $FUNCSIG$v) + (func $recursive (; 2 ;) (call $recursive) ) - (func $tabled (; 3 ;) (type $FUNCSIG$v) + (func $tabled (; 3 ;) (nop) ) - (func $cycle1 (; 4 ;) (type $FUNCSIG$v) + (func $cycle1 (; 4 ;) (block $__inlined_func$cycle2 (block (call $cycle1) @@ -155,25 +152,24 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (func $child (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (func $child (; 0 ;) (param $0 i32) (result i32) (i32.const 1234) ) - (func $parent (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $parent (; 1 ;) (result i32) (call $child (unreachable) ) ) ) (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$ifi (func (param f32 i32) (result i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $f32_i32_=>_i32 (func (param f32 i32) (result i32))) (memory $0 1 1) (global $hangLimit (mut i32) (i32.const 25)) (export "hangLimitInitializer" (func $hangLimitInitializer)) - (func $func_4 (; 0 ;) (type $FUNCSIG$ifi) (param $0 f32) (param $1 i32) (result i32) + (func $func_4 (; 0 ;) (param $0 f32) (param $1 i32) (result i32) (local $2 i64) (local $3 f64) (local $4 f32) @@ -226,19 +222,19 @@ ) ) ) - (func $hangLimitInitializer (; 1 ;) (type $FUNCSIG$v) + (func $hangLimitInitializer (; 1 ;) (global.set $hangLimit (i32.const 25) ) ) ) (module - (type $T (func (param i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (table $0 10 funcref) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (func $0 (; 0 ;) (block $__inlined_func$1 - (call_indirect (type $T) + (call_indirect (type $i32_=>_none) (if (result i32) (i32.const 0) (unreachable) @@ -250,8 +246,8 @@ ) ) (module - (type $FUNCSIG$v (func)) - (func $1 (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $1 (; 0 ;) (block $__inlined_func$0 (block $label$1 (br_table $label$1 $label$1 @@ -262,8 +258,8 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) - (func $0 (; 0 ;) (type $FUNCSIG$i) (result i32) + (type $none_=>_i32 (func (result i32))) + (func $0 (; 0 ;) (result i32) (return (block $__inlined_func$1 (result i32) (i32.const 42) @@ -272,9 +268,8 @@ ) ) (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $0 (; 0 ;) (local $0 i32) (block (block $__inlined_func$1 @@ -290,9 +285,8 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (func $0 (; 0 ;) (type $FUNCSIG$i) (result i32) + (type $none_=>_i32 (func (result i32))) + (func $0 (; 0 ;) (result i32) (local $0 i32) (return (block $__inlined_func$1 (result i32) @@ -305,9 +299,8 @@ ) ) (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $0 (; 0 ;) (drop (block (result i32) (block $__inlined_func$1 (result i32) @@ -326,9 +319,8 @@ ) ) (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $0 (; 0 ;) (local $0 i32) (block $__inlined_func$1 (block @@ -351,16 +343,15 @@ ) ) (module - (type $T (func (param i32) (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (table $0 10 funcref) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (func $0 (; 0 ;) (drop (block (result i32) (block $__inlined_func$1 (result i32) (br $__inlined_func$1 - (call_indirect (type $T) + (call_indirect (type $i32_=>_i32) (i32.const 42) (i32.const 0) ) @@ -371,13 +362,13 @@ ) ) (module - (type $T (func (param i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (table $0 10 funcref) - (func $0 (; 0 ;) (type $FUNCSIG$v) + (func $0 (; 0 ;) (block $__inlined_func$1 (block - (call_indirect (type $T) + (call_indirect (type $i32_=>_none) (i32.const 42) (i32.const 0) ) @@ -388,11 +379,11 @@ ) ) (module - (type $6 (func)) + (type $none_=>_none (func)) (memory $0 1 1) (global $global$0 (mut i32) (i32.const 10)) (export "func_102_invoker" (func $19)) - (func $19 (; 0 ;) (type $6) + (func $19 (; 0 ;) (block (block (block $__inlined_func$13 diff --git a/test/passes/inlining_optimize-level=3.txt b/test/passes/inlining_optimize-level=3.txt index de6700e29..3d864de0c 100644 --- a/test/passes/inlining_optimize-level=3.txt +++ b/test/passes/inlining_optimize-level=3.txt @@ -1,14 +1,14 @@ (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) (table $0 1 1 funcref) (elem (i32.const 0) $no-loops-but-one-use-but-tabled) (export "yes" (func $yes)) (export "no-loops-but-one-use-but-exported" (func $no-loops-but-one-use-but-exported)) - (func $yes (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $yes (; 0 ;) (result i32) (i32.const 1) ) - (func $no-tooBig (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $no-tooBig (; 1 ;) (result i32) (nop) (nop) (nop) @@ -47,17 +47,17 @@ (nop) (i32.const 1) ) - (func $no-loops-but-one-use-but-exported (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $no-loops-but-one-use-but-exported (; 2 ;) (result i32) (loop $loop-in (result i32) (i32.const 1) ) ) - (func $no-loops-but-one-use-but-tabled (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $no-loops-but-one-use-but-tabled (; 3 ;) (result i32) (loop $loop-in (result i32) (i32.const 1) ) ) - (func $intoHere (; 4 ;) (type $FUNCSIG$v) + (func $intoHere (; 4 ;) (drop (block (result i32) (block $__inlined_func$yes (result i32) diff --git a/test/passes/instrument-locals_all-features.txt b/test/passes/instrument-locals_all-features.txt index 3d6aa4d05..92924611c 100644 --- a/test/passes/instrument-locals_all-features.txt +++ b/test/passes/instrument-locals_all-features.txt @@ -1,11 +1,11 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$jiij (func (param i32 i32 i64) (result i64))) - (type $FUNCSIG$fiif (func (param i32 i32 f32) (result f32))) - (type $FUNCSIG$diid (func (param i32 i32 f64) (result f64))) - (type $FUNCSIG$aiia (func (param i32 i32 anyref) (result anyref))) - (type $FUNCSIG$eiie (func (param i32 i32 exnref) (result exnref))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i64_=>_i64 (func (param i32 i32 i64) (result i64))) + (type $i32_i32_f32_=>_f32 (func (param i32 i32 f32) (result f32))) + (type $i32_i32_f64_=>_f64 (func (param i32 i32 f64) (result f64))) + (type $i32_i32_anyref_=>_anyref (func (param i32 i32 anyref) (result anyref))) + (type $i32_i32_exnref_=>_exnref (func (param i32 i32 exnref) (result exnref))) + (type $none_=>_none (func)) (import "env" "get_i32" (func $get_i32 (param i32 i32 i32) (result i32))) (import "env" "get_i64" (func $get_i64 (param i32 i32 i64) (result i64))) (import "env" "get_f32" (func $get_f32 (param i32 i32 f32) (result f32))) @@ -18,7 +18,7 @@ (import "env" "set_anyref" (func $set_anyref (param i32 i32 anyref) (result anyref))) (import "env" "get_exnref" (func $get_exnref (param i32 i32 exnref) (result exnref))) (import "env" "set_exnref" (func $set_exnref (param i32 i32 exnref) (result exnref))) - (func $A (; 12 ;) (type $FUNCSIG$v) + (func $A (; 12 ;) (local $x i32) (local $y i64) (local $z f32) diff --git a/test/passes/instrument-memory.txt b/test/passes/instrument-memory.txt index 1bcc9ea01..f47be27d9 100644 --- a/test/passes/instrument-memory.txt +++ b/test/passes/instrument-memory.txt @@ -1,10 +1,10 @@ (module - (type $1 (func)) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$jij (func (param i32 i64) (result i64))) - (type $FUNCSIG$fif (func (param i32 f32) (result f32))) - (type $FUNCSIG$did (func (param i32 f64) (result f64))) + (type $none_=>_none (func)) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $i32_i64_=>_i64 (func (param i32 i64) (result i64))) + (type $i32_f32_=>_f32 (func (param i32 f32) (result f32))) + (type $i32_f64_=>_f64 (func (param i32 f64) (result f64))) (import "env" "load_ptr" (func $load_ptr (param i32 i32 i32 i32) (result i32))) (import "env" "load_val_i32" (func $load_val_i32 (param i32 i32) (result i32))) (import "env" "load_val_i64" (func $load_val_i64 (param i32 i64) (result i64))) @@ -16,7 +16,7 @@ (import "env" "store_val_f32" (func $store_val_f32 (param i32 f32) (result f32))) (import "env" "store_val_f64" (func $store_val_f64 (param i32 f64) (result f64))) (memory $0 256 256) - (func $A (; 10 ;) (type $1) + (func $A (; 10 ;) (drop (call $load_val_i32 (i32.const 1) @@ -382,7 +382,7 @@ ) ) ) - (func $B (; 11 ;) (type $1) + (func $B (; 11 ;) (i32.store8 (call $store_ptr (i32.const 29) diff --git a/test/passes/legalize-js-interface-minimally.txt b/test/passes/legalize-js-interface-minimally.txt index 2841ddb09..63445998d 100644 --- a/test/passes/legalize-js-interface-minimally.txt +++ b/test/passes/legalize-js-interface-minimally.txt @@ -1,14 +1,15 @@ (module - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$vj (func (param i64))) - (type $FUNCSIG$vi (func (param i32))) - (type $legaltype$invoke_vj (func (param i32 i32))) + (type $none_=>_i64 (func (result i64))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i64_=>_none (func (param i64))) + (type $none_=>_i32 (func (result i32))) (import "env" "imported" (func $imported (result i64))) (import "env" "setTempRet0" (func $setTempRet0 (param i32))) (import "env" "invoke_vj" (func $legalimport$invoke_vj (param i32 i32))) (export "func" (func $func)) (export "dynCall_foo" (func $legalstub$dyn)) - (func $func (; 3 ;) (type $FUNCSIG$j) (result i64) + (func $func (; 3 ;) (result i64) (drop (call $imported) ) @@ -17,7 +18,7 @@ ) (unreachable) ) - (func $dyn (; 4 ;) (type $FUNCSIG$j) (result i64) + (func $dyn (; 4 ;) (result i64) (drop (call $imported) ) diff --git a/test/passes/legalize-js-interface.txt b/test/passes/legalize-js-interface.txt index 4bf45f4c1..4e27eff5c 100644 --- a/test/passes/legalize-js-interface.txt +++ b/test/passes/legalize-js-interface.txt @@ -1,21 +1,29 @@ (module - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $legaltype$imported (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) + (type $none_=>_i64 (func (result i64))) + (type $i32_=>_none (func (param i32))) + (type $i32_i64_i64_=>_none (func (param i32 i64 i64))) (import "env" "setTempRet0" (func $setTempRet0 (param i32))) (import "env" "getTempRet0" (func $getTempRet0 (result i32))) (import "env" "imported" (func $legalimport$imported (result i32))) + (import "env" "other" (func $legalimport$other (param i32 i32 i32 i32 i32))) (export "func" (func $legalstub$func)) (export "imported" (func $legalstub$imported)) (export "imported_again" (func $legalstub$imported)) - (func $func (; 3 ;) (type $FUNCSIG$j) (result i64) + (export "other" (func $legalstub$other)) + (func $func (; 4 ;) (result i64) (drop (call $legalfunc$imported) ) + (call $legalfunc$other + (i32.const 0) + (i64.const 0) + (i64.const 0) + ) (unreachable) ) - (func $legalstub$func (; 4 ;) (result i32) + (func $legalstub$func (; 5 ;) (result i32) (local $0 i64) (local.set $0 (call $func) @@ -32,7 +40,7 @@ (local.get $0) ) ) - (func $legalstub$imported (; 5 ;) (result i32) + (func $legalstub$imported (; 6 ;) (result i32) (local $0 i64) (local.set $0 (call $legalfunc$imported) @@ -49,7 +57,34 @@ (local.get $0) ) ) - (func $legalfunc$imported (; 6 ;) (result i64) + (func $legalstub$other (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (call $legalfunc$other + (local.get $0) + (i64.or + (i64.extend_i32_u + (local.get $1) + ) + (i64.shl + (i64.extend_i32_u + (local.get $2) + ) + (i64.const 32) + ) + ) + (i64.or + (i64.extend_i32_u + (local.get $3) + ) + (i64.shl + (i64.extend_i32_u + (local.get $4) + ) + (i64.const 32) + ) + ) + ) + ) + (func $legalfunc$imported (; 8 ;) (result i64) (i64.or (i64.extend_i32_u (call $legalimport$imported) @@ -62,6 +97,29 @@ ) ) ) + (func $legalfunc$other (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i64) + (call $legalimport$other + (local.get $0) + (i32.wrap_i64 + (local.get $1) + ) + (i32.wrap_i64 + (i64.shr_u + (local.get $1) + (i64.const 32) + ) + ) + (i32.wrap_i64 + (local.get $2) + ) + (i32.wrap_i64 + (i64.shr_u + (local.get $2) + (i64.const 32) + ) + ) + ) + ) ) (module ) diff --git a/test/passes/legalize-js-interface.wast b/test/passes/legalize-js-interface.wast index 5e1341653..da8a0b2ff 100644 --- a/test/passes/legalize-js-interface.wast +++ b/test/passes/legalize-js-interface.wast @@ -1,12 +1,18 @@ (module (import "env" "imported" (func $imported (result i64))) + (import "env" "other" (func $other (param i32) (param i64) (param i64))) (export "func" (func $func)) (export "imported" (func $imported)) (export "imported_again" (func $imported)) + (export "other" (func $other)) (func $func (result i64) (drop (call $imported)) + (call $other + (i32.const 0) + (i64.const 0) + (i64.const 0) + ) (unreachable) ) ) (module) - diff --git a/test/passes/legalize-js-interface_pass-arg=legalize-js-interface-export-originals.txt b/test/passes/legalize-js-interface_pass-arg=legalize-js-interface-export-originals.txt index bdf304ade..ceef220cd 100644 --- a/test/passes/legalize-js-interface_pass-arg=legalize-js-interface-export-originals.txt +++ b/test/passes/legalize-js-interface_pass-arg=legalize-js-interface-export-originals.txt @@ -1,10 +1,11 @@ (module - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) (import "env" "setTempRet0" (func $setTempRet0 (param i32))) (export "func" (func $legalstub$func)) (export "orig$func" (func $func)) - (func $func (; 1 ;) (type $FUNCSIG$j) (result i64) + (func $func (; 1 ;) (result i64) (unreachable) ) (func $legalstub$func (; 2 ;) (result i32) diff --git a/test/passes/licm.txt b/test/passes/licm.txt index 78d82807b..7e8021b35 100644 --- a/test/passes/licm.txt +++ b/test/passes/licm.txt @@ -1,12 +1,12 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i64 (func (result i64))) (memory $0 1) (global $glob (mut i32) (i32.const 1)) - (func $loop1 (; 0 ;) (type $FUNCSIG$v) + (func $loop1 (; 0 ;) (drop (i32.const 10) ) @@ -17,7 +17,7 @@ ) ) ) - (func $loop2 (; 1 ;) (type $FUNCSIG$v) + (func $loop2 (; 1 ;) (drop (i32.const 10) ) @@ -32,7 +32,7 @@ ) ) ) - (func $loop3 (; 2 ;) (type $FUNCSIG$v) + (func $loop3 (; 2 ;) (drop (i32.const 10) ) @@ -48,7 +48,7 @@ ) ) ) - (func $loop4 (; 3 ;) (type $FUNCSIG$v) + (func $loop4 (; 3 ;) (drop (i32.load (i32.const 1) @@ -61,7 +61,7 @@ ) ) ) - (func $loop3-4 (; 4 ;) (type $FUNCSIG$v) + (func $loop3-4 (; 4 ;) (loop $loop (drop (i32.load @@ -79,7 +79,7 @@ ) ) ) - (func $loop3-4-b (; 5 ;) (type $FUNCSIG$v) + (func $loop3-4-b (; 5 ;) (drop (i32.load (i32.const 10) @@ -98,7 +98,7 @@ ) ) ) - (func $loop5 (; 6 ;) (type $FUNCSIG$v) + (func $loop5 (; 6 ;) (loop $loop (i32.store (i32.const 1) @@ -109,7 +109,7 @@ ) ) ) - (func $loop6 (; 7 ;) (type $FUNCSIG$v) + (func $loop6 (; 7 ;) (loop $loop (i32.store (i32.const 1) @@ -121,7 +121,7 @@ ) ) ) - (func $loop7 (; 8 ;) (type $FUNCSIG$v) + (func $loop7 (; 8 ;) (loop $loop (i32.store (i32.const 1) @@ -136,7 +136,7 @@ ) ) ) - (func $loop8 (; 9 ;) (type $FUNCSIG$v) + (func $loop8 (; 9 ;) (loop $loop (i32.store (i32.const 1) @@ -147,7 +147,7 @@ ) ) ) - (func $loop9 (; 10 ;) (type $FUNCSIG$v) + (func $loop9 (; 10 ;) (loop $loop (drop (i32.load @@ -163,7 +163,7 @@ ) ) ) - (func $loop10 (; 11 ;) (type $FUNCSIG$v) + (func $loop10 (; 11 ;) (drop (i32.load (i32.const 1) @@ -182,7 +182,7 @@ ) ) ) - (func $loop11 (; 12 ;) (type $FUNCSIG$v) + (func $loop11 (; 12 ;) (local $x i32) (local $y i32) (loop $loop @@ -196,7 +196,7 @@ ) ) ) - (func $loop12 (; 13 ;) (type $FUNCSIG$v) + (func $loop12 (; 13 ;) (local $x i32) (local $y i32) (drop @@ -211,7 +211,7 @@ ) ) ) - (func $loop13 (; 14 ;) (type $FUNCSIG$v) + (func $loop13 (; 14 ;) (local $x i32) (local $y i32) (local.set $x @@ -227,7 +227,7 @@ ) ) ) - (func $loop14 (; 15 ;) (type $FUNCSIG$v) + (func $loop14 (; 15 ;) (local $x i32) (local $y i32) (local.set $x @@ -246,7 +246,7 @@ ) ) ) - (func $loop14-1 (; 16 ;) (type $FUNCSIG$v) + (func $loop14-1 (; 16 ;) (local $x i32) (local $y i32) (loop $loop @@ -264,7 +264,7 @@ ) ) ) - (func $loop15 (; 17 ;) (type $FUNCSIG$v) + (func $loop15 (; 17 ;) (local $x i32) (local $y i32) (local.set $x @@ -283,7 +283,7 @@ ) ) ) - (func $loop15-1 (; 18 ;) (type $FUNCSIG$v) + (func $loop15-1 (; 18 ;) (local $x i32) (local $y i32) (local.set $x @@ -303,7 +303,7 @@ ) ) ) - (func $loop16 (; 19 ;) (type $FUNCSIG$v) + (func $loop16 (; 19 ;) (local $x i32) (local $y i32) (local.set $x @@ -322,7 +322,7 @@ ) ) ) - (func $loop16-1 (; 20 ;) (type $FUNCSIG$v) + (func $loop16-1 (; 20 ;) (local $x i32) (local $y i32) (local.set $x @@ -342,7 +342,7 @@ ) ) ) - (func $loop16-2 (; 21 ;) (type $FUNCSIG$v) + (func $loop16-2 (; 21 ;) (local $x i32) (local $y i32) (local.set $x @@ -367,7 +367,7 @@ ) ) ) - (func $loop16-3 (; 22 ;) (type $FUNCSIG$v) + (func $loop16-3 (; 22 ;) (local $x i32) (local $y i32) (local.set $y @@ -392,7 +392,7 @@ ) ) ) - (func $nop (; 23 ;) (type $FUNCSIG$v) + (func $nop (; 23 ;) (loop $loop (nop) (br_if $loop @@ -400,7 +400,7 @@ ) ) ) - (func $nested-blocks (; 24 ;) (type $FUNCSIG$v) + (func $nested-blocks (; 24 ;) (loop $loop (block $block (nop) @@ -420,7 +420,7 @@ ) ) ) - (func $nested-unhoistable-blocks (; 25 ;) (type $FUNCSIG$v) + (func $nested-unhoistable-blocks (; 25 ;) (loop $loop (block $block (call $nested-unhoistable-blocks) @@ -440,7 +440,7 @@ ) ) ) - (func $conditional (; 26 ;) (type $FUNCSIG$v) + (func $conditional (; 26 ;) (if (i32.const 0) (drop @@ -454,7 +454,7 @@ ) ) ) - (func $conditional1 (; 27 ;) (type $FUNCSIG$i) (result i32) + (func $conditional1 (; 27 ;) (result i32) (loop $loop (if (call $conditional1) @@ -468,7 +468,7 @@ ) (unreachable) ) - (func $conditional2 (; 28 ;) (type $FUNCSIG$v) + (func $conditional2 (; 28 ;) (block $out (loop $loop (br_if $out @@ -483,7 +483,7 @@ ) ) ) - (func $conditional3 (; 29 ;) (type $FUNCSIG$v) + (func $conditional3 (; 29 ;) (block $out (block (drop @@ -501,7 +501,7 @@ ) ) ) - (func $after (; 30 ;) (type $FUNCSIG$v) + (func $after (; 30 ;) (loop $loop (nop) ) @@ -509,7 +509,7 @@ (i32.const 10) ) ) - (func $loops (; 31 ;) (type $FUNCSIG$v) + (func $loops (; 31 ;) (drop (i32.const 10) ) @@ -523,7 +523,7 @@ ) ) ) - (func $loops2 (; 32 ;) (type $FUNCSIG$v) + (func $loops2 (; 32 ;) (drop (i32.const 10) ) @@ -537,7 +537,7 @@ ) ) ) - (func $fuzz1 (; 33 ;) (type $FUNCSIG$j) (result i64) + (func $fuzz1 (; 33 ;) (result i64) (local $var$1 i64) (drop (block (result i32) @@ -566,7 +566,7 @@ (local.get $var$1) ) ) - (func $self (; 34 ;) (type $FUNCSIG$i) (result i32) + (func $self (; 34 ;) (result i32) (local $x i32) (loop $loop (local.set $x @@ -581,7 +581,7 @@ ) (local.get $x) ) - (func $nested-set (; 35 ;) (type $FUNCSIG$v) + (func $nested-set (; 35 ;) (local $var$0 i32) (local $var$1 i64) (loop $label$1 @@ -601,7 +601,7 @@ ) ) ) - (func $load-store (; 36 ;) (type $FUNCSIG$vi) (param $x i32) + (func $load-store (; 36 ;) (param $x i32) (loop $loop (drop (i32.load @@ -617,7 +617,7 @@ ) ) ) - (func $set-set (; 37 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $set-set (; 37 ;) (param $x i32) (result i32) (loop $loop (local.set $x (i32.const 1) @@ -634,7 +634,7 @@ ) (local.get $x) ) - (func $copies-no (; 38 ;) (type $FUNCSIG$v) + (func $copies-no (; 38 ;) (local $x i32) (local $y i32) (local $z i32) @@ -658,7 +658,7 @@ ) ) ) - (func $consts-no (; 39 ;) (type $FUNCSIG$v) + (func $consts-no (; 39 ;) (local $x i32) (local $a i32) (local $b i32) @@ -676,7 +676,7 @@ ) ) ) - (func $global (; 40 ;) (type $FUNCSIG$v) + (func $global (; 40 ;) (local $x i32) (local.set $x (global.get $glob) diff --git a/test/passes/licm.wast b/test/passes/licm.wast index d012bc41e..6c5c747bd 100644 --- a/test/passes/licm.wast +++ b/test/passes/licm.wast @@ -36,7 +36,7 @@ (br_if $loop (i32.const 1)) ) ) - (func $loop3-4-b (; 4 ;) (type 0) + (func $loop3-4-b (; 4 ;) (loop $loop (drop (i32.load @@ -399,4 +399,3 @@ ) ) ) - diff --git a/test/passes/log-execution.txt b/test/passes/log-execution.txt index e6b9c8fd8..4b57410e8 100644 --- a/test/passes/log-execution.txt +++ b/test/passes/log-execution.txt @@ -1,22 +1,22 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "func" (func $import)) (import "env" "log_execution" (func $log_execution (param i32))) - (func $nopp (; 2 ;) (type $FUNCSIG$v) + (func $nopp (; 2 ;) (call $log_execution (i32.const 0) ) (nop) ) - (func $intt (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $intt (; 3 ;) (result i32) (call $log_execution (i32.const 1) ) (i32.const 10) ) - (func $workk (; 4 ;) (type $FUNCSIG$v) + (func $workk (; 4 ;) (call $log_execution (i32.const 3) ) @@ -35,7 +35,7 @@ ) ) ) - (func $loops (; 5 ;) (type $FUNCSIG$v) + (func $loops (; 5 ;) (call $log_execution (i32.const 8) ) @@ -81,7 +81,7 @@ ) ) ) - (func $loops-similar (; 6 ;) (type $FUNCSIG$v) + (func $loops-similar (; 6 ;) (call $log_execution (i32.const 10) ) diff --git a/test/passes/memory-packing_all-features.txt b/test/passes/memory-packing_all-features.txt index bf04ae91b..1666c23a1 100644 --- a/test/passes/memory-packing_all-features.txt +++ b/test/passes/memory-packing_all-features.txt @@ -19,9 +19,9 @@ (import "env" "memoryBase" (global $memoryBase i32)) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 1 1) - (func $foo (; 0 ;) (type $FUNCSIG$v) + (func $foo (; 0 ;) (block (drop (i32.const 0) @@ -36,7 +36,7 @@ ) (unreachable) ) - (func $bar (; 1 ;) (type $FUNCSIG$v) + (func $bar (; 1 ;) (drop (loop $loop-in (result i32) (unreachable) diff --git a/test/passes/merge-blocks.txt b/test/passes/merge-blocks.txt index c7b054b74..301961d05 100644 --- a/test/passes/merge-blocks.txt +++ b/test/passes/merge-blocks.txt @@ -1,17 +1,17 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$f (func (result f32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_f32 (func (result f32))) (global $global$0 (mut i32) (i32.const 10)) - (func $drop-block (; 0 ;) (type $FUNCSIG$v) + (func $drop-block (; 0 ;) (block $block (drop (i32.const 0) ) ) ) - (func $drop-block-br (; 1 ;) (type $FUNCSIG$v) + (func $drop-block-br (; 1 ;) (block $block (drop (block $x (result i32) @@ -23,7 +23,7 @@ ) ) ) - (func $drop-block-br-if (; 2 ;) (type $FUNCSIG$v) + (func $drop-block-br-if (; 2 ;) (block $block (drop (i32.const 1) @@ -38,7 +38,7 @@ ) ) ) - (func $undroppable-block-br-if (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $undroppable-block-br-if (; 3 ;) (param $0 i32) (block $block (drop (block $x (result i32) @@ -53,7 +53,7 @@ ) ) ) - (func $drop-block-nested-br-if (; 4 ;) (type $FUNCSIG$v) + (func $drop-block-nested-br-if (; 4 ;) (block $block (block $x (if @@ -74,7 +74,7 @@ ) ) ) - (func $drop-unreachable-br_if (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $drop-unreachable-br_if (; 5 ;) (result i32) (block $label$0 (result i32) (block $label$2 (result i32) (br_if $label$2 @@ -86,7 +86,7 @@ ) ) ) - (func $drop-block-squared-iloop (; 6 ;) (type $FUNCSIG$v) + (func $drop-block-squared-iloop (; 6 ;) (drop (block $label$0 (result i32) (drop @@ -99,7 +99,7 @@ ) ) ) - (func $br-goes-away-label2-becomes-unreachable (; 7 ;) (type $FUNCSIG$v) + (func $br-goes-away-label2-becomes-unreachable (; 7 ;) (block $block (drop (block $label$1 (result i32) @@ -118,7 +118,7 @@ ) ) ) - (func $loop-block-drop-block-return (; 8 ;) (type $FUNCSIG$v) + (func $loop-block-drop-block-return (; 8 ;) (loop $label$4 (block $label$5 (drop @@ -129,7 +129,7 @@ ) ) ) - (func $if-block (; 9 ;) (type $FUNCSIG$v) + (func $if-block (; 9 ;) (block $label (if (i32.const 1) @@ -144,7 +144,7 @@ ) ) ) - (func $if-block-bad (; 10 ;) (type $FUNCSIG$v) + (func $if-block-bad (; 10 ;) (block $label (if (br $label) @@ -159,7 +159,7 @@ ) ) ) - (func $if-block-br (; 11 ;) (type $FUNCSIG$v) + (func $if-block-br (; 11 ;) (block $label (if (i32.const 1) @@ -167,7 +167,7 @@ ) ) ) - (func $if-block-br-1 (; 12 ;) (type $FUNCSIG$v) + (func $if-block-br-1 (; 12 ;) (block $label (if (i32.const 1) @@ -178,7 +178,7 @@ ) ) ) - (func $if-block-br-2 (; 13 ;) (type $FUNCSIG$v) + (func $if-block-br-2 (; 13 ;) (block $label (if (i32.const 1) @@ -189,7 +189,7 @@ ) ) ) - (func $if-block-br-3 (; 14 ;) (type $FUNCSIG$v) + (func $if-block-br-3 (; 14 ;) (block $label (if (i32.const 1) @@ -198,7 +198,7 @@ ) ) ) - (func $if-block-br-4-eithre (; 15 ;) (type $FUNCSIG$v) + (func $if-block-br-4-eithre (; 15 ;) (block $label (if (i32.const 1) @@ -211,7 +211,7 @@ ) ) ) - (func $if-block-br-5-value (; 16 ;) (type $FUNCSIG$i) (result i32) + (func $if-block-br-5-value (; 16 ;) (result i32) (block $label (result i32) (if (result i32) (i32.const 1) @@ -220,7 +220,7 @@ ) ) ) - (func $restructure-if-outerType-change (; 17 ;) (type $FUNCSIG$v) + (func $restructure-if-outerType-change (; 17 ;) (loop $label$1 (br_if $label$1 (block $label$2 @@ -237,7 +237,7 @@ ) ) ) - (func $if-arm-unreachable (; 18 ;) (type $FUNCSIG$v) + (func $if-arm-unreachable (; 18 ;) (block $label$1 (if (unreachable) @@ -246,7 +246,7 @@ ) ) ) - (func $propagate-type-if-we-optimize (; 19 ;) (type $FUNCSIG$v) + (func $propagate-type-if-we-optimize (; 19 ;) (if (i32.const 1) (nop) @@ -269,7 +269,7 @@ ) ) ) - (func $br-value-blocktypechange (; 20 ;) (type $FUNCSIG$f) (result f32) + (func $br-value-blocktypechange (; 20 ;) (result f32) (global.set $global$0 (i32.const 0) ) diff --git a/test/passes/merge-blocks_remove-unused-brs.txt b/test/passes/merge-blocks_remove-unused-brs.txt index 86464ac25..65c8a388a 100644 --- a/test/passes/merge-blocks_remove-unused-brs.txt +++ b/test/passes/merge-blocks_remove-unused-brs.txt @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (func $func (; 0 ;) (type $FUNCSIG$vi) (param $x i32) + (type $i32_=>_none (func (param i32))) + (func $func (; 0 ;) (param $x i32) (loop $loop (block $out (block diff --git a/test/passes/merge-locals.txt b/test/passes/merge-locals.txt index c027984fb..f955cec33 100644 --- a/test/passes/merge-locals.txt +++ b/test/passes/merge-locals.txt @@ -1,10 +1,10 @@ (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$jiff (func (param i32 f32 f32) (result i64))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_f32_f32_=>_i64 (func (param i32 f32 f32) (result i64))) (global $global$0 (mut i32) (i32.const 10)) - (func $test (; 0 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $test (; 0 ;) (param $x i32) (param $y i32) (result i32) (drop (if (result i32) (local.tee $x @@ -16,7 +16,7 @@ ) (local.get $x) ) - (func $test2 (; 1 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $test2 (; 1 ;) (param $x i32) (param $y i32) (result i32) (drop (if (result i32) (local.tee $x @@ -28,7 +28,7 @@ ) (local.get $x) ) - (func $test-multiple (; 2 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $test-multiple (; 2 ;) (param $x i32) (param $y i32) (result i32) (drop (if (result i32) (local.tee $x @@ -43,7 +43,7 @@ ) (local.get $x) ) - (func $test-just-some (; 3 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $test-just-some (; 3 ;) (param $x i32) (param $y i32) (result i32) (drop (if (result i32) (local.tee $x @@ -61,7 +61,7 @@ ) (local.get $y) ) - (func $test-just-some2 (; 4 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $test-just-some2 (; 4 ;) (param $x i32) (param $y i32) (result i32) (drop (if (result i32) (local.tee $x @@ -82,7 +82,7 @@ ) (i32.const 500) ) - (func $test-just-some3 (; 5 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $test-just-some3 (; 5 ;) (param $x i32) (param $y i32) (result i32) (drop (if (result i32) (local.tee $x @@ -103,7 +103,7 @@ ) (local.get $y) ) - (func $silly-self (; 6 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $silly-self (; 6 ;) (param $x i32) (param $y i32) (result i32) (drop (if (result i32) (local.tee $x @@ -115,7 +115,7 @@ ) (local.get $y) ) - (func $silly-multi (; 7 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $silly-multi (; 7 ;) (param $x i32) (param $y i32) (result i32) (drop (if (result i32) (local.tee $x @@ -129,7 +129,7 @@ ) (local.get $y) ) - (func $undo-1 (; 8 ;) (type $FUNCSIG$vii) (param $var$1 i32) (param $var$2 i32) + (func $undo-1 (; 8 ;) (param $var$1 i32) (param $var$2 i32) (local $var$5 i32) (local.set $var$2 (local.get $var$1) @@ -141,7 +141,7 @@ (local.get $var$1) ) ) - (func $undo-2 (; 9 ;) (type $FUNCSIG$vii) (param $var$1 i32) (param $var$2 i32) + (func $undo-2 (; 9 ;) (param $var$1 i32) (param $var$2 i32) (local $var$5 i32) (local.set $var$2 (local.get $var$1) @@ -156,7 +156,7 @@ (local.get $var$1) ) ) - (func $reverse (; 10 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $reverse (; 10 ;) (param $x i32) (param $y i32) (drop (if (result i32) (local.tee $x @@ -179,7 +179,7 @@ (local.get $y) ) ) - (func $reverse-end (; 11 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $reverse-end (; 11 ;) (param $x i32) (param $y i32) (drop (if (result i32) (local.tee $x @@ -190,7 +190,7 @@ ) ) ) - (func $reverse-lone-end-2 (; 12 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $reverse-lone-end-2 (; 12 ;) (param $x i32) (param $y i32) (drop (if (result i32) (local.tee $x @@ -207,7 +207,7 @@ (local.get $y) ) ) - (func $reverse-undo (; 13 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $reverse-undo (; 13 ;) (param $x i32) (param $y i32) (drop (if (result i32) (local.tee $x @@ -233,7 +233,7 @@ (local.get $y) ) ) - (func $reverse-undo2 (; 14 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $reverse-undo2 (; 14 ;) (param $x i32) (param $y i32) (drop (if (result i32) (local.tee $x @@ -259,7 +259,7 @@ (local.get $y) ) ) - (func $reverse-undo3-conditional (; 15 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $reverse-undo3-conditional (; 15 ;) (param $x i32) (param $y i32) (drop (if (result i32) (local.tee $x @@ -288,7 +288,7 @@ (local.get $y) ) ) - (func $reverse-undo3-conditional-b (; 16 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $reverse-undo3-conditional-b (; 16 ;) (param $x i32) (param $y i32) (drop (if (result i32) (local.tee $x @@ -317,7 +317,7 @@ (local.get $y) ) ) - (func $reverse-undo3-conditional-c (; 17 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $reverse-undo3-conditional-c (; 17 ;) (param $x i32) (param $y i32) (drop (if (result i32) (local.tee $x @@ -354,7 +354,7 @@ (local.get $y) ) ) - (func $fuzz (; 18 ;) (type $FUNCSIG$jiff) (param $var$0 i32) (param $var$1 f32) (param $var$2 f32) (result i64) + (func $fuzz (; 18 ;) (param $var$0 i32) (param $var$1 f32) (param $var$2 f32) (result i64) (local $var$3 i32) (global.set $global$0 (i32.sub @@ -438,7 +438,7 @@ (i64.const -36028797018963968) ) ) - (func $trivial-confusion (; 19 ;) (type $FUNCSIG$viii) (param $unused i32) (param $param i32) (param $result i32) + (func $trivial-confusion (; 19 ;) (param $unused i32) (param $param i32) (param $result i32) (loop $label$1 (if (i32.const 1) diff --git a/test/passes/metrics_all-features.txt b/test/passes/metrics_all-features.txt index ba772597d..cb8daf050 100644 --- a/test/passes/metrics_all-features.txt +++ b/test/passes/metrics_all-features.txt @@ -14,8 +14,8 @@ total drop : 6 if : 4 (module - (type $0 (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (memory $0 256 256) (data (i32.const 0) "\ff\ef\0f\1f 0@P\99") (table $0 256 256 funcref) @@ -23,7 +23,7 @@ total (global $glob i32 (i32.const 1337)) (event $e0 (attr 0) (param i32)) (event $e1 (attr 0) (param i32 i32)) - (func $ifs (; 0 ;) (type $0) (param $x i32) + (func $ifs (; 0 ;) (param $x i32) (local $y f32) (block $block0 (if diff --git a/test/passes/metrics_strip-debug_metrics.bin.txt b/test/passes/metrics_strip-debug_metrics.bin.txt index 51dfd1e79..032f413a8 100644 --- a/test/passes/metrics_strip-debug_metrics.bin.txt +++ b/test/passes/metrics_strip-debug_metrics.bin.txt @@ -17,9 +17,9 @@ total [vars] : 0 nop : 1 (module - (type $0 (func)) + (type $none_=>_none (func)) (export "a" (func $0)) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (nop) ) ;; custom section "emscripten_metadata", size 7 diff --git a/test/passes/metrics_strip-producers_metrics.bin.txt b/test/passes/metrics_strip-producers_metrics.bin.txt index 290ed2599..1b21df98d 100644 --- a/test/passes/metrics_strip-producers_metrics.bin.txt +++ b/test/passes/metrics_strip-producers_metrics.bin.txt @@ -17,9 +17,9 @@ total [vars] : 0 nop : 1 (module - (type $0 (func)) + (type $none_=>_none (func)) (export "a" (func $0)) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (nop) ) ;; custom section "emscripten_metadata", size 7 diff --git a/test/passes/minify-imports-and-exports_all-features.txt b/test/passes/minify-imports-and-exports_all-features.txt index b3f8b5b8a..1f6ed9e0e 100644 --- a/test/passes/minify-imports-and-exports_all-features.txt +++ b/test/passes/minify-imports-and-exports_all-features.txt @@ -5004,9 +5004,9 @@ longname4828 => zya longname1426 => zz longname4882 => zza (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (import "env" "a" (global $import$global0 i32)) (import "env" "__memory_base" (global $import$global1 i32)) (import "env" "__table_base" (global $import$global2 i32)) @@ -10017,10 +10017,10 @@ longname4882 => zza (export "LBa" (func $foo1)) (export "MBa" (func $foo2)) (export "NBa" (event $event1)) - (func $foo1 (; 5002 ;) (type $FUNCSIG$v) + (func $foo1 (; 5002 ;) (nop) ) - (func $foo2 (; 5003 ;) (type $FUNCSIG$v) + (func $foo2 (; 5003 ;) (nop) ) ) diff --git a/test/passes/minify-imports_all-features.txt b/test/passes/minify-imports_all-features.txt index 024018bc2..ffbba6c33 100644 --- a/test/passes/minify-imports_all-features.txt +++ b/test/passes/minify-imports_all-features.txt @@ -5000,9 +5000,9 @@ longname4828 => zya longname1426 => zz longname4882 => zza (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (import "env" "a" (global $import$global0 i32)) (import "env" "__memory_base" (global $import$global1 i32)) (import "env" "__table_base" (global $import$global2 i32)) @@ -10011,10 +10011,10 @@ longname4882 => zza (export "foo1" (func $foo1)) (export "foo2" (func $foo2)) (export "event1" (event $event1)) - (func $foo1 (; 5000 ;) (type $FUNCSIG$v) + (func $foo1 (; 5000 ;) (nop) ) - (func $foo2 (; 5001 ;) (type $FUNCSIG$v) + (func $foo2 (; 5001 ;) (nop) ) ) diff --git a/test/passes/nm.txt b/test/passes/nm.txt index 3a8aad31d..6a7bc8027 100644 --- a/test/passes/nm.txt +++ b/test/passes/nm.txt @@ -2,12 +2,12 @@ b : 5 c : 13 (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $a (; 0 ;) (type $0) + (func $a (; 0 ;) (nop) ) - (func $b (; 1 ;) (type $0) + (func $b (; 1 ;) (drop (loop $loop-in1 (result i32) (nop) @@ -15,7 +15,7 @@ ) ) ) - (func $c (; 2 ;) (type $0) + (func $c (; 2 ;) (block $top (nop) (drop diff --git a/test/passes/no-exit-runtime.txt b/test/passes/no-exit-runtime.txt index 7059eca3e..5b76e1bf6 100644 --- a/test/passes/no-exit-runtime.txt +++ b/test/passes/no-exit-runtime.txt @@ -1,12 +1,12 @@ (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$v (func)) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) (import "env" "atexit" (func $fimport$0 (param i32 i32) (result i32))) (import "env" "__cxa_atexit" (func $fimport$1 (param i32 i32) (result i32))) (import "env" "_atexit" (func $fimport$2 (param i32 i32) (result i32))) (import "env" "___cxa_atexit" (func $fimport$3 (param i32 i32) (result i32))) (import "env" "other" (func $fimport$4 (param i32 i32) (result i32))) - (func $caller (; 5 ;) (type $FUNCSIG$v) + (func $caller (; 5 ;) (drop (i32.const 0) ) diff --git a/test/passes/optimize-added-constants-propagate_low-memory-unused.txt b/test/passes/optimize-added-constants-propagate_low-memory-unused.txt index 4d1a1e31c..a314718f9 100644 --- a/test/passes/optimize-added-constants-propagate_low-memory-unused.txt +++ b/test/passes/optimize-added-constants-propagate_low-memory-unused.txt @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 1 1) - (func $consts (; 0 ;) (type $FUNCSIG$v) + (func $consts (; 0 ;) (drop (i32.load (i32.const 0) @@ -59,7 +59,7 @@ (i32.const 1) ) ) - (func $offsets (; 1 ;) (type $FUNCSIG$vi) (param $x i32) + (func $offsets (; 1 ;) (param $x i32) (drop (i32.load offset=1 (local.get $x) @@ -97,7 +97,7 @@ ) ) ) - (func $load-off-2 (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $load-off-2 (; 2 ;) (param $0 i32) (result i32) (i32.store (i32.const 6) (local.get $0) @@ -168,7 +168,7 @@ (local.get $0) ) ) - (func $offset-constant (; 3 ;) (type $FUNCSIG$v) + (func $offset-constant (; 3 ;) (drop (i32.load (i32.const 10) @@ -205,7 +205,7 @@ ) ) ) - (func $offset-propagate-param (; 4 ;) (type $FUNCSIG$vi) (param $x i32) + (func $offset-propagate-param (; 4 ;) (param $x i32) (local $y i32) (nop) (drop @@ -214,7 +214,7 @@ ) ) ) - (func $offset-propagate (; 5 ;) (type $FUNCSIG$v) + (func $offset-propagate (; 5 ;) (local $x i32) (local $y i32) (nop) @@ -224,7 +224,7 @@ ) ) ) - (func $offset-propagate2 (; 6 ;) (type $FUNCSIG$v) + (func $offset-propagate2 (; 6 ;) (local $x i32) (local $y i32) (local.set $x @@ -242,7 +242,7 @@ ) ) ) - (func $offset-propagate3 (; 7 ;) (type $FUNCSIG$v) + (func $offset-propagate3 (; 7 ;) (local $x i32) (local $y i32) (nop) @@ -252,7 +252,7 @@ ) ) ) - (func $offset-propagate4 (; 8 ;) (type $FUNCSIG$v) + (func $offset-propagate4 (; 8 ;) (local $x i32) (local $y i32) (local.set $y @@ -265,7 +265,7 @@ ) ) ) - (func $offset-propagate5 (; 9 ;) (type $FUNCSIG$vi) (param $z i32) + (func $offset-propagate5 (; 9 ;) (param $z i32) (local $x i32) (local $y i32) (local $3 i32) @@ -287,7 +287,7 @@ ) ) ) - (func $offset-propagate6 (; 10 ;) (type $FUNCSIG$vi) (param $z i32) + (func $offset-propagate6 (; 10 ;) (param $z i32) (local $x i32) (local $y i32) (local $3 i32) @@ -309,7 +309,7 @@ ) ) ) - (func $offset-propagate7 (; 11 ;) (type $FUNCSIG$vi) (param $z i32) + (func $offset-propagate7 (; 11 ;) (param $z i32) (local $x i32) (local $y i32) (local.set $y @@ -336,7 +336,7 @@ ) ) ) - (func $offset-realistic (; 12 ;) (type $FUNCSIG$vi) (param $ptr i32) + (func $offset-realistic (; 12 ;) (param $ptr i32) (local $x i32) (local $y i32) (local $z i32) @@ -375,7 +375,7 @@ ) ) ) - (func $multiadd (; 13 ;) (type $FUNCSIG$vi) (param $sp i32) + (func $multiadd (; 13 ;) (param $sp i32) (local $$vararg_buffer i32) (local $$vararg_ptr1 i32) (nop) @@ -385,7 +385,7 @@ (i32.const 1) ) ) - (func $multiadd-extraUse (; 14 ;) (type $FUNCSIG$vi) (param $sp i32) + (func $multiadd-extraUse (; 14 ;) (param $sp i32) (local $$vararg_buffer i32) (local $$vararg_ptr1 i32) (local.set $$vararg_buffer diff --git a/test/passes/optimize-added-constants_low-memory-unused.txt b/test/passes/optimize-added-constants_low-memory-unused.txt index 4150c4da1..53faf31f1 100644 --- a/test/passes/optimize-added-constants_low-memory-unused.txt +++ b/test/passes/optimize-added-constants_low-memory-unused.txt @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 1 1) - (func $consts (; 0 ;) (type $FUNCSIG$v) + (func $consts (; 0 ;) (drop (i32.load (i32.const 0) @@ -59,7 +59,7 @@ (i32.const 1) ) ) - (func $offsets (; 1 ;) (type $FUNCSIG$vi) (param $x i32) + (func $offsets (; 1 ;) (param $x i32) (drop (i32.load offset=1 (local.get $x) @@ -97,7 +97,7 @@ ) ) ) - (func $load-off-2 (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $load-off-2 (; 2 ;) (param $0 i32) (result i32) (i32.store (i32.const 6) (local.get $0) @@ -168,7 +168,7 @@ (local.get $0) ) ) - (func $offset-constant (; 3 ;) (type $FUNCSIG$v) + (func $offset-constant (; 3 ;) (drop (i32.load (i32.const 10) @@ -205,7 +205,7 @@ ) ) ) - (func $offset-propagate-param (; 4 ;) (type $FUNCSIG$vi) (param $x i32) + (func $offset-propagate-param (; 4 ;) (param $x i32) (local $y i32) (local.set $x (i32.add @@ -219,7 +219,7 @@ ) ) ) - (func $offset-propagate (; 5 ;) (type $FUNCSIG$v) + (func $offset-propagate (; 5 ;) (local $x i32) (local $y i32) (local.set $x @@ -234,7 +234,7 @@ ) ) ) - (func $offset-propagate2 (; 6 ;) (type $FUNCSIG$v) + (func $offset-propagate2 (; 6 ;) (local $x i32) (local $y i32) (local.set $x @@ -252,7 +252,7 @@ ) ) ) - (func $offset-propagate3 (; 7 ;) (type $FUNCSIG$v) + (func $offset-propagate3 (; 7 ;) (local $x i32) (local $y i32) (local.set $x @@ -267,7 +267,7 @@ ) ) ) - (func $offset-propagate4 (; 8 ;) (type $FUNCSIG$v) + (func $offset-propagate4 (; 8 ;) (local $x i32) (local $y i32) (local.set $y @@ -285,7 +285,7 @@ ) ) ) - (func $offset-propagate5 (; 9 ;) (type $FUNCSIG$vi) (param $z i32) + (func $offset-propagate5 (; 9 ;) (param $z i32) (local $x i32) (local $y i32) (if @@ -306,7 +306,7 @@ ) ) ) - (func $offset-propagate6 (; 10 ;) (type $FUNCSIG$vi) (param $z i32) + (func $offset-propagate6 (; 10 ;) (param $z i32) (local $x i32) (local $y i32) (local.set $y @@ -327,7 +327,7 @@ ) ) ) - (func $offset-realistic (; 11 ;) (type $FUNCSIG$vi) (param $ptr i32) + (func $offset-realistic (; 11 ;) (param $ptr i32) (local $x i32) (local $y i32) (local $z i32) diff --git a/test/passes/optimize-instructions_enable-threads.txt b/test/passes/optimize-instructions_enable-threads.txt index ef3122a89..8f9ee1843 100644 --- a/test/passes/optimize-instructions_enable-threads.txt +++ b/test/passes/optimize-instructions_enable-threads.txt @@ -1,21 +1,21 @@ (module - (type $0 (func (param i32 i64))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$viidd (func (param i32 i32 f64 f64))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$jj (func (param i64) (result i64))) - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$vijfd (func (param i32 i64 f32 f64))) - (type $FUNCSIG$vijf (func (param i32 i64 f32))) - (type $FUNCSIG$vijdi (func (param i32 i64 f64 i32))) - (type $FUNCSIG$d (func (result f64))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i64_=>_none (func (param i32 i64))) + (type $none_=>_i64 (func (result i64))) + (type $i32_i64_f32_=>_none (func (param i32 i64 f32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i32_i32_f64_f64_=>_none (func (param i32 i32 f64 f64))) + (type $i32_i64_f32_f64_=>_none (func (param i32 i64 f32 f64))) + (type $i32_i64_f64_i32_=>_none (func (param i32 i64 f64 i32))) + (type $none_=>_f64 (func (result f64))) (memory $0 0) (export "load-off-2" (func $load-off-2)) - (func $f (; 0 ;) (type $0) (param $i1 i32) (param $i2 i64) + (func $f (; 0 ;) (param $i1 i32) (param $i2 i64) (if (i32.eqz (local.get $i1) @@ -240,7 +240,7 @@ (i32.const 0) ) ) - (func $load-store (; 1 ;) (type $FUNCSIG$v) + (func $load-store (; 1 ;) (drop (i32.load8_u (i32.const 0) @@ -328,7 +328,7 @@ (i64.const 3) ) ) - (func $and-neg1 (; 2 ;) (type $FUNCSIG$v) + (func $and-neg1 (; 2 ;) (drop (i32.const 100) ) @@ -339,7 +339,7 @@ ) ) ) - (func $and-pos1 (; 3 ;) (type $FUNCSIG$v) + (func $and-pos1 (; 3 ;) (drop (i32.eqz (i32.const 1000) @@ -363,7 +363,7 @@ ) ) ) - (func $canonicalize (; 4 ;) (type $FUNCSIG$viidd) (param $x i32) (param $y i32) (param $fx f64) (param $fy f64) + (func $canonicalize (; 4 ;) (param $x i32) (param $y i32) (param $fx f64) (param $fy f64) (drop (i32.and (unreachable) @@ -589,7 +589,7 @@ ) ) ) - (func $ne0 (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $ne0 (; 5 ;) (result i32) (if (call $ne0) (nop) @@ -620,7 +620,7 @@ ) (i32.const 1) ) - (func $recurse-bool (; 6 ;) (type $FUNCSIG$v) + (func $recurse-bool (; 6 ;) (if (if (result i32) (i32.const 1) @@ -637,10 +637,10 @@ (nop) ) ) - (func $ne1 (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $ne1 (; 7 ;) (result i32) (unreachable) ) - (func $load-off-2 (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $load-off-2 (; 8 ;) (param $0 i32) (result i32) (i32.store (i32.const 6) (local.get $0) @@ -723,7 +723,7 @@ ) ) ) - (func $sign-ext (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $sign-ext (; 9 ;) (param $0 i32) (param $1 i32) (drop (i32.eqz (i32.and @@ -834,7 +834,7 @@ ) ) ) - (func $sign-ext-input (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $sign-ext-input (; 10 ;) (param $0 i32) (param $1 i32) (drop (i32.const 100) ) @@ -1165,7 +1165,7 @@ ) ) ) - (func $linear-sums (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $linear-sums (; 11 ;) (param $0 i32) (param $1 i32) (drop (i32.add (i32.shl @@ -1257,7 +1257,7 @@ (local.get $0) ) ) - (func $almost-sign-ext (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $almost-sign-ext (; 12 ;) (param $0 i32) (drop (i32.shr_s (i32.shl @@ -1274,7 +1274,7 @@ ) ) ) - (func $squaring (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $squaring (; 13 ;) (param $0 i32) (param $1 i32) (drop (i32.and (local.get $0) @@ -1330,7 +1330,7 @@ ) ) ) - (func $sign-ext-ne (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $sign-ext-ne (; 14 ;) (param $0 i32) (param $1 i32) (drop (i32.ne (i32.and @@ -1380,7 +1380,7 @@ ) ) ) - (func $sign-ext-eqz (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $sign-ext-eqz (; 15 ;) (param $0 i32) (param $1 i32) (drop (i32.eqz (i32.and @@ -1390,7 +1390,7 @@ ) ) ) - (func $sign-ext-boolean (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $sign-ext-boolean (; 16 ;) (param $0 i32) (param $1 i32) (drop (if (result i32) (i32.and @@ -1402,7 +1402,7 @@ ) ) ) - (func $add-sub-zero (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $add-sub-zero (; 17 ;) (param $0 i32) (param $1 i32) (drop (local.get $0) ) @@ -1410,7 +1410,7 @@ (local.get $0) ) ) - (func $store-signext (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $store-signext (; 18 ;) (param $0 i32) (i32.store8 (i32.const 8) (local.get $0) @@ -1468,7 +1468,7 @@ ) ) ) - (func $sign-ext-tee (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $sign-ext-tee (; 19 ;) (param $0 i32) (param $1 i32) (drop (i32.shr_s (i32.shl @@ -1486,7 +1486,7 @@ ) ) ) - (func $sign-ext-load (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $sign-ext-load (; 20 ;) (param $0 i32) (param $1 i32) (drop (i32.load8_s (i32.const 256) @@ -1557,7 +1557,7 @@ ) ) ) - (func $mask-bits (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $mask-bits (; 21 ;) (param $0 i32) (param $1 i32) (drop (local.tee $0 (i32.const 127) @@ -1611,7 +1611,7 @@ ) ) ) - (func $local-info-zero-ext (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $local-info-zero-ext (; 22 ;) (param $0 i32) (param $1 i32) (local $x i32) (local $y i32) (local $z i32) @@ -1662,7 +1662,7 @@ ) ) ) - (func $local-info-sign-ext-bitsize (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $local-info-sign-ext-bitsize (; 23 ;) (param $0 i32) (param $1 i32) (local $x i32) (local $y i32) (local $z i32) @@ -1722,7 +1722,7 @@ ) ) ) - (func $local-info-sign-ext-already-exted (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $local-info-sign-ext-already-exted (; 24 ;) (param $0 i32) (param $1 i32) (local $x i32) (local $y i32) (local $z i32) @@ -1833,7 +1833,7 @@ ) ) ) - (func $signed-loads-fill-the-bits (; 25 ;) (type $FUNCSIG$ii) (param $$e i32) (result i32) + (func $signed-loads-fill-the-bits (; 25 ;) (param $$e i32) (result i32) (local $$0 i32) (local $$conv i32) (local.set $$0 @@ -1854,7 +1854,7 @@ ) ) ) - (func $local-info-sign-ext-already-exted-by-load (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $local-info-sign-ext-already-exted-by-load (; 26 ;) (param $0 i32) (param $1 i32) (local $x i32) (local $y i32) (local $z i32) @@ -1896,7 +1896,7 @@ ) ) ) - (func $compare-load-s-sign-extend (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $compare-load-s-sign-extend (; 27 ;) (param $0 i32) (param $1 i32) (drop (i32.eq (i32.load8_u @@ -1976,7 +1976,7 @@ ) ) ) - (func $unsign-diff-sizes (; 28 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $unsign-diff-sizes (; 28 ;) (param $x i32) (param $y i32) (result i32) (i32.ne (i32.shr_s (i32.shl @@ -2000,7 +2000,7 @@ ) ) ) - (func $unsign-same-sizes (; 29 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $unsign-same-sizes (; 29 ;) (param $x i32) (param $y i32) (result i32) (i32.ne (i32.and (call $unsign-same-sizes @@ -2018,7 +2018,7 @@ ) ) ) - (func $fuzz-almost-sign-ext (; 30 ;) (type $FUNCSIG$v) + (func $fuzz-almost-sign-ext (; 30 ;) (drop (i32.shr_s (i32.shl @@ -2042,7 +2042,7 @@ ) ) ) - (func $fuzz-comp-impossible (; 31 ;) (type $FUNCSIG$vi) (param $x i32) + (func $fuzz-comp-impossible (; 31 ;) (param $x i32) (drop (i32.eq (i32.and @@ -2107,7 +2107,7 @@ ) ) ) - (func $if-parallel (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $if-parallel (; 32 ;) (param $0 i32) (param $1 i32) (drop (i32.add (local.get $1) @@ -2162,7 +2162,7 @@ ) ) ) - (func $select-parallel (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $select-parallel (; 33 ;) (param $0 i32) (param $1 i32) (drop (i32.add (local.get $1) @@ -2218,7 +2218,7 @@ ) ) ) - (func $zero-shifts-is-not-sign-ext (; 34 ;) (type $FUNCSIG$v) + (func $zero-shifts-is-not-sign-ext (; 34 ;) (drop (i32.eq (i32.load16_s align=1 @@ -2239,7 +2239,7 @@ ) ) ) - (func $zero-ops (; 35 ;) (type $FUNCSIG$i) (result i32) + (func $zero-ops (; 35 ;) (result i32) (return (i32.eq (i32.load16_s align=1 @@ -2249,7 +2249,7 @@ ) ) ) - (func $sign-ext-1-and-ne (; 36 ;) (type $FUNCSIG$i) (result i32) + (func $sign-ext-1-and-ne (; 36 ;) (result i32) (i32.ne (i32.and (call $sign-ext-1-and-ne) @@ -2258,7 +2258,7 @@ (i32.const -2147483648) ) ) - (func $neg-shifts-and-255 (; 37 ;) (type $FUNCSIG$i) (result i32) + (func $neg-shifts-and-255 (; 37 ;) (result i32) (i32.and (i32.shr_u (i32.const -99) @@ -2267,7 +2267,7 @@ (i32.const 255) ) ) - (func $neg-shifts-and-255-b (; 38 ;) (type $FUNCSIG$i) (result i32) + (func $neg-shifts-and-255-b (; 38 ;) (result i32) (i32.and (i32.shl (i32.const -2349025) @@ -2276,7 +2276,7 @@ (i32.const 255) ) ) - (func $shifts-square-overflow (; 39 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $shifts-square-overflow (; 39 ;) (param $x i32) (result i32) (i32.shr_u (i32.shr_u (local.get $x) @@ -2285,13 +2285,13 @@ (i32.const 32767) ) ) - (func $shifts-square-no-overflow-small (; 40 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $shifts-square-no-overflow-small (; 40 ;) (param $x i32) (result i32) (i32.shr_u (local.get $x) (i32.const 9) ) ) - (func $shifts-square-overflow-64 (; 41 ;) (type $FUNCSIG$jj) (param $x i64) (result i64) + (func $shifts-square-overflow-64 (; 41 ;) (param $x i64) (result i64) (i64.shr_u (i64.shr_u (local.get $x) @@ -2300,13 +2300,13 @@ (i64.const 64767) ) ) - (func $shifts-square-no-overflow-small-64 (; 42 ;) (type $FUNCSIG$jj) (param $x i64) (result i64) + (func $shifts-square-no-overflow-small-64 (; 42 ;) (param $x i64) (result i64) (i64.shr_u (local.get $x) (i64.const 9) ) ) - (func $shifts-square-unreachable (; 43 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $shifts-square-unreachable (; 43 ;) (param $x i32) (result i32) (i32.shr_u (i32.shr_u (unreachable) @@ -2315,7 +2315,7 @@ (i32.const 4098) ) ) - (func $mix-shifts (; 44 ;) (type $FUNCSIG$i) (result i32) + (func $mix-shifts (; 44 ;) (result i32) (i32.shr_s (i32.shl (i32.const 23) @@ -2324,13 +2324,13 @@ (i32.const 168) ) ) - (func $actually-no-shifts (; 45 ;) (type $FUNCSIG$i) (result i32) + (func $actually-no-shifts (; 45 ;) (result i32) (i32.const 33) ) - (func $less-shifts-than-it-seems (; 46 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $less-shifts-than-it-seems (; 46 ;) (param $x i32) (result i32) (i32.const 4800) ) - (func $and-popcount32 (; 47 ;) (type $FUNCSIG$i) (result i32) + (func $and-popcount32 (; 47 ;) (result i32) (i32.and (i32.popcnt (i32.const -1) @@ -2338,12 +2338,12 @@ (i32.const 31) ) ) - (func $and-popcount32-big (; 48 ;) (type $FUNCSIG$i) (result i32) + (func $and-popcount32-big (; 48 ;) (result i32) (i32.popcnt (i32.const -1) ) ) - (func $and-popcount64 (; 49 ;) (type $FUNCSIG$j) (result i64) + (func $and-popcount64 (; 49 ;) (result i64) (i64.and (i64.popcnt (i64.const -1) @@ -2351,7 +2351,7 @@ (i64.const 63) ) ) - (func $and-popcount64-big (; 50 ;) (type $FUNCSIG$j) (result i64) + (func $and-popcount64-big (; 50 ;) (result i64) (i64.and (i64.popcnt (i64.const -1) @@ -2359,7 +2359,7 @@ (i64.const 127) ) ) - (func $and-popcount64-bigger (; 51 ;) (type $FUNCSIG$j) (result i64) + (func $and-popcount64-bigger (; 51 ;) (result i64) (i64.and (i64.popcnt (i64.const -1) @@ -2367,7 +2367,7 @@ (i64.const 255) ) ) - (func $optimizeAddedConstants-filters-through-nonzero (; 52 ;) (type $FUNCSIG$i) (result i32) + (func $optimizeAddedConstants-filters-through-nonzero (; 52 ;) (result i32) (i32.add (i32.shl (i32.const -536870912) @@ -2378,7 +2378,7 @@ (i32.const -31744) ) ) - (func $optimizeAddedConstants-filters-through-nonzero-b (; 53 ;) (type $FUNCSIG$i) (result i32) + (func $optimizeAddedConstants-filters-through-nonzero-b (; 53 ;) (result i32) (i32.add (i32.shl (i32.const -536870912) @@ -2389,7 +2389,7 @@ (i32.const -31744) ) ) - (func $return-proper-value-from-shift-left-by-zero (; 54 ;) (type $FUNCSIG$i) (result i32) + (func $return-proper-value-from-shift-left-by-zero (; 54 ;) (result i32) (if (result i32) (i32.add (loop $label$0 (result i32) @@ -2408,7 +2408,7 @@ (i32.const 0) ) ) - (func $de-morgan-2 (; 55 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $de-morgan-2 (; 55 ;) (param $x i32) (param $y i32) (drop (i32.eqz (i32.or @@ -2474,7 +2474,7 @@ ) ) ) - (func $subzero1 (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $subzero1 (; 56 ;) (param $0 i32) (result i32) (i32.sub (i32.const 32) (i32.clz @@ -2482,7 +2482,7 @@ ) ) ) - (func $subzero2 (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $subzero2 (; 57 ;) (param $0 i32) (result i32) (i32.sub (i32.const 32) (i32.clz @@ -2490,7 +2490,7 @@ ) ) ) - (func $subzero3 (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $subzero3 (; 58 ;) (param $0 i32) (param $1 i32) (result i32) (i32.sub (local.get $1) (i32.clz @@ -2498,7 +2498,7 @@ ) ) ) - (func $subzero4 (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $subzero4 (; 59 ;) (param $0 i32) (param $1 i32) (result i32) (i32.sub (local.get $0) (i32.clz @@ -2506,7 +2506,7 @@ ) ) ) - (func $mul-power-2 (; 60 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $mul-power-2 (; 60 ;) (param $x i32) (result i32) (drop (call $mul-power-2 (i32.shl @@ -2561,7 +2561,7 @@ ) (unreachable) ) - (func $urem-power-2 (; 61 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $urem-power-2 (; 61 ;) (param $x i32) (result i32) (drop (call $urem-power-2 (i32.and @@ -2609,10 +2609,10 @@ ) (unreachable) ) - (func $orZero (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $orZero (; 62 ;) (param $0 i32) (result i32) (local.get $0) ) - (func $andZero (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $andZero (; 63 ;) (param $0 i32) (result i32) (drop (i32.const 0) ) @@ -2626,7 +2626,7 @@ ) (unreachable) ) - (func $abstract-additions (; 64 ;) (type $FUNCSIG$vijfd) (param $x32 i32) (param $x64 i64) (param $y32 f32) (param $y64 f64) + (func $abstract-additions (; 64 ;) (param $x32 i32) (param $x64 i64) (param $y32 f32) (param $y64 f64) (drop (local.get $x32) ) @@ -2832,7 +2832,7 @@ ) ) ) - (func $negatives-are-sometimes-better (; 65 ;) (type $FUNCSIG$vijf) (param $x i32) (param $y i64) (param $z f32) + (func $negatives-are-sometimes-better (; 65 ;) (param $x i32) (param $y i64) (param $z f32) (drop (i32.sub (local.get $x) @@ -2930,7 +2930,7 @@ ) ) ) - (func $shift-a-zero (; 66 ;) (type $FUNCSIG$vijf) (param $x i32) (param $y i64) (param $z f32) + (func $shift-a-zero (; 66 ;) (param $x i32) (param $y i64) (param $z f32) (drop (i32.const 0) ) @@ -2950,7 +2950,7 @@ ) ) ) - (func $identical-siblings (; 67 ;) (type $FUNCSIG$vijdi) (param $x i32) (param $y i64) (param $z f64) (param $xx i32) + (func $identical-siblings (; 67 ;) (param $x i32) (param $y i64) (param $z f64) (param $xx i32) (drop (i32.const 0) ) @@ -3060,7 +3060,7 @@ (i32.const 1) ) ) - (func $all_ones (; 68 ;) (type $0) (param $x i32) (param $y i64) + (func $all_ones (; 68 ;) (param $x i32) (param $y i64) (drop (local.get $x) ) @@ -3082,12 +3082,12 @@ (i64.const -1) ) ) - (func $xor (; 69 ;) (type $0) (param $x i32) (param $y i64) + (func $xor (; 69 ;) (param $x i32) (param $y i64) (drop (local.get $x) ) ) - (func $select-on-const (; 70 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $select-on-const (; 70 ;) (param $x i32) (param $y i32) (drop (local.get $x) ) @@ -3124,7 +3124,7 @@ ) ) ) - (func $getFallthrough (; 71 ;) (type $FUNCSIG$v) + (func $getFallthrough (; 71 ;) (local $x0 i32) (local $x1 i32) (local $x2 i32) @@ -3203,7 +3203,7 @@ ) ) ) - (func $tee-with-unreachable-value (; 72 ;) (type $FUNCSIG$d) (result f64) + (func $tee-with-unreachable-value (; 72 ;) (result f64) (local $var$0 i32) (block $label$1 (result f64) (local.tee $var$0 @@ -3214,7 +3214,7 @@ ) ) ) - (func $add-sub-zero-reorder-1 (; 73 ;) (type $FUNCSIG$ii) (param $temp i32) (result i32) + (func $add-sub-zero-reorder-1 (; 73 ;) (param $temp i32) (result i32) (i32.add (i32.add (i32.sub @@ -3228,7 +3228,7 @@ (i32.const 2) ) ) - (func $add-sub-zero-reorder-2 (; 74 ;) (type $FUNCSIG$ii) (param $temp i32) (result i32) + (func $add-sub-zero-reorder-2 (; 74 ;) (param $temp i32) (result i32) (i32.add (i32.sub (local.tee $temp @@ -3239,7 +3239,7 @@ (i32.const 2) ) ) - (func $pre-combine-or (; 75 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $pre-combine-or (; 75 ;) (param $x i32) (param $y i32) (drop (i32.ge_s (local.get $x) @@ -3301,7 +3301,7 @@ ) ) ) - (func $combine-or (; 76 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $combine-or (; 76 ;) (param $x i32) (param $y i32) (drop (i32.ge_s (local.get $x) @@ -3309,7 +3309,7 @@ ) ) ) - (func $select-into-arms (; 77 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $select-into-arms (; 77 ;) (param $x i32) (param $y i32) (if (select (local.get $x) @@ -3321,9 +3321,9 @@ ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "memory" (memory $0 (shared 256 256))) - (func $x (; 0 ;) (type $FUNCSIG$v) + (func $x (; 0 ;) (drop (i32.shr_s (i32.shl diff --git a/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.txt b/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.txt index 1f68bded1..1c2b4cc36 100644 --- a/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.txt +++ b/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.txt @@ -1,8 +1,8 @@ (module - (type $0 (func (param i32 i32) (result i32))) - (type $FUNCSIG$d (func (result f64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_f64 (func (result f64))) (memory $0 0) - (func $conditionals (; 0 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $conditionals (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -87,7 +87,7 @@ (local.get $5) ) ) - (func $side-effect (; 1 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $side-effect (; 1 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -170,7 +170,7 @@ (local.get $5) ) ) - (func $flip (; 2 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $flip (; 2 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -252,7 +252,7 @@ (local.get $5) ) ) - (func $invalidate-conditionalizeExpensiveOnBitwise (; 3 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $invalidate-conditionalizeExpensiveOnBitwise (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (if (i32.eqz (i32.and @@ -288,7 +288,7 @@ (local.get $1) ) ) - (func $invalidate-conditionalizeExpensiveOnBitwise-ok (; 4 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $invalidate-conditionalizeExpensiveOnBitwise-ok (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (if (i32.eqz (if (result i32) @@ -322,7 +322,7 @@ (local.get $1) ) ) - (func $conditionalize-if-type-change (; 5 ;) (type $FUNCSIG$d) (result f64) + (func $conditionalize-if-type-change (; 5 ;) (result f64) (local $0 i32) (drop (loop $label$1 (result f32) diff --git a/test/passes/pick-load-signs.txt b/test/passes/pick-load-signs.txt index d4b1d62c1..847134925 100644 --- a/test/passes/pick-load-signs.txt +++ b/test/passes/pick-load-signs.txt @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (memory $0 1) - (func $a (; 0 ;) (type $FUNCSIG$v) + (func $a (; 0 ;) (local $y i32) (local.set $y (i32.load8_u @@ -16,7 +16,7 @@ ) ) ) - (func $b (; 1 ;) (type $FUNCSIG$v) + (func $b (; 1 ;) (local $y i32) (local.set $y (i32.load16_u @@ -30,7 +30,7 @@ ) ) ) - (func $c (; 2 ;) (type $FUNCSIG$v) + (func $c (; 2 ;) (local $y i32) (local.set $y (i32.load8_u @@ -44,7 +44,7 @@ ) ) ) - (func $d (; 3 ;) (type $FUNCSIG$v) + (func $d (; 3 ;) (local $y i32) (local.set $y (i32.load16_u @@ -58,7 +58,7 @@ ) ) ) - (func $one-of-each (; 4 ;) (type $FUNCSIG$v) + (func $one-of-each (; 4 ;) (local $y i32) (local.set $y (i32.load8_s @@ -81,7 +81,7 @@ ) ) ) - (func $more-of-one (; 5 ;) (type $FUNCSIG$v) + (func $more-of-one (; 5 ;) (local $y i32) (local.set $y (i32.load8_s @@ -110,7 +110,7 @@ ) ) ) - (func $many-more-of-one (; 6 ;) (type $FUNCSIG$v) + (func $many-more-of-one (; 6 ;) (local $y i32) (local.set $y (i32.load8_u @@ -145,7 +145,7 @@ ) ) ) - (func $a-sign (; 7 ;) (type $FUNCSIG$v) + (func $a-sign (; 7 ;) (local $y i32) (local.set $y (i32.load8_s @@ -162,7 +162,7 @@ ) ) ) - (func $multivar (; 8 ;) (type $FUNCSIG$v) + (func $multivar (; 8 ;) (local $x i32) (local $y i32) (local.set $x @@ -191,7 +191,7 @@ ) ) ) - (func $corners (; 9 ;) (type $FUNCSIG$v) + (func $corners (; 9 ;) (local $y i32) (drop (i32.load8_s @@ -207,7 +207,7 @@ (i32.const 1024) ) ) - (func $wrong-size (; 10 ;) (type $FUNCSIG$v) + (func $wrong-size (; 10 ;) (local $y i32) (local.set $y (i32.load8_s @@ -221,7 +221,7 @@ ) ) ) - (func $wrong-size_s (; 11 ;) (type $FUNCSIG$v) + (func $wrong-size_s (; 11 ;) (local $y i32) (local.set $y (i32.load8_u @@ -238,7 +238,7 @@ ) ) ) - (func $non-sign-or-unsigned-use (; 12 ;) (type $FUNCSIG$v) + (func $non-sign-or-unsigned-use (; 12 ;) (local $y i32) (local.set $y (i32.load8_s @@ -255,12 +255,12 @@ (local.get $y) ) ) - (func $toplevel-load (; 13 ;) (type $FUNCSIG$i) (result i32) + (func $toplevel-load (; 13 ;) (result i32) (i32.load8_s (i32.const 1024) ) ) - (func $tees (; 14 ;) (type $FUNCSIG$v) + (func $tees (; 14 ;) (local $y i32) (drop (local.tee $y diff --git a/test/passes/post-assemblyscript-finalize.txt b/test/passes/post-assemblyscript-finalize.txt index 46f69acdf..560d5d52c 100644 --- a/test/passes/post-assemblyscript-finalize.txt +++ b/test/passes/post-assemblyscript-finalize.txt @@ -1,38 +1,38 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "rt" "retain" (func $~lib/rt/pure/__retain (param i32) (result i32))) (import "rt" "release" (func $~lib/rt/pure/__release (param i32))) (import "rt" "alloc" (func $~lib/rt/tlsf/__alloc (param i32 i32) (result i32))) - (func $eliminates.unnecessaryAllocation (; 3 ;) (type $FUNCSIG$v) + (func $eliminates.unnecessaryAllocation (; 3 ;) (nop) ) - (func $eliminates.unnecessaryPair (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $eliminates.unnecessaryPair (; 4 ;) (param $0 i32) (drop (local.get $0) ) ) - (func $eliminates.unnecessaryStaticPair (; 5 ;) (type $FUNCSIG$v) + (func $eliminates.unnecessaryStaticPair (; 5 ;) (nop) ) - (func $eliminates.unnecessaryStaticRetain (; 6 ;) (type $FUNCSIG$v) + (func $eliminates.unnecessaryStaticRetain (; 6 ;) (drop (i32.const 272) ) ) - (func $eliminates.unnecessaryStaticRelease (; 7 ;) (type $FUNCSIG$v) + (func $eliminates.unnecessaryStaticRelease (; 7 ;) (nop) ) - (func $keeps.dynamicRetain (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $keeps.dynamicRetain (; 8 ;) (param $0 i32) (local.set $0 (call $~lib/rt/pure/__retain (local.get $0) ) ) ) - (func $keeps.dynamicRelease (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $keeps.dynamicRelease (; 9 ;) (param $0 i32) (call $~lib/rt/pure/__release (local.get $0) ) diff --git a/test/passes/post-assemblyscript.txt b/test/passes/post-assemblyscript.txt index b81301cd4..cfdadff83 100644 --- a/test/passes/post-assemblyscript.txt +++ b/test/passes/post-assemblyscript.txt @@ -1,27 +1,27 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "rt" "retain" (func $~lib/rt/pure/__retain (param i32) (result i32))) (import "rt" "release" (func $~lib/rt/pure/__release (param i32))) (import "rc" "getRetainedRef" (func $getRetainedRef (result i32))) - (func $eliminates.linearArgument (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $eliminates.linearArgument (; 3 ;) (param $0 i32) (local.set $0 (local.get $0) ) (nop) ) - (func $eliminates.linearLocal (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $eliminates.linearLocal (; 4 ;) (param $0 i32) (local $1 i32) (local.set $1 (local.get $0) ) (nop) ) - (func $eliminates.linearChain (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $eliminates.linearChain (; 5 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -38,7 +38,7 @@ (nop) (nop) ) - (func $eliminates.balancedReleases (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $cond i32) + (func $eliminates.balancedReleases (; 6 ;) (param $0 i32) (param $cond i32) (local $2 i32) (local.set $2 (local.get $0) @@ -49,7 +49,7 @@ (nop) ) ) - (func $eliminates.partialReleases (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $cond i32) + (func $eliminates.partialReleases (; 7 ;) (param $0 i32) (param $cond i32) (local $2 i32) (local.set $2 (local.get $0) @@ -59,7 +59,7 @@ (nop) ) ) - (func $eliminates.balancedRetains (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $cond1 i32) (param $cond2 i32) + (func $eliminates.balancedRetains (; 8 ;) (param $0 i32) (param $cond1 i32) (param $cond2 i32) (local $3 i32) (if (local.get $cond1) @@ -78,7 +78,7 @@ ) (nop) ) - (func $eliminates.balancedInsideLoop (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $cond i32) + (func $eliminates.balancedInsideLoop (; 9 ;) (param $0 i32) (param $cond i32) (local $flat i32) (block $break|0 (loop $continue|0 @@ -99,7 +99,7 @@ (unreachable) ) ) - (func $eliminates.balancedOutsideLoop (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $cond i32) + (func $eliminates.balancedOutsideLoop (; 10 ;) (param $0 i32) (param $cond i32) (local $flat i32) (local.set $0 (local.get $0) @@ -120,7 +120,7 @@ ) (nop) ) - (func $eliminates.balancedInsideOutsideLoop (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $cond i32) + (func $eliminates.balancedInsideOutsideLoop (; 11 ;) (param $0 i32) (param $cond i32) (local $flat i32) (local.set $0 (local.get $0) @@ -145,7 +145,7 @@ ) (nop) ) - (func $eliminates.balancedInsideOutsideLoopWithBranch (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $cond1 i32) (param $cond2 i32) + (func $eliminates.balancedInsideOutsideLoopWithBranch (; 12 ;) (param $0 i32) (param $cond1 i32) (param $cond2 i32) (local $flat i32) (local.set $0 (local.get $0) @@ -177,7 +177,7 @@ ) (nop) ) - (func $eliminates.replace (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $eliminates.replace (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local.set $0 @@ -208,7 +208,7 @@ (nop) (nop) ) - (func $eliminates.replaceAlreadyRetained (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $eliminates.replaceAlreadyRetained (; 14 ;) (param $0 i32) (result i32) (local $1 i32) (block $block (local.set $0 @@ -226,7 +226,7 @@ ) ) ) - (func $keeps.partialRetains (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $cond i32) + (func $keeps.partialRetains (; 15 ;) (param $0 i32) (param $cond i32) (if (local.get $cond) (local.set $0 @@ -239,7 +239,7 @@ (local.get $0) ) ) - (func $keeps.reachesReturn (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $cond i32) (result i32) + (func $keeps.reachesReturn (; 16 ;) (param $0 i32) (param $cond i32) (result i32) (block $block (local.set $0 (call $~lib/rt/pure/__retain diff --git a/test/passes/post-emscripten.txt b/test/passes/post-emscripten.txt index ee4eb4976..13fb3e0de 100644 --- a/test/passes/post-emscripten.txt +++ b/test/passes/post-emscripten.txt @@ -1,15 +1,14 @@ (module - (type $0 (func (param i32))) - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$viif (func (param i32 i32 f32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vif (func (param i32 f32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $none_=>_none (func)) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (import "global.Math" "pow" (func $Math_pow (param f64 f64) (result f64))) (import "env" "invoke_vif" (func $invoke_vif (param i32 i32 f32))) (memory $0 256 256) (table $0 7 7 funcref) (elem (i32.const 0) $pow2 $pow.2 $exc $other_safe $other_unsafe $deep_safe $deep_unsafe) - (func $pow2 (; 2 ;) (type $FUNCSIG$v) + (func $pow2 (; 2 ;) (local $x f64) (local $y f64) (local $2 f64) @@ -60,7 +59,7 @@ ) ) ) - (func $pow.2 (; 3 ;) (type $FUNCSIG$v) + (func $pow.2 (; 3 ;) (drop (f64.sqrt (f64.const 1) @@ -73,7 +72,7 @@ ) ) ) - (func $exc (; 4 ;) (type $FUNCSIG$v) + (func $exc (; 4 ;) (call $other_safe (i32.const 42) (f32.const 3.141590118408203) @@ -101,10 +100,10 @@ (f32.const 3.141590118408203) ) ) - (func $other_safe (; 5 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $other_safe (; 5 ;) (param $0 i32) (param $1 f32) (nop) ) - (func $other_unsafe (; 6 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $other_unsafe (; 6 ;) (param $0 i32) (param $1 f32) (drop (call $Math_pow (f64.const 1) @@ -112,13 +111,13 @@ ) ) ) - (func $deep_safe (; 7 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $deep_safe (; 7 ;) (param $0 i32) (param $1 f32) (call $other_safe (unreachable) (unreachable) ) ) - (func $deep_unsafe (; 8 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $deep_unsafe (; 8 ;) (param $0 i32) (param $1 f32) (call $other_unsafe (unreachable) (unreachable) @@ -126,31 +125,30 @@ ) ) (module - (type $FUNCSIG$v (func)) - (func $call (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $call (; 0 ;) (call $call) ) ) (module - (type $0 (func (param i32))) - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$viif (func (param i32 i32 f32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vif (func (param i32 f32))) + (type $none_=>_none (func)) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (import "env" "glob" (global $glob i32)) (import "global.Math" "pow" (func $Math_pow (param f64 f64) (result f64))) (import "env" "invoke_vif" (func $invoke_vif (param i32 i32 f32))) (memory $0 256 256) (table $0 7 7 funcref) (elem (global.get $glob) $other_safe) - (func $exc (; 2 ;) (type $FUNCSIG$v) + (func $exc (; 2 ;) (call $invoke_vif (i32.const 3) (i32.const 42) (f32.const 3.141590118408203) ) ) - (func $other_safe (; 3 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $other_safe (; 3 ;) (param $0 i32) (param $1 f32) (nop) ) ) diff --git a/test/passes/post-emscripten_pass-arg=emscripten-sbrk-ptr@16_pass-arg=emscripten-sbrk-val@42.txt b/test/passes/post-emscripten_pass-arg=emscripten-sbrk-ptr@16_pass-arg=emscripten-sbrk-val@42.txt index 119366efd..8f8ed2a2f 100644 --- a/test/passes/post-emscripten_pass-arg=emscripten-sbrk-ptr@16_pass-arg=emscripten-sbrk-val@42.txt +++ b/test/passes/post-emscripten_pass-arg=emscripten-sbrk-ptr@16_pass-arg=emscripten-sbrk-val@42.txt @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 1 1) (data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00*\00\00\00") - (func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $internal (; 0 ;) (result i32) (i32.const 16) ) ) @@ -11,50 +11,50 @@ (data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00*\00\00\00") ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 10 10) (data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00*\00\00\00") - (func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $internal (; 0 ;) (result i32) (i32.const 16) ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 10 10) (data (i32.const 0) "1234567890123456*\00\00\00") - (func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $internal (; 0 ;) (result i32) (i32.const 16) ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 10 10) (data (i32.const 0) "1234567890\00\00\00\00\00\00*\00\00\00") - (func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $internal (; 0 ;) (result i32) (i32.const 16) ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 10 10) (data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00123456*\00\00\001234567890") - (func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $internal (; 0 ;) (result i32) (i32.const 16) ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 10 10) (data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00123456*\00\00\00") - (func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $internal (; 0 ;) (result i32) (i32.const 16) ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 10 10) (data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\00\00\00\001234567890") - (func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $internal (; 0 ;) (result i32) (i32.const 16) ) ) diff --git a/test/passes/post-emscripten_pass-arg=emscripten-sbrk-ptr@4008.txt b/test/passes/post-emscripten_pass-arg=emscripten-sbrk-ptr@4008.txt index 4b8da86cd..40addc46d 100644 --- a/test/passes/post-emscripten_pass-arg=emscripten-sbrk-ptr@4008.txt +++ b/test/passes/post-emscripten_pass-arg=emscripten-sbrk-ptr@4008.txt @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$i (func (result i32))) - (func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) + (type $none_=>_i32 (func (result i32))) + (func $internal (; 0 ;) (result i32) (i32.const 4008) ) ) diff --git a/test/passes/precompute-propagate_all-features.txt b/test/passes/precompute-propagate_all-features.txt index 93ec352ee..5a0b7b3a5 100644 --- a/test/passes/precompute-propagate_all-features.txt +++ b/test/passes/precompute-propagate_all-features.txt @@ -1,11 +1,11 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$V (func (result v128))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $none_=>_v128 (func (result v128))) (memory $0 10 10) - (func $basic (; 0 ;) (type $FUNCSIG$vi) (param $p i32) + (func $basic (; 0 ;) (param $p i32) (local $x i32) (local.set $x (i32.const 10) @@ -14,7 +14,7 @@ (i32.const 20) ) ) - (func $split (; 1 ;) (type $FUNCSIG$vi) (param $p i32) + (func $split (; 1 ;) (param $p i32) (local $x i32) (if (i32.const 1) @@ -29,7 +29,7 @@ ) ) ) - (func $split-but-join (; 2 ;) (type $FUNCSIG$vi) (param $p i32) + (func $split-but-join (; 2 ;) (param $p i32) (local $x i32) (if (i32.const 1) @@ -44,7 +44,7 @@ (i32.const 20) ) ) - (func $split-but-join-different (; 3 ;) (type $FUNCSIG$vi) (param $p i32) + (func $split-but-join-different (; 3 ;) (param $p i32) (local $x i32) (if (i32.const 1) @@ -62,7 +62,7 @@ ) ) ) - (func $split-but-join-different-b (; 4 ;) (type $FUNCSIG$vi) (param $p i32) + (func $split-but-join-different-b (; 4 ;) (param $p i32) (local $x i32) (if (i32.const 1) @@ -80,7 +80,7 @@ ) ) ) - (func $split-but-join-init0 (; 5 ;) (type $FUNCSIG$vi) (param $p i32) + (func $split-but-join-init0 (; 5 ;) (param $p i32) (local $x i32) (if (i32.const 1) @@ -92,7 +92,7 @@ (i32.const 0) ) ) - (func $later (; 6 ;) (type $FUNCSIG$vi) (param $p i32) + (func $later (; 6 ;) (param $p i32) (local $x i32) (local.set $x (i32.const 10) @@ -110,7 +110,7 @@ (i32.const 39) ) ) - (func $later2 (; 7 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $later2 (; 7 ;) (param $p i32) (result i32) (local $x i32) (local.set $x (i32.const 10) @@ -120,7 +120,7 @@ ) (i32.const 20) ) - (func $two-ways-but-identical (; 8 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $two-ways-but-identical (; 8 ;) (param $p i32) (result i32) (local $x i32) (local $y i32) (local.set $x @@ -140,7 +140,7 @@ ) (i32.const 21) ) - (func $two-ways-but-almost-identical (; 9 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $two-ways-but-almost-identical (; 9 ;) (param $p i32) (result i32) (local $x i32) (local $y i32) (local.set $x @@ -163,7 +163,7 @@ ) (local.get $y) ) - (func $deadloop (; 10 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $deadloop (; 10 ;) (param $p i32) (result i32) (local $x i32) (local $y i32) (loop $loop @@ -176,7 +176,7 @@ (br $loop) ) ) - (func $deadloop2 (; 11 ;) (type $FUNCSIG$vi) (param $p i32) + (func $deadloop2 (; 11 ;) (param $p i32) (local $x i32) (local $y i32) (loop $loop @@ -195,7 +195,7 @@ (br $loop) ) ) - (func $deadloop3 (; 12 ;) (type $FUNCSIG$vi) (param $p i32) + (func $deadloop3 (; 12 ;) (param $p i32) (local $x i32) (local $y i32) (loop $loop @@ -214,7 +214,7 @@ (br $loop) ) ) - (func $through-tee (; 13 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $through-tee (; 13 ;) (param $x i32) (param $y i32) (result i32) (local.set $x (local.tee $y (i32.const 7) @@ -224,7 +224,7 @@ (i32.const 14) ) ) - (func $through-tee-more (; 14 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $through-tee-more (; 14 ;) (param $x i32) (param $y i32) (result i32) (local.set $x (i32.eqz (local.tee $y @@ -236,13 +236,13 @@ (i32.const 7) ) ) - (func $multipass (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $multipass (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (nop) (nop) (local.get $2) ) - (func $through-fallthrough (; 16 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $through-fallthrough (; 16 ;) (param $x i32) (param $y i32) (result i32) (local.set $x (block $block (result i32) (nop) @@ -255,7 +255,7 @@ (i32.const 14) ) ) - (func $simd-load (; 17 ;) (type $FUNCSIG$V) (result v128) + (func $simd-load (; 17 ;) (result v128) (local $x v128) (local.set $x (v8x16.load_splat diff --git a/test/passes/precompute_all-features.txt b/test/passes/precompute_all-features.txt index c662aa406..901757b99 100644 --- a/test/passes/precompute_all-features.txt +++ b/test/passes/precompute_all-features.txt @@ -1,14 +1,14 @@ (module - (type $0 (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$V (func (result v128))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_f64 (func (result f64))) + (type $none_=>_v128 (func (result v128))) + (type $i32_=>_none (func (param i32))) (memory $0 512 512) (data (i32.const 0) "passive") (global $global i32 (i32.const 1)) (global $global-mut (mut i32) (i32.const 2)) - (func $x (; 0 ;) (type $0) (param $x i32) + (func $x (; 0 ;) (param $x i32) (call $x (i32.const 2300) ) @@ -89,7 +89,7 @@ (i32.const 0) ) ) - (func $ret (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $ret (; 1 ;) (result i32) (if (call $ret) (return @@ -104,13 +104,13 @@ ) (i32.const 1) ) - (func $noret (; 2 ;) (type $FUNCSIG$v) + (func $noret (; 2 ;) (if (call $ret) (return) ) ) - (func $refinalize-br-condition-unreachable (; 3 ;) (type $FUNCSIG$v) + (func $refinalize-br-condition-unreachable (; 3 ;) (block $label$1 (drop (br_if $label$1 @@ -119,7 +119,7 @@ ) ) ) - (func $br_if-condition-is-block-i32-but-unreachable-so-refinalize-tricky (; 4 ;) (type $FUNCSIG$v) + (func $br_if-condition-is-block-i32-but-unreachable-so-refinalize-tricky (; 4 ;) (drop (block $label$1 (result i32) (drop @@ -134,7 +134,7 @@ ) ) ) - (func $reuse-br-value (; 5 ;) (type $FUNCSIG$d) (result f64) + (func $reuse-br-value (; 5 ;) (result f64) (block $label$0 (result f64) (i32.store8 (i32.const 1919623207) @@ -161,7 +161,7 @@ (f64.const 4776014875438170098655851e156) ) ) - (func $refinalize-two-breaks-one-unreachable (; 6 ;) (type $FUNCSIG$v) + (func $refinalize-two-breaks-one-unreachable (; 6 ;) (drop (block $label$0 (result i64) (block @@ -184,7 +184,7 @@ ) ) ) - (func $one-break-value-and-it-is-unreachable (; 7 ;) (type $FUNCSIG$d) (result f64) + (func $one-break-value-and-it-is-unreachable (; 7 ;) (result f64) (local $var$0 i32) (block $label$6 (block @@ -195,16 +195,16 @@ ) ) ) - (func $global-notprecomputable (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $global-notprecomputable (; 8 ;) (result i32) (i32.add (i32.const 1) (global.get $global-mut) ) ) - (func $global-precomputable (; 9 ;) (type $FUNCSIG$i) (result i32) + (func $global-precomputable (; 9 ;) (result i32) (i32.const 2) ) - (func $global-partiallyprecomputable (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $global-partiallyprecomputable (; 10 ;) (result i32) (i32.sub (i32.add (i32.const 1) @@ -213,36 +213,36 @@ (i32.const 2) ) ) - (func $no-simd-precompute (; 11 ;) (type $FUNCSIG$V) (result v128) + (func $no-simd-precompute (; 11 ;) (result v128) (i32x4.splat (i32.const 0) ) ) - (func $no-simd-precompute-if (; 12 ;) (type $FUNCSIG$V) (result v128) + (func $no-simd-precompute-if (; 12 ;) (result v128) (return (i32x4.splat (i32.const 0) ) ) ) - (func $no-memory-init-precompute (; 13 ;) (type $FUNCSIG$v) + (func $no-memory-init-precompute (; 13 ;) (memory.init 0 (i32.const 512) (i32.const 0) (i32.const 12) ) ) - (func $no-data-drop-precompute (; 14 ;) (type $FUNCSIG$v) + (func $no-data-drop-precompute (; 14 ;) (data.drop 0) ) - (func $no-memory-copy-precompute (; 15 ;) (type $FUNCSIG$v) + (func $no-memory-copy-precompute (; 15 ;) (memory.copy (i32.const 512) (i32.const 0) (i32.const 12) ) ) - (func $no-memory-fill-precompute (; 16 ;) (type $FUNCSIG$v) + (func $no-memory-fill-precompute (; 16 ;) (memory.fill (i32.const 512) (i32.const 0) diff --git a/test/passes/precompute_coalesce-locals_vacuum.txt b/test/passes/precompute_coalesce-locals_vacuum.txt index 2129f2418..4efb9002f 100644 --- a/test/passes/precompute_coalesce-locals_vacuum.txt +++ b/test/passes/precompute_coalesce-locals_vacuum.txt @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (func $nested-br_if-value (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (type $i32_=>_i32 (func (param i32) (result i32))) + (func $nested-br_if-value (; 0 ;) (param $0 i32) (result i32) (loop $label$0 (br $label$0) ) diff --git a/test/passes/print-call-graph.txt b/test/passes/print-call-graph.txt index 013be17bb..722762af6 100644 --- a/test/passes/print-call-graph.txt +++ b/test/passes/print-call-graph.txt @@ -112,14 +112,14 @@ digraph call { "b3" [style="filled, rounded"]; } (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $0 256 256)) (data (global.get $memoryBase) "\05\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\b0\04\00\00\00\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\ff\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04") (import "env" "table" (table $0 9 9 funcref)) @@ -186,7 +186,7 @@ digraph call { (export "dynCall_iiii" (func $dynCall_iiii)) (export "dynCall_vi" (func $dynCall_vi)) (export "dynCall_v" (func $dynCall_v)) - (func $stackAlloc (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $stackAlloc (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local.set $1 (global.get $STACKTOP) @@ -208,15 +208,15 @@ digraph call { ) (local.get $1) ) - (func $stackSave (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $stackSave (; 11 ;) (result i32) (global.get $STACKTOP) ) - (func $stackRestore (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $stackRestore (; 12 ;) (param $0 i32) (global.set $STACKTOP (local.get $0) ) ) - (func $establishStackSpace (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $establishStackSpace (; 13 ;) (param $0 i32) (param $1 i32) (global.set $STACKTOP (local.get $0) ) @@ -224,7 +224,7 @@ digraph call { (local.get $1) ) ) - (func $setThrew (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $setThrew (; 14 ;) (param $0 i32) (param $1 i32) (if (i32.eqz (global.get $__THREW__) @@ -239,21 +239,21 @@ digraph call { ) ) ) - (func $setTempRet0 (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $setTempRet0 (; 15 ;) (param $0 i32) (global.set $tempRet0 (local.get $0) ) ) - (func $getTempRet0 (; 16 ;) (type $FUNCSIG$i) (result i32) + (func $getTempRet0 (; 16 ;) (result i32) (global.get $tempRet0) ) - (func $_malloc (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $_malloc (; 17 ;) (param $0 i32) (result i32) (i32.const 0) ) - (func $_free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $_free (; 18 ;) (param $0 i32) (nop) ) - (func $_main (; 19 ;) (type $FUNCSIG$i) (result i32) + (func $_main (; 19 ;) (result i32) (local $0 i32) (i64.store align=4 (local.tee $0 @@ -265,7 +265,7 @@ digraph call { ) (local.get $0) ) - (func $___stdio_close (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $___stdio_close (; 20 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local.set $1 @@ -298,7 +298,7 @@ digraph call { ) (local.get $0) ) - (func $___stdio_write (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $___stdio_write (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -645,7 +645,7 @@ digraph call { ) (local.get $0) ) - (func $___stdio_seek (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $___stdio_seek (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local.set $4 @@ -714,7 +714,7 @@ digraph call { ) (local.get $0) ) - (func $___syscall_ret (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $___syscall_ret (; 23 ;) (param $0 i32) (result i32) (if (result i32) (i32.gt_u (local.get $0) @@ -733,7 +733,7 @@ digraph call { (local.get $0) ) ) - (func $___errno_location (; 24 ;) (type $FUNCSIG$i) (result i32) + (func $___errno_location (; 24 ;) (result i32) (if (result i32) (i32.load (i32.const 1140) @@ -744,7 +744,7 @@ digraph call { (i32.const 1184) ) ) - (func $_cleanup_387 (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $_cleanup_387 (; 25 ;) (param $0 i32) (if (i32.eqz (i32.load offset=68 @@ -756,7 +756,7 @@ digraph call { ) ) ) - (func $___stdout_write (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $___stdout_write (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -830,7 +830,7 @@ digraph call { ) (local.get $0) ) - (func $_fflush (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $_fflush (; 27 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (block $do-once (result i32) @@ -953,7 +953,7 @@ digraph call { ) ) ) - (func $___fflush_unlocked (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $___fflush_unlocked (; 28 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -983,7 +983,7 @@ digraph call { ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.const 0) (i32.const 0) @@ -1031,7 +1031,7 @@ digraph call { ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $0) (i32.sub (local.get $4) @@ -1073,7 +1073,7 @@ digraph call { (i32.const 0) ) ) - (func $__Znwj (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $__Znwj (; 29 ;) (param $0 i32) (result i32) (local $1 i32) (local.set $1 (select @@ -1096,7 +1096,7 @@ digraph call { (call $__ZSt15get_new_handlerv) ) (block $block - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.add (i32.and (local.get $0) @@ -1115,7 +1115,7 @@ digraph call { ) (local.get $0) ) - (func $__ZSt15get_new_handlerv (; 30 ;) (type $FUNCSIG$i) (result i32) + (func $__ZSt15get_new_handlerv (; 30 ;) (result i32) (local $0 i32) (i32.store (i32.const 1188) @@ -1130,10 +1130,10 @@ digraph call { ) (local.get $0) ) - (func $runPostSets (; 31 ;) (type $FUNCSIG$v) + (func $runPostSets (; 31 ;) (nop) ) - (func $_memset (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_memset (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1271,7 +1271,7 @@ digraph call { (local.get $2) ) ) - (func $_memcpy (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $_memcpy (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.ge_s @@ -1420,11 +1420,11 @@ digraph call { ) (local.get $3) ) - (func $_pthread_self (; 34 ;) (type $FUNCSIG$i) (result i32) + (func $_pthread_self (; 34 ;) (result i32) (i32.const 0) ) - (func $dynCall_ii (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (call_indirect (type $FUNCSIG$ii) + (func $dynCall_ii (; 35 ;) (param $0 i32) (param $1 i32) (result i32) + (call_indirect (type $i32_=>_i32) (local.get $1) (i32.add (i32.and @@ -1435,8 +1435,8 @@ digraph call { ) ) ) - (func $dynCall_iiii (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (call_indirect (type $FUNCSIG$iiii) + (func $dynCall_iiii (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $1) (local.get $2) (local.get $3) @@ -1449,8 +1449,8 @@ digraph call { ) ) ) - (func $dynCall_vi (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (call_indirect (type $FUNCSIG$vi) + (func $dynCall_vi (; 37 ;) (param $0 i32) (param $1 i32) + (call_indirect (type $i32_=>_none) (local.get $1) (i32.add (i32.and @@ -1461,8 +1461,8 @@ digraph call { ) ) ) - (func $dynCall_v (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) - (call_indirect (type $FUNCSIG$v) + (func $dynCall_v (; 38 ;) (param $0 i32) + (call_indirect (type $none_=>_none) (i32.add (i32.and (local.get $0) @@ -1472,24 +1472,24 @@ digraph call { ) ) ) - (func $b0 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $b0 (; 39 ;) (param $0 i32) (result i32) (call $abort (i32.const 0) ) (i32.const 0) ) - (func $b1 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $b1 (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (call $abort (i32.const 1) ) (i32.const 0) ) - (func $b2 (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $b2 (; 41 ;) (param $0 i32) (call $abort (i32.const 2) ) ) - (func $b3 (; 42 ;) (type $FUNCSIG$v) + (func $b3 (; 42 ;) (call $abort (i32.const 3) ) diff --git a/test/passes/print-function-map.txt b/test/passes/print-function-map.txt index a10c11a1b..bc8988b34 100644 --- a/test/passes/print-function-map.txt +++ b/test/passes/print-function-map.txt @@ -2,12 +2,12 @@ 1:bar 2:baz (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "foo" (func $Foo)) - (func $bar (; 1 ;) (type $FUNCSIG$v) + (func $bar (; 1 ;) (nop) ) - (func $baz (; 2 ;) (type $FUNCSIG$v) + (func $baz (; 2 ;) (nop) ) ) diff --git a/test/passes/remove-imports.txt b/test/passes/remove-imports.txt index 4d85934de..d125543b3 100644 --- a/test/passes/remove-imports.txt +++ b/test/passes/remove-imports.txt @@ -1,13 +1,11 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$d (func (result f64))) + (type $none_=>_none (func)) (import "env" "table" (table $0 1 1 funcref)) (elem (i32.const 0) $waka-sneaky) (import "env" "memBase" (global $import$global0 i32)) (import "somewhere" "waka-sneaky" (func $waka-sneaky)) (memory $0 1024 1024) - (func $nada (; 1 ;) (type $FUNCSIG$v) + (func $nada (; 1 ;) (nop) (drop (i32.const 0) @@ -15,7 +13,7 @@ (drop (f64.const 0) ) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 0) ) ) diff --git a/test/passes/remove-non-js-ops.txt b/test/passes/remove-non-js-ops.txt index 333b11536..6a6e884c4 100644 --- a/test/passes/remove-non-js-ops.txt +++ b/test/passes/remove-non-js-ops.txt @@ -1,11 +1,18 @@ (module - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$fff (func (param f32 f32) (result f32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$jjj (func (param i64 i64) (result i64))) - (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$ff (func (param f32) (result f32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $f32_=>_f32 (func (param f32) (result f32))) + (type $f64_=>_f64 (func (param f64) (result f64))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i64_=>_none (func (param i64))) + (type $f32_=>_none (func (param f32))) + (type $f64_=>_none (func (param f64))) + (type $none_=>_i64 (func (result i64))) + (type $none_=>_f32 (func (result f32))) + (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) + (type $none_=>_f64 (func (result f64))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (import "env" "wasm2js_scratch_load_i32" (func $wasm2js_scratch_load_i32 (param i32) (result i32))) (import "env" "wasm2js_scratch_store_i32" (func $wasm2js_scratch_store_i32 (param i32 i32))) (import "env" "wasm2js_scratch_load_i64" (func $wasm2js_scratch_load_i64 (result i64))) @@ -15,7 +22,7 @@ (import "env" "wasm2js_scratch_load_f64" (func $wasm2js_scratch_load_f64 (result f64))) (import "env" "wasm2js_scratch_store_f64" (func $wasm2js_scratch_store_f64 (param f64))) (memory $0 1) - (func $copysign64 (; 8 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $copysign64 (; 8 ;) (param $0 f64) (param $1 f64) (result f64) (f64.reinterpret_i64 (i64.or (i64.and @@ -33,7 +40,7 @@ ) ) ) - (func $copysign32 (; 9 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $copysign32 (; 9 ;) (param $0 f32) (param $1 f32) (result f32) (f32.reinterpret_i32 (i32.or (i32.and @@ -51,85 +58,85 @@ ) ) ) - (func $rotl32 (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $rotl32 (; 10 ;) (param $0 i32) (param $1 i32) (result i32) (call $__wasm_rotl_i32 (local.get $0) (local.get $1) ) ) - (func $rotr32 (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $rotr32 (; 11 ;) (param $0 i32) (param $1 i32) (result i32) (call $__wasm_rotr_i32 (local.get $0) (local.get $1) ) ) - (func $rotl64 (; 12 ;) (type $FUNCSIG$jjj) (param $0 i64) (param $1 i64) (result i64) + (func $rotl64 (; 12 ;) (param $0 i64) (param $1 i64) (result i64) (call $__wasm_rotl_i64 (local.get $0) (local.get $1) ) ) - (func $rotr64 (; 13 ;) (type $FUNCSIG$jjj) (param $0 i64) (param $1 i64) (result i64) + (func $rotr64 (; 13 ;) (param $0 i64) (param $1 i64) (result i64) (call $__wasm_rotr_i64 (local.get $0) (local.get $1) ) ) - (func $nearest64 (; 14 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $nearest64 (; 14 ;) (param $0 f64) (result f64) (call $__wasm_nearest_f64 (local.get $0) ) ) - (func $nearest32 (; 15 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $nearest32 (; 15 ;) (param $0 f32) (result f32) (call $__wasm_nearest_f32 (local.get $0) ) ) - (func $trunc64 (; 16 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $trunc64 (; 16 ;) (param $0 f64) (result f64) (call $__wasm_trunc_f64 (local.get $0) ) ) - (func $trunc32 (; 17 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $trunc32 (; 17 ;) (param $0 f32) (result f32) (call $__wasm_trunc_f32 (local.get $0) ) ) - (func $popcnt32 (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $popcnt32 (; 18 ;) (param $0 i32) (result i32) (call $__wasm_popcnt_i32 (local.get $0) ) ) - (func $ctz32 (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $ctz32 (; 19 ;) (param $0 i32) (result i32) (call $__wasm_ctz_i32 (local.get $0) ) ) - (func $i64_sdiv (; 20 ;) (type $FUNCSIG$jjj) (param $0 i64) (param $1 i64) (result i64) + (func $i64_sdiv (; 20 ;) (param $0 i64) (param $1 i64) (result i64) (call $__wasm_i64_sdiv (local.get $0) (local.get $1) ) ) - (func $i64_udiv (; 21 ;) (type $FUNCSIG$jjj) (param $0 i64) (param $1 i64) (result i64) + (func $i64_udiv (; 21 ;) (param $0 i64) (param $1 i64) (result i64) (call $__wasm_i64_udiv (local.get $0) (local.get $1) ) ) - (func $i64_srem (; 22 ;) (type $FUNCSIG$jjj) (param $0 i64) (param $1 i64) (result i64) + (func $i64_srem (; 22 ;) (param $0 i64) (param $1 i64) (result i64) (call $__wasm_i64_srem (local.get $0) (local.get $1) ) ) - (func $i64_urem (; 23 ;) (type $FUNCSIG$jjj) (param $0 i64) (param $1 i64) (result i64) + (func $i64_urem (; 23 ;) (param $0 i64) (param $1 i64) (result i64) (call $__wasm_i64_urem (local.get $0) (local.get $1) ) ) - (func $i64_mul (; 24 ;) (type $FUNCSIG$jjj) (param $0 i64) (param $1 i64) (result i64) + (func $i64_mul (; 24 ;) (param $0 i64) (param $1 i64) (result i64) (call $__wasm_i64_mul (local.get $0) (local.get $1) diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt index 0cfa94f6c..392913702 100644 --- a/test/passes/remove-unused-brs.txt +++ b/test/passes/remove-unused-brs.txt @@ -1,22 +1,22 @@ (module - (type $0 (func (param i32))) - (type $1 (func)) - (type $2 (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$ififiidf (func (param f32 i32 f32 i32 i32 f64 f32) (result i32))) - (type $FUNCSIG$ji (func (param i32) (result i64))) - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$f (func (result f32))) - (type $FUNCSIG$fi (func (param i32) (result f32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iididff (func (param i32 f64 i32 f64 f32 f32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_f64_i32_f64_f32_f32_=>_i32 (func (param i32 f64 i32 f64 f32 f32) (result i32))) + (type $f32_i32_f32_i32_i32_f64_f32_=>_i32 (func (param f32 i32 f32 i32 i32 f64 f32) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) + (type $none_=>_f32 (func (result f32))) + (type $i32_=>_f32 (func (param i32) (result f32))) (memory $0 256 256) - (func $b0-yes (; 0 ;) (type $0) (param $i1 i32) + (func $b0-yes (; 0 ;) (param $i1 i32) (block $topmost ) ) - (func $b1 (; 1 ;) (type $0) (param $i1 i32) + (func $b1 (; 1 ;) (param $i1 i32) (block $topmost (block $block (drop @@ -25,19 +25,19 @@ ) ) ) - (func $b2 (; 2 ;) (type $0) (param $i1 i32) + (func $b2 (; 2 ;) (param $i1 i32) (block $topmost (block $inner ) ) ) - (func $b3-yes (; 3 ;) (type $0) (param $i1 i32) + (func $b3-yes (; 3 ;) (param $i1 i32) (block $topmost (block $inner ) ) ) - (func $b4 (; 4 ;) (type $0) (param $i1 i32) + (func $b4 (; 4 ;) (param $i1 i32) (block $topmost (block $inner (block $block @@ -48,7 +48,7 @@ ) ) ) - (func $b5 (; 5 ;) (type $0) (param $i1 i32) + (func $b5 (; 5 ;) (param $i1 i32) (block $topmost (block $inner (block $block @@ -59,14 +59,14 @@ ) ) ) - (func $b6 (; 6 ;) (type $0) (param $i1 i32) + (func $b6 (; 6 ;) (param $i1 i32) (block $topmost (br_if $topmost (i32.const 1) ) ) ) - (func $b7 (; 7 ;) (type $0) (param $i1 i32) + (func $b7 (; 7 ;) (param $i1 i32) (block $topmost (block $block (drop @@ -78,7 +78,7 @@ ) ) ) - (func $b8 (; 8 ;) (type $0) (param $i1 i32) + (func $b8 (; 8 ;) (param $i1 i32) (block $topmost (block $inner (br_if $topmost @@ -87,7 +87,7 @@ ) ) ) - (func $b9 (; 9 ;) (type $0) (param $i1 i32) + (func $b9 (; 9 ;) (param $i1 i32) (block $topmost (block $inner (br_if $topmost @@ -96,7 +96,7 @@ ) ) ) - (func $b10 (; 10 ;) (type $0) (param $i1 i32) + (func $b10 (; 10 ;) (param $i1 i32) (block $topmost (block $inner (block $block @@ -110,7 +110,7 @@ ) ) ) - (func $b11 (; 11 ;) (type $0) (param $i1 i32) + (func $b11 (; 11 ;) (param $i1 i32) (block $topmost (block $inner (block $block @@ -124,7 +124,7 @@ ) ) ) - (func $b12-yes (; 12 ;) (type $1) + (func $b12-yes (; 12 ;) (if (i32.const 1) (block $topmost @@ -151,7 +151,7 @@ ) ) ) - (func $b13 (; 13 ;) (type $2) (result i32) + (func $b13 (; 13 ;) (result i32) (block $topmost (result i32) (if (i32.const 1) @@ -178,7 +178,7 @@ (i32.const 3) ) ) - (func $b14 (; 14 ;) (type $2) (result i32) + (func $b14 (; 14 ;) (result i32) (select (block $topmost (result i32) (block $block1 (result i32) @@ -191,14 +191,14 @@ (i32.const 1) ) ) - (func $b15 (; 15 ;) (type $1) + (func $b15 (; 15 ;) (block $topmost (br_if $topmost (i32.const 17) ) ) ) - (func $b15b (; 16 ;) (type $1) + (func $b15b (; 16 ;) (if (i32.const 18) (block $topmost @@ -210,7 +210,7 @@ ) ) ) - (func $b16 (; 17 ;) (type $1) + (func $b16 (; 17 ;) (block $a (block $b (block $c @@ -230,7 +230,7 @@ ) ) ) - (func $b17 (; 18 ;) (type $1) + (func $b17 (; 18 ;) (if (i32.const 0) (block $a @@ -272,16 +272,16 @@ ) ) ) - (func $ret-1 (; 19 ;) (type $1) + (func $ret-1 (; 19 ;) (nop) ) - (func $ret-2 (; 20 ;) (type $1) + (func $ret-2 (; 20 ;) (block $block0 (block $block1 ) ) ) - (func $ret-3 (; 21 ;) (type $1) + (func $ret-3 (; 21 ;) (if (i32.const 0) (block $block0 @@ -290,14 +290,14 @@ ) ) ) - (func $ret-value (; 22 ;) (type $2) (result i32) + (func $ret-value (; 22 ;) (result i32) (block $block0 (result i32) (block $block1 (result i32) (i32.const 1) ) ) ) - (func $no-select-but-the-last (; 23 ;) (type $1) + (func $no-select-but-the-last (; 23 ;) (block $a (if (i32.const 0) @@ -371,7 +371,7 @@ ) ) ) - (func $side-effects-and-order (; 24 ;) (type $2) (result i32) + (func $side-effects-and-order (; 24 ;) (result i32) (local $x i32) (block $do-once$0 (if @@ -429,7 +429,7 @@ (i32.const 1) ) ) - (func $loops (; 25 ;) (type $1) + (func $loops (; 25 ;) (loop $in (block $out (br_if $in @@ -699,7 +699,7 @@ ) ) ) - (func $br_if_in_block (; 26 ;) (type $2) (result i32) + (func $br_if_in_block (; 26 ;) (result i32) (block $outval (result i32) (block $in (drop @@ -733,7 +733,7 @@ ) ) ) - (func $threading (; 27 ;) (type $1) + (func $threading (; 27 ;) (drop (block $value-out (result i32) (block $value-in (result i32) @@ -767,7 +767,7 @@ ) ) ) - (func $if-to-br_if-conflict (; 28 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $if-to-br_if-conflict (; 28 ;) (param $x i32) (param $y i32) (result i32) (block $leave (local.set $y (block $out (result i32) @@ -794,7 +794,7 @@ (local.get $y) ) ) - (func $if-to-br_if-conflict2 (; 29 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $if-to-br_if-conflict2 (; 29 ;) (param $x i32) (param $y i32) (result i32) (block $leave (local.set $y (block $out (result i32) @@ -821,7 +821,7 @@ (local.get $y) ) ) - (func $if-to-br_if-value-sideeffect (; 30 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $if-to-br_if-value-sideeffect (; 30 ;) (param $x i32) (param $y i32) (result i32) (block $leave (local.set $y (block $out (result i32) @@ -849,7 +849,7 @@ (local.get $y) ) ) - (func $fuzz (; 31 ;) (type $FUNCSIG$vii) (param $j i32) (param $g i32) + (func $fuzz (; 31 ;) (param $j i32) (param $g i32) (loop $label$continue$d (block $label$break$c (block $label$break$d @@ -879,7 +879,7 @@ ) ) ) - (func $iffify (; 32 ;) (type $1) + (func $iffify (; 32 ;) (if (i32.eqz (i32.const 0) @@ -934,7 +934,7 @@ ) ) ) - (func $loop-if (; 33 ;) (type $2) (result i32) + (func $loop-if (; 33 ;) (result i32) (loop $typed (result i32) (block $outer (result i32) (block (result i32) @@ -953,7 +953,7 @@ ) ) ) - (func $block-break (; 34 ;) (type $0) (param $0 i32) + (func $block-break (; 34 ;) (param $0 i32) (block $block$7$break (block $shape$6$continue (call $block-break @@ -962,7 +962,7 @@ ) ) ) - (func $loop-break (; 35 ;) (type $0) (param $0 i32) + (func $loop-break (; 35 ;) (param $0 i32) (loop $shape$6$continue (block $block$7$break (block @@ -977,7 +977,7 @@ ) ) ) - (func $untaken-brs-might-prevent-block-removal (; 36 ;) (type $FUNCSIG$ififiidf) (param $0 f32) (param $1 i32) (param $2 f32) (param $3 i32) (param $4 i32) (param $5 f64) (param $6 f32) (result i32) + (func $untaken-brs-might-prevent-block-removal (; 36 ;) (param $0 f32) (param $1 i32) (param $2 f32) (param $3 i32) (param $4 i32) (param $5 f64) (param $6 f32) (result i32) (block $label$0 (result i32) (block $label$1 (br_if $label$1 @@ -1012,7 +1012,7 @@ (i32.const 1935947830) ) ) - (func $unexitable-loops-result (; 37 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + (func $unexitable-loops-result (; 37 ;) (param $0 i32) (result i64) (loop $label$0 (loop $label$1 (br_if $label$0 @@ -1031,7 +1031,7 @@ ) ) ) - (func $untaken-br-with-concrete-last-element (; 38 ;) (type $1) + (func $untaken-br-with-concrete-last-element (; 38 ;) (block $label$8 (block $label$11 (block $label$14 @@ -1042,7 +1042,7 @@ ) ) ) - (func $untaken-br-with-concrete-last-element2 (; 39 ;) (type $2) (result i32) + (func $untaken-br-with-concrete-last-element2 (; 39 ;) (result i32) (block $label$8 (result i32) (block $label$11 (result i32) (block $label$14 (result i32) @@ -1056,7 +1056,7 @@ ) ) ) - (func $untaken-br_if-then-if (; 40 ;) (type $1) + (func $untaken-br_if-then-if (; 40 ;) (block $label$0 (br_if $label$0 (unreachable) @@ -1067,7 +1067,7 @@ ) ) ) - (func $unreachable-if-that-could-be-a-br_if (; 41 ;) (type $FUNCSIG$j) (result i64) + (func $unreachable-if-that-could-be-a-br_if (; 41 ;) (result i64) (loop $label$3 (result i64) (drop (if (result f64) @@ -1079,7 +1079,7 @@ (i64.const 1) ) ) - (func $nop-br-might-update-type (; 42 ;) (type $1) + (func $nop-br-might-update-type (; 42 ;) (block $label$39 (drop (if (result i32) @@ -1094,7 +1094,7 @@ ) ) ) - (func $no-flow-through-if-without-else (; 43 ;) (type $FUNCSIG$f) (result f32) + (func $no-flow-through-if-without-else (; 43 ;) (result f32) (local $0 i32) (local $2 f32) (if (result f32) @@ -1115,7 +1115,7 @@ (f32.const -9223372036854775808) ) ) - (func $unreachable-return-loop-value (; 44 ;) (type $FUNCSIG$j) (result i64) + (func $unreachable-return-loop-value (; 44 ;) (result i64) (loop $loop (if (i32.const 1) @@ -1129,7 +1129,7 @@ (br $loop) ) ) - (func $obviously-flows-out-maybe (; 45 ;) (type $FUNCSIG$fi) (param $var$0 i32) (result f32) + (func $obviously-flows-out-maybe (; 45 ;) (param $var$0 i32) (result f32) (block $label$1 (result f32) (br $label$1 (f32.const 1) @@ -1148,7 +1148,7 @@ ) ) ) - (func $br-to-table (; 46 ;) (type $0) (param $a i32) + (func $br-to-table (; 46 ;) (param $a i32) (block $x (block $y (block $z @@ -1167,7 +1167,7 @@ ) (unreachable) ) - (func $br-to-table-too-few (; 47 ;) (type $0) (param $a i32) + (func $br-to-table-too-few (; 47 ;) (param $a i32) (block $x (block $y (block $z @@ -1187,7 +1187,7 @@ ) ) ) - (func $br-to-table-one-more (; 48 ;) (type $0) (param $a i32) + (func $br-to-table-one-more (; 48 ;) (param $a i32) (block $x (block $y (block $z @@ -1207,7 +1207,7 @@ ) (unreachable) ) - (func $br-to-table-overlap (; 49 ;) (type $0) (param $a i32) + (func $br-to-table-overlap (; 49 ;) (param $a i32) (block $x (block $y (block $z @@ -1237,7 +1237,7 @@ ) (unreachable) ) - (func $br-to-table-overlap-start (; 50 ;) (type $0) (param $a i32) + (func $br-to-table-overlap-start (; 50 ;) (param $a i32) (block $x (block $y (block $z @@ -1267,7 +1267,7 @@ ) (unreachable) ) - (func $br-to-table-offset (; 51 ;) (type $0) (param $a i32) + (func $br-to-table-offset (; 51 ;) (param $a i32) (block $x (block $y (block $z @@ -1289,7 +1289,7 @@ ) (unreachable) ) - (func $br-to-table-RANGE-high (; 52 ;) (type $0) (param $a i32) + (func $br-to-table-RANGE-high (; 52 ;) (param $a i32) (block $x (block $y (block $z @@ -1319,7 +1319,7 @@ ) (unreachable) ) - (func $br-to-table-RANGE-low (; 53 ;) (type $0) (param $a i32) + (func $br-to-table-RANGE-low (; 53 ;) (param $a i32) (block $x (block $y (block $z @@ -1338,7 +1338,7 @@ ) (unreachable) ) - (func $br-to-table-bad (; 54 ;) (type $FUNCSIG$ii) (param $a i32) (result i32) + (func $br-to-table-bad (; 54 ;) (param $a i32) (result i32) (block $value (result i32) (block $x (block $y @@ -1361,7 +1361,7 @@ (i32.const 2000) ) ) - (func $br-to-table-bad2 (; 55 ;) (type $FUNCSIG$ii) (param $a i32) (result i32) + (func $br-to-table-bad2 (; 55 ;) (param $a i32) (result i32) (block $value (result i32) (block $x (block $y @@ -1392,7 +1392,7 @@ (i32.const 2000) ) ) - (func $br-to-table-bad3 (; 56 ;) (type $0) (param $a i32) + (func $br-to-table-bad3 (; 56 ;) (param $a i32) (block $x (block $y (block $z @@ -1417,7 +1417,7 @@ ) (unreachable) ) - (func $br-to-table-multi (; 57 ;) (type $0) (param $a i32) + (func $br-to-table-multi (; 57 ;) (param $a i32) (block $x (block $y (block $z @@ -1446,7 +1446,7 @@ ) (unreachable) ) - (func $br-to-table-bad4 (; 58 ;) (type $0) (param $a i32) + (func $br-to-table-bad4 (; 58 ;) (param $a i32) (block $x (block $y (block $z @@ -1476,7 +1476,7 @@ ) (unreachable) ) - (func $br-to-table-bad5 (; 59 ;) (type $0) (param $a i32) + (func $br-to-table-bad5 (; 59 ;) (param $a i32) (block $x (block $y (block $z @@ -1506,7 +1506,7 @@ ) (unreachable) ) - (func $br-to-table-bad6 (; 60 ;) (type $0) (param $a i32) + (func $br-to-table-bad6 (; 60 ;) (param $a i32) (block $x (block $y (block $z @@ -1536,7 +1536,7 @@ ) (unreachable) ) - (func $br-to-table-bad7 (; 61 ;) (type $0) (param $a i32) + (func $br-to-table-bad7 (; 61 ;) (param $a i32) (block $x (block $y (block $z @@ -1566,7 +1566,7 @@ ) (unreachable) ) - (func $br-to-table-defaultNameOverlaps (; 62 ;) (type $0) (param $a i32) + (func $br-to-table-defaultNameOverlaps (; 62 ;) (param $a i32) (block $x (block $tablify|0 (block $z @@ -1585,7 +1585,7 @@ ) (unreachable) ) - (func $br-to-table-unreach (; 63 ;) (type $0) (param $a i32) + (func $br-to-table-unreach (; 63 ;) (param $a i32) (block $x (block $y (block $z @@ -1615,7 +1615,7 @@ ) (unreachable) ) - (func $br-to-table-overlap-but-later (; 64 ;) (type $0) (param $a i32) + (func $br-to-table-overlap-but-later (; 64 ;) (param $a i32) (block $x (block $y (block $z @@ -1649,7 +1649,7 @@ ) (unreachable) ) - (func $tiny-switch (; 65 ;) (type $1) + (func $tiny-switch (; 65 ;) (if (i32.const 0) (block $y @@ -1666,7 +1666,7 @@ ) ) ) - (func $trim-switch (; 66 ;) (type $1) + (func $trim-switch (; 66 ;) (block $A (block $y (br_table $A $y $A $y $A $y @@ -1679,7 +1679,7 @@ (call $trim-switch) ) ) - (func $same-target-br_if-and-br (; 67 ;) (type $1) + (func $same-target-br_if-and-br (; 67 ;) (block $x (drop (i32.const 0) @@ -1688,7 +1688,7 @@ (unreachable) ) ) - (func $simple-switch (; 68 ;) (type $2) (result i32) + (func $simple-switch (; 68 ;) (result i32) (block $A (block $B (block $y @@ -1709,7 +1709,7 @@ ) (i32.const 3) ) - (func $simple-switch-2 (; 69 ;) (type $2) (result i32) + (func $simple-switch-2 (; 69 ;) (result i32) (block $A (block $B (block $y @@ -1730,7 +1730,7 @@ ) (i32.const 3) ) - (func $simple-switch-3 (; 70 ;) (type $2) (result i32) + (func $simple-switch-3 (; 70 ;) (result i32) (block $A (block $B (block $y @@ -1751,7 +1751,7 @@ ) (i32.const 3) ) - (func $simple-switch43 (; 71 ;) (type $2) (result i32) + (func $simple-switch43 (; 71 ;) (result i32) (local $0 i32) (block $A (block $B @@ -1784,7 +1784,7 @@ ) (i32.const 3) ) - (func $simple-switch-5 (; 72 ;) (type $2) (result i32) + (func $simple-switch-5 (; 72 ;) (result i32) (block $A (block $B (block $y @@ -1805,7 +1805,7 @@ ) (i32.const 3) ) - (func $undo-if-return (; 73 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $undo-if-return (; 73 ;) (param $p i32) (result i32) (local $x i32) (block $out (block @@ -1836,7 +1836,7 @@ ) (local.get $p) ) - (func $if-unreachable-but-declares-value (; 74 ;) (type $FUNCSIG$iididff) (param $var$0 i32) (param $var$1 f64) (param $var$2 i32) (param $var$3 f64) (param $var$4 f32) (param $var$5 f32) (result i32) + (func $if-unreachable-but-declares-value (; 74 ;) (param $var$0 i32) (param $var$1 f64) (param $var$2 i32) (param $var$3 f64) (param $var$4 f32) (param $var$5 f32) (result i32) (local $var$6 f64) (if (i32.const 0) @@ -1861,28 +1861,28 @@ ) (i32.const 0) ) - (func $if-flow-1 (; 75 ;) (type $2) (result i32) + (func $if-flow-1 (; 75 ;) (result i32) (select (i32.const 1) (i32.const 2) (i32.const 0) ) ) - (func $if-flow-2 (; 76 ;) (type $2) (result i32) + (func $if-flow-2 (; 76 ;) (result i32) (if (result i32) (i32.const 0) (unreachable) (i32.const 2) ) ) - (func $if-flow-3 (; 77 ;) (type $2) (result i32) + (func $if-flow-3 (; 77 ;) (result i32) (if (result i32) (i32.const 0) (i32.const 1) (unreachable) ) ) - (func $if-flow-4 (; 78 ;) (type $2) (result i32) + (func $if-flow-4 (; 78 ;) (result i32) (if (return (i32.const 0) @@ -1895,7 +1895,7 @@ ) ) ) - (func $iff-flow-fuzz-bug (; 79 ;) (type $2) (result i32) + (func $iff-flow-fuzz-bug (; 79 ;) (result i32) (loop $label$1 (br_if $label$1 (i32.eqz @@ -1914,7 +1914,7 @@ ) ) ) - (func $fuzz-block-unreachable-brs-with-values (; 80 ;) (type $2) (result i32) + (func $fuzz-block-unreachable-brs-with-values (; 80 ;) (result i32) (local $0 i32) (loop $label$1 (if @@ -1937,7 +1937,7 @@ ) ) ) - (func $drop-restructure-if (; 81 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $drop-restructure-if (; 81 ;) (param $x i32) (param $y i32) (result i32) (if (result i32) (local.get $y) (local.get $x) @@ -1947,7 +1947,7 @@ ) ) ) - (func $drop-restructure-if-final (; 82 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $drop-restructure-if-final (; 82 ;) (param $x i32) (param $y i32) (result i32) (if (result i32) (local.get $y) (local.get $x) @@ -1957,7 +1957,7 @@ ) ) ) - (func $drop-restructure-if-middle (; 83 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $drop-restructure-if-middle (; 83 ;) (param $x i32) (param $y i32) (result i32) (if (result i32) (local.get $y) (local.get $x) @@ -1968,7 +1968,7 @@ ) ) ) - (func $drop-restructure-if-bad (; 84 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $drop-restructure-if-bad (; 84 ;) (param $x i32) (param $y i32) (result i32) (block $label$2 (result i32) (drop (br_if $label$2 @@ -1981,7 +1981,7 @@ (i32.const 0) ) ) - (func $drop-restructure-if-bad-2 (; 85 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $drop-restructure-if-bad-2 (; 85 ;) (param $x i32) (param $y i32) (result i32) (block $label$2 (result i32) (drop (br_if $label$2 @@ -1994,7 +1994,7 @@ (i32.const 0) ) ) - (func $if-block (; 86 ;) (type $1) + (func $if-block (; 86 ;) (if (i32.const 1) (block $label @@ -2009,7 +2009,7 @@ ) ) ) - (func $if-block-bad (; 87 ;) (type $1) + (func $if-block-bad (; 87 ;) (block $label (if (br $label) @@ -2024,14 +2024,14 @@ ) ) ) - (func $if-block-br (; 88 ;) (type $1) + (func $if-block-br (; 88 ;) (block $label (br_if $label (i32.const 1) ) ) ) - (func $if-block-br-1 (; 89 ;) (type $1) + (func $if-block-br-1 (; 89 ;) (if (i32.const 1) (block $label @@ -2041,7 +2041,7 @@ ) ) ) - (func $if-block-br-2 (; 90 ;) (type $1) + (func $if-block-br-2 (; 90 ;) (if (i32.const 1) (block $label @@ -2052,7 +2052,7 @@ (nop) ) ) - (func $if-block-br-3 (; 91 ;) (type $1) + (func $if-block-br-3 (; 91 ;) (if (i32.const 1) (block $label @@ -2060,7 +2060,7 @@ (nop) ) ) - (func $if-block-br-4-eithre (; 92 ;) (type $1) + (func $if-block-br-4-eithre (; 92 ;) (if (i32.const 1) (block $label @@ -2073,7 +2073,7 @@ ) ) ) - (func $if-block-br-5-value (; 93 ;) (type $2) (result i32) + (func $if-block-br-5-value (; 93 ;) (result i32) (select (block $label (result i32) (i32.const 2) @@ -2082,7 +2082,7 @@ (i32.const 1) ) ) - (func $restructure-if-outerType-change (; 94 ;) (type $1) + (func $restructure-if-outerType-change (; 94 ;) (loop $label$1 (br_if $label$1 (block $label$2 @@ -2099,7 +2099,7 @@ ) ) ) - (func $if-arm-unreachable (; 95 ;) (type $1) + (func $if-arm-unreachable (; 95 ;) (if (unreachable) (block $label$1 @@ -2108,7 +2108,7 @@ (unreachable) ) ) - (func $propagate-type-if-we-optimize (; 96 ;) (type $1) + (func $propagate-type-if-we-optimize (; 96 ;) (if (i32.const 1) (nop) @@ -2131,7 +2131,7 @@ ) ) ) - (func $switch-to-br (; 97 ;) (type $1) + (func $switch-to-br (; 97 ;) (block $A (block $y (block @@ -2143,7 +2143,7 @@ ) ) ) - (func $switch-to-br-value (; 98 ;) (type $2) (result i32) + (func $switch-to-br-value (; 98 ;) (result i32) (block $A (result i32) (block $y (result i32) (block @@ -2157,7 +2157,7 @@ ) ) ) - (func $switch-threading-multi (; 99 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $switch-threading-multi (; 99 ;) (param $x i32) (param $y i32) (result i32) (block $block$5$break (block $block$4$break (loop $shape$1$continue @@ -2191,7 +2191,7 @@ ) (unreachable) ) - (func $fuzz-type-changes-in-our-cycles (; 100 ;) (type $2) (result i32) + (func $fuzz-type-changes-in-our-cycles (; 100 ;) (result i32) (loop $label$1 (if (i32.const 0) @@ -2209,7 +2209,7 @@ (br $label$1) ) ) - (func $refinalize-need-br-value (; 101 ;) (type $2) (result i32) + (func $refinalize-need-br-value (; 101 ;) (result i32) (loop $label$3 (result i32) (block $label$6 (result i32) (block $label$10 @@ -2231,7 +2231,7 @@ ) ) ) - (func $selectify (; 102 ;) (type $0) (param $x i32) + (func $selectify (; 102 ;) (param $x i32) (drop (if (result i32) (i32.eq @@ -2265,7 +2265,7 @@ ) ) ) - (func $if-one-side (; 103 ;) (type $2) (result i32) + (func $if-one-side (; 103 ;) (result i32) (local $x i32) (local.set $x (select @@ -2276,7 +2276,7 @@ ) (local.get $x) ) - (func $if-one-side-b (; 104 ;) (type $2) (result i32) + (func $if-one-side-b (; 104 ;) (result i32) (local $x i32) (local.set $x (select @@ -2287,7 +2287,7 @@ ) (local.get $x) ) - (func $if-one-side-tee-etc (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $if-one-side-tee-etc (; 105 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2308,7 +2308,7 @@ ) (i32.const 0) ) - (func $ifs-copies-recursive (; 106 ;) (type $FUNCSIG$ii) (param $20 i32) (result i32) + (func $ifs-copies-recursive (; 106 ;) (param $20 i32) (result i32) (if (i32.const 1) (local.set $20 @@ -2325,7 +2325,7 @@ ) (local.get $20) ) - (func $if-copy1 (; 107 ;) (type $1) + (func $if-copy1 (; 107 ;) (local $x i32) (local $y i32) (loop $top @@ -2339,7 +2339,7 @@ (br $top) ) ) - (func $if-copy3 (; 108 ;) (type $1) + (func $if-copy3 (; 108 ;) (local $x i32) (local $y i32) (loop $top @@ -2352,7 +2352,7 @@ (br $top) ) ) - (func $if-copy4 (; 109 ;) (type $1) + (func $if-copy4 (; 109 ;) (local $x i32) (local $y i32) (loop $top @@ -2366,7 +2366,7 @@ (br $top) ) ) - (func $if-copy-tee (; 110 ;) (type $1) + (func $if-copy-tee (; 110 ;) (local $x i32) (local $y i32) (loop $top @@ -2382,7 +2382,7 @@ (br $top) ) ) - (func $loop-end-set (; 111 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $loop-end-set (; 111 ;) (param $x i32) (result i32) (loop $loop (nop) (br_if $loop @@ -2394,7 +2394,7 @@ ) (local.get $x) ) - (func $loop-end-value (; 112 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $loop-end-value (; 112 ;) (param $x i32) (result i32) (loop $loop (result i32) (nop) (br_if $loop @@ -2403,7 +2403,7 @@ (i32.const 1) ) ) - (func $do-not-flow-values-through-unreachable-code (; 113 ;) (type $2) (result i32) + (func $do-not-flow-values-through-unreachable-code (; 113 ;) (result i32) (block $block (unreachable) (if @@ -2417,7 +2417,7 @@ ) ) ) - (func $do-not-flow-values-through-unreachable-code-b (; 114 ;) (type $2) (result i32) + (func $do-not-flow-values-through-unreachable-code-b (; 114 ;) (result i32) (loop $loop-in (unreachable) (if @@ -2431,7 +2431,7 @@ ) ) ) - (func $if_br_if (; 115 ;) (type $1) + (func $if_br_if (; 115 ;) (local $0 i32) (block $label$1 (br_if $label$1 diff --git a/test/passes/remove-unused-brs_generate-stack-ir_print-stack-ir.txt b/test/passes/remove-unused-brs_generate-stack-ir_print-stack-ir.txt index 937fe59a3..485a2c57c 100644 --- a/test/passes/remove-unused-brs_generate-stack-ir_print-stack-ir.txt +++ b/test/passes/remove-unused-brs_generate-stack-ir_print-stack-ir.txt @@ -1,6 +1,6 @@ (module - (type $0 (func (param i64))) - (func $0 (; 0 ;) (type $0) (param $var$0 i64) + (type $i64_=>_none (func (param i64))) + (func $0 (; 0 ;) (param $var$0 i64) block $label$1 block $label$2 loop $label$3 @@ -23,8 +23,8 @@ ) ) (module - (type $0 (func (param i64))) - (func $0 (; 0 ;) (; has Stack IR ;) (type $0) (param $var$0 i64) + (type $i64_=>_none (func (param i64))) + (func $0 (; 0 ;) (; has Stack IR ;) (param $var$0 i64) (block $label$1 (br_if $label$1 (block $label$2 diff --git a/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt b/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt index 430b9e42a..b650aae43 100644 --- a/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt +++ b/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$di (func (param i32) (result f64))) + (type $i32_=>_f64 (func (param i32) (result f64))) (global $global$3 (mut f64) (f64.const 0)) - (func $1 (; 0 ;) (type $FUNCSIG$di) (param $x i32) (result f64) + (func $1 (; 0 ;) (param $x i32) (result f64) (local $var$0 f64) (block $label$0 (result f64) (local.set $var$0 diff --git a/test/passes/remove-unused-brs_shrink-level=1.txt b/test/passes/remove-unused-brs_shrink-level=1.txt index 5d17a7688..e05b66040 100644 --- a/test/passes/remove-unused-brs_shrink-level=1.txt +++ b/test/passes/remove-unused-brs_shrink-level=1.txt @@ -1,9 +1,8 @@ (module - (type $0 (func (param i32))) - (type $1 (func)) - (type $2 (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) (memory $0 256 256) - (func $b14 (; 0 ;) (type $2) (result i32) + (func $b14 (; 0 ;) (result i32) (drop (select (block $block1 (result i32) @@ -45,7 +44,7 @@ ) (i32.const 0) ) - (func $join-br_ifs (; 1 ;) (type $1) + (func $join-br_ifs (; 1 ;) (block $out (br_if $out (i32.or @@ -123,7 +122,7 @@ ) ) ) - (func $join-and-it-becomes-unreachable (; 2 ;) (type $1) + (func $join-and-it-becomes-unreachable (; 2 ;) (block $label$1 (block $block (br_if $label$1 @@ -139,7 +138,7 @@ ) ) ) - (func $br-if-unreachable-pair (; 3 ;) (type $1) + (func $br-if-unreachable-pair (; 3 ;) (block $label$14 (br_if $label$14 (unreachable) @@ -149,7 +148,7 @@ ) ) ) - (func $br-if-unreachable-pair2 (; 4 ;) (type $1) + (func $br-if-unreachable-pair2 (; 4 ;) (block $label$14 (br_if $label$14 (i32.const 0) @@ -159,7 +158,7 @@ ) ) ) - (func $simple-switch (; 5 ;) (type $2) (result i32) + (func $simple-switch (; 5 ;) (result i32) (block $A (block $B (block $y @@ -180,7 +179,7 @@ ) (i32.const 3) ) - (func $simple-switch-2 (; 6 ;) (type $2) (result i32) + (func $simple-switch-2 (; 6 ;) (result i32) (local $0 i32) (block $A (block $B @@ -214,7 +213,7 @@ ) (i32.const 3) ) - (func $simple-switch-3 (; 7 ;) (type $2) (result i32) + (func $simple-switch-3 (; 7 ;) (result i32) (local $0 i32) (block $A (block $B @@ -247,7 +246,7 @@ ) (i32.const 3) ) - (func $simple-switch-4 (; 8 ;) (type $2) (result i32) + (func $simple-switch-4 (; 8 ;) (result i32) (block $A (block $B (block $y diff --git a/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt b/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt index 9fad11aa2..ad6589a28 100644 --- a/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt +++ b/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt @@ -1,9 +1,8 @@ (module - (type $0 (func (param i32))) - (type $1 (func)) - (type $2 (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (memory $0 256 256) - (func $b14 (; 0 ;) (type $2) (result i32) + (func $b14 (; 0 ;) (result i32) (drop (select (block $block1 (result i32) @@ -45,7 +44,7 @@ ) (i32.const 0) ) - (func $join-br_ifs (; 1 ;) (type $1) + (func $join-br_ifs (; 1 ;) (block $out (br_if $out (i32.or diff --git a/test/passes/remove-unused-module-elements_all-features.txt b/test/passes/remove-unused-module-elements_all-features.txt index 98e08c186..eb5d177dd 100644 --- a/test/passes/remove-unused-module-elements_all-features.txt +++ b/test/passes/remove-unused-module-elements_all-features.txt @@ -1,7 +1,7 @@ (module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (table $0 1 1 funcref) (elem (i32.const 0) $called_indirect) @@ -10,72 +10,72 @@ (export "other1" (func $other1)) (export "other2" (func $other2)) (start $start) - (func $start (; 0 ;) (type $0) + (func $start (; 0 ;) (call $called0) ) - (func $called0 (; 1 ;) (type $0) + (func $called0 (; 1 ;) (call $called1) ) - (func $called1 (; 2 ;) (type $0) + (func $called1 (; 2 ;) (nop) ) - (func $called_indirect (; 3 ;) (type $0) + (func $called_indirect (; 3 ;) (nop) ) - (func $exported (; 4 ;) (type $0) + (func $exported (; 4 ;) (call $called2) ) - (func $called2 (; 5 ;) (type $0) + (func $called2 (; 5 ;) (call $called2) (call $called3) ) - (func $called3 (; 6 ;) (type $0) + (func $called3 (; 6 ;) (call $called4) ) - (func $called4 (; 7 ;) (type $0) + (func $called4 (; 7 ;) (call $called3) ) - (func $other1 (; 8 ;) (type $1) (param $0 i32) - (call_indirect (type $0) + (func $other1 (; 8 ;) (param $0 i32) + (call_indirect (type $none_=>_none) (i32.const 0) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (i32.const 0) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (i32.const 0) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (i32.const 0) ) - (call_indirect (type $1) + (call_indirect (type $i32_=>_none) (i32.const 0) (i32.const 0) ) - (call_indirect (type $1) + (call_indirect (type $i32_=>_none) (i32.const 0) (i32.const 0) ) (drop - (call_indirect (type $2) + (call_indirect (type $i32_=>_i32) (i32.const 0) (i32.const 0) ) ) (drop - (call_indirect (type $2) + (call_indirect (type $i32_=>_i32) (i32.const 0) (i32.const 0) ) ) (drop - (call_indirect (type $2) + (call_indirect (type $i32_=>_i32) (i32.const 0) (i32.const 0) ) ) ) - (func $other2 (; 9 ;) (type $1) (param $0 i32) + (func $other2 (; 9 ;) (param $0 i32) (unreachable) ) ) @@ -90,36 +90,36 @@ (export "tab" (table $0)) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) (data (i32.const 1) "hello, world!") (import "env" "table" (table $0 1 funcref)) (elem (i32.const 0) $waka) - (func $waka (; 0 ;) (type $FUNCSIG$v) + (func $waka (; 0 ;) (nop) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) (import "env" "table" (table $0 0 funcref)) (export "user" (func $user)) - (func $user (; 0 ;) (type $0) + (func $user (; 0 ;) (drop (i32.load (i32.const 0) ) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (i32.const 0) ) ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 (shared 23 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$v) + (func $user (; 0 ;) (i32.store (i32.const 0) (i32.const 0) @@ -127,10 +127,10 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 (shared 23 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (i32.atomic.rmw.add (i32.const 0) (i32.const 0) @@ -138,10 +138,10 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 (shared 23 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (i32.atomic.rmw8.cmpxchg_u (i32.const 0) (i32.const 0) @@ -150,10 +150,10 @@ ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 (shared 23 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$v) + (func $user (; 0 ;) (local $0 i32) (local $1 i64) (drop @@ -166,10 +166,10 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 (shared 23 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (atomic.notify (i32.const 0) (i32.const 0) @@ -177,49 +177,49 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 23 256) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (memory.grow (i32.const 0) ) ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $0 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (memory.grow (i32.const 0) ) ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 23 256) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (memory.size) ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) (data (global.get $memoryBase) "hello, world!") (import "env" "table" (table $0 0 funcref)) (elem (global.get $tableBase) $waka) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (func $waka (; 0 ;) (type $FUNCSIG$v) + (func $waka (; 0 ;) (nop) ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "imported" (global $imported i32)) (import "env" "_puts" (func $_puts (param i32) (result i32))) (global $int (mut i32) (global.get $imported)) @@ -228,16 +228,16 @@ (export "one" (func $one)) (export "three" (func $three)) (export "exp_glob" (global $exp_glob)) - (func $one (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $one (; 1 ;) (result i32) (call $two) ) - (func $two (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $two (; 2 ;) (result i32) (global.get $int) ) - (func $three (; 3 ;) (type $FUNCSIG$v) + (func $three (; 3 ;) (call $four) ) - (func $four (; 4 ;) (type $FUNCSIG$v) + (func $four (; 4 ;) (global.set $set (i32.const 200) ) @@ -251,9 +251,9 @@ (module ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (start $starter) - (func $starter (; 0 ;) (type $FUNCSIG$v) + (func $starter (; 0 ;) (drop (i32.const 0) ) @@ -264,10 +264,10 @@ (module ) (module - (type $0 (func (param f64) (result f64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (import "env" "table" (table $0 6 6 funcref)) (elem (i32.const 0) $0) - (func $0 (; 0 ;) (type $0) (param $var$0 f64) (result f64) + (func $0 (; 0 ;) (param $var$0 f64) (result f64) (if (result f64) (f64.eq (f64.const 1) @@ -279,13 +279,15 @@ ) ) (module - (type $FUNCSIG$v (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) + (type $i64_=>_none (func (param i64))) (event $e-export (attr 0) (param i64)) (event $e-throw (attr 0) (param i32)) (event $e-bronexn (attr 0) (param i32)) (export "e-export" (event $e-export)) (start $start) - (func $start (; 0 ;) (type $FUNCSIG$v) + (func $start (; 0 ;) (local $exn exnref) (try (throw $e-throw diff --git a/test/passes/remove-unused-names.txt b/test/passes/remove-unused-names.txt index 441930539..11e75d567 100644 --- a/test/passes/remove-unused-names.txt +++ b/test/passes/remove-unused-names.txt @@ -1,12 +1,12 @@ (module - (type $0 (func (param i32) (result i32))) - (type $1 (func)) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 256 256) - (func $b0 (; 0 ;) (type $0) (param $i1 i32) (result i32) + (func $b0 (; 0 ;) (param $i1 i32) (result i32) (i32.const 0) ) - (func $loops (; 1 ;) (type $1) + (func $loops (; 1 ;) (block $out (loop $in (br $out) @@ -48,7 +48,7 @@ ) ) ) - (func $merges (; 2 ;) (type $1) + (func $merges (; 2 ;) (block $b (br $b) (br $b) @@ -64,7 +64,7 @@ ) ) ) - (func $merge-typed-with-unreachable-child (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $merge-typed-with-unreachable-child (; 3 ;) (result i32) (local $0 f32) (block $label$1 (result i32) (br_if $label$1 diff --git a/test/passes/remove-unused-names_code-folding.txt b/test/passes/remove-unused-names_code-folding.txt index f84032ef6..93f503579 100644 --- a/test/passes/remove-unused-names_code-folding.txt +++ b/test/passes/remove-unused-names_code-folding.txt @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (func $ifs (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (func $ifs (; 0 ;) (if (i32.const 0) (nop) @@ -44,7 +44,7 @@ ) ) ) - (func $ifs-blocks (; 1 ;) (type $FUNCSIG$v) + (func $ifs-blocks (; 1 ;) (block (drop (i32.const 0) @@ -88,7 +88,7 @@ ) ) ) - (func $ifs-blocks-big (; 2 ;) (type $FUNCSIG$v) + (func $ifs-blocks-big (; 2 ;) (block (drop (i32.const 0) @@ -167,7 +167,7 @@ ) ) ) - (func $ifs-blocks-long (; 3 ;) (type $FUNCSIG$v) + (func $ifs-blocks-long (; 3 ;) (block (if (i32.const 1) @@ -237,7 +237,7 @@ ) ) ) - (func $if-worth-it-i-dunno (; 4 ;) (type $FUNCSIG$v) + (func $if-worth-it-i-dunno (; 4 ;) (block $folding-inner0 (block (if @@ -411,7 +411,7 @@ (unreachable) (unreachable) ) - (func $no-grandparent (; 5 ;) (type $FUNCSIG$v) + (func $no-grandparent (; 5 ;) (if (i32.const 9999) (block @@ -436,7 +436,7 @@ ) ) ) - (func $yes-grandparent (; 6 ;) (type $FUNCSIG$v) + (func $yes-grandparent (; 6 ;) (block (if (i32.const 9999) @@ -461,7 +461,7 @@ (unreachable) ) ) - (func $ifs-named-block (; 7 ;) (type $FUNCSIG$iii) (param $x i32) (param $y i32) (result i32) + (func $ifs-named-block (; 7 ;) (param $x i32) (param $y i32) (result i32) (block $out (block $out2 (block @@ -546,7 +546,7 @@ (i32.const 20) ) ) - (func $block (; 8 ;) (type $FUNCSIG$v) + (func $block (; 8 ;) (block $x (if (i32.const 0) @@ -565,7 +565,7 @@ (i32.const 2) ) ) - (func $block2 (; 9 ;) (type $FUNCSIG$v) + (func $block2 (; 9 ;) (block $x (if (i32.const 0) @@ -600,7 +600,7 @@ (br $x) ) ) - (func $block3 (; 10 ;) (type $FUNCSIG$v) + (func $block3 (; 10 ;) (block $x (if (i32.const 0) @@ -641,7 +641,7 @@ (i32.const 2) ) ) - (func $mixture (; 11 ;) (type $FUNCSIG$v) + (func $mixture (; 11 ;) (block $out (block (drop @@ -720,7 +720,7 @@ (nop) ) ) - (func $block-corners (; 12 ;) (type $FUNCSIG$v) + (func $block-corners (; 12 ;) (block (block $x (if @@ -879,7 +879,7 @@ ) ) ) - (func $terminating (; 13 ;) (type $FUNCSIG$v) + (func $terminating (; 13 ;) (block $folding-inner0 (block (if @@ -910,7 +910,7 @@ (nop) (unreachable) ) - (func $terminating-unreachable (; 14 ;) (type $FUNCSIG$v) + (func $terminating-unreachable (; 14 ;) (block $folding-inner0 (block (if @@ -941,7 +941,7 @@ (nop) (unreachable) ) - (func $terminating-value (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $terminating-value (; 15 ;) (result i32) (block $folding-inner0 (return (block (result i32) @@ -974,7 +974,7 @@ (nop) (unreachable) ) - (func $terminating-just-2 (; 16 ;) (type $FUNCSIG$v) + (func $terminating-just-2 (; 16 ;) (block $folding-inner0 (block (if @@ -1021,7 +1021,7 @@ (nop) (unreachable) ) - (func $terminating-shortness (; 17 ;) (type $FUNCSIG$v) + (func $terminating-shortness (; 17 ;) (block $folding-inner1 (block (block $folding-inner0 @@ -1062,7 +1062,7 @@ (nop) (unreachable) ) - (func $terminating-multiple-separate (; 18 ;) (type $FUNCSIG$v) + (func $terminating-multiple-separate (; 18 ;) (block $folding-inner1 (block (block $folding-inner0 @@ -1119,7 +1119,7 @@ ) (unreachable) ) - (func $terminating-just-worth-it (; 19 ;) (type $FUNCSIG$v) + (func $terminating-just-worth-it (; 19 ;) (block $folding-inner0 (block (if @@ -1142,7 +1142,7 @@ (nop) (unreachable) ) - (func $terminating-not-worth-it (; 20 ;) (type $FUNCSIG$v) + (func $terminating-not-worth-it (; 20 ;) (if (i32.const 1) (block @@ -1168,7 +1168,7 @@ ) ) ) - (func $terminating-return (; 21 ;) (type $FUNCSIG$v) + (func $terminating-return (; 21 ;) (block $folding-inner0 (block (if @@ -1199,7 +1199,7 @@ (nop) (return) ) - (func $terminating-return-value (; 22 ;) (type $FUNCSIG$i) (result i32) + (func $terminating-return-value (; 22 ;) (result i32) (block $folding-inner0 (block (if @@ -1239,7 +1239,7 @@ ) ) ) - (func $terminating-fallthrough-value (; 23 ;) (type $FUNCSIG$i) (result i32) + (func $terminating-fallthrough-value (; 23 ;) (result i32) (block $folding-inner0 (return (block (result i32) @@ -1279,7 +1279,7 @@ ) ) ) - (func $big-return (; 24 ;) (type $FUNCSIG$i) (result i32) + (func $big-return (; 24 ;) (result i32) (block $folding-inner0 (block (if @@ -1316,7 +1316,7 @@ ) ) ) - (func $return-mix (; 25 ;) (type $FUNCSIG$i) (result i32) + (func $return-mix (; 25 ;) (result i32) (block $folding-inner0 (block (if @@ -1354,10 +1354,10 @@ ) ) ) - (func $just-unreachable (; 26 ;) (type $FUNCSIG$v) + (func $just-unreachable (; 26 ;) (unreachable) ) - (func $just-return (; 27 ;) (type $FUNCSIG$i) (result i32) + (func $just-return (; 27 ;) (result i32) (return (i32.add (i32.const 1) @@ -1365,7 +1365,7 @@ ) ) ) - (func $drop-if-with-value-but-unreachable (; 28 ;) (type $FUNCSIG$v) + (func $drop-if-with-value-but-unreachable (; 28 ;) (if (i32.const 0) (nop) @@ -1411,7 +1411,7 @@ ) ) ) - (func $nested-control-flow (; 29 ;) (type $FUNCSIG$v) + (func $nested-control-flow (; 29 ;) (block $out (block (block $x @@ -1441,7 +1441,7 @@ ) ) ) - (func $nested-control-flow-dangerous (; 30 ;) (type $FUNCSIG$v) + (func $nested-control-flow-dangerous (; 30 ;) (block $folding-inner0 (block $out (block @@ -1485,7 +1485,7 @@ ) (return) ) - (func $nested-control-flow-dangerous-but-ok (; 31 ;) (type $FUNCSIG$v) + (func $nested-control-flow-dangerous-but-ok (; 31 ;) (block $folding-inner0 (block (block $middle @@ -1540,7 +1540,7 @@ ) (return) ) - (func $nested-control-flow-dangerous-but-ok-b (; 32 ;) (type $FUNCSIG$v) + (func $nested-control-flow-dangerous-but-ok-b (; 32 ;) (block $out (block $middle (block @@ -1606,7 +1606,7 @@ (i32.const 4) ) ) - (func $nested-control-flow-dangerous-but-ok-c (; 33 ;) (type $FUNCSIG$v) + (func $nested-control-flow-dangerous-but-ok-c (; 33 ;) (block $x (block (block $out @@ -1643,7 +1643,7 @@ (i32.const 5) ) ) - (func $nested-control-flow-dangerous-but-ok-d (; 34 ;) (type $FUNCSIG$v) + (func $nested-control-flow-dangerous-but-ok-d (; 34 ;) (block (block $out (block @@ -1678,7 +1678,7 @@ (i32.const 3) ) ) - (func $if-suffix (; 35 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $if-suffix (; 35 ;) (param $x i32) (result i32) (block (if (local.get $x) diff --git a/test/passes/remove-unused-names_merge-blocks_enable-threads.txt b/test/passes/remove-unused-names_merge-blocks_enable-threads.txt index 74cce687a..3fe8a5fdf 100644 --- a/test/passes/remove-unused-names_merge-blocks_enable-threads.txt +++ b/test/passes/remove-unused-names_merge-blocks_enable-threads.txt @@ -1,28 +1,28 @@ (module - (type $i (func (param i32))) - (type $ii (func (param i32 i32))) - (type $iii (func (param i32 i32 i32))) - (type $3 (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$d (func (result f64))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $none_=>_f64 (func (result f64))) (memory $0 (shared 256 256)) (table $0 1 1 funcref) (elem (i32.const 0) $call-i) - (func $call-i (; 0 ;) (type $i) (param $0 i32) + (func $call-i (; 0 ;) (param $0 i32) (nop) ) - (func $call-ii (; 1 ;) (type $ii) (param $0 i32) (param $1 i32) + (func $call-ii (; 1 ;) (param $0 i32) (param $1 i32) (nop) ) - (func $call-iii (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $call-iii (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (nop) ) - (func $b0-yes (; 3 ;) (type $i) (param $i1 i32) + (func $b0-yes (; 3 ;) (param $i1 i32) (drop (i32.const 10) ) ) - (func $b0-no (; 4 ;) (type $i) (param $i1 i32) + (func $b0-no (; 4 ;) (param $i1 i32) (block $topmost (block $block0 (br $block0) @@ -30,17 +30,17 @@ (br $topmost) ) ) - (func $b0-br-but-ok (; 5 ;) (type $i) (param $i1 i32) + (func $b0-br-but-ok (; 5 ;) (param $i1 i32) (block $topmost (br $topmost) ) ) - (func $b1-yes (; 6 ;) (type $i) (param $i1 i32) + (func $b1-yes (; 6 ;) (param $i1 i32) (drop (i32.const 10) ) ) - (func $b2-yes (; 7 ;) (type $i) (param $i1 i32) + (func $b2-yes (; 7 ;) (param $i1 i32) (drop (i32.const 5) ) @@ -51,7 +51,7 @@ (i32.const 15) ) ) - (func $b3-yes (; 8 ;) (type $i) (param $i1 i32) + (func $b3-yes (; 8 ;) (param $i1 i32) (drop (i32.const 3) ) @@ -68,7 +68,7 @@ (i32.const 20) ) ) - (func $b4 (; 9 ;) (type $i) (param $i1 i32) + (func $b4 (; 9 ;) (param $i1 i32) (block $inner (drop (i32.const 10) @@ -76,7 +76,7 @@ (br $inner) ) ) - (func $b5 (; 10 ;) (type $i) (param $i1 i32) + (func $b5 (; 10 ;) (param $i1 i32) (block $middle (drop (i32.const 10) @@ -87,7 +87,7 @@ (br $middle) ) ) - (func $b6 (; 11 ;) (type $i) (param $i1 i32) + (func $b6 (; 11 ;) (param $i1 i32) (drop (i32.const 5) ) @@ -101,7 +101,7 @@ (i32.const 15) ) ) - (func $b7 (; 12 ;) (type $i) (param $i1 i32) + (func $b7 (; 12 ;) (param $i1 i32) (drop (i32.const 3) ) @@ -124,7 +124,7 @@ (i32.const 20) ) ) - (func $unary (; 13 ;) (type $3) + (func $unary (; 13 ;) (local $x i32) (drop (i32.eqz @@ -175,7 +175,7 @@ ) ) ) - (func $binary (; 14 ;) (type $3) + (func $binary (; 14 ;) (drop (i32.add (block (result i32) @@ -312,7 +312,7 @@ ) ) ) - (func $trinary (; 15 ;) (type $3) + (func $trinary (; 15 ;) (drop (i32.const 10) ) @@ -531,7 +531,7 @@ ) ) ) - (func $breaks (; 16 ;) (type $3) + (func $breaks (; 16 ;) (block $out (drop (i32.const 10) @@ -581,7 +581,7 @@ (unreachable) ) ) - (func $calls (; 17 ;) (type $3) + (func $calls (; 17 ;) (call $call-i (block (result i32) (i32.const 10) @@ -694,12 +694,12 @@ (drop (i32.const 50) ) - (call_indirect (type $ii) + (call_indirect (type $i32_i32_=>_none) (i32.const 20) (i32.const 40) (i32.const 60) ) - (call_indirect (type $ii) + (call_indirect (type $i32_i32_=>_none) (unreachable) (block (result i32) (drop @@ -717,7 +717,7 @@ (drop (i32.const 31) ) - (call_indirect (type $ii) + (call_indirect (type $i32_i32_=>_none) (i32.const 41) (unreachable) (block (result i32) @@ -733,13 +733,13 @@ (drop (i32.const 52) ) - (call_indirect (type $ii) + (call_indirect (type $i32_i32_=>_none) (i32.const 42) (i32.const 62) (unreachable) ) ) - (func $atomics (; 18 ;) (type $3) + (func $atomics (; 18 ;) (drop (i32.const 10) ) @@ -766,7 +766,7 @@ ) ) ) - (func $mix-select (; 19 ;) (type $i) (param $x i32) + (func $mix-select (; 19 ;) (param $x i32) (drop (select (local.get $x) @@ -780,7 +780,7 @@ ) ) ) - (func $block-type-change (; 20 ;) (type $3) + (func $block-type-change (; 20 ;) (local $0 f64) (local $1 f64) (if @@ -794,7 +794,7 @@ (nop) ) ) - (func $do-reorder (; 21 ;) (type $i) (param $x i32) + (func $do-reorder (; 21 ;) (param $x i32) (local $y i32) (if (i32.const 1) @@ -811,7 +811,7 @@ ) ) ) - (func $do-not-reorder (; 22 ;) (type $i) (param $x i32) + (func $do-not-reorder (; 22 ;) (param $x i32) (local $y i32) (if (i32.const 1) @@ -828,7 +828,7 @@ ) ) ) - (func $return-different-type (; 23 ;) (type $FUNCSIG$i) (result i32) + (func $return-different-type (; 23 ;) (result i32) (drop (f64.abs (block @@ -843,7 +843,7 @@ ) (unreachable) ) - (func $drop-unreachable (; 24 ;) (type $FUNCSIG$i) (result i32) + (func $drop-unreachable (; 24 ;) (result i32) (local $0 i32) (drop (block (result i32) @@ -852,7 +852,7 @@ ) (unreachable) ) - (func $concrete_finale_in_unreachable (; 25 ;) (type $FUNCSIG$d) (result f64) + (func $concrete_finale_in_unreachable (; 25 ;) (result f64) (drop (block (result f64) (unreachable) @@ -861,7 +861,7 @@ ) (f64.const -1) ) - (func $dont-move-unreachable (; 26 ;) (type $3) + (func $dont-move-unreachable (; 26 ;) (loop $label$0 (drop (block (result i32) @@ -871,7 +871,7 @@ ) ) ) - (func $dont-move-unreachable-last (; 27 ;) (type $3) + (func $dont-move-unreachable-last (; 27 ;) (loop $label$0 (drop (block (result i32) @@ -881,7 +881,7 @@ ) ) ) - (func $move-around-unreachable-in-middle (; 28 ;) (type $3) + (func $move-around-unreachable-in-middle (; 28 ;) (loop $label$0 (nop) (drop @@ -897,7 +897,7 @@ ) ) ) - (func $drop-unreachable-block-with-concrete-final (; 29 ;) (type $3) + (func $drop-unreachable-block-with-concrete-final (; 29 ;) (drop (block (result i32) (drop @@ -911,7 +911,7 @@ ) ) ) - (func $merging-with-unreachable-in-middle (; 30 ;) (type $FUNCSIG$i) (result i32) + (func $merging-with-unreachable-in-middle (; 30 ;) (result i32) (block (result i32) (return (i32.const 21536) @@ -922,7 +922,7 @@ (i32.const 19299) ) ) - (func $remove-br-after-unreachable (; 31 ;) (type $3) + (func $remove-br-after-unreachable (; 31 ;) (block $label$9 (drop (block @@ -934,7 +934,7 @@ ) ) ) - (func $block-tails (; 32 ;) (type $3) + (func $block-tails (; 32 ;) (block $l1 (drop (i32.const -2) @@ -1071,7 +1071,7 @@ ) ) ) - (func $loop-tails (; 33 ;) (type $3) + (func $loop-tails (; 33 ;) (loop $l1 (drop (i32.const -2) @@ -1220,7 +1220,7 @@ (i32.const 33) ) ) - (func $block-tail-one (; 34 ;) (type $3) + (func $block-tail-one (; 34 ;) (block $l1 (drop (i32.const -2) @@ -1240,7 +1240,7 @@ (i32.const 2) ) ) - (func $loop-tail-one (; 35 ;) (type $3) + (func $loop-tail-one (; 35 ;) (loop $l1 (drop (i32.const -2) @@ -1260,7 +1260,7 @@ (i32.const 2) ) ) - (func $block-tail-value (; 36 ;) (type $FUNCSIG$i) (result i32) + (func $block-tail-value (; 36 ;) (result i32) (block $l1 (result i32) (drop (i32.const -1) @@ -1274,7 +1274,7 @@ (i32.const 2) ) ) - (func $block-tail-empty (; 37 ;) (type $3) + (func $block-tail-empty (; 37 ;) (block $l1 (drop (i32.const -1) @@ -1282,7 +1282,7 @@ (br $l1) ) ) - (func $loop-tail-empty (; 38 ;) (type $3) + (func $loop-tail-empty (; 38 ;) (loop $l1 (drop (i32.const -1) @@ -1290,7 +1290,7 @@ (br $l1) ) ) - (func $block-tail-unreachable (; 39 ;) (type $FUNCSIG$i) (result i32) + (func $block-tail-unreachable (; 39 ;) (result i32) (block $l1 (result i32) (drop (i32.const -1) @@ -1307,7 +1307,7 @@ (unreachable) ) ) - (func $loop-tail-unreachable (; 40 ;) (type $FUNCSIG$i) (result i32) + (func $loop-tail-unreachable (; 40 ;) (result i32) (loop $l1 (drop (i32.const -1) @@ -1323,9 +1323,9 @@ ) ) (module - (type $FUNCSIG$idi (func (param f64 i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (func $unreachable-in-sub-block (; 0 ;) (type $FUNCSIG$idi) (param $0 f64) (param $1 i32) (result i32) + (type $none_=>_i32 (func (result i32))) + (type $f64_i32_=>_i32 (func (param f64 i32) (result i32))) + (func $unreachable-in-sub-block (; 0 ;) (param $0 f64) (param $1 i32) (result i32) (local $2 i32) (local $9 i32) (loop $label$1 @@ -1354,13 +1354,13 @@ (nop) (local.get $9) ) - (func $trivial (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $trivial (; 1 ;) (result i32) (block (unreachable) (nop) ) ) - (func $trivial-more (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $trivial-more (; 2 ;) (result i32) (block (nop) (unreachable) @@ -1376,8 +1376,8 @@ ) ) (module - (type $FUNCSIG$v (func)) - (func $merge-some-block (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $merge-some-block (; 0 ;) (drop (i32.const 1) ) @@ -1454,7 +1454,7 @@ ) ) ) - (func $merge-some-loop (; 1 ;) (type $FUNCSIG$v) + (func $merge-some-loop (; 1 ;) (drop (i32.const 1) ) @@ -1522,7 +1522,7 @@ ) ) ) - (func $merge-some-loop-taken (; 2 ;) (type $FUNCSIG$v) + (func $merge-some-loop-taken (; 2 ;) (loop $l1 (block $b1 (drop diff --git a/test/passes/remove-unused-names_precompute.txt b/test/passes/remove-unused-names_precompute.txt index 7fcc2dbe7..d530469aa 100644 --- a/test/passes/remove-unused-names_precompute.txt +++ b/test/passes/remove-unused-names_precompute.txt @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) (memory $0 256 256) - (func $__ZN10WasmAssertC2Ev__async_cb (; 0 ;) (type $FUNCSIG$vi) (param $$0 i32) + (func $__ZN10WasmAssertC2Ev__async_cb (; 0 ;) (param $$0 i32) (block $switch-default (nop) (block diff --git a/test/passes/remove-unused-names_remove-unused-brs_vacuum.txt b/test/passes/remove-unused-names_remove-unused-brs_vacuum.txt index e18770b15..701da221b 100644 --- a/test/passes/remove-unused-names_remove-unused-brs_vacuum.txt +++ b/test/passes/remove-unused-names_remove-unused-brs_vacuum.txt @@ -1,21 +1,13 @@ (module - (type $0 (func (param i32 i32 i32) (result i32))) - (type $1 (func (param f64) (result i32))) - (type $2 (func (param i32 i32) (result i32))) - (type $3 (func (param i32) (result i32))) - (type $4 (func (param i32))) - (type $5 (func (result i32))) - (type $6 (func)) - (type $7 (func (param i32 i32))) - (type $8 (func (param i64 i32 i32))) - (type $9 (func (param i64 i64) (result i64))) - (type $10 (func (param i32 i32 i32 i32 i32) (result i32))) - (type $11 (func (param i32 i32 i32))) - (type $12 (func (param i64 i32) (result i32))) - (type $13 (func (param i32 i32 i32 i32 i32))) - (type $14 (func (param f64 i32) (result f64))) - (type $15 (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$ji (func (param i32) (result i64))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (import "env" "memory" (memory $0 256)) (import "env" "table" (table $0 18 18 funcref)) (import "env" "DYNAMICTOP_PTR" (global $import$0 i32)) @@ -73,7 +65,7 @@ (global $global$20 (mut i32) (i32.const 0)) (global $global$21 (mut f32) (f32.const 0)) (global $global$22 (mut f32) (f32.const 0)) - (func $27 (; 23 ;) (type $13) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (param $var$3 i32) (param $var$4 i32) + (func $27 (; 23 ;) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (param $var$3 i32) (param $var$4 i32) (local $var$5 i32) (local $var$6 i32) (local $var$7 i32) @@ -104,10 +96,10 @@ ) ) ) - (func $23 (; 24 ;) (type $0) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $23 (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (unreachable) ) - (func $unexitable-loops-result (; 25 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + (func $unexitable-loops-result (; 25 ;) (param $0 i32) (result i64) (loop $label$0 (loop $label$1 (br_if $label$0 diff --git a/test/passes/remove-unused-names_vacuum.txt b/test/passes/remove-unused-names_vacuum.txt index e78c3f40e..c2a1ec36f 100644 --- a/test/passes/remove-unused-names_vacuum.txt +++ b/test/passes/remove-unused-names_vacuum.txt @@ -1,30 +1,30 @@ (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) - (func $return-i32-but-body-is-unreachable3 (; 0 ;) (type $FUNCSIG$i) (result i32) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (func $return-i32-but-body-is-unreachable3 (; 0 ;) (result i32) (local $label i32) (loop $while-in$1 (br $while-in$1) ) ) - (func $return-i32-but-body-is-unreachable4 (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $return-i32-but-body-is-unreachable4 (; 1 ;) (result i32) (local $label i32) (loop $while-in$1 (br $while-in$1) ) ) - (func $to-drop-unreachable (; 2 ;) (type $FUNCSIG$v) + (func $to-drop-unreachable (; 2 ;) (drop (block (result i32) (unreachable) ) ) ) - (func $return-i32-but-body-is-unreachable5 (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $return-i32-but-body-is-unreachable5 (; 3 ;) (result i32) (local $label i32) (unreachable) ) - (func $return-i32-but-body-is-unreachable6 (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $return-i32-but-body-is-unreachable6 (; 4 ;) (result i32) (local $label i32) (unreachable) ) diff --git a/test/passes/remove-unused-names_vacuum_ignore-implicit-traps.txt b/test/passes/remove-unused-names_vacuum_ignore-implicit-traps.txt index 22288056a..69835c780 100644 --- a/test/passes/remove-unused-names_vacuum_ignore-implicit-traps.txt +++ b/test/passes/remove-unused-names_vacuum_ignore-implicit-traps.txt @@ -1,15 +1,14 @@ (module - (type $0 (func)) - (type $FUNCSIG$j (func (result i32))) - (type $FUNCSIG$i (func (result i32))) - (type $legaltype$wasm2js_scratch_load_i64 (func (result i32))) - (type $FUNCSIG$vj (func (param i32 i32))) - (type $legaltype$wasm2js_scratch_store_i64 (func (param i32 i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$f (func (result f32))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$vd (func (param f64))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i64_=>_none (func (param i64))) + (type $f32_=>_none (func (param f32))) + (type $f64_=>_none (func (param f64))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $none_=>_f32 (func (result f32))) + (type $none_=>_f64 (func (result f64))) (import "env" "wasm2js_scratch_load_i32" (func $wasm2js_scratch_load_i32 (param i32) (result i32))) (import "env" "wasm2js_scratch_store_i32" (func $wasm2js_scratch_store_i32 (param i32 i32))) (import "env" "wasm2js_scratch_load_f32" (func $wasm2js_scratch_load_f32 (result f32))) @@ -19,16 +18,16 @@ (import "env" "getTempRet0" (func $getTempRet0 (result i32))) (import "env" "wasm2js_scratch_load_i64" (func $legalimport$wasm2js_scratch_load_i64 (result i32))) (import "env" "wasm2js_scratch_store_i64" (func $legalimport$wasm2js_scratch_store_i64 (param i32 i32))) - (import "env" "wasm2js_scratch_load_i64" (func $wasm2js_scratch_load_i64 (result i32))) - (import "env" "wasm2js_scratch_store_i64" (func $wasm2js_scratch_store_i64 (param i32 i32))) + (import "env" "wasm2js_scratch_load_i64" (func $wasm2js_scratch_load_i64 (result i64))) + (import "env" "wasm2js_scratch_store_i64" (func $wasm2js_scratch_store_i64 (param i64))) (memory $0 1 1) (global $i64toi32_i32$HIGH_BITS (mut i32) (i32.const 0)) - (func $0 (; 11 ;) (type $0) + (func $0 (; 11 ;) (local $0 f64) (local $1 i32) (nop) ) - (func $legalfunc$wasm2js_scratch_load_i64 (; 12 ;) (type $FUNCSIG$j) (result i32) + (func $legalfunc$wasm2js_scratch_load_i64 (; 12 ;) (result i32) (local $0 i32) (local $1 i32) (local.set $1 @@ -42,7 +41,7 @@ ) (local.get $1) ) - (func $legalfunc$wasm2js_scratch_store_i64 (; 13 ;) (type $FUNCSIG$vj) (param $0 i32) (param $1 i32) + (func $legalfunc$wasm2js_scratch_store_i64 (; 13 ;) (param $0 i32) (param $1 i32) (call $legalimport$wasm2js_scratch_store_i64 (local.get $0) (local.get $1) diff --git a/test/passes/remove-unused-nonfunction-module-elements_all-features.txt b/test/passes/remove-unused-nonfunction-module-elements_all-features.txt index b3ace30d0..d740fdb18 100644 --- a/test/passes/remove-unused-nonfunction-module-elements_all-features.txt +++ b/test/passes/remove-unused-nonfunction-module-elements_all-features.txt @@ -1,7 +1,7 @@ (module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (table $0 1 1 funcref) (elem (i32.const 0) $called_indirect) @@ -10,87 +10,87 @@ (export "other1" (func $other1)) (export "other2" (func $other2)) (start $start) - (func $start (; 0 ;) (type $0) + (func $start (; 0 ;) (call $called0) ) - (func $called0 (; 1 ;) (type $0) + (func $called0 (; 1 ;) (call $called1) ) - (func $called1 (; 2 ;) (type $0) + (func $called1 (; 2 ;) (nop) ) - (func $called_indirect (; 3 ;) (type $0) + (func $called_indirect (; 3 ;) (nop) ) - (func $exported (; 4 ;) (type $0) + (func $exported (; 4 ;) (call $called2) ) - (func $called2 (; 5 ;) (type $0) + (func $called2 (; 5 ;) (call $called2) (call $called3) ) - (func $called3 (; 6 ;) (type $0) + (func $called3 (; 6 ;) (call $called4) ) - (func $called4 (; 7 ;) (type $0) + (func $called4 (; 7 ;) (call $called3) ) - (func $remove0 (; 8 ;) (type $0) + (func $remove0 (; 8 ;) (call $remove1) ) - (func $remove1 (; 9 ;) (type $0) + (func $remove1 (; 9 ;) (nop) ) - (func $remove2 (; 10 ;) (type $0) + (func $remove2 (; 10 ;) (call $remove2) ) - (func $remove3 (; 11 ;) (type $0) + (func $remove3 (; 11 ;) (call $remove4) ) - (func $remove4 (; 12 ;) (type $0) + (func $remove4 (; 12 ;) (call $remove3) ) - (func $other1 (; 13 ;) (type $1) (param $0 i32) - (call_indirect (type $0) + (func $other1 (; 13 ;) (param $0 i32) + (call_indirect (type $none_=>_none) (i32.const 0) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (i32.const 0) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (i32.const 0) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (i32.const 0) ) - (call_indirect (type $1) + (call_indirect (type $i32_=>_none) (i32.const 0) (i32.const 0) ) - (call_indirect (type $1) + (call_indirect (type $i32_=>_none) (i32.const 0) (i32.const 0) ) (drop - (call_indirect (type $2) + (call_indirect (type $i32_=>_i32) (i32.const 0) (i32.const 0) ) ) (drop - (call_indirect (type $2) + (call_indirect (type $i32_=>_i32) (i32.const 0) (i32.const 0) ) ) (drop - (call_indirect (type $2) + (call_indirect (type $i32_=>_i32) (i32.const 0) (i32.const 0) ) ) ) - (func $other2 (; 14 ;) (type $1) (param $0 i32) + (func $other2 (; 14 ;) (param $0 i32) (unreachable) ) ) @@ -105,36 +105,36 @@ (export "tab" (table $0)) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) (data (i32.const 1) "hello, world!") (import "env" "table" (table $0 1 funcref)) (elem (i32.const 0) $waka) - (func $waka (; 0 ;) (type $FUNCSIG$v) + (func $waka (; 0 ;) (nop) ) ) (module - (type $0 (func)) + (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) (import "env" "table" (table $0 0 funcref)) (export "user" (func $user)) - (func $user (; 0 ;) (type $0) + (func $user (; 0 ;) (drop (i32.load (i32.const 0) ) ) - (call_indirect (type $0) + (call_indirect (type $none_=>_none) (i32.const 0) ) ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 (shared 23 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$v) + (func $user (; 0 ;) (i32.store (i32.const 0) (i32.const 0) @@ -142,10 +142,10 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 (shared 23 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (i32.atomic.rmw.add (i32.const 0) (i32.const 0) @@ -153,10 +153,10 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 (shared 23 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (i32.atomic.rmw8.cmpxchg_u (i32.const 0) (i32.const 0) @@ -165,10 +165,10 @@ ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 (shared 23 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$v) + (func $user (; 0 ;) (local $0 i32) (local $1 i64) (drop @@ -181,10 +181,10 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 (shared 23 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (atomic.notify (i32.const 0) (i32.const 0) @@ -192,49 +192,49 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 23 256) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (memory.grow (i32.const 0) ) ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $0 256)) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (memory.grow (i32.const 0) ) ) ) (module - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 23 256) (export "user" (func $user)) - (func $user (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $user (; 0 ;) (result i32) (memory.size) ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) (data (global.get $memoryBase) "hello, world!") (import "env" "table" (table $0 0 funcref)) (elem (global.get $tableBase) $waka) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (func $waka (; 0 ;) (type $FUNCSIG$v) + (func $waka (; 0 ;) (nop) ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "imported" (global $imported i32)) (import "env" "_puts" (func $_puts (param i32) (result i32))) (global $int (mut i32) (global.get $imported)) @@ -243,16 +243,16 @@ (export "one" (func $one)) (export "three" (func $three)) (export "exp_glob" (global $exp_glob)) - (func $one (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $one (; 1 ;) (result i32) (call $two) ) - (func $two (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $two (; 2 ;) (result i32) (global.get $int) ) - (func $three (; 3 ;) (type $FUNCSIG$v) + (func $three (; 3 ;) (call $four) ) - (func $four (; 4 ;) (type $FUNCSIG$v) + (func $four (; 4 ;) (global.set $set (i32.const 200) ) @@ -262,31 +262,31 @@ ) ) ) - (func $forget_implemented (; 5 ;) (type $FUNCSIG$v) + (func $forget_implemented (; 5 ;) (nop) ) - (func $starter (; 6 ;) (type $FUNCSIG$v) + (func $starter (; 6 ;) (nop) ) ) (module - (type $FUNCSIG$v (func)) - (func $starter (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $starter (; 0 ;) (nop) ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (start $starter) - (func $starter (; 0 ;) (type $FUNCSIG$v) + (func $starter (; 0 ;) (drop (i32.const 0) ) ) ) (module - (type $0 (func (param f64) (result f64))) - (func $0 (; 0 ;) (type $0) (param $var$0 f64) (result f64) + (type $f64_=>_f64 (func (param f64) (result f64))) + (func $0 (; 0 ;) (param $var$0 f64) (result f64) (if (result f64) (f64.eq (f64.const 1) @@ -298,15 +298,15 @@ ) ) (module - (type $0 (func (param f64) (result f64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (table $0 6 6 funcref) - (func $0 (; 0 ;) (type $0) (param $var$0 f64) (result f64) + (func $0 (; 0 ;) (param $var$0 f64) (result f64) (if (result f64) (f64.eq (f64.const 1) (f64.const 1) ) - (call_indirect (type $0) + (call_indirect (type $f64_=>_f64) (f64.const 1) (i32.const 0) ) @@ -315,10 +315,10 @@ ) ) (module - (type $0 (func (param f64) (result f64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (import "env" "table" (table $0 6 6 funcref)) (elem (i32.const 0) $0) - (func $0 (; 0 ;) (type $0) (param $var$0 f64) (result f64) + (func $0 (; 0 ;) (param $var$0 f64) (result f64) (if (result f64) (f64.eq (f64.const 1) @@ -330,10 +330,11 @@ ) ) (module - (type $0 (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $i64_=>_none (func (param i64))) (event $e1 (attr 0) (param i64)) (export "e1" (event $e1)) - (func $f (; 0 ;) (type $0) (param $0 i32) + (func $f (; 0 ;) (param $0 i32) (nop) ) ) diff --git a/test/passes/reorder-functions.txt b/test/passes/reorder-functions.txt index f2fbcec30..3e8ad3eab 100644 --- a/test/passes/reorder-functions.txt +++ b/test/passes/reorder-functions.txt @@ -1,16 +1,16 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 256 256) - (func $c (; 0 ;) (type $0) + (func $c (; 0 ;) (call $c) (call $c) (call $c) ) - (func $b (; 1 ;) (type $0) + (func $b (; 1 ;) (call $b) (call $b) ) - (func $a (; 2 ;) (type $0) + (func $a (; 2 ;) (call $a) ) ) diff --git a/test/passes/reorder-locals.txt b/test/passes/reorder-locals.txt index fc82dbaab..5ca50fe70 100644 --- a/test/passes/reorder-locals.txt +++ b/test/passes/reorder-locals.txt @@ -1,8 +1,8 @@ (module - (type $0 (func (param i32 i32))) - (type $1 (func)) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) (memory $0 256 256) - (func $b0-yes (; 0 ;) (type $0) (param $a i32) (param $b i32) + (func $b0-yes (; 0 ;) (param $a i32) (param $b i32) (local $z i32) (local $y i32) (local $x i32) @@ -43,13 +43,13 @@ (local.get $b) ) ) - (func $zero (; 1 ;) (type $1) + (func $zero (; 1 ;) (local $b i32) (drop (local.get $b) ) ) - (func $null (; 2 ;) (type $1) + (func $null (; 2 ;) (nop) ) ) diff --git a/test/passes/roundtrip.txt b/test/passes/roundtrip.txt index ca74a299e..bcd8b186a 100644 --- a/test/passes/roundtrip.txt +++ b/test/passes/roundtrip.txt @@ -1,5 +1,5 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (export "foo" (func $0)) (func $0 (; 0 ;) (unreachable) diff --git a/test/passes/rse.txt b/test/passes/rse.txt index 3c2056457..6eb7996bf 100644 --- a/test/passes/rse.txt +++ b/test/passes/rse.txt @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$vid (func (param i32 f64))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) - (func $basic (; 0 ;) (type $FUNCSIG$vid) (param $x i32) (param $y f64) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_f64_=>_none (func (param i32 f64))) + (func $basic (; 0 ;) (param $x i32) (param $y f64) (local $a f32) (local $b i64) (local.set $x @@ -19,7 +19,7 @@ (i64.const 0) ) ) - (func $later-param-use (; 1 ;) (type $FUNCSIG$vi) (param $x i32) + (func $later-param-use (; 1 ;) (param $x i32) (local.set $x (i32.const 0) ) @@ -27,7 +27,7 @@ (i32.const 0) ) ) - (func $diff-value (; 2 ;) (type $FUNCSIG$vi) (param $x i32) + (func $diff-value (; 2 ;) (param $x i32) (local $a i32) (local.set $x (i32.const 0) @@ -48,7 +48,7 @@ (i32.const 0) ) ) - (func $unreach (; 3 ;) (type $FUNCSIG$v) + (func $unreach (; 3 ;) (local $a i32) (block $x (drop @@ -72,7 +72,7 @@ ) ) ) - (func $loop (; 4 ;) (type $FUNCSIG$v) + (func $loop (; 4 ;) (local $a i32) (local $b i32) (loop $x @@ -99,7 +99,7 @@ (i32.const 1) ) ) - (func $if (; 5 ;) (type $FUNCSIG$v) + (func $if (; 5 ;) (local $x i32) (if (i32.const 0) @@ -114,7 +114,7 @@ (i32.const 1) ) ) - (func $if2 (; 6 ;) (type $FUNCSIG$v) + (func $if2 (; 6 ;) (local $x i32) (if (local.tee $x @@ -131,7 +131,7 @@ (i32.const 1) ) ) - (func $if3 (; 7 ;) (type $FUNCSIG$v) + (func $if3 (; 7 ;) (local $x i32) (if (local.tee $x @@ -148,7 +148,7 @@ (i32.const 1) ) ) - (func $copy (; 8 ;) (type $FUNCSIG$v) + (func $copy (; 8 ;) (local $x i32) (local $y i32) (local.set $x @@ -192,7 +192,7 @@ (local.get $x) ) ) - (func $param-unique (; 9 ;) (type $FUNCSIG$vi) (param $x i32) + (func $param-unique (; 9 ;) (param $x i32) (local $a i32) (local.set $a (local.get $x) @@ -212,7 +212,7 @@ (local.get $x) ) ) - (func $set-unique (; 10 ;) (type $FUNCSIG$v) + (func $set-unique (; 10 ;) (local $x i32) (local $y i32) (local.set $x @@ -270,7 +270,7 @@ (local.get $x) ) ) - (func $identical_complex (; 11 ;) (type $FUNCSIG$vi) (param $x i32) + (func $identical_complex (; 11 ;) (param $x i32) (local $y i32) (local.set $y (local.get $x) @@ -291,7 +291,7 @@ (local.get $y) ) ) - (func $merge (; 12 ;) (type $FUNCSIG$v) + (func $merge (; 12 ;) (local $x i32) (if (i32.const 1) @@ -326,7 +326,7 @@ (i32.const 2) ) ) - (func $one-arm (; 13 ;) (type $FUNCSIG$vii) (param $1 i32) (param $3 i32) + (func $one-arm (; 13 ;) (param $1 i32) (param $3 i32) (local.set $1 (local.get $3) ) @@ -338,7 +338,7 @@ ) ) ) - (func $one-arm2 (; 14 ;) (type $FUNCSIG$vii) (param $1 i32) (param $3 i32) + (func $one-arm2 (; 14 ;) (param $1 i32) (param $3 i32) (local.set $1 (local.get $3) ) @@ -349,7 +349,7 @@ ) ) ) - (func $many-merges (; 15 ;) (type $FUNCSIG$v) + (func $many-merges (; 15 ;) (local $0 i32) (local $1 i32) (block $block @@ -378,7 +378,7 @@ ) ) ) - (func $fuzz (; 16 ;) (type $FUNCSIG$v) + (func $fuzz (; 16 ;) (local $x i32) (loop $label$4 (block $label$5 @@ -407,7 +407,7 @@ ) ) ) - (func $fuzz2 (; 17 ;) (type $FUNCSIG$v) + (func $fuzz2 (; 17 ;) (local $var$1 i32) (if (i32.const 0) @@ -430,7 +430,7 @@ ) ) ) - (func $fuzz-nan (; 18 ;) (type $FUNCSIG$v) + (func $fuzz-nan (; 18 ;) (local $0 f64) (local $1 f64) (block $block diff --git a/test/passes/safe-heap_disable-simd.txt b/test/passes/safe-heap_disable-simd.txt index 07ea7385f..495e7e3c9 100644 --- a/test/passes/safe-heap_disable-simd.txt +++ b/test/passes/safe-heap_disable-simd.txt @@ -1,6 +1,14 @@ (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) + (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (import "env" "emscripten_get_sbrk_ptr" (func $emscripten_get_sbrk_ptr (result i32))) (import "env" "segfault" (func $segfault)) (import "env" "alignfault" (func $alignfault)) @@ -1904,7 +1912,15 @@ ) ) (module - (type $FUNCSIG$v (func)) + (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $none_=>_none (func)) (import "env" "DYNAMICTOP_PTR" (global $foo i32)) (import "env" "segfault" (func $segfault)) (import "env" "alignfault" (func $alignfault)) @@ -3808,8 +3824,16 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) + (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (import "env" "emscripten_get_sbrk_ptr" (func $foo (result i32))) (import "env" "segfault" (func $segfault)) (import "env" "alignfault" (func $alignfault)) @@ -5713,13 +5737,21 @@ ) ) (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) + (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (import "env" "segfault" (func $segfault)) (import "env" "alignfault" (func $alignfault)) (memory $0 1 1) (export "_emscripten_get_sbrk_ptr" (func $foo)) - (func $foo (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $foo (; 2 ;) (result i32) (i32.const 1234) ) (func $SAFE_HEAP_LOAD_i32_1_1 (; 3 ;) (param $0 i32) (param $1 i32) (result i32) diff --git a/test/passes/safe-heap_enable-threads_enable-simd.txt b/test/passes/safe-heap_enable-threads_enable-simd.txt index 14219c13f..3ecd48aa3 100644 --- a/test/passes/safe-heap_enable-threads_enable-simd.txt +++ b/test/passes/safe-heap_enable-threads_enable-simd.txt @@ -1,11 +1,21 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) + (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_v128_=>_none (func (param i32 i32 v128))) + (type $i32_i32_=>_v128 (func (param i32 i32) (result v128))) + (type $none_=>_none (func)) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $none_=>_i32 (func (result i32))) (import "env" "emscripten_get_sbrk_ptr" (func $emscripten_get_sbrk_ptr (result i32))) (import "env" "segfault" (func $segfault)) (import "env" "alignfault" (func $alignfault)) (memory $0 (shared 100 100)) - (func $loads (; 3 ;) (type $FUNCSIG$v) + (func $loads (; 3 ;) (drop (call $SAFE_HEAP_LOAD_i32_4_4 (i32.const 1) @@ -97,7 +107,7 @@ ) ) ) - (func $stores (; 4 ;) (type $FUNCSIG$v) + (func $stores (; 4 ;) (call $SAFE_HEAP_STORE_i32_4_4 (i32.const 1) (i32.const 0) @@ -3132,13 +3142,23 @@ ) ) (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) + (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_v128_=>_none (func (param i32 i32 v128))) + (type $i32_i32_=>_v128 (func (param i32 i32) (result v128))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $none_=>_none (func)) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $none_=>_i32 (func (result i32))) (import "env" "emscripten_get_sbrk_ptr" (func $emscripten_get_sbrk_ptr (result i32))) (import "env" "segfault" (func $segfault)) (import "env" "alignfault" (func $alignfault)) (memory $0 100 100) - (func $loads (; 3 ;) (type $FUNCSIG$v) + (func $loads (; 3 ;) (drop (call $SAFE_HEAP_LOAD_i32_4_4 (i32.const 1) @@ -5406,12 +5426,22 @@ ) ) (module - (type $FUNCSIG$v (func)) + (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_v128_=>_none (func (param i32 i32 v128))) + (type $i32_i32_=>_v128 (func (param i32 i32) (result v128))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $none_=>_none (func)) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR i32)) (import "env" "segfault" (func $segfault)) (import "env" "alignfault" (func $alignfault)) (memory $0 (shared 100 100)) - (func $actions (; 2 ;) (type $FUNCSIG$v) + (func $actions (; 2 ;) (drop (call $SAFE_HEAP_LOAD_i32_4_4 (i32.const 1) diff --git a/test/passes/safe-heap_low-memory-unused_enable-threads_enable-simd.txt b/test/passes/safe-heap_low-memory-unused_enable-threads_enable-simd.txt index 86943869b..8b7bdd3ed 100644 --- a/test/passes/safe-heap_low-memory-unused_enable-threads_enable-simd.txt +++ b/test/passes/safe-heap_low-memory-unused_enable-threads_enable-simd.txt @@ -1,11 +1,21 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) + (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_v128_=>_none (func (param i32 i32 v128))) + (type $i32_i32_=>_v128 (func (param i32 i32) (result v128))) + (type $none_=>_none (func)) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $none_=>_i32 (func (result i32))) (import "env" "emscripten_get_sbrk_ptr" (func $emscripten_get_sbrk_ptr (result i32))) (import "env" "segfault" (func $segfault)) (import "env" "alignfault" (func $alignfault)) (memory $0 (shared 100 100)) - (func $loads (; 3 ;) (type $FUNCSIG$v) + (func $loads (; 3 ;) (drop (call $SAFE_HEAP_LOAD_i32_4_4 (i32.const 1) @@ -97,7 +107,7 @@ ) ) ) - (func $stores (; 4 ;) (type $FUNCSIG$v) + (func $stores (; 4 ;) (call $SAFE_HEAP_STORE_i32_4_4 (i32.const 1) (i32.const 0) @@ -3132,13 +3142,23 @@ ) ) (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) + (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_v128_=>_none (func (param i32 i32 v128))) + (type $i32_i32_=>_v128 (func (param i32 i32) (result v128))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $none_=>_none (func)) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $none_=>_i32 (func (result i32))) (import "env" "emscripten_get_sbrk_ptr" (func $emscripten_get_sbrk_ptr (result i32))) (import "env" "segfault" (func $segfault)) (import "env" "alignfault" (func $alignfault)) (memory $0 100 100) - (func $loads (; 3 ;) (type $FUNCSIG$v) + (func $loads (; 3 ;) (drop (call $SAFE_HEAP_LOAD_i32_4_4 (i32.const 1) @@ -5406,12 +5426,22 @@ ) ) (module - (type $FUNCSIG$v (func)) + (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_v128_=>_none (func (param i32 i32 v128))) + (type $i32_i32_=>_v128 (func (param i32 i32) (result v128))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) + (type $none_=>_none (func)) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR i32)) (import "env" "segfault" (func $segfault)) (import "env" "alignfault" (func $alignfault)) (memory $0 (shared 100 100)) - (func $actions (; 2 ;) (type $FUNCSIG$v) + (func $actions (; 2 ;) (drop (call $SAFE_HEAP_LOAD_i32_4_4 (i32.const 1) diff --git a/test/passes/simplify-globals-optimizing_enable-mutable-globals.txt b/test/passes/simplify-globals-optimizing_enable-mutable-globals.txt index 3511927ff..8756da233 100644 --- a/test/passes/simplify-globals-optimizing_enable-mutable-globals.txt +++ b/test/passes/simplify-globals-optimizing_enable-mutable-globals.txt @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "global-1" (global $g1 i32)) (global $g2 i32 (global.get $g1)) - (func $foo (; 0 ;) (type $FUNCSIG$v) + (func $foo (; 0 ;) (drop (global.get $g1) ) @@ -12,12 +12,12 @@ ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "global-1" (global $g1 i32)) (global $g2 i32 (global.get $g1)) (global $g3 i32 (global.get $g2)) (global $g4 i32 (global.get $g3)) - (func $foo (; 0 ;) (type $FUNCSIG$v) + (func $foo (; 0 ;) (drop (global.get $g1) ) @@ -37,10 +37,10 @@ (global $g2 i32 (global.get $g1)) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "global-1" (global $g1 i32)) (global $g2 (mut i32) (global.get $g1)) - (func $foo (; 0 ;) (type $FUNCSIG$v) + (func $foo (; 0 ;) (global.set $g2 (unreachable) ) @@ -52,7 +52,7 @@ (export "global-2" (global $g2)) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (global $g1 i32 (i32.const 1)) (global $g2 i32 (i32.const 1)) (global $g3 f64 (f64.const -3.4)) @@ -65,7 +65,7 @@ (global $ga (mut i32) (i32.const 4)) (global $gb (mut i32) (i32.const 5)) (global $gc i32 (i32.const 5)) - (func $foo (; 0 ;) (type $FUNCSIG$v) + (func $foo (; 0 ;) (global.set $ga (i32.const 6) ) @@ -75,10 +75,10 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (global $g1 (mut i32) (i32.const 1)) (global $g2 (mut i32) (i32.const 1)) - (func $f (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $f (; 0 ;) (param $0 i32) (result i32) (global.set $g1 (i32.const 100) ) @@ -115,10 +115,10 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (global $g1 (mut i32) (i32.const 1)) (global $g2 (mut i32) (i32.const 1)) - (func $f (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $f (; 0 ;) (param $0 i32) (result i32) (global.set $g1 (i32.const 100) ) @@ -132,10 +132,10 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (global $g1 (mut i32) (i32.const 1)) (global $g2 (mut i32) (i32.const 1)) - (func $no (; 0 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $no (; 0 ;) (param $x i32) (result i32) (global.set $g1 (i32.const 100) ) @@ -146,7 +146,7 @@ ) (global.get $g1) ) - (func $no2 (; 1 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $no2 (; 1 ;) (param $x i32) (result i32) (global.set $g1 (i32.const 100) ) @@ -155,7 +155,7 @@ ) (global.get $g1) ) - (func $yes (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $yes (; 2 ;) (param $0 i32) (result i32) (global.set $g1 (i32.const 100) ) diff --git a/test/passes/simplify-globals_enable-mutable-globals.txt b/test/passes/simplify-globals_enable-mutable-globals.txt index e0971742b..8146bb942 100644 --- a/test/passes/simplify-globals_enable-mutable-globals.txt +++ b/test/passes/simplify-globals_enable-mutable-globals.txt @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "global-1" (global $g1 i32)) (global $g2 i32 (global.get $g1)) - (func $foo (; 0 ;) (type $FUNCSIG$v) + (func $foo (; 0 ;) (drop (global.get $g1) ) @@ -12,12 +12,12 @@ ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "global-1" (global $g1 i32)) (global $g2 i32 (global.get $g1)) (global $g3 i32 (global.get $g2)) (global $g4 i32 (global.get $g3)) - (func $foo (; 0 ;) (type $FUNCSIG$v) + (func $foo (; 0 ;) (drop (global.get $g1) ) @@ -37,10 +37,10 @@ (global $g2 i32 (global.get $g1)) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (import "env" "global-1" (global $g1 i32)) (global $g2 (mut i32) (global.get $g1)) - (func $foo (; 0 ;) (type $FUNCSIG$v) + (func $foo (; 0 ;) (global.set $g2 (unreachable) ) @@ -52,7 +52,7 @@ (export "global-2" (global $g2)) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (global $g1 i32 (i32.const 1)) (global $g2 i32 (i32.const 1)) (global $g3 f64 (f64.const -3.4)) @@ -65,7 +65,7 @@ (global $ga (mut i32) (i32.const 4)) (global $gb (mut i32) (i32.const 5)) (global $gc i32 (i32.const 5)) - (func $foo (; 0 ;) (type $FUNCSIG$v) + (func $foo (; 0 ;) (drop (i32.const 1) ) @@ -111,10 +111,10 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (global $g1 (mut i32) (i32.const 1)) (global $g2 (mut i32) (i32.const 1)) - (func $f (; 0 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $f (; 0 ;) (param $x i32) (result i32) (global.set $g1 (i32.const 100) ) @@ -155,10 +155,10 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (global $g1 (mut i32) (i32.const 1)) (global $g2 (mut i32) (i32.const 1)) - (func $f (; 0 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $f (; 0 ;) (param $x i32) (result i32) (global.set $g1 (i32.const 100) ) @@ -178,10 +178,10 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (global $g1 (mut i32) (i32.const 1)) (global $g2 (mut i32) (i32.const 1)) - (func $no (; 0 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $no (; 0 ;) (param $x i32) (result i32) (global.set $g1 (i32.const 100) ) @@ -192,7 +192,7 @@ ) (global.get $g1) ) - (func $no2 (; 1 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $no2 (; 1 ;) (param $x i32) (result i32) (global.set $g1 (i32.const 100) ) @@ -201,7 +201,7 @@ ) (global.get $g1) ) - (func $yes (; 2 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $yes (; 2 ;) (param $x i32) (result i32) (global.set $g1 (i32.const 100) ) diff --git a/test/passes/simplify-locals-nonesting.txt b/test/passes/simplify-locals-nonesting.txt index 577bf7cf9..04210c07a 100644 --- a/test/passes/simplify-locals-nonesting.txt +++ b/test/passes/simplify-locals-nonesting.txt @@ -1,7 +1,7 @@ (module - (type $0 (func (param i64 i64 i64) (result i32))) - (type $1 (func (param i32) (result i32))) - (func $figure-1a (; 0 ;) (type $0) (param $a i64) (param $x i64) (param $y i64) (result i32) + (type $i64_i64_i64_=>_i32 (func (param i64 i64 i64) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (func $figure-1a (; 0 ;) (param $a i64) (param $x i64) (param $y i64) (result i32) (local $i i32) (local $j i32) (local $r i32) @@ -59,7 +59,7 @@ (local.get $16) ) ) - (func $figure-1b (; 1 ;) (type $0) (param $a i64) (param $x i64) (param $y i64) (result i32) + (func $figure-1b (; 1 ;) (param $a i64) (param $x i64) (param $y i64) (result i32) (local $i i32) (local $j i32) (local $r i32) @@ -135,7 +135,7 @@ ) (unreachable) ) - (func $figure-3-if (; 2 ;) (type $1) (param $x i32) (result i32) + (func $figure-3-if (; 2 ;) (param $x i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) diff --git a/test/passes/simplify-locals-nostructure.txt b/test/passes/simplify-locals-nostructure.txt index 1b5ca6580..b921d97ca 100644 --- a/test/passes/simplify-locals-nostructure.txt +++ b/test/passes/simplify-locals-nostructure.txt @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$dii (func (param i32 i32) (result f64))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (memory $0 1) - (func $contrast (; 0 ;) (type $FUNCSIG$v) + (func $contrast (; 0 ;) (local $x i32) (local $y i32) (local $z i32) @@ -64,11 +64,11 @@ (local.get $b) ) ) - (func $no-unreachable (; 1 ;) (type $FUNCSIG$v) + (func $no-unreachable (; 1 ;) (local $x i32) (unreachable) ) - (func $implicit-trap-and-global-effects (; 2 ;) (type $FUNCSIG$v) + (func $implicit-trap-and-global-effects (; 2 ;) (local $var$0 i32) (local.set $var$0 (i32.trunc_f64_u @@ -83,7 +83,7 @@ (local.get $var$0) ) ) - (func $implicit-trap-and-local-effects (; 3 ;) (type $FUNCSIG$v) + (func $implicit-trap-and-local-effects (; 3 ;) (local $var$0 i32) (local $other i32) (nop) @@ -102,7 +102,7 @@ ) ) ) - (func $multi-pass-get-equivs-right (; 4 ;) (type $FUNCSIG$dii) (param $var$0 i32) (param $var$1 i32) (result f64) + (func $multi-pass-get-equivs-right (; 4 ;) (param $var$0 i32) (param $var$1 i32) (result f64) (local $var$2 i32) (nop) (i32.store @@ -115,7 +115,7 @@ ) ) ) - (func $if-value-structure-equivalent (; 5 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (func $if-value-structure-equivalent (; 5 ;) (param $x i32) (result i32) (local $y i32) (if (i32.const 1) diff --git a/test/passes/simplify-locals-notee-nostructure.txt b/test/passes/simplify-locals-notee-nostructure.txt index 517c87dea..9ad5dfa33 100644 --- a/test/passes/simplify-locals-notee-nostructure.txt +++ b/test/passes/simplify-locals-notee-nostructure.txt @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$v (func)) - (func $contrast (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $contrast (; 0 ;) (local $x i32) (local $y i32) (local $z i32) diff --git a/test/passes/simplify-locals-notee.txt b/test/passes/simplify-locals-notee.txt index 66cf78ead..89562728d 100644 --- a/test/passes/simplify-locals-notee.txt +++ b/test/passes/simplify-locals-notee.txt @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$v (func)) - (func $contrast (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $contrast (; 0 ;) (local $x i32) (local $y i32) (local $z i32) diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt index 5804fd658..451fae278 100644 --- a/test/passes/simplify-locals.txt +++ b/test/passes/simplify-locals.txt @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$i (func (result i32))) - (func $sink-from-inside (; 0 ;) (type $FUNCSIG$i) (result i32) + (type $none_=>_i32 (func (result i32))) + (func $sink-from-inside (; 0 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) diff --git a/test/passes/simplify-locals_all-features.txt b/test/passes/simplify-locals_all-features.txt index 84dcaeb6a..0902a607e 100644 --- a/test/passes/simplify-locals_all-features.txt +++ b/test/passes/simplify-locals_all-features.txt @@ -1,17 +1,17 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) - (type $4 (func (param i32))) - (type $5 (func (param i32) (result i32))) - (type $6 (func (param i32 i32 i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$vj (func (param i64))) - (type $FUNCSIG$diddfi (func (param i32 f64 f64 f32 i32) (result f64))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32 i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i64_=>_none (func (param i64))) + (type $f32_=>_none (func (param f32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i32_f64_f64_f32_i32_=>_f64 (func (param i32 f64 f64 f32 i32) (result f64))) (import "env" "waka" (func $waka)) (import "env" "waka_int" (func $waka_int (result i32))) (import "env" "i64sub" (func $_i64Subtract (param i32 i32 i32 i32) (result i32))) @@ -20,7 +20,7 @@ (import "fuzzing-support" "log-f32" (func $fimport$0 (param f32))) (memory $0 256 256) (global $global$0 (mut i32) (i32.const 10)) - (func $contrast (; 6 ;) (type $FUNCSIG$v) + (func $contrast (; 6 ;) (local $x i32) (local $y i32) (local $z i32) @@ -82,7 +82,7 @@ ) ) ) - (func $b0-yes (; 7 ;) (type $4) (param $i1 i32) + (func $b0-yes (; 7 ;) (param $i1 i32) (local $x i32) (local $y i32) (local $a i32) @@ -400,7 +400,7 @@ ) ) ) - (func $Ia (; 8 ;) (type $5) (param $a i32) (result i32) + (func $Ia (; 8 ;) (param $a i32) (result i32) (local $b i32) (block $switch$0 (block $switch-default$6 @@ -411,7 +411,7 @@ (i32.const 60) ) ) - (func $memories (; 9 ;) (type $6) (param $i2 i32) (param $i3 i32) (param $bi2 i32) (param $bi3 i32) (param $ci3 i32) (param $di3 i32) + (func $memories (; 9 ;) (param $i2 i32) (param $i3 i32) (param $bi2 i32) (param $bi3 i32) (param $ci3 i32) (param $di3 i32) (local $set_with_no_get i32) (nop) (i32.store8 @@ -441,7 +441,7 @@ ) (nop) ) - (func $___remdi3 (; 10 ;) (type $FUNCSIG$iiiii) (param $$a$0 i32) (param $$a$1 i32) (param $$b$0 i32) (param $$b$1 i32) (result i32) + (func $___remdi3 (; 10 ;) (param $$a$0 i32) (param $$a$1 i32) (param $$b$0 i32) (param $$b$1 i32) (result i32) (local $$1$1 i32) (local $$1$0 i32) (local $$rem i32) @@ -634,7 +634,7 @@ ) ) ) - (func $block-returns (; 11 ;) (type $FUNCSIG$v) + (func $block-returns (; 11 ;) (local $x i32) (local.set $x (block $out (result i32) @@ -708,7 +708,7 @@ ) ) ) - (func $multiple (; 12 ;) (type $6) (param $s i32) (param $r i32) (param $f i32) (param $p i32) (param $t i32) (param $m i32) + (func $multiple (; 12 ;) (param $s i32) (param $r i32) (param $f i32) (param $p i32) (param $t i32) (param $m i32) (nop) (local.set $r (i32.add @@ -735,7 +735,7 @@ (local.get $t) ) ) - (func $switch-def (; 13 ;) (type $5) (param $i3 i32) (result i32) + (func $switch-def (; 13 ;) (param $i3 i32) (result i32) (local $i1 i32) (local.set $i1 (i32.const 10) @@ -754,7 +754,7 @@ (local.get $i1) ) ) - (func $no-out-of-label (; 14 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $no-out-of-label (; 14 ;) (param $x i32) (param $y i32) (nop) (local.set $x (loop $moar (result i32) @@ -781,7 +781,7 @@ (local.get $y) ) ) - (func $freetype-cd (; 15 ;) (type $5) (param $a i32) (result i32) + (func $freetype-cd (; 15 ;) (param $a i32) (result i32) (local $e i32) (nop) (local.tee $a @@ -809,7 +809,7 @@ ) ) ) - (func $drop-if-value (; 16 ;) (type $FUNCSIG$iiii) (param $x i32) (param $y i32) (param $z i32) (result i32) + (func $drop-if-value (; 16 ;) (param $x i32) (param $y i32) (param $z i32) (result i32) (local $temp i32) (drop (if (result i32) @@ -837,7 +837,7 @@ (i32.const 0) ) ) - (func $drop-br_if (; 17 ;) (type $FUNCSIG$iiii) (param $label i32) (param $$cond2 i32) (param $$$0151 i32) (result i32) + (func $drop-br_if (; 17 ;) (param $label i32) (param $$cond2 i32) (param $$$0151 i32) (result i32) (nop) (local.tee $label (block $label$break$L4 (result i32) @@ -869,7 +869,7 @@ ) ) ) - (func $drop-tee-unreachable (; 18 ;) (type $FUNCSIG$v) + (func $drop-tee-unreachable (; 18 ;) (local $x i32) (local.tee $x (unreachable) @@ -878,7 +878,7 @@ (local.get $x) ) ) - (func $if-return-but-unreachable (; 19 ;) (type $FUNCSIG$vj) (param $var$0 i64) + (func $if-return-but-unreachable (; 19 ;) (param $var$0 i64) (if (unreachable) (drop @@ -889,7 +889,7 @@ ) ) ) - (func $if-one-side (; 20 ;) (type $FUNCSIG$i) (result i32) + (func $if-one-side (; 20 ;) (result i32) (local $x i32) (nop) (local.tee $x @@ -903,7 +903,7 @@ ) ) ) - (func $if-one-side-undo (; 21 ;) (type $FUNCSIG$i) (result i32) + (func $if-one-side-undo (; 21 ;) (result i32) (local $x i32) (local $y i32) (local.set $y @@ -921,7 +921,7 @@ ) (local.get $y) ) - (func $if-one-side-multi (; 22 ;) (type $5) (param $0 i32) (result i32) + (func $if-one-side-multi (; 22 ;) (param $0 i32) (result i32) (nop) (local.tee $0 (if (result i32) @@ -950,7 +950,7 @@ ) ) ) - (func $if-one-side-undo-but-its-a-tee (; 23 ;) (type $5) (param $0 i32) (result i32) + (func $if-one-side-undo-but-its-a-tee (; 23 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1029,7 +1029,7 @@ ) (i32.const 0) ) - (func $splittable-ifs-multicycle (; 24 ;) (type $5) (param $20 i32) (result i32) + (func $splittable-ifs-multicycle (; 24 ;) (param $20 i32) (result i32) (nop) (local.tee $20 (if (result i32) @@ -1047,7 +1047,7 @@ ) ) ) - (func $update-getCounter (; 25 ;) (type $FUNCSIG$diddfi) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f32) (param $4 i32) (result f64) + (func $update-getCounter (; 25 ;) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f32) (param $4 i32) (result f64) (global.set $global$0 (i32.sub (global.get $global$0) @@ -1116,24 +1116,22 @@ ) ) (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) - (type $4 (func (param i32))) - (type $5 (func (param i32) (result i32))) - (type $6 (func (param i32 i32 i32 i32 i32 i32))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$dii (func (param i32 i32) (result f64))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $f32_=>_none (func (param f32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_f64 (func (result f64))) + (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (import "fuzzing-support" "log1" (func $fimport$0 (result i32))) (import "fuzzing-support" "log2" (func $fimport$1 (param i32))) (import "fuzzing-support" "log3" (func $fimport$2 (param f32))) (memory $0 (shared 256 256)) (global $global$0 (mut i32) (i32.const 10)) - (func $nonatomics (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $nonatomics (; 3 ;) (result i32) (local $x i32) (nop) (drop @@ -1145,7 +1143,7 @@ (i32.const 1024) ) ) - (func $nonatomic-growmem (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $nonatomic-growmem (; 4 ;) (result i32) (local $x i32) (local.set $x (i32.load @@ -1161,7 +1159,7 @@ ) (local.get $x) ) - (func $atomics (; 5 ;) (type $FUNCSIG$v) + (func $atomics (; 5 ;) (local $x i32) (local.set $x (i32.atomic.load @@ -1177,7 +1175,7 @@ (local.get $x) ) ) - (func $one-atomic (; 6 ;) (type $FUNCSIG$v) + (func $one-atomic (; 6 ;) (local $x i32) (local.set $x (i32.load @@ -1193,7 +1191,7 @@ (local.get $x) ) ) - (func $other-atomic (; 7 ;) (type $FUNCSIG$v) + (func $other-atomic (; 7 ;) (local $x i32) (local.set $x (i32.atomic.load @@ -1209,7 +1207,7 @@ (local.get $x) ) ) - (func $atomic-growmem (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $atomic-growmem (; 8 ;) (result i32) (local $x i32) (local.set $x (i32.load @@ -1225,7 +1223,7 @@ ) (local.get $x) ) - (func $atomicrmw (; 9 ;) (type $FUNCSIG$v) + (func $atomicrmw (; 9 ;) (local $x i32) (local.set $x (i32.atomic.rmw.add @@ -1242,7 +1240,7 @@ (local.get $x) ) ) - (func $atomic-cmpxchg (; 10 ;) (type $FUNCSIG$v) + (func $atomic-cmpxchg (; 10 ;) (local $x i32) (local.set $x (i32.atomic.rmw.cmpxchg @@ -1260,7 +1258,7 @@ (local.get $x) ) ) - (func $br-value-reordering (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $br-value-reordering (; 11 ;) (result i32) (local $temp i32) (block $outside (loop $loop @@ -1283,7 +1281,7 @@ ) (unreachable) ) - (func $br-value-reordering-safe (; 12 ;) (type $FUNCSIG$i) (result i32) + (func $br-value-reordering-safe (; 12 ;) (result i32) (local $temp i32) (local.set $temp (block $outside (result i32) @@ -1309,7 +1307,7 @@ ) (unreachable) ) - (func $if-one-side-unreachable (; 13 ;) (type $FUNCSIG$v) + (func $if-one-side-unreachable (; 13 ;) (local $x i32) (block $out (drop @@ -1345,7 +1343,7 @@ ) ) ) - (func $if-one-side-unreachable-blocks (; 14 ;) (type $FUNCSIG$v) + (func $if-one-side-unreachable-blocks (; 14 ;) (local $x i32) (local $y i32) (block $out @@ -1404,7 +1402,7 @@ ) ) ) - (func $loop-value (; 15 ;) (type $5) (param $x i32) (result i32) + (func $loop-value (; 15 ;) (param $x i32) (result i32) (loop $loopy (unreachable) ) @@ -1414,7 +1412,7 @@ (i32.const 1) ) ) - (func $loop-loop-loopy-value (; 16 ;) (type $5) (param $x i32) (result i32) + (func $loop-loop-loopy-value (; 16 ;) (param $x i32) (result i32) (nop) (loop $loopy1 (result i32) (nop) @@ -1427,7 +1425,7 @@ ) ) ) - (func $loop-modified-during-main-pass-be-careful-fuzz (; 17 ;) (type $FUNCSIG$i) (result i32) + (func $loop-modified-during-main-pass-be-careful-fuzz (; 17 ;) (result i32) (local $0 i32) (nop) (if (result i32) @@ -1444,11 +1442,11 @@ ) ) ) - (func $loop-later (; 18 ;) (type $FUNCSIG$iiiiii) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (param $var$3 i32) (param $var$4 i32) (result i32) + (func $loop-later (; 18 ;) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (param $var$3 i32) (param $var$4 i32) (result i32) (nop) (i32.const 0) ) - (func $pick (; 19 ;) (type $FUNCSIG$v) + (func $pick (; 19 ;) (local $x i32) (local $y i32) (local.set $x @@ -1471,7 +1469,7 @@ (local.get $y) ) ) - (func $pick-2 (; 20 ;) (type $FUNCSIG$v) + (func $pick-2 (; 20 ;) (local $x i32) (local $y i32) (local.set $y @@ -1494,7 +1492,7 @@ (local.get $x) ) ) - (func $many (; 21 ;) (type $FUNCSIG$v) + (func $many (; 21 ;) (local $x i32) (local $y i32) (local $z i32) @@ -1565,7 +1563,7 @@ (local.get $x) ) ) - (func $loop-copies (; 22 ;) (type $FUNCSIG$vii) (param $x i32) (param $y i32) + (func $loop-copies (; 22 ;) (param $x i32) (param $y i32) (loop $loop (nop) (drop @@ -1576,7 +1574,7 @@ ) ) ) - (func $proper-type (; 23 ;) (type $FUNCSIG$d) (result f64) + (func $proper-type (; 23 ;) (result f64) (local $var$0 i32) (local $var$2 f64) (local.set $var$0 @@ -1588,7 +1586,7 @@ ) (local.get $var$2) ) - (func $multi-pass-get-equivs-right (; 24 ;) (type $FUNCSIG$dii) (param $var$0 i32) (param $var$1 i32) (result f64) + (func $multi-pass-get-equivs-right (; 24 ;) (param $var$0 i32) (param $var$1 i32) (result f64) (local $var$2 i32) (nop) (i32.store @@ -1601,7 +1599,7 @@ ) ) ) - (func $if-value-structure-equivalent (; 25 ;) (type $5) (param $x i32) (result i32) + (func $if-value-structure-equivalent (; 25 ;) (param $x i32) (result i32) (local $y i32) (nop) (local.tee $x @@ -1621,7 +1619,7 @@ ) ) ) - (func $set-tee-need-one-of-them (; 26 ;) (type $FUNCSIG$iii) (param $var$0 i32) (param $var$1 i32) (result i32) + (func $set-tee-need-one-of-them (; 26 ;) (param $var$0 i32) (param $var$1 i32) (result i32) (local $var$2 i32) (local $var$3 i32) (local.set $var$2 @@ -1634,7 +1632,7 @@ ) (local.get $var$2) ) - (func $loop-value-harder (; 27 ;) (type $FUNCSIG$i) (result i32) + (func $loop-value-harder (; 27 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1689,7 +1687,7 @@ (i32.const -5417091) ) ) - (func $tee-chain (; 28 ;) (type $FUNCSIG$iiiiii) (param $x i32) (param $z i32) (param $t1 i32) (param $t2 i32) (param $t3 i32) (result i32) + (func $tee-chain (; 28 ;) (param $x i32) (param $z i32) (param $t1 i32) (param $t2 i32) (param $t3 i32) (result i32) (nop) (drop (i32.const 10) @@ -1720,10 +1718,10 @@ ) ) (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 256 256) (data passive "hello, there!") - (func $memory-init-load (; 0 ;) (type $FUNCSIG$v) + (func $memory-init-load (; 0 ;) (local $x i32) (local.set $x (i32.load @@ -1739,7 +1737,7 @@ (local.get $x) ) ) - (func $memory-init-store (; 1 ;) (type $FUNCSIG$v) + (func $memory-init-store (; 1 ;) (local $x i32) (local.set $x (block $block (result i32) @@ -1759,7 +1757,7 @@ (local.get $x) ) ) - (func $memory-copy-load (; 2 ;) (type $FUNCSIG$v) + (func $memory-copy-load (; 2 ;) (local $x i32) (local.set $x (i32.load @@ -1775,7 +1773,7 @@ (local.get $x) ) ) - (func $memory-copy-store (; 3 ;) (type $FUNCSIG$v) + (func $memory-copy-store (; 3 ;) (local $x i32) (local.set $x (block $block (result i32) @@ -1795,7 +1793,7 @@ (local.get $x) ) ) - (func $memory-fill-load (; 4 ;) (type $FUNCSIG$v) + (func $memory-fill-load (; 4 ;) (local $x i32) (local.set $x (i32.load @@ -1811,7 +1809,7 @@ (local.get $x) ) ) - (func $memory-fill-store (; 5 ;) (type $FUNCSIG$v) + (func $memory-fill-store (; 5 ;) (local $x i32) (local.set $x (block $block (result i32) @@ -1831,7 +1829,7 @@ (local.get $x) ) ) - (func $data-drop-load (; 6 ;) (type $FUNCSIG$v) + (func $data-drop-load (; 6 ;) (local $x i32) (nop) (data.drop 0) @@ -1841,7 +1839,7 @@ ) ) ) - (func $data-drop-store (; 7 ;) (type $FUNCSIG$v) + (func $data-drop-store (; 7 ;) (local $x i32) (local.set $x (block $block (result i32) @@ -1857,7 +1855,7 @@ (local.get $x) ) ) - (func $data-drop-memory-init (; 8 ;) (type $FUNCSIG$v) + (func $data-drop-memory-init (; 8 ;) (local $x i32) (local.set $x (block $block (result i32) diff --git a/test/passes/souperify.txt b/test/passes/souperify.txt index 657f6e523..a7dcf9edd 100644 --- a/test/passes/souperify.txt +++ b/test/passes/souperify.txt @@ -8,8 +8,8 @@ pc %1 1:i1 infer %0 (module - (type $FUNCSIG$v (func)) - (func $if-loop-test (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $if-loop-test (; 0 ;) (local $0 i32) (if (i32.const 0) diff --git a/test/passes/spill-pointers.txt b/test/passes/spill-pointers.txt index 8ad136ee3..db84af42d 100644 --- a/test/passes/spill-pointers.txt +++ b/test/passes/spill-pointers.txt @@ -1,26 +1,26 @@ (module - (type $ii (func (param i32 i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vd (func (param f64))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_none (func (param i32))) + (type $f64_=>_none (func (param f64))) (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32)) (import "env" "segfault" (func $segfault (param i32))) (memory $0 10) (table $0 1 1 funcref) (global $stack_ptr (mut i32) (global.get $STACKTOP$asm2wasm$import)) - (func $nothing (; 1 ;) (type $FUNCSIG$v) + (func $nothing (; 1 ;) (nop) ) - (func $not-alive (; 2 ;) (type $FUNCSIG$v) + (func $not-alive (; 2 ;) (local $x i32) (local.set $x (i32.const 1) ) (call $nothing) ) - (func $spill (; 3 ;) (type $FUNCSIG$v) + (func $spill (; 3 ;) (local $x i32) (local $1 i32) (local.set $1 @@ -48,7 +48,7 @@ (local.get $1) ) ) - (func $ignore-non-pointers (; 4 ;) (type $FUNCSIG$v) + (func $ignore-non-pointers (; 4 ;) (local $x i32) (local $y i64) (local $z f32) @@ -100,7 +100,7 @@ (local.get $4) ) ) - (func $spill4 (; 5 ;) (type $FUNCSIG$v) + (func $spill4 (; 5 ;) (local $x i32) (local $y i32) (local $z i32) @@ -164,7 +164,7 @@ (local.get $4) ) ) - (func $spill5 (; 6 ;) (type $FUNCSIG$v) + (func $spill5 (; 6 ;) (local $x i32) (local $y i32) (local $z i32) @@ -239,7 +239,7 @@ (local.get $5) ) ) - (func $some-alive (; 7 ;) (type $FUNCSIG$v) + (func $some-alive (; 7 ;) (local $x i32) (local $y i32) (local $2 i32) @@ -268,7 +268,7 @@ (local.get $2) ) ) - (func $spill-args (; 8 ;) (type $ii) (param $p i32) (param $q i32) + (func $spill-args (; 8 ;) (param $p i32) (param $q i32) (local $x i32) (local $3 i32) (local $4 i32) @@ -307,7 +307,7 @@ (local.get $3) ) ) - (func $spill-ret (; 9 ;) (type $FUNCSIG$i) (result i32) + (func $spill-ret (; 9 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -367,7 +367,7 @@ ) (local.get $4) ) - (func $spill-unreachable (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $spill-unreachable (; 10 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -400,10 +400,10 @@ ) (local.get $2) ) - (func $spill-call-call0 (; 11 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $spill-call-call0 (; 11 ;) (param $p i32) (result i32) (unreachable) ) - (func $spill-call-call1 (; 12 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $spill-call-call1 (; 12 ;) (param $p i32) (result i32) (local $x i32) (local $2 i32) (local $3 i32) @@ -453,7 +453,7 @@ ) (local.get $5) ) - (func $spill-call-ret (; 13 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $spill-call-ret (; 13 ;) (param $p i32) (result i32) (local $x i32) (drop (call $spill-call-call0 @@ -464,7 +464,7 @@ ) (i32.const 0) ) - (func $spill-ret-call (; 14 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $spill-ret-call (; 14 ;) (param $p i32) (result i32) (local $x i32) (drop (return @@ -475,7 +475,7 @@ ) (i32.const 0) ) - (func $spill-ret-ret (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $spill-ret-ret (; 15 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -529,7 +529,7 @@ ) (local.get $3) ) - (func $spill-call-othertype (; 16 ;) (type $FUNCSIG$vd) (param $y f64) + (func $spill-call-othertype (; 16 ;) (param $y f64) (local $x i32) (local $2 i32) (local $3 f64) @@ -563,7 +563,7 @@ (local.get $2) ) ) - (func $spill-call_indirect (; 17 ;) (type $FUNCSIG$v) + (func $spill-call_indirect (; 17 ;) (local $x i32) (local $1 i32) (local $2 i32) @@ -593,7 +593,7 @@ (local.get $1) (local.get $x) ) - (call_indirect (type $ii) + (call_indirect (type $i32_i32_=>_none) (local.get $2) (local.get $3) (local.get $4) @@ -607,7 +607,7 @@ (local.get $1) ) ) - (func $spill-call_import (; 18 ;) (type $FUNCSIG$v) + (func $spill-call_import (; 18 ;) (local $x i32) (local $1 i32) (local $2 i32) @@ -643,31 +643,31 @@ ) ) (module - (type $ii (func (param i32 i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vd (func (param f64))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_none (func (param i32))) + (type $f64_=>_none (func (param f64))) (import "env" "segfault" (func $segfault (param i32))) (memory $0 10) (table $0 1 1 funcref) (global $stack_ptr (mut i32) (i32.const 1716592)) (export "stackSave" (func $stack_save)) - (func $stack_save (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $stack_save (; 1 ;) (result i32) (global.get $stack_ptr) ) - (func $nothing (; 2 ;) (type $FUNCSIG$v) + (func $nothing (; 2 ;) (nop) ) - (func $not-alive (; 3 ;) (type $FUNCSIG$v) + (func $not-alive (; 3 ;) (local $x i32) (local.set $x (i32.const 1) ) (call $nothing) ) - (func $spill (; 4 ;) (type $FUNCSIG$v) + (func $spill (; 4 ;) (local $x i32) (local $1 i32) (local.set $1 @@ -695,7 +695,7 @@ (local.get $1) ) ) - (func $ignore-non-pointers (; 5 ;) (type $FUNCSIG$v) + (func $ignore-non-pointers (; 5 ;) (local $x i32) (local $y i64) (local $z f32) @@ -747,7 +747,7 @@ (local.get $4) ) ) - (func $spill4 (; 6 ;) (type $FUNCSIG$v) + (func $spill4 (; 6 ;) (local $x i32) (local $y i32) (local $z i32) @@ -811,7 +811,7 @@ (local.get $4) ) ) - (func $spill5 (; 7 ;) (type $FUNCSIG$v) + (func $spill5 (; 7 ;) (local $x i32) (local $y i32) (local $z i32) @@ -886,7 +886,7 @@ (local.get $5) ) ) - (func $some-alive (; 8 ;) (type $FUNCSIG$v) + (func $some-alive (; 8 ;) (local $x i32) (local $y i32) (local $2 i32) @@ -915,7 +915,7 @@ (local.get $2) ) ) - (func $spill-args (; 9 ;) (type $ii) (param $p i32) (param $q i32) + (func $spill-args (; 9 ;) (param $p i32) (param $q i32) (local $x i32) (local $3 i32) (local $4 i32) @@ -954,7 +954,7 @@ (local.get $3) ) ) - (func $spill-ret (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $spill-ret (; 10 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -1014,7 +1014,7 @@ ) (local.get $4) ) - (func $spill-unreachable (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $spill-unreachable (; 11 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -1047,10 +1047,10 @@ ) (local.get $2) ) - (func $spill-call-call0 (; 12 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $spill-call-call0 (; 12 ;) (param $p i32) (result i32) (unreachable) ) - (func $spill-call-call1 (; 13 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $spill-call-call1 (; 13 ;) (param $p i32) (result i32) (local $x i32) (local $2 i32) (local $3 i32) @@ -1100,7 +1100,7 @@ ) (local.get $5) ) - (func $spill-call-ret (; 14 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $spill-call-ret (; 14 ;) (param $p i32) (result i32) (local $x i32) (drop (call $spill-call-call0 @@ -1111,7 +1111,7 @@ ) (i32.const 0) ) - (func $spill-ret-call (; 15 ;) (type $FUNCSIG$ii) (param $p i32) (result i32) + (func $spill-ret-call (; 15 ;) (param $p i32) (result i32) (local $x i32) (drop (return @@ -1122,7 +1122,7 @@ ) (i32.const 0) ) - (func $spill-ret-ret (; 16 ;) (type $FUNCSIG$i) (result i32) + (func $spill-ret-ret (; 16 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -1176,7 +1176,7 @@ ) (local.get $3) ) - (func $spill-call-othertype (; 17 ;) (type $FUNCSIG$vd) (param $y f64) + (func $spill-call-othertype (; 17 ;) (param $y f64) (local $x i32) (local $2 i32) (local $3 f64) @@ -1210,7 +1210,7 @@ (local.get $2) ) ) - (func $spill-call_indirect (; 18 ;) (type $FUNCSIG$v) + (func $spill-call_indirect (; 18 ;) (local $x i32) (local $1 i32) (local $2 i32) @@ -1240,7 +1240,7 @@ (local.get $1) (local.get $x) ) - (call_indirect (type $ii) + (call_indirect (type $i32_i32_=>_none) (local.get $2) (local.get $3) (local.get $4) @@ -1254,7 +1254,7 @@ (local.get $1) ) ) - (func $spill-call_import (; 19 ;) (type $FUNCSIG$v) + (func $spill-call_import (; 19 ;) (local $x i32) (local $1 i32) (local $2 i32) diff --git a/test/passes/ssa-nomerge_enable-simd.txt b/test/passes/ssa-nomerge_enable-simd.txt index 7674e0626..d74c91260 100644 --- a/test/passes/ssa-nomerge_enable-simd.txt +++ b/test/passes/ssa-nomerge_enable-simd.txt @@ -1,10 +1,10 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$v (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) (memory $0 1 1) (global $global$0 (mut i32) (i32.const 1)) - (func $basics (; 0 ;) (type $FUNCSIG$vi) (param $x i32) + (func $basics (; 0 ;) (param $x i32) (local $y i32) (local $z f32) (local $w i64) @@ -49,7 +49,7 @@ (local.get $7) ) ) - (func $if (; 1 ;) (type $FUNCSIG$vi) (param $p i32) + (func $if (; 1 ;) (param $p i32) (local $x i32) (local $y i32) (local $3 i32) @@ -128,7 +128,7 @@ (local.get $x) ) ) - (func $if2 (; 2 ;) (type $FUNCSIG$vi) (param $x i32) + (func $if2 (; 2 ;) (param $x i32) (if (i32.const 1) (block $block @@ -144,7 +144,7 @@ (local.get $x) ) ) - (func $nomerge (; 3 ;) (type $FUNCSIG$vii) (param $p i32) (param $q i32) + (func $nomerge (; 3 ;) (param $p i32) (param $q i32) (local $x i32) (local $3 i32) (local $4 i32) @@ -201,7 +201,7 @@ (local.get $x) ) ) - (func $simd-zero (; 4 ;) (type $FUNCSIG$v) + (func $simd-zero (; 4 ;) (local $0 v128) (v128.store align=4 (i32.const 0) diff --git a/test/passes/ssa_enable-threads.txt b/test/passes/ssa_enable-threads.txt index 09029195a..619c44d46 100644 --- a/test/passes/ssa_enable-threads.txt +++ b/test/passes/ssa_enable-threads.txt @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) (global $global$0 (mut i32) (i32.const 1)) - (func $basics (; 0 ;) (type $FUNCSIG$vi) (param $x i32) + (func $basics (; 0 ;) (param $x i32) (local $y i32) (local $z f32) (local $w i64) @@ -48,7 +48,7 @@ (local.get $7) ) ) - (func $if (; 1 ;) (type $FUNCSIG$vi) (param $p i32) + (func $if (; 1 ;) (param $p i32) (local $x i32) (local $y i32) (local $3 i32) @@ -168,7 +168,7 @@ ) ) ) - (func $if2 (; 2 ;) (type $FUNCSIG$vi) (param $x i32) + (func $if2 (; 2 ;) (param $x i32) (local $1 i32) (local $2 i32) (local.set $2 @@ -193,7 +193,7 @@ ) ) ) - (func $block (; 3 ;) (type $FUNCSIG$vi) (param $x i32) + (func $block (; 3 ;) (param $x i32) (local $1 i32) (local $2 i32) (local.set $2 @@ -215,7 +215,7 @@ ) ) ) - (func $block2 (; 4 ;) (type $FUNCSIG$vi) (param $x i32) + (func $block2 (; 4 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -315,7 +315,7 @@ (local.get $6) ) ) - (func $loop (; 5 ;) (type $FUNCSIG$vi) (param $x i32) + (func $loop (; 5 ;) (param $x i32) (local $1 i32) (local $2 i32) (local.set $2 @@ -343,7 +343,7 @@ ) ) ) - (func $loop2 (; 6 ;) (type $FUNCSIG$vi) (param $x i32) + (func $loop2 (; 6 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -391,7 +391,7 @@ ) ) ) - (func $loop2-zeroinit (; 7 ;) (type $FUNCSIG$v) + (func $loop2-zeroinit (; 7 ;) (local $x i32) (local $1 i32) (local $2 i32) @@ -435,7 +435,7 @@ (local.get $3) ) ) - (func $real-loop (; 8 ;) (type $FUNCSIG$vi) (param $param i32) + (func $real-loop (; 8 ;) (param $param i32) (local $loopvar i32) (local $inc i32) (local $3 i32) @@ -475,7 +475,7 @@ (local.get $6) ) ) - (func $real-loop-outblock (; 9 ;) (type $FUNCSIG$vi) (param $param i32) + (func $real-loop-outblock (; 9 ;) (param $param i32) (local $loopvar i32) (local $inc i32) (local $3 i32) @@ -515,7 +515,7 @@ (local.get $6) ) ) - (func $loop-loop-param (; 10 ;) (type $FUNCSIG$vi) (param $param i32) + (func $loop-loop-param (; 10 ;) (param $param i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -559,7 +559,7 @@ ) ) ) - (func $loop-loop-param-nomerge (; 11 ;) (type $FUNCSIG$vi) (param $param i32) + (func $loop-loop-param-nomerge (; 11 ;) (param $param i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -592,7 +592,7 @@ ) ) ) - (func $loop-nesting (; 12 ;) (type $FUNCSIG$vi) (param $x i32) + (func $loop-nesting (; 12 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -645,7 +645,7 @@ ) ) ) - (func $loop-nesting-2 (; 13 ;) (type $FUNCSIG$vi) (param $x i32) + (func $loop-nesting-2 (; 13 ;) (param $x i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -700,7 +700,7 @@ ) ) ) - (func $func_6 (; 14 ;) (type $FUNCSIG$i) (result i32) + (func $func_6 (; 14 ;) (result i32) (local $result i32) (local $zero i32) (local $2 i32) @@ -734,7 +734,7 @@ (br $label$1) ) ) - (func $ssa-merge-tricky (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $ssa-merge-tricky (; 15 ;) (result i32) (local $var$0 i32) (local $var$1 i32) (local $2 i32) diff --git a/test/passes/ssa_fuzz-exec_enable-threads.txt b/test/passes/ssa_fuzz-exec_enable-threads.txt index be63a7243..b5cb47640 100644 --- a/test/passes/ssa_fuzz-exec_enable-threads.txt +++ b/test/passes/ssa_fuzz-exec_enable-threads.txt @@ -1,12 +1,11 @@ [fuzz-exec] calling func_0 [fuzz-exec] note result: func_0 => 16384 (module - (type $0 (func (result i32))) - (type $1 (func)) + (type $none_=>_i32 (func (result i32))) (memory $0 (shared 1 1)) (table $0 0 0 funcref) (export "func_0" (func $0)) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (local $var$0 i32) (local $var$1 i32) (local $var$2 i32) diff --git a/test/passes/strip-debug.bin.txt b/test/passes/strip-debug.bin.txt index 7160e69f2..cee9ed1fa 100644 --- a/test/passes/strip-debug.bin.txt +++ b/test/passes/strip-debug.bin.txt @@ -1,8 +1,8 @@ (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "__linear_memory" (memory $0 0)) (import "env" "__indirect_function_table" (table $timport$1 0 funcref)) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (local $0 i32) (local.set $0 (i32.const 1) diff --git a/test/passes/strip-dwarf.bin.txt b/test/passes/strip-dwarf.bin.txt index 2276090e7..bbd2d8f4a 100644 --- a/test/passes/strip-dwarf.bin.txt +++ b/test/passes/strip-dwarf.bin.txt @@ -1,9 +1,9 @@ (module - (type $0 (func (result i32))) - (type $1 (func (param i32) (result i32))) - (type $2 (func)) - (type $3 (func (param i32))) - (type $4 (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) (import "env" "__wasm_call_ctors" (func $fimport$0)) (import "env" "dlmalloc" (func $fimport$1 (param i32) (result i32))) (import "env" "dlfree" (func $fimport$2 (param i32))) @@ -24,7 +24,7 @@ (export "stackAlloc" (func $fimport$5)) (export "stackRestore" (func $fimport$6)) (export "__growWasmMemory" (func $fimport$7)) - (func $0 (; 8 ;) (type $0) (result i32) + (func $0 (; 8 ;) (result i32) (i32.const 1024) ) ;; custom section "sourceMappingURL", size 15 diff --git a/test/passes/strip-producers.bin.txt b/test/passes/strip-producers.bin.txt index dcc8ab9b4..e86d80b2e 100644 --- a/test/passes/strip-producers.bin.txt +++ b/test/passes/strip-producers.bin.txt @@ -1,8 +1,8 @@ (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "__linear_memory" (memory $0 0)) (import "env" "__indirect_function_table" (table $timport$1 0 funcref)) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (local $0 i32) (local.set $0 (i32.const 1) diff --git a/test/passes/translate-to-fuzz_all-features.txt b/test/passes/translate-to-fuzz_all-features.txt index 6ab202979..50c7658d8 100644 --- a/test/passes/translate-to-fuzz_all-features.txt +++ b/test/passes/translate-to-fuzz_all-features.txt @@ -1,15 +1,13 @@ (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vj (func (param i64))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vd (func (param f64))) - (type $FUNCSIG$vV (func (param v128))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$V (func (result v128))) - (type $FUNCSIG$fiff (func (param i32 f32 f32) (result f32))) - (type $FUNCSIG$ddfff (func (param f64 f32 f32 f32) (result f64))) - (type $FUNCSIG$fiV (func (param i32 v128) (result f32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i64_=>_none (func (param i64))) + (type $f32_=>_none (func (param f32))) + (type $f64_=>_none (func (param f64))) + (type $f64_f32_=>_none (func (param f64 f32))) + (type $v128_=>_none (func (param v128))) + (type $f64_i32_=>_v128 (func (param f64 i32) (result v128))) (import "fuzzing-support" "log-i32" (func $log-i32 (param i32))) (import "fuzzing-support" "log-i64" (func $log-i64 (param i64))) (import "fuzzing-support" "log-f32" (func $log-f32 (param f32))) @@ -17,8 +15,7 @@ (import "fuzzing-support" "log-v128" (func $log-v128 (param v128))) (memory $0 (shared 1 1)) (data (i32.const 0) "N\0fN\f5\f9\b1\ff\fa\eb\e5\fe\a7\ec\fb\fc\f4\a6\e4\ea\f0\ae\e3") - (table $0 4 4 funcref) - (elem (i32.const 0) $func_6 $func_6 $func_17 $func_17) + (table $0 0 funcref) (global $global$0 (mut i32) (i32.const 975663930)) (global $global$1 (mut i32) (i32.const 2066300474)) (global $global$2 (mut i64) (i64.const 20510)) @@ -28,17 +25,8 @@ (event $event$0 (attr 0) (param f64 f32)) (export "hashMemory" (func $hashMemory)) (export "memory" (memory $0)) - (export "func_7_invoker" (func $func_7_invoker)) - (export "func_9_invoker" (func $func_9_invoker)) - (export "func_11" (func $func_11)) - (export "func_12" (func $func_12)) - (export "func_14" (func $func_14)) - (export "func_15" (func $func_15)) - (export "func_15_invoker" (func $func_15_invoker)) - (export "func_17" (func $func_17)) - (export "func_17_invoker" (func $func_17_invoker)) (export "hangLimitInitializer" (func $hangLimitInitializer)) - (func $hashMemory (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $hashMemory (; 5 ;) (result i32) (local $0 i32) (local.set $0 (i32.const 5381) @@ -269,125 +257,15 @@ ) (local.get $0) ) - (func $func_6 (; 6 ;) (param $0 i64) (param $1 v128) (param $2 i64) (result f64) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (f64.const 4.615318461355401e-04) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 - (if - (if - (i32.eqz - (i32.atomic.load8_u offset=4 - (i32.and - (i32.const 6401) - (i32.const 15) - ) - ) - ) - (block $label$1 - (block $label$2 - (nop) - (nop) - ) - (return - (f64.const -4294967295) - ) - ) - (block $label$3 - (nop) - (return - (f64.const 16970) - ) - ) - ) - (block $label$4 - (br_if $label$4 - (i32.eqz - (i32.const 26420) - ) - ) - (nop) - ) - (block $label$5 - (nop) - (nop) - ) - ) - (return - (f64.const -1.1754943508222875e-38) - ) - ) - ) - (func $func_7 (; 7 ;) (param $0 i32) (result v128) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (v128.const i32x4 0x06800018 0x000017ff 0xde018aa0 0x71680e30) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (v128.const i32x4 0x43770000 0x5e0d1b1b 0xffffffbb 0xffffffe5) - ) - (func $func_7_invoker (; 8 ;) (type $FUNCSIG$v) - (drop - (call $func_7 - (i32.const 0) - ) - ) - (call $log-i32 - (call $hashMemory) - ) - (drop - (call $func_7 - (i32.const 0) - ) - ) - (drop - (call $func_7 - (i32.const -33554432) - ) - ) - ) - (func $func_9 (; 9 ;) (param $0 v128) (param $1 f32) (param $2 f32) (result i64) - (local $3 i64) - (local $4 v128) - (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i64) - (local $9 f32) - (local $10 i64) - (local $11 f64) - (local $12 i32) + (func $func_6 (; 6 ;) (result i32) + (local $0 i64) (block (if (i32.eqz (global.get $hangLimit) ) (return - (local.get $10) + (i32.const 1296977737) ) ) (global.set $hangLimit @@ -398,53 +276,21 @@ ) ) (block $label$0 - (call $log-i32 - (call $hashMemory) - ) + (nop) + (nop) (return - (i64.const -16777216) - ) - ) - ) - (func $func_9_invoker (; 10 ;) (type $FUNCSIG$v) - (drop - (call $func_9 - (v128.const i32x4 0xffb61517 0xffff8000 0xf000160f 0x0100007f) - (f32.const -4294967296) - (f32.const 358374752) - ) - ) - (drop - (call $func_9 - (v128.const i32x4 0x00000000 0xc0d00000 0x00000000 0x401c0000) - (f32.const 5681) - (f32.const 268435456) - ) - ) - (drop - (call $func_9 - (v128.const i32x4 0x00040000 0x00000000 0x00006869 0x00000000) - (f32.const -3402823466385288598117041e14) - (f32.const 2147483648) - ) - ) - (drop - (call $func_9 - (v128.const i32x4 0x00307f00 0x00bd6300 0x7809001d 0x01803c00) - (f32.const 25703) - (f32.const -4503599627370496) + (i32.const -4096) ) ) ) - (func $func_11 (; 11 ;) (type $FUNCSIG$V) (result v128) - (local $0 i64) + (func $func_7 (; 7 ;) (param $0 f64) (param $1 i32) (result v128) (block (if (i32.eqz (global.get $hangLimit) ) (return - (v128.const i32x4 0x00002342 0x01e864ff 0xe203e043 0xe2fe3408) + (v128.const i32x4 0xd6000000 0xfffffff4 0x00000000 0xbf800000) ) ) (global.set $hangLimit @@ -454,146 +300,138 @@ ) ) ) - (v128.const i32x4 0x00000b05 0x80000001 0x0000007f 0x00000b0b) - ) - (func $func_12 (; 12 ;) (type $FUNCSIG$fiff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32) - (local $3 f32) - (local $4 i64) - (local $5 i64) - (local $6 v128) - (local $7 i32) - (local $8 f32) - (local $9 f32) - (local $10 v128) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $9) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 (result f32) - (nop) - (loop $label$25 (result f32) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $9) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (local.tee $8 - (block $label$26 (result f32) - (local.tee $1 - (f32.const 1.1446596105595402e-28) + (block $label$0 (result v128) + (call $log-v128 + (br_if $label$0 + (loop $label$1 (result v128) + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0xe7010001 0xe5bb1b00 0x15001800 0x005d0001) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) ) - ) - ) - ) - ) - ) - (func $func_13 (; 13 ;) (result i64) - (local $0 i32) - (local $1 v128) - (local $2 i64) - (local $3 v128) - (local $4 f64) - (local $5 f32) - (local $6 i64) - (local $7 i64) - (local $8 f64) - (local $9 i64) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (i64.const -2) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 - (local.set $0 - (block $label$1 (result i32) - (local.set $0 - (loop $label$2 (result i32) - (block - (if - (i32.eqz - (global.get $hangLimit) + (block (result v128) + (loop $label$2 + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x00000000 0x405ac000 0x00000000 0x40448000) + ) ) - (return - (local.get $6) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) ) ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) + (block + (block $label$3 + (call $log-i32 + (i32.const -43) + ) + (call $log-i32 + (call $hashMemory) + ) ) - ) - ) - (block (result i32) - (block $label$3 - (local.set $5 - (loop $label$4 (result f32) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $6) + (br_if $label$2 + (if (result i32) + (if (result i32) + (block $label$4 + (call $log-i64 + (if (result i64) + (i32.eqz + (block $label$5 (result i32) + (block $label$6 + (nop) + (nop) + ) + (local.get $1) + ) + ) + (block $label$7 (result i64) + (call $log-v128 + (call $func_7 + (f64.const 404429336) + (local.tee $1 + (i32.const 128) + ) + ) + ) + (i64.const -131072) + ) + (block $label$8 + (call $log-i64 + (i64.const 4294967230) + ) + (br $label$2) + ) + ) ) + (br $label$2) ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) + (block $label$9 (result i32) + (br_if $label$1 + (i32.eqz + (local.tee $1 + (br_if $label$9 + (i32.const 1364020300) + (i32.eqz + (local.tee $1 + (br_if $label$9 + (loop $label$10 (result i32) + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x0000084d 0x00000000 0x00000001 0x00000000) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (i32.const 151324422) + ) + (i32.eqz + (i32.const 65535) + ) + ) + ) + ) + ) + ) + ) ) - ) - ) - (local.get $5) - ) - ) - (br_if $label$2 - (i32.eqz - (local.tee $0 - (local.tee $0 - (local.tee $0 - (loop $label$8 (result i32) + (select + (local.get $1) + (i32.const -124) + (loop $label$11 (block (if (i32.eqz (global.get $hangLimit) ) (return - (i64.const -49) + (v128.const i32x4 0x5f5f5f5f 0xd2800000 0x59595959 0x469e9800) ) ) (global.set $hangLimit @@ -603,376 +441,589 @@ ) ) ) - (block $label$9 (result i32) - (local.set $0 - (if (result i32) - (i32.eqz - (br_if $label$1 - (local.get $0) - (i32.const 336817427) + (block + (block $label$12 + (loop $label$13 + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x00000040 0x00000000 0x80000001 0x00000000) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) ) ) - (block $label$10 - (call $log-f32 - (local.get $5) + (block $label$14 + (call $log-v128 + (v128.const i32x4 0xffea0000 0x0020ff80 0x50590000 0x1c002e39) ) - (br $label$8) ) - (local.tee $0 - (i32.const -2147483648) + ) + (call $log-f32 + (f32.const 35766419849216) + ) + ) + (br_if $label$11 + (br_if $label$9 + (local.tee $1 + (i32.const -14) + ) + (local.tee $1 + (local.tee $1 + (i32.const -67108864) + ) + ) + ) + ) + (if + (local.tee $1 + (local.tee $1 + (i32.const -32766) + ) + ) + (block $label$15 + (nop) + (br $label$11) + ) + (block $label$16 + (loop $label$17 + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x00000001 0xffffffff 0xffffffeb 0xffffffff) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (block + (block $label$18 + (call $log-i32 + (local.tee $1 + (local.get $1) + ) + ) + (br_if $label$17 + (local.tee $1 + (loop $label$19 (result i32) + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x05090b0a 0x06080f09 0x00007f63 0x80000000) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (block (result i32) + (call $log-i64 + (i64.const -28) + ) + (br_if $label$19 + (local.tee $1 + (local.get $1) + ) + ) + (i32.const -5) + ) + ) + ) + ) + ) + (br_if $label$17 + (local.tee $1 + (local.get $1) + ) + ) + (call $log-i32 + (call $hashMemory) + ) + ) ) + (br $label$1) ) ) - (i32.const 32767) ) ) ) ) + (block $label$20 + (nop) + (br $label$2) + ) ) - ) - ) - ) - (br_if $label$2 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (i32.atomic.load offset=4 - (i32.and - (local.get $0) - (i32.const 15) + (block $label$21 (result i32) + (call $log-i64 + (if (result i64) + (if (result i32) + (loop $label$22 + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x641a061c 0x0000151a 0xffffff81 0x14071e1b) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (block $label$23 + (call $log-i32 + (block $label$24 (result i32) + (nop) + (loop $label$25 (result i32) + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x40000000 0x4f000000 0x477fe400 0x4694b200) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (block (result i32) + (nop) + (br_if $label$25 + (i32.const 31097) + ) + (call $func_6) + ) + ) + ) + ) + (br $label$2) + ) + ) + (block $label$26 + (loop $label$27 + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0xffffffa2 0x0e0f0e09 0x0000007f 0x116f110d) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (block + (block $label$28 + (call $log-i32 + (call $hashMemory) + ) + (call $log-i64 + (i64.const -4194304) + ) + ) + (br_if $label$27 + (i32.eqz + (i32.const 2147483647) + ) + ) + (nop) + ) + ) + (br $label$2) + ) + (block $label$29 (result i32) + (call $log-f64 + (f64.const 8.697524797146243e-275) + ) + (i32.const 262144) + ) + ) + (block $label$30 + (call $log-i64 + (i64.const -24) + ) + (br $label$2) + ) + (i64.mul + (i64.const 10797) + (i64.const 4190383344442562905) ) ) ) - ) - ) - ) - ) - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (i32.atomic.load offset=4 - (i32.and - (i32.and - (local.get $0) - (i32.const 15) + (br_if $label$21 + (local.tee $1 + (loop $label$35 (result i32) + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x1d131913 0x00000000 0x00000000 0x00004000) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (if (result i32) + (i32.eqz + (local.get $1) + ) + (block $label$36 (result i32) + (call $log-i64 + (i64.const 3079) + ) + (i32.const 24684) + ) + (local.tee $1 + (i32.const 2048) + ) + ) + ) + ) + (i32.eqz + (br_if $label$21 + (block $label$32 (result i32) + (call $log-f64 + (local.tee $0 + (local.tee $0 + (f64.const 1900100968416013050458753e112) + ) + ) + ) + (i16x8.extract_lane_u 7 + (loop $label$33 (result v128) + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x1c171e11 0xfffc0000 0x00004d42 0xfc000000) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (loop $label$34 (result v128) + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x80000000 0x00008000 0x00000020 0x00800000) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (v128.const i32x4 0x00000000 0x43b00000 0x00000000 0xc0300000) ) - (i32.const 15) ) ) ) + (i32.eqz + (block $label$31 + (call $log-i32 + (call $hashMemory) + ) + (br $label$1) + ) + ) ) ) ) ) - ) - ) - ) - ) - ) - ) - (return - (local.get $6) - ) - ) - ) - (return - (local.get $9) - ) - ) - ) - (func $func_14 (; 14 ;) (type $FUNCSIG$ddfff) (param $0 f64) (param $1 f32) (param $2 f32) (param $3 f32) (result f64) - (local $4 i64) - (local $5 i64) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $0) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 (result f64) - (nop) - (local.get $0) - ) - ) - (func $func_15 (; 15 ;) (type $FUNCSIG$fiV) (param $0 i32) (param $1 v128) (result f32) - (local $2 v128) - (local $3 f32) - (local $4 v128) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $3) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 - (nop) - (return - (f32.const 1414878976) - ) - ) - ) - (func $func_15_invoker (; 16 ;) (type $FUNCSIG$v) - (drop - (call $func_15 - (i32.const -66) - (v128.const i32x4 0x1f1f151f 0x261e021e 0x00000000 0xc0300000) - ) - ) - ) - (func $func_17 (; 17 ;) (type $FUNCSIG$i) (result i32) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (i32.const 1349680251) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 - (loop $label$1 - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (i32.const 268435456) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block - (br_if $label$1 - (i32.eqz - (i32.const 2097152) - ) - ) - (nop) - (if - (i32.eqz - (i32.eqz - (i32.const 67372064) - ) - ) - (block $label$2 - (nop) - (br_if $label$1 - (i32.eqz - (i32.const 2097152) - ) - ) - ) - (if - (i32.eqz - (i32.const 925712176) - ) - (block $label$3 - (loop $label$4 - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (i32.const -67108864) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) + (block $label$37 + (if + (block $label$38 (result i32) + (call $log-f64 + (local.get $0) + ) + (local.tee $1 + (i32.const -116) + ) + ) + (call $log-i32 + (call $hashMemory) + ) + (block $label$39 + (call $log-i32 + (i32.const -1) + ) + (call $log-i32 + (call $hashMemory) + ) + ) + ) + (br $label$2) ) ) ) - (block - (nop) - (br_if $label$4 - (i32.eqz - (i32.const -17) - ) - ) - (br_if $label$1 - (i32.eqz - (i32.const 2097152) - ) - ) + (call $log-i64 + (i64.const 65481) ) ) ) (br_if $label$1 (i32.eqz - (i32.const 2097152) - ) - ) - ) - ) - ) - ) - (return - (i32.const 110) - ) - ) - ) - (func $func_17_invoker (; 18 ;) (type $FUNCSIG$v) - (drop - (call $func_17) - ) - (call $log-i32 - (call $hashMemory) - ) - ) - (func $func_19 (; 19 ;) (param $0 f32) (result f64) - (local $1 v128) - (local $2 i64) - (local $3 i64) - (local $4 f64) - (local $5 f32) - (local $6 v128) - (local $7 i32) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $4) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 (result f64) - (if (result f64) - (i32.eqz - (i32x4.extract_lane 1 - (block $label$1 (result v128) - (call $log-i64 - (i64.const 2) - ) - (local.tee $6 - (local.tee $1 - (v128.const i32x4 0x00000000 0x40b13f00 0x00000000 0x42c00000) - ) - ) - ) - ) - ) - (block $label$2 (result f64) - (block $label$3 - (call $log-v128 - (loop $label$4 (result v128) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (f64.const -17592186044416) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block (result v128) - (call $log-i32 - (call $hashMemory) - ) - (br_if $label$4 - (local.tee $7 - (block $label$5 (result i32) - (call $log-f32 - (local.tee $5 - (loop $label$6 (result f32) - (block - (if - (i32.eqz - (global.get $hangLimit) + (block $label$40 (result i32) + (drop + (block + (if + (i32.eqz + (block $label$46 + (call $log-i32 + (call $hashMemory) + ) + (block $label$47 + (call $log-v128 + (v128.const i32x4 0xfc000000 0x00000041 0x5e48481b 0x36703625) + ) + (br $label$1) + ) + ) + ) + (block $label$48 + (call $log-i64 + (loop $label$49 (result i64) + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x16590e16 0x17590d0e 0x00000000 0x41600000) + ) ) - (return - (local.get $4) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) ) ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) + (block $label$50 (result i64) + (i64.const -9223372036854775807) + ) + ) + ) + (br $label$1) + ) + (block $label$51 + (local.set $0 + (loop $label$52 (result f64) + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x8e997f88 0x00b56f00 0xff010000 0x02004300) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (block (result f64) + (call $log-f64 + (f64.const 128) + ) + (br_if $label$52 + (i32.eqz + (block $label$53 + (call $log-f64 + (f64.const 4.955179737724083e-183) + ) + (br $label$1) + ) + ) + ) + (local.tee $0 + (loop $label$54 (result f64) + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0x00040000 0x00000050 0x00010000 0xfffffff0) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (f64.const 1.1754943508222875e-38) + ) ) ) ) + ) + (br $label$1) + ) + ) + (br_if $label$40 + (block $label$45 (result i32) + (call $log-f64 (local.tee $0 - (local.tee $5 - (local.get $5) + (f64.const 1073741824) + ) + ) + (local.get $1) + ) + (i32.eqz + (br_if $label$40 + (local.tee $1 + (loop $label$44 (result i32) + (block + (if + (i32.eqz + (global.get $hangLimit) + ) + (return + (v128.const i32x4 0xff520000 0x55041a00 0x15807253 0x011be7a2) + ) + ) + (global.set $hangLimit + (i32.sub + (global.get $hangLimit) + (i32.const 1) + ) + ) + ) + (local.get $1) + ) + ) + (if + (i32.eqz + (block $label$41 + (nop) + (br $label$1) + ) + ) + (block $label$42 + (call $log-f32 + (f32.const 1162102144) + ) + (br $label$1) + ) + (block $label$43 + (call $log-v128 + (v128.const i32x4 0x00001d1c 0x00000000 0x00000000 0x00000000) + ) + (return + (v128.const i32x4 0x7fffc000 0x0000125f 0xff01444e 0x1d1d0b01) + ) ) ) ) ) ) - (i32.const -128) ) ) + (if (result i32) + (br_if $label$40 + (br_if $label$40 + (local.tee $1 + (local.get $1) + ) + (br_if $label$40 + (local.get $1) + (br_if $label$40 + (local.tee $1 + (local.tee $1 + (local.get $1) + ) + ) + (call $hashMemory) + ) + ) + ) + (block $label$55 (result i32) + (call $log-i32 + (call $hashMemory) + ) + (local.get $1) + ) + ) + (block $label$56 (result i32) + (call $log-f32 + (f32.const 18773) + ) + (i32.const 23632) + ) + (local.get $1) + ) ) - (local.get $1) ) ) + (v128.const i32x4 0xca000000 0x07101419 0x46b62a00 0xffffffe5) ) - (nop) ) - (f64.const -131072) - ) - (block $label$7 (result f64) - (local.get $4) + (i32.eqz + (i32.const 16719) + ) ) ) + (v128.const i32x4 0x1d735757 0xd9800000 0xffffffc5 0xc9800000) ) ) - (func $hangLimitInitializer (; 20 ;) + (func $hangLimitInitializer (; 8 ;) (global.set $hangLimit (i32.const 10) ) diff --git a/test/passes/translate-to-fuzz_no-fuzz-nans_all-features.txt b/test/passes/translate-to-fuzz_no-fuzz-nans_all-features.txt index 229b1edea..8c34a1384 100644 --- a/test/passes/translate-to-fuzz_no-fuzz-nans_all-features.txt +++ b/test/passes/translate-to-fuzz_no-fuzz-nans_all-features.txt @@ -1,16 +1,15 @@ (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vj (func (param i64))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vd (func (param f64))) - (type $FUNCSIG$vV (func (param v128))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$V (func (result v128))) - (type $FUNCSIG$fiff (func (param i32 f32 f32) (result f32))) - (type $FUNCSIG$ddfff (func (param f64 f32 f32 f32) (result f64))) - (type $FUNCSIG$fiV (func (param i32 v128) (result f32))) - (type $FUNCSIG$df (func (param f32) (result f64))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $i64_=>_none (func (param i64))) + (type $f32_=>_none (func (param f32))) + (type $f64_=>_none (func (param f64))) + (type $f64_f32_=>_none (func (param f64 f32))) + (type $v128_=>_none (func (param v128))) + (type $f32_=>_f32 (func (param f32) (result f32))) + (type $f64_=>_f64 (func (param f64) (result f64))) + (type $f64_i32_=>_v128 (func (param f64 i32) (result v128))) (import "fuzzing-support" "log-i32" (func $log-i32 (param i32))) (import "fuzzing-support" "log-i64" (func $log-i64 (param i64))) (import "fuzzing-support" "log-f32" (func $log-f32 (param f32))) @@ -18,8 +17,7 @@ (import "fuzzing-support" "log-v128" (func $log-v128 (param v128))) (memory $0 (shared 1 1)) (data (i32.const 0) "N\0fN\f5\f9\b1\ff\fa\eb\e5\fe\a7\ec\fb\fc\f4\a6\e4\ea\f0\ae\e3") - (table $0 6 6 funcref) - (elem (i32.const 0) $func_6 $func_6 $func_17 $func_17 $func_19 $func_19) + (table $0 0 0 funcref) (global $global$0 (mut i32) (i32.const 975663930)) (global $global$1 (mut i32) (i32.const 2066300474)) (global $global$2 (mut i64) (i64.const 20510)) @@ -29,18 +27,8 @@ (event $event$0 (attr 0) (param f64 f32)) (export "hashMemory" (func $hashMemory)) (export "memory" (memory $0)) - (export "func_7_invoker" (func $func_7_invoker)) - (export "func_9_invoker" (func $func_9_invoker)) - (export "func_11" (func $func_11)) - (export "func_12" (func $func_12)) - (export "func_14" (func $func_14)) - (export "func_15" (func $func_15)) - (export "func_15_invoker" (func $func_15_invoker)) - (export "func_17" (func $func_17)) - (export "func_17_invoker" (func $func_17_invoker)) - (export "func_19" (func $func_19)) (export "hangLimitInitializer" (func $hangLimitInitializer)) - (func $hashMemory (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $hashMemory (; 5 ;) (result i32) (local $0 i32) (local.set $0 (i32.const 5381) @@ -271,174 +259,7 @@ ) (local.get $0) ) - (func $func_6 (; 6 ;) (param $0 i64) (param $1 v128) (param $2 i64) (result f64) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (f64.const 4.615318461355401e-04) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 - (if - (if - (i32.eqz - (i32.atomic.load8_u offset=4 - (i32.and - (i32.const 6401) - (i32.const 15) - ) - ) - ) - (block $label$1 - (block $label$2 - (nop) - (nop) - ) - (return - (f64.const -4294967295) - ) - ) - (block $label$3 - (nop) - (return - (f64.const 16970) - ) - ) - ) - (block $label$4 - (br_if $label$4 - (i32.eqz - (i32.const 26420) - ) - ) - (nop) - ) - (block $label$5 - (nop) - (nop) - ) - ) - (return - (f64.const -1.1754943508222875e-38) - ) - ) - ) - (func $func_7 (; 7 ;) (param $0 i32) (result v128) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (v128.const i32x4 0x06800018 0x000017ff 0xde018aa0 0x71680e30) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (v128.const i32x4 0x43770000 0x5e0d1b1b 0x00000000 0x00000000) - ) - (func $func_7_invoker (; 8 ;) (type $FUNCSIG$v) - (drop - (call $func_7 - (i32.const 0) - ) - ) - (call $log-i32 - (call $hashMemory) - ) - (drop - (call $func_7 - (i32.const 0) - ) - ) - (drop - (call $func_7 - (i32.const -33554432) - ) - ) - ) - (func $func_9 (; 9 ;) (param $0 v128) (param $1 f32) (param $2 f32) (result i64) - (local $3 i64) - (local $4 v128) - (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i64) - (local $9 f32) - (local $10 i64) - (local $11 f64) - (local $12 i32) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $10) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 - (call $log-i32 - (call $hashMemory) - ) - (return - (i64.const -16777216) - ) - ) - ) - (func $func_9_invoker (; 10 ;) (type $FUNCSIG$v) - (drop - (call $func_9 - (v128.const i32x4 0xffb61517 0xffff8000 0xf000160f 0x0100007f) - (f32.const -4294967296) - (f32.const 358374752) - ) - ) - (drop - (call $func_9 - (v128.const i32x4 0x00000000 0xc0d00000 0x00000000 0x401c0000) - (f32.const 5681) - (f32.const 268435456) - ) - ) - (drop - (call $func_9 - (v128.const i32x4 0x00040000 0x00000000 0x00006869 0x00000000) - (f32.const -3402823466385288598117041e14) - (f32.const 2147483648) - ) - ) - (drop - (call $func_9 - (v128.const i32x4 0x00307f00 0x00bd6300 0x7809001d 0x01803c00) - (f32.const 25703) - (f32.const -4503599627370496) - ) - ) - ) - (func $func_11 (; 11 ;) (type $FUNCSIG$V) (result v128) + (func $func_6 (; 6 ;) (result i32) (local $0 i64) (block (if @@ -446,90 +267,7 @@ (global.get $hangLimit) ) (return - (v128.const i32x4 0x00002342 0x01e864ff 0xe203e043 0xe2fe3408) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (v128.const i32x4 0x00000b05 0x80000001 0x0000007f 0x00000b0b) - ) - (func $func_12 (; 12 ;) (type $FUNCSIG$fiff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32) - (local $3 f32) - (local $4 i64) - (local $5 i64) - (local $6 v128) - (local $7 i32) - (local $8 f32) - (local $9 f32) - (local $10 v128) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $9) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 (result f32) - (nop) - (loop $label$25 (result f32) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $9) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (local.tee $8 - (block $label$26 (result f32) - (local.tee $1 - (f32.const 1.1446596105595402e-28) - ) - ) - ) - ) - ) - ) - (func $func_13 (; 13 ;) (result i64) - (local $0 i32) - (local $1 v128) - (local $2 i64) - (local $3 v128) - (local $4 f64) - (local $5 f32) - (local $6 i64) - (local $7 i64) - (local $8 f64) - (local $9 i64) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (i64.const -2) + (i32.const 1296977737) ) ) (global.set $hangLimit @@ -540,343 +278,21 @@ ) ) (block $label$0 - (local.set $0 - (block $label$1 (result i32) - (local.set $0 - (loop $label$2 (result i32) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $6) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block (result i32) - (block $label$3 - (local.set $5 - (loop $label$4 (result f32) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $6) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (local.get $5) - ) - ) - (br_if $label$2 - (i32.eqz - (local.tee $0 - (local.tee $0 - (local.tee $0 - (loop $label$8 (result i32) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (i64.const -49) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$9 (result i32) - (local.set $0 - (if (result i32) - (i32.eqz - (br_if $label$1 - (local.get $0) - (i32.const 336817427) - ) - ) - (block $label$10 - (call $log-f32 - (local.get $5) - ) - (br $label$8) - ) - (local.tee $0 - (i32.const -2147483648) - ) - ) - ) - (i32.const 32767) - ) - ) - ) - ) - ) - ) - ) - ) - (br_if $label$2 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (i32.atomic.load offset=4 - (i32.and - (local.get $0) - (i32.const 15) - ) - ) - ) - ) - ) - ) - ) - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (local.tee $0 - (i32.atomic.load offset=4 - (i32.and - (i32.and - (local.get $0) - (i32.const 15) - ) - (i32.const 15) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) - (return - (local.get $6) - ) - ) - ) - (return - (local.get $9) - ) - ) - ) - (func $func_14 (; 14 ;) (type $FUNCSIG$ddfff) (param $0 f64) (param $1 f32) (param $2 f32) (param $3 f32) (result f64) - (local $4 i64) - (local $5 i64) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $0) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 (result f64) (nop) - (local.get $0) - ) - ) - (func $func_15 (; 15 ;) (type $FUNCSIG$fiV) (param $0 i32) (param $1 v128) (result f32) - (local $2 v128) - (local $3 f32) - (local $4 v128) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $3) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 (nop) (return - (f32.const 1414878976) - ) - ) - ) - (func $func_15_invoker (; 16 ;) (type $FUNCSIG$v) - (drop - (call $func_15 - (i32.const -66) - (v128.const i32x4 0x1f1f151f 0x261e021e 0x00000000 0xc0300000) - ) - ) - ) - (func $func_17 (; 17 ;) (type $FUNCSIG$i) (result i32) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (i32.const 1349680251) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block $label$0 - (loop $label$1 - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (i32.const 268435456) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block - (br_if $label$1 - (i32.eqz - (i32.const 2097152) - ) - ) - (nop) - (if - (i32.eqz - (i32.eqz - (i32.const 67372064) - ) - ) - (block $label$2 - (nop) - (br_if $label$1 - (i32.eqz - (i32.const 2097152) - ) - ) - ) - (if - (i32.eqz - (i32.const 925712176) - ) - (block $label$3 - (loop $label$4 - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (i32.const -67108864) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block - (nop) - (br_if $label$4 - (i32.eqz - (i32.const -17) - ) - ) - (br_if $label$1 - (i32.eqz - (i32.const 2097152) - ) - ) - ) - ) - ) - (br_if $label$1 - (i32.eqz - (i32.const 2097152) - ) - ) - ) - ) - ) - ) - (return - (i32.const 110) + (i32.const -4096) ) ) ) - (func $func_17_invoker (; 18 ;) (type $FUNCSIG$v) - (drop - (call $func_17) - ) - (call $log-i32 - (call $hashMemory) - ) - ) - (func $func_19 (; 19 ;) (type $FUNCSIG$df) (param $0 f32) (result f64) - (local $1 v128) - (local $2 i64) - (local $3 i64) - (local $4 f64) - (local $5 f32) - (local $6 v128) - (local $7 i32) + (func $func_7 (; 7 ;) (param $0 f64) (param $1 i32) (result v128) (block (if (i32.eqz (global.get $hangLimit) ) (return - (f64.const 288230376151711744) + (v128.const i32x4 0x00008048 0x6400ed00 0x00010101 0x264ec77c) ) ) (global.set $hangLimit @@ -886,102 +302,14 @@ ) ) ) - (block $label$0 (result f64) - (if (result f64) - (i32.eqz - (i32x4.extract_lane 1 - (block $label$1 (result v128) - (call $log-i64 - (i64.const 2) - ) - (local.tee $6 - (local.tee $1 - (v128.const i32x4 0x00000000 0x40b13f00 0x00000000 0x42c00000) - ) - ) - ) - ) - ) - (block $label$2 (result f64) - (block $label$3 - (call $log-v128 - (loop $label$4 (result v128) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (local.get $4) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (block (result v128) - (call $log-i32 - (call $hashMemory) - ) - (br_if $label$4 - (local.tee $7 - (block $label$5 (result i32) - (call $log-f32 - (local.tee $5 - (loop $label$6 (result f32) - (block - (if - (i32.eqz - (global.get $hangLimit) - ) - (return - (f64.const 18446744073709551615) - ) - ) - (global.set $hangLimit - (i32.sub - (global.get $hangLimit) - (i32.const 1) - ) - ) - ) - (local.tee $0 - (local.tee $5 - (local.get $5) - ) - ) - ) - ) - ) - (i32.const -96) - ) - ) - ) - (v128.const i32x4 0xfe000419 0x00138001 0x00001502 0xfffeffff) - ) - ) - ) - (local.set $5 - (local.get $5) - ) - ) - (f64.const 19788) - ) - (block $label$7 (result f64) - (f64.const 85090648) - ) - ) - ) + (v128.const i32x4 0x00000001 0x00000000 0xffffffed 0xffffffff) ) - (func $hangLimitInitializer (; 20 ;) + (func $hangLimitInitializer (; 8 ;) (global.set $hangLimit (i32.const 10) ) ) - (func $deNan32 (; 21 ;) (param $0 f32) (result f32) + (func $deNan32 (; 9 ;) (param $0 f32) (result f32) (if (result f32) (f32.eq (local.get $0) @@ -991,7 +319,7 @@ (f32.const 0) ) ) - (func $deNan64 (; 22 ;) (param $0 f64) (result f64) + (func $deNan64 (; 10 ;) (param $0 f64) (result f64) (if (result f64) (f64.eq (local.get $0) diff --git a/test/passes/trap-mode-clamp.txt b/test/passes/trap-mode-clamp.txt index 1ba06b773..3311cc565 100644 --- a/test/passes/trap-mode-clamp.txt +++ b/test/passes/trap-mode-clamp.txt @@ -1,8 +1,14 @@ (module - (type $FUNCSIG$vij (func (param i32 i64))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vd (func (param f64))) - (func $test_div (; 0 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $i32_i64_=>_none (func (param i32 i64))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) + (type $f32_=>_none (func (param f32))) + (type $f64_=>_none (func (param f64))) + (func $test_div (; 0 ;) (param $0 i32) (param $1 i64) (drop (call $i32s-div (local.get $0) @@ -28,7 +34,7 @@ ) ) ) - (func $test_rem (; 1 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $test_rem (; 1 ;) (param $0 i32) (param $1 i64) (drop (call $i32s-rem (local.get $0) @@ -54,7 +60,7 @@ ) ) ) - (func $test_f32_to_int (; 2 ;) (type $FUNCSIG$vf) (param $0 f32) + (func $test_f32_to_int (; 2 ;) (param $0 f32) (drop (call $f32-to-int (local.get $0) @@ -76,7 +82,7 @@ ) ) ) - (func $test_f64_to_int (; 3 ;) (type $FUNCSIG$vd) (param $0 f64) + (func $test_f64_to_int (; 3 ;) (param $0 f64) (drop (call $f64-to-int (local.get $0) diff --git a/test/passes/trap-mode-js.txt b/test/passes/trap-mode-js.txt index af632378a..9042f29b0 100644 --- a/test/passes/trap-mode-js.txt +++ b/test/passes/trap-mode-js.txt @@ -1,10 +1,14 @@ (module - (type $FUNCSIG$vij (func (param i32 i64))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vd (func (param f64))) - (type $FUNCSIG$id (func (param f64) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $i32_i64_=>_none (func (param i32 i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) + (type $f32_=>_none (func (param f32))) + (type $f64_=>_none (func (param f64))) + (type $f64_=>_i32 (func (param f64) (result i32))) (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) - (func $test_div (; 1 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $test_div (; 1 ;) (param $0 i32) (param $1 i64) (drop (call $i32s-div (local.get $0) @@ -30,7 +34,7 @@ ) ) ) - (func $test_rem (; 2 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $test_rem (; 2 ;) (param $0 i32) (param $1 i64) (drop (call $i32s-rem (local.get $0) @@ -56,7 +60,7 @@ ) ) ) - (func $test_f32_to_int (; 3 ;) (type $FUNCSIG$vf) (param $0 f32) + (func $test_f32_to_int (; 3 ;) (param $0 f32) (drop (call $f64-to-int (f64.promote_f32 @@ -82,7 +86,7 @@ ) ) ) - (func $test_f64_to_int (; 4 ;) (type $FUNCSIG$vd) (param $0 f64) + (func $test_f64_to_int (; 4 ;) (param $0 f64) (drop (call $f64-to-int (local.get $0) diff --git a/test/passes/untee.txt b/test/passes/untee.txt index 531c6e365..35f55a370 100644 --- a/test/passes/untee.txt +++ b/test/passes/untee.txt @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$v (func)) - (func $tee (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $tee (; 0 ;) (local $x i32) (local $y f64) (drop diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt index dbeddeb96..bf6596cac 100644 --- a/test/passes/vacuum.txt +++ b/test/passes/vacuum.txt @@ -1,17 +1,17 @@ (module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (result f32))) - (type $3 (func (result i32))) - (type $4 (func (param i32 f64 i32 i32))) - (type $FUNCSIG$d (func (result f64))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_f32 (func (result f32))) + (type $i32_f64_i32_i32_=>_none (func (param i32 f64 i32 i32))) + (type $none_=>_f64 (func (result f64))) (import "env" "int" (func $int (result i32))) (memory $0 256 256) (global $Int i32 (i32.const 0)) - (func $b (; 1 ;) (type $0) + (func $b (; 1 ;) (nop) ) - (func $l (; 2 ;) (type $0) + (func $l (; 2 ;) (local $x i32) (local $y i32) (local.set $x @@ -24,15 +24,15 @@ (local.get $y) ) ) - (func $loopy (; 3 ;) (type $1) (param $0 i32) + (func $loopy (; 3 ;) (param $0 i32) (nop) ) - (func $unary (; 4 ;) (type $2) (result f32) + (func $unary (; 4 ;) (result f32) (f32.abs (unreachable) ) ) - (func $binary (; 5 ;) (type $2) (result f32) + (func $binary (; 5 ;) (result f32) (drop (f32.add (unreachable) @@ -40,7 +40,7 @@ ) ) ) - (func $select (; 6 ;) (type $3) (result i32) + (func $select (; 6 ;) (result i32) (drop (select (unreachable) @@ -49,16 +49,16 @@ ) ) ) - (func $block-to-one (; 7 ;) (type $0) + (func $block-to-one (; 7 ;) (unreachable) ) - (func $recurse (; 8 ;) (type $0) + (func $recurse (; 8 ;) (nop) ) - (func $func-block (; 9 ;) (type $0) + (func $func-block (; 9 ;) (nop) ) - (func $Gu (; 10 ;) (type $4) (param $b i32) (param $e f64) (param $l i32) (param $d i32) + (func $Gu (; 10 ;) (param $b i32) (param $e f64) (param $l i32) (param $d i32) (if (if (result i32) (local.get $d) @@ -80,7 +80,7 @@ (unreachable) ) ) - (func $if-drop (; 11 ;) (type $3) (result i32) + (func $if-drop (; 11 ;) (result i32) (block $out (if (call $if-drop) @@ -99,7 +99,7 @@ ) (i32.const 1) ) - (func $drop-silly (; 12 ;) (type $0) + (func $drop-silly (; 12 ;) (drop (call $int) ) @@ -116,21 +116,21 @@ ) ) ) - (func $drop-get-global (; 13 ;) (type $0) + (func $drop-get-global (; 13 ;) (call $drop-get-global) ) - (func $relooperJumpThreading1 (; 14 ;) (type $0) + (func $relooperJumpThreading1 (; 14 ;) (local $$vararg_ptr5 i32) (local $$11 i32) (nop) ) - (func $relooperJumpThreading2 (; 15 ;) (type $0) + (func $relooperJumpThreading2 (; 15 ;) (nop) ) - (func $relooperJumpThreading3 (; 16 ;) (type $0) + (func $relooperJumpThreading3 (; 16 ;) (nop) ) - (func $if2drops (; 17 ;) (type $3) (result i32) + (func $if2drops (; 17 ;) (result i32) (drop (if (result i32) (call $if2drops) @@ -140,7 +140,7 @@ ) (i32.const 2) ) - (func $if2drops-different (; 18 ;) (type $3) (result i32) + (func $if2drops-different (; 18 ;) (result i32) (if (call $if2drops) (drop @@ -152,7 +152,7 @@ ) (i32.const 2) ) - (func $if-const (; 19 ;) (type $1) (param $x i32) + (func $if-const (; 19 ;) (param $x i32) (call $if-const (i32.const 3) ) @@ -163,7 +163,7 @@ (i32.const 7) ) ) - (func $drop-if-both-unreachable (; 20 ;) (type $1) (param $0 i32) + (func $drop-if-both-unreachable (; 20 ;) (param $0 i32) (block $out (drop (if (result i32) @@ -181,7 +181,7 @@ ) ) ) - (func $if-1-block (; 21 ;) (type $1) (param $x i32) + (func $if-1-block (; 21 ;) (param $x i32) (block $out (if (local.get $x) @@ -194,7 +194,7 @@ ) ) ) - (func $block-resize-br-gone (; 22 ;) (type $0) + (func $block-resize-br-gone (; 22 ;) (block $out (block $in (call $block-resize-br-gone) @@ -203,11 +203,11 @@ (return) ) ) - (func $block-unreachable-but-last-element-concrete (; 23 ;) (type $0) + (func $block-unreachable-but-last-element-concrete (; 23 ;) (local $2 i32) (nop) ) - (func $a (; 24 ;) (type $0) + (func $a (; 24 ;) (block $block (i32.store (i32.const 1) @@ -221,7 +221,7 @@ ) ) ) - (func $leave-block-even-if-br-not-taken (; 25 ;) (type $FUNCSIG$d) (result f64) + (func $leave-block-even-if-br-not-taken (; 25 ;) (result f64) (block $label$0 (result f64) (f64.store align=1 (i32.const 879179022) @@ -234,19 +234,19 @@ ) ) ) - (func $executed-if-in-block (; 26 ;) (type $0) + (func $executed-if-in-block (; 26 ;) (unreachable) ) - (func $executed-if-in-block2 (; 27 ;) (type $0) + (func $executed-if-in-block2 (; 27 ;) (unreachable) ) - (func $executed-if-in-block3 (; 28 ;) (type $0) + (func $executed-if-in-block3 (; 28 ;) (block $label$0 (br $label$0) ) (unreachable) ) - (func $load-may-have-side-effects (; 29 ;) (type $3) (result i32) + (func $load-may-have-side-effects (; 29 ;) (result i32) (i64.ge_s (block $block (result i64) (drop @@ -259,7 +259,7 @@ (i64.const 0) ) ) - (func $unary-binary-may-trap (; 30 ;) (type $0) + (func $unary-binary-may-trap (; 30 ;) (drop (i64.div_s (i64.const -1) @@ -272,7 +272,7 @@ ) ) ) - (func $unreachable-if-with-nop-arm-that-leaves-a-concrete-value-if-nop-is-removed (; 31 ;) (type $0) + (func $unreachable-if-with-nop-arm-that-leaves-a-concrete-value-if-nop-is-removed (; 31 ;) (block $label$0 (loop $label$1 (drop @@ -285,32 +285,32 @@ ) ) ) - (func $if-arm-vanishes (; 32 ;) (type $3) (result i32) + (func $if-arm-vanishes (; 32 ;) (result i32) (block $label$0 (result i32) (br $label$0 (i32.const 1) ) ) ) - (func $if-arm-vanishes-2 (; 33 ;) (type $3) (result i32) + (func $if-arm-vanishes-2 (; 33 ;) (result i32) (block $label$0 (result i32) (br $label$0 (i32.const 1) ) ) ) - (func $nop-if-type-changes (; 34 ;) (type $0) + (func $nop-if-type-changes (; 34 ;) (local $0 i32) (nop) ) ) (module - (type $0 (func (param i64))) - (type $1 (func (param f32 i32) (result i32))) - (func $0 (; 0 ;) (type $0) (param $0 i64) + (type $i64_=>_none (func (param i64))) + (type $f32_i32_=>_i32 (func (param f32 i32) (result i32))) + (func $0 (; 0 ;) (param $0 i64) (nop) ) - (func $1 (; 1 ;) (type $1) (param $0 f32) (param $1 i32) (result i32) + (func $1 (; 1 ;) (param $0 f32) (param $1 i32) (result i32) (drop (block $label$2 (result i64) (call $0 @@ -326,27 +326,27 @@ ) ) (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (memory $0 1 1) (global $global$1 (mut i32) (i32.const 0)) (export "compress" (func $3)) - (func $_deflate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $_deflate (; 0 ;) (param $0 i32) (result i32) (call $_deflate (local.get $0) ) ) - (func $_deflateInit2_ (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $_deflateInit2_ (; 1 ;) (param $0 i32) (result i32) (call $_deflateInit2_ (local.get $0) ) ) - (func $_deflateEnd (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $_deflateEnd (; 2 ;) (param $0 i32) (result i32) (call $_deflateEnd (local.get $0) ) ) - (func $3 (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $3 (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local.set $3 (global.get $global$1) diff --git a/test/passes/vacuum_ignore-implicit-traps.txt b/test/passes/vacuum_ignore-implicit-traps.txt index 61ab6f8d2..bfa557ef6 100644 --- a/test/passes/vacuum_ignore-implicit-traps.txt +++ b/test/passes/vacuum_ignore-implicit-traps.txt @@ -1,14 +1,14 @@ (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (memory $0 1) - (func $load-would-normally-have-side-effects (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $load-would-normally-have-side-effects (; 0 ;) (result i32) (i64.ge_s (i64.const 2912825531628789796) (i64.const 0) ) ) - (func $unary-binary-may-trap (; 1 ;) (type $FUNCSIG$v) + (func $unary-binary-may-trap (; 1 ;) (nop) ) ) diff --git a/test/passes/vacuum_remove-unused-names_merge-blocks.txt b/test/passes/vacuum_remove-unused-names_merge-blocks.txt index 2d7993bd1..94fe65110 100644 --- a/test/passes/vacuum_remove-unused-names_merge-blocks.txt +++ b/test/passes/vacuum_remove-unused-names_merge-blocks.txt @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (func $return-block (; 0 ;) (type $FUNCSIG$ii) (param $x i32) (result i32) + (type $i32_=>_i32 (func (param i32) (result i32))) + (func $return-block (; 0 ;) (param $x i32) (result i32) (local.set $x (local.get $x) ) diff --git a/test/polymorphic_stack.wast.from-wast b/test/polymorphic_stack.wast.from-wast index cb0d47355..e669a54ed 100644 --- a/test/polymorphic_stack.wast.from-wast +++ b/test/polymorphic_stack.wast.from-wast @@ -1,10 +1,10 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (import "env" "table" (table $0 9 9 funcref)) - (func $break-and-binary (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $break-and-binary (; 0 ;) (result i32) (block $x (result i32) (f32.add (br_if $x @@ -19,7 +19,7 @@ ) ) ) - (func $call-and-unary (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-and-unary (; 1 ;) (param $0 i32) (result i32) (drop (i64.eqz (call $call-and-unary @@ -36,14 +36,14 @@ ) (drop (i64.eqz - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (unreachable) (unreachable) ) ) ) ) - (func $tee (; 2 ;) (type $FUNCSIG$vi) (param $x i32) + (func $tee (; 2 ;) (param $x i32) (local $y f32) (drop (i64.eqz @@ -60,7 +60,7 @@ ) ) ) - (func $tee2 (; 3 ;) (type $FUNCSIG$v) + (func $tee2 (; 3 ;) (local $0 f32) (if (i32.const 259) @@ -69,7 +69,7 @@ ) ) ) - (func $select (; 4 ;) (type $FUNCSIG$v) + (func $select (; 4 ;) (drop (i64.eqz (select @@ -80,7 +80,7 @@ ) ) ) - (func $untaken-break-should-have-value (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $untaken-break-should-have-value (; 5 ;) (result i32) (block $x (result i32) (block $block (br_if $x @@ -90,7 +90,7 @@ ) ) ) - (func $unreachable-in-block-but-code-before (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $unreachable-in-block-but-code-before (; 6 ;) (param $0 i32) (result i32) (if (local.get $0) (return @@ -106,7 +106,7 @@ ) ) ) - (func $br_table_unreachable_to_also_unreachable (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $br_table_unreachable_to_also_unreachable (; 7 ;) (result i32) (block $a (result i32) (block $b (result i32) (br_table $a $b @@ -116,7 +116,7 @@ ) ) ) - (func $untaken-br_if (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $untaken-br_if (; 8 ;) (result i32) (block $label$8 (result i32) (block $label$9 (drop diff --git a/test/polymorphic_stack.wast.fromBinary b/test/polymorphic_stack.wast.fromBinary index 3083b5bf9..23bf8b3a0 100644 --- a/test/polymorphic_stack.wast.fromBinary +++ b/test/polymorphic_stack.wast.fromBinary @@ -1,32 +1,32 @@ (module - (type $0 (func (result i32))) - (type $1 (func (param i32) (result i32))) - (type $2 (func)) - (type $3 (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) (import "env" "table" (table $timport$0 9 9 funcref)) - (func $break-and-binary (; 0 ;) (type $0) (result i32) + (func $break-and-binary (; 0 ;) (result i32) (block $label$1 (result i32) (unreachable) ) ) - (func $call-and-unary (; 1 ;) (type $1) (param $0 i32) (result i32) + (func $call-and-unary (; 1 ;) (param $0 i32) (result i32) (unreachable) ) - (func $tee (; 2 ;) (type $3) (param $0 i32) + (func $tee (; 2 ;) (param $0 i32) (local $1 f32) (unreachable) ) - (func $tee2 (; 3 ;) (type $2) + (func $tee2 (; 3 ;) (local $0 f32) (if (i32.const 259) (unreachable) ) ) - (func $select (; 4 ;) (type $2) + (func $select (; 4 ;) (unreachable) ) - (func $untaken-break-should-have-value (; 5 ;) (type $0) (result i32) + (func $untaken-break-should-have-value (; 5 ;) (result i32) (block $label$1 (result i32) (block $label$2 (drop @@ -37,7 +37,7 @@ (unreachable) ) ) - (func $unreachable-in-block-but-code-before (; 6 ;) (type $1) (param $0 i32) (result i32) + (func $unreachable-in-block-but-code-before (; 6 ;) (param $0 i32) (result i32) (if (local.get $0) (return @@ -53,14 +53,14 @@ ) ) ) - (func $br_table_unreachable_to_also_unreachable (; 7 ;) (type $0) (result i32) + (func $br_table_unreachable_to_also_unreachable (; 7 ;) (result i32) (block $label$1 (result i32) (block $label$2 (result i32) (unreachable) ) ) ) - (func $untaken-br_if (; 8 ;) (type $0) (result i32) + (func $untaken-br_if (; 8 ;) (result i32) (block $label$1 (result i32) (block $label$2 (if diff --git a/test/polymorphic_stack.wast.fromBinary.noDebugInfo b/test/polymorphic_stack.wast.fromBinary.noDebugInfo index a4cd0081c..3d8061ff4 100644 --- a/test/polymorphic_stack.wast.fromBinary.noDebugInfo +++ b/test/polymorphic_stack.wast.fromBinary.noDebugInfo @@ -1,32 +1,32 @@ (module - (type $0 (func (result i32))) - (type $1 (func (param i32) (result i32))) - (type $2 (func)) - (type $3 (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) (import "env" "table" (table $timport$0 9 9 funcref)) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (block $label$1 (result i32) (unreachable) ) ) - (func $1 (; 1 ;) (type $1) (param $0 i32) (result i32) + (func $1 (; 1 ;) (param $0 i32) (result i32) (unreachable) ) - (func $2 (; 2 ;) (type $3) (param $0 i32) + (func $2 (; 2 ;) (param $0 i32) (local $1 f32) (unreachable) ) - (func $3 (; 3 ;) (type $2) + (func $3 (; 3 ;) (local $0 f32) (if (i32.const 259) (unreachable) ) ) - (func $4 (; 4 ;) (type $2) + (func $4 (; 4 ;) (unreachable) ) - (func $5 (; 5 ;) (type $0) (result i32) + (func $5 (; 5 ;) (result i32) (block $label$1 (result i32) (block $label$2 (drop @@ -37,7 +37,7 @@ (unreachable) ) ) - (func $6 (; 6 ;) (type $1) (param $0 i32) (result i32) + (func $6 (; 6 ;) (param $0 i32) (result i32) (if (local.get $0) (return @@ -53,14 +53,14 @@ ) ) ) - (func $7 (; 7 ;) (type $0) (result i32) + (func $7 (; 7 ;) (result i32) (block $label$1 (result i32) (block $label$2 (result i32) (unreachable) ) ) ) - (func $8 (; 8 ;) (type $0) (result i32) + (func $8 (; 8 ;) (result i32) (block $label$1 (result i32) (block $label$2 (if diff --git a/test/print/min.minified.txt b/test/print/min.minified.txt index 37d1cea08..f242c8059 100644 --- a/test/print/min.minified.txt +++ b/test/print/min.minified.txt @@ -1,4 +1,4 @@ -(module(type $0 (func(param f32)(result f32)))(type $1 (func(param i32 i32)(result f32)))(type $2 (func(param i32)(result i32)))(type $3 (func(param i32 i32 i32)(result i32)))(memory $0 256 256) -(export "floats" (func $floats))(func $floats(type $0)(param $f f32)(result f32)(local $t f32)(f32.add(local.get $t)(local.get $f)))(func $neg(type $1)(param $k i32)(param $p i32)(result f32)(local $n f32)(local.tee $n(f32.neg(block $block0 (result f32)(i32.store(local.get $k)(local.get $p))(f32.load(local.get $k))))))(func $littleswitch(type $2)(param $x i32)(result i32)(block $topmost (result i32)(block $switch-case$2(block $switch-case$1(br_table $switch-case$1 $switch-case$2 $switch-case$1(i32.sub(local.get $x)(i32.const 1)))) +(module(type $i32_=>_i32 (func(param i32)(result i32)))(type $i32_i32_i32_=>_i32 (func(param i32 i32 i32)(result i32)))(type $i32_i32_=>_f32 (func(param i32 i32)(result f32)))(type $f32_=>_f32 (func(param f32)(result f32)))(memory $0 256 256) +(export "floats" (func $floats))(func $floats(param $f f32)(result f32)(local $t f32)(f32.add(local.get $t)(local.get $f)))(func $neg(param $k i32)(param $p i32)(result f32)(local $n f32)(local.tee $n(f32.neg(block $block0 (result f32)(i32.store(local.get $k)(local.get $p))(f32.load(local.get $k))))))(func $littleswitch(param $x i32)(result i32)(block $topmost (result i32)(block $switch-case$2(block $switch-case$1(br_table $switch-case$1 $switch-case$2 $switch-case$1(i32.sub(local.get $x)(i32.const 1)))) (br $topmost(i32.const 1))) -(br $topmost(i32.const 2))(i32.const 0)))(func $f1(type $3)(param $i1 i32)(param $i2 i32)(param $i3 i32)(result i32)(block $topmost (result i32)(local.get $i3))))
\ No newline at end of file +(br $topmost(i32.const 2))(i32.const 0)))(func $f1(param $i1 i32)(param $i2 i32)(param $i3 i32)(result i32)(block $topmost (result i32)(local.get $i3))))
\ No newline at end of file diff --git a/test/print/min.txt b/test/print/min.txt index b34ee140b..191b331ad 100644 --- a/test/print/min.txt +++ b/test/print/min.txt @@ -1,18 +1,18 @@ (module - (type $0 (func (param f32) (result f32))) - (type $1 (func (param i32 i32) (result f32))) - (type $2 (func (param i32) (result i32))) - (type $3 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (memory $0 256 256) (export "floats" (func $floats)) - (func $floats (; 0 ;) (type $0) (param $f f32) (result f32) + (func $floats (; 0 ;) (param $f f32) (result f32) (local $t f32) (f32.add (local.get $t) (local.get $f) ) ) - (func $neg (; 1 ;) (type $1) (param $k i32) (param $p i32) (result f32) + (func $neg (; 1 ;) (param $k i32) (param $p i32) (result f32) (local $n f32) (local.tee $n (f32.neg @@ -28,7 +28,7 @@ ) ) ) - (func $littleswitch (; 2 ;) (type $2) (param $x i32) (result i32) + (func $littleswitch (; 2 ;) (param $x i32) (result i32) (block $topmost (result i32) (block $switch-case$2 (block $switch-case$1 @@ -49,7 +49,7 @@ (i32.const 0) ) ) - (func $f1 (; 3 ;) (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) + (func $f1 (; 3 ;) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) (block $topmost (result i32) (local.get $i3) ) diff --git a/test/push_pop.wast.from-wast b/test/push_pop.wast.from-wast index 63f21ee9c..6ab4074bf 100644 --- a/test/push_pop.wast.from-wast +++ b/test/push_pop.wast.from-wast @@ -1,31 +1,31 @@ (module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$f (func (result f32))) - (type $FUNCSIG$d (func (result f64))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $none_=>_f32 (func (result f32))) + (type $none_=>_f64 (func (result f64))) (export "ppi32" (func $0)) (export "ppi64" (func $1)) (export "ppf32" (func $2)) (export "ppf64" (func $3)) - (func $0 (; 0 ;) (type $FUNCSIG$i) (result i32) + (func $0 (; 0 ;) (result i32) (push (i32.const 1) ) (i32.pop) ) - (func $1 (; 1 ;) (type $FUNCSIG$j) (result i64) + (func $1 (; 1 ;) (result i64) (push (i64.const 1) ) (i64.pop) ) - (func $2 (; 2 ;) (type $FUNCSIG$f) (result f32) + (func $2 (; 2 ;) (result f32) (push (f32.const 1) ) (f32.pop) ) - (func $3 (; 3 ;) (type $FUNCSIG$d) (result f64) + (func $3 (; 3 ;) (result f64) (push (f64.const 1) ) diff --git a/test/push_pop.wast.fromBinary b/test/push_pop.wast.fromBinary index ac6901ff3..52db1d5fb 100644 --- a/test/push_pop.wast.fromBinary +++ b/test/push_pop.wast.fromBinary @@ -1,22 +1,22 @@ (module - (type $0 (func (result i32))) - (type $1 (func (result i64))) - (type $2 (func (result f32))) - (type $3 (func (result f64))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $none_=>_f32 (func (result f32))) + (type $none_=>_f64 (func (result f64))) (export "ppi32" (func $0)) (export "ppi64" (func $1)) (export "ppf32" (func $2)) (export "ppf64" (func $3)) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (i32.const 1) ) - (func $1 (; 1 ;) (type $1) (result i64) + (func $1 (; 1 ;) (result i64) (i64.const 1) ) - (func $2 (; 2 ;) (type $2) (result f32) + (func $2 (; 2 ;) (result f32) (f32.const 1) ) - (func $3 (; 3 ;) (type $3) (result f64) + (func $3 (; 3 ;) (result f64) (f64.const 1) ) ) diff --git a/test/push_pop.wast.fromBinary.noDebugInfo b/test/push_pop.wast.fromBinary.noDebugInfo index ac6901ff3..52db1d5fb 100644 --- a/test/push_pop.wast.fromBinary.noDebugInfo +++ b/test/push_pop.wast.fromBinary.noDebugInfo @@ -1,22 +1,22 @@ (module - (type $0 (func (result i32))) - (type $1 (func (result i64))) - (type $2 (func (result f32))) - (type $3 (func (result f64))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $none_=>_f32 (func (result f32))) + (type $none_=>_f64 (func (result f64))) (export "ppi32" (func $0)) (export "ppi64" (func $1)) (export "ppf32" (func $2)) (export "ppf64" (func $3)) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (i32.const 1) ) - (func $1 (; 1 ;) (type $1) (result i64) + (func $1 (; 1 ;) (result i64) (i64.const 1) ) - (func $2 (; 2 ;) (type $2) (result f32) + (func $2 (; 2 ;) (result f32) (f32.const 1) ) - (func $3 (; 3 ;) (type $3) (result f64) + (func $3 (; 3 ;) (result f64) (f64.const 1) ) ) diff --git a/test/reduce/destructive.wast.txt b/test/reduce/destructive.wast.txt index 8721c051f..f9deb1a04 100644 --- a/test/reduce/destructive.wast.txt +++ b/test/reduce/destructive.wast.txt @@ -1,7 +1,7 @@ (module - (type $0 (func (param i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (export "x" (func $0)) - (func $0 (; 0 ;) (type $0) (param $0 i32) (result i32) + (func $0 (; 0 ;) (param $0 i32) (result i32) (i32.const 100) ) ) diff --git a/test/reduce/imports.wast.txt b/test/reduce/imports.wast.txt index adfd5ff04..4dff9a003 100644 --- a/test/reduce/imports.wast.txt +++ b/test/reduce/imports.wast.txt @@ -1,7 +1,7 @@ (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (export "x" (func $0)) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (i32.const 5678) ) ) diff --git a/test/reduce/memory_table.wast.txt b/test/reduce/memory_table.wast.txt index 1665c7a4e..4e250f02a 100644 --- a/test/reduce/memory_table.wast.txt +++ b/test/reduce/memory_table.wast.txt @@ -1,14 +1,14 @@ (module - (type $0 (func (result i32))) - (type $1 (func)) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) (memory $0 256 256) (export "f1" (func $0)) (export "f2" (func $1)) (export "f4" (func $2)) - (func $0 (; 0 ;) (type $1) + (func $0 (; 0 ;) (nop) ) - (func $1 (; 1 ;) (type $0) (result i32) + (func $1 (; 1 ;) (result i32) (i32.store (i32.const 0) (i32.const 65530) @@ -17,7 +17,7 @@ (i32.const 0) ) ) - (func $2 (; 2 ;) (type $0) (result i32) + (func $2 (; 2 ;) (result i32) (i32.add (call $1) (i32.const 1234) diff --git a/test/reduce/simple.wast.txt b/test/reduce/simple.wast.txt index adfd5ff04..4dff9a003 100644 --- a/test/reduce/simple.wast.txt +++ b/test/reduce/simple.wast.txt @@ -1,7 +1,7 @@ (module - (type $0 (func (result i32))) + (type $none_=>_i32 (func (result i32))) (export "x" (func $0)) - (func $0 (; 0 ;) (type $0) (result i32) + (func $0 (; 0 ;) (result i32) (i32.const 5678) ) ) diff --git a/test/reg_switch.wast.from-wast b/test/reg_switch.wast.from-wast index e6f3d0960..c1a3c5a4a 100644 --- a/test/reg_switch.wast.from-wast +++ b/test/reg_switch.wast.from-wast @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (if (i32.const 0) (block $A diff --git a/test/reg_switch.wast.fromBinary b/test/reg_switch.wast.fromBinary index bd09d1dd8..58b03f671 100644 --- a/test/reg_switch.wast.fromBinary +++ b/test/reg_switch.wast.fromBinary @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (if (i32.const 0) (block $label$2 diff --git a/test/reg_switch.wast.fromBinary.noDebugInfo b/test/reg_switch.wast.fromBinary.noDebugInfo index bd09d1dd8..58b03f671 100644 --- a/test/reg_switch.wast.fromBinary.noDebugInfo +++ b/test/reg_switch.wast.fromBinary.noDebugInfo @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 0) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (if (i32.const 0) (block $label$2 diff --git a/test/signext.wast.from-wast b/test/signext.wast.from-wast index 3997f8a5b..37ccc2c44 100644 --- a/test/signext.wast.from-wast +++ b/test/signext.wast.from-wast @@ -1,6 +1,6 @@ (module - (type $0 (func)) - (func $signext (; 0 ;) (type $0) + (type $none_=>_none (func)) + (func $signext (; 0 ;) (local $0 i32) (local $1 i64) (drop diff --git a/test/signext.wast.fromBinary b/test/signext.wast.fromBinary index 0a05eda7b..bff06e89f 100644 --- a/test/signext.wast.fromBinary +++ b/test/signext.wast.fromBinary @@ -1,6 +1,6 @@ (module - (type $0 (func)) - (func $signext (; 0 ;) (type $0) + (type $none_=>_none (func)) + (func $signext (; 0 ;) (local $0 i32) (local $1 i64) (drop diff --git a/test/signext.wast.fromBinary.noDebugInfo b/test/signext.wast.fromBinary.noDebugInfo index 21d716615..7fd39a5ce 100644 --- a/test/signext.wast.fromBinary.noDebugInfo +++ b/test/signext.wast.fromBinary.noDebugInfo @@ -1,6 +1,6 @@ (module - (type $0 (func)) - (func $0 (; 0 ;) (type $0) + (type $none_=>_none (func)) + (func $0 (; 0 ;) (local $0 i32) (local $1 i64) (drop diff --git a/test/simd.wast.from-wast b/test/simd.wast.from-wast index b5914a62d..29ec13e8c 100644 --- a/test/simd.wast.from-wast +++ b/test/simd.wast.from-wast @@ -1,1054 +1,1054 @@ (module - (type $FUNCSIG$Vi (func (param i32) (result v128))) - (type $FUNCSIG$viV (func (param i32 v128))) - (type $FUNCSIG$V (func (result v128))) - (type $FUNCSIG$VVV (func (param v128 v128) (result v128))) - (type $FUNCSIG$iV (func (param v128) (result i32))) - (type $FUNCSIG$VVi (func (param v128 i32) (result v128))) - (type $FUNCSIG$jV (func (param v128) (result i64))) - (type $FUNCSIG$VVj (func (param v128 i64) (result v128))) - (type $FUNCSIG$Vf (func (param f32) (result v128))) - (type $FUNCSIG$fV (func (param v128) (result f32))) - (type $FUNCSIG$VVf (func (param v128 f32) (result v128))) - (type $FUNCSIG$Vd (func (param f64) (result v128))) - (type $FUNCSIG$dV (func (param v128) (result f64))) - (type $FUNCSIG$VVd (func (param v128 f64) (result v128))) - (type $FUNCSIG$VV (func (param v128) (result v128))) - (type $FUNCSIG$VVVV (func (param v128 v128 v128) (result v128))) + (type $v128_v128_=>_v128 (func (param v128 v128) (result v128))) + (type $v128_=>_v128 (func (param v128) (result v128))) + (type $v128_i32_=>_v128 (func (param v128 i32) (result v128))) + (type $i32_=>_v128 (func (param i32) (result v128))) + (type $v128_=>_i32 (func (param v128) (result i32))) + (type $none_=>_v128 (func (result v128))) + (type $v128_v128_v128_=>_v128 (func (param v128 v128 v128) (result v128))) + (type $i32_v128_=>_none (func (param i32 v128))) + (type $v128_=>_i64 (func (param v128) (result i64))) + (type $v128_=>_f32 (func (param v128) (result f32))) + (type $v128_=>_f64 (func (param v128) (result f64))) + (type $f32_=>_v128 (func (param f32) (result v128))) + (type $f64_=>_v128 (func (param f64) (result v128))) + (type $v128_i64_=>_v128 (func (param v128 i64) (result v128))) + (type $v128_f32_=>_v128 (func (param v128 f32) (result v128))) + (type $v128_f64_=>_v128 (func (param v128 f64) (result v128))) (memory $0 1 1) - (func $v128.load (; 0 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $v128.load (; 0 ;) (param $0 i32) (result v128) (v128.load (local.get $0) ) ) - (func $v128.store (; 1 ;) (type $FUNCSIG$viV) (param $0 i32) (param $1 v128) + (func $v128.store (; 1 ;) (param $0 i32) (param $1 v128) (v128.store (local.get $0) (local.get $1) ) ) - (func $v128.const.i8x16 (; 2 ;) (type $FUNCSIG$V) (result v128) + (func $v128.const.i8x16 (; 2 ;) (result v128) (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) ) - (func $v128.const.i16x8 (; 3 ;) (type $FUNCSIG$V) (result v128) + (func $v128.const.i16x8 (; 3 ;) (result v128) (v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00080007) ) - (func $v128.const.i32x4 (; 4 ;) (type $FUNCSIG$V) (result v128) + (func $v128.const.i32x4 (; 4 ;) (result v128) (v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004) ) - (func $v128.const.i64x2 (; 5 ;) (type $FUNCSIG$V) (result v128) + (func $v128.const.i64x2 (; 5 ;) (result v128) (v128.const i32x4 0x00000001 0x00000000 0x00000002 0x00000000) ) - (func $v128.const.f32x4 (; 6 ;) (type $FUNCSIG$V) (result v128) + (func $v128.const.f32x4 (; 6 ;) (result v128) (v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000) ) - (func $v128.const.f64x2 (; 7 ;) (type $FUNCSIG$V) (result v128) + (func $v128.const.f64x2 (; 7 ;) (result v128) (v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000) ) - (func $v128.shuffle (; 8 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $v128.shuffle (; 8 ;) (param $0 v128) (param $1 v128) (result v128) (v8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 (local.get $0) (local.get $1) ) ) - (func $i8x16.splat (; 9 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $i8x16.splat (; 9 ;) (param $0 i32) (result v128) (i8x16.splat (local.get $0) ) ) - (func $i8x16.extract_lane_s (; 10 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i8x16.extract_lane_s (; 10 ;) (param $0 v128) (result i32) (i8x16.extract_lane_s 0 (local.get $0) ) ) - (func $i8x16.extract_lane_u (; 11 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i8x16.extract_lane_u (; 11 ;) (param $0 v128) (result i32) (i8x16.extract_lane_u 0 (local.get $0) ) ) - (func $i8x16.replace_lane (; 12 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i8x16.replace_lane (; 12 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $i16x8.splat (; 13 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $i16x8.splat (; 13 ;) (param $0 i32) (result v128) (i16x8.splat (local.get $0) ) ) - (func $i16x8.extract_lane_s (; 14 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i16x8.extract_lane_s (; 14 ;) (param $0 v128) (result i32) (i16x8.extract_lane_s 0 (local.get $0) ) ) - (func $i16x8.extract_lane_u (; 15 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i16x8.extract_lane_u (; 15 ;) (param $0 v128) (result i32) (i16x8.extract_lane_u 0 (local.get $0) ) ) - (func $i16x8.replace_lane (; 16 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i16x8.replace_lane (; 16 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $i32x4.splat (; 17 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $i32x4.splat (; 17 ;) (param $0 i32) (result v128) (i32x4.splat (local.get $0) ) ) - (func $i32x4.extract_lane (; 18 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i32x4.extract_lane (; 18 ;) (param $0 v128) (result i32) (i32x4.extract_lane 0 (local.get $0) ) ) - (func $i32x4.replace_lane (; 19 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i32x4.replace_lane (; 19 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $i64x2.extract_lane (; 20 ;) (type $FUNCSIG$jV) (param $0 v128) (result i64) + (func $i64x2.extract_lane (; 20 ;) (param $0 v128) (result i64) (i64x2.extract_lane 0 (local.get $0) ) ) - (func $i64x2.replace_lane (; 21 ;) (type $FUNCSIG$VVj) (param $0 v128) (param $1 i64) (result v128) + (func $i64x2.replace_lane (; 21 ;) (param $0 v128) (param $1 i64) (result v128) (i64x2.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $f32x4.splat (; 22 ;) (type $FUNCSIG$Vf) (param $0 f32) (result v128) + (func $f32x4.splat (; 22 ;) (param $0 f32) (result v128) (f32x4.splat (local.get $0) ) ) - (func $f32x4.extract_lane (; 23 ;) (type $FUNCSIG$fV) (param $0 v128) (result f32) + (func $f32x4.extract_lane (; 23 ;) (param $0 v128) (result f32) (f32x4.extract_lane 0 (local.get $0) ) ) - (func $f32x4.replace_lane (; 24 ;) (type $FUNCSIG$VVf) (param $0 v128) (param $1 f32) (result v128) + (func $f32x4.replace_lane (; 24 ;) (param $0 v128) (param $1 f32) (result v128) (f32x4.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $f64x2.splat (; 25 ;) (type $FUNCSIG$Vd) (param $0 f64) (result v128) + (func $f64x2.splat (; 25 ;) (param $0 f64) (result v128) (f64x2.splat (local.get $0) ) ) - (func $f64x2.extract_lane (; 26 ;) (type $FUNCSIG$dV) (param $0 v128) (result f64) + (func $f64x2.extract_lane (; 26 ;) (param $0 v128) (result f64) (f64x2.extract_lane 0 (local.get $0) ) ) - (func $f64x2.replace_lane (; 27 ;) (type $FUNCSIG$VVd) (param $0 v128) (param $1 f64) (result v128) + (func $f64x2.replace_lane (; 27 ;) (param $0 v128) (param $1 f64) (result v128) (f64x2.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $i8x16.eq (; 28 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.eq (; 28 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.eq (local.get $0) (local.get $1) ) ) - (func $i8x16.ne (; 29 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.ne (; 29 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.ne (local.get $0) (local.get $1) ) ) - (func $i8x16.lt_s (; 30 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.lt_s (; 30 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.lt_s (local.get $0) (local.get $1) ) ) - (func $i8x16.lt_u (; 31 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.lt_u (; 31 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.lt_u (local.get $0) (local.get $1) ) ) - (func $i8x16.gt_s (; 32 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.gt_s (; 32 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.gt_s (local.get $0) (local.get $1) ) ) - (func $i8x16.gt_u (; 33 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.gt_u (; 33 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.gt_u (local.get $0) (local.get $1) ) ) - (func $i8x16.le_s (; 34 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.le_s (; 34 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.le_s (local.get $0) (local.get $1) ) ) - (func $i8x16.le_u (; 35 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.le_u (; 35 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.le_u (local.get $0) (local.get $1) ) ) - (func $i8x16.ge_s (; 36 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.ge_s (; 36 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.ge_s (local.get $0) (local.get $1) ) ) - (func $i8x16.ge_u (; 37 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.ge_u (; 37 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.ge_u (local.get $0) (local.get $1) ) ) - (func $i16x8.eq (; 38 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.eq (; 38 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.eq (local.get $0) (local.get $1) ) ) - (func $i16x8.ne (; 39 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.ne (; 39 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.ne (local.get $0) (local.get $1) ) ) - (func $i16x8.lt_s (; 40 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.lt_s (; 40 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.lt_s (local.get $0) (local.get $1) ) ) - (func $i16x8.lt_u (; 41 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.lt_u (; 41 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.lt_u (local.get $0) (local.get $1) ) ) - (func $i16x8.gt_s (; 42 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.gt_s (; 42 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.gt_s (local.get $0) (local.get $1) ) ) - (func $i16x8.gt_u (; 43 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.gt_u (; 43 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.gt_u (local.get $0) (local.get $1) ) ) - (func $i16x8.le_s (; 44 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.le_s (; 44 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.le_s (local.get $0) (local.get $1) ) ) - (func $i16x8.le_u (; 45 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.le_u (; 45 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.le_u (local.get $0) (local.get $1) ) ) - (func $i16x8.ge_s (; 46 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.ge_s (; 46 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.ge_s (local.get $0) (local.get $1) ) ) - (func $i16x8.ge_u (; 47 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.ge_u (; 47 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.ge_u (local.get $0) (local.get $1) ) ) - (func $i32x4.eq (; 48 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.eq (; 48 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.eq (local.get $0) (local.get $1) ) ) - (func $i32x4.ne (; 49 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.ne (; 49 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.ne (local.get $0) (local.get $1) ) ) - (func $i32x4.lt_s (; 50 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.lt_s (; 50 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.lt_s (local.get $0) (local.get $1) ) ) - (func $i32x4.lt_u (; 51 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.lt_u (; 51 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.lt_u (local.get $0) (local.get $1) ) ) - (func $i32x4.gt_s (; 52 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.gt_s (; 52 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.gt_s (local.get $0) (local.get $1) ) ) - (func $i32x4.gt_u (; 53 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.gt_u (; 53 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.gt_u (local.get $0) (local.get $1) ) ) - (func $i32x4.le_s (; 54 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.le_s (; 54 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.le_s (local.get $0) (local.get $1) ) ) - (func $i32x4.le_u (; 55 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.le_u (; 55 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.le_u (local.get $0) (local.get $1) ) ) - (func $i32x4.ge_s (; 56 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.ge_s (; 56 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.ge_s (local.get $0) (local.get $1) ) ) - (func $i32x4.ge_u (; 57 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.ge_u (; 57 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.ge_u (local.get $0) (local.get $1) ) ) - (func $f32x4.eq (; 58 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.eq (; 58 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.eq (local.get $0) (local.get $1) ) ) - (func $f32x4.ne (; 59 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.ne (; 59 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.ne (local.get $0) (local.get $1) ) ) - (func $f32x4.lt (; 60 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.lt (; 60 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.lt (local.get $0) (local.get $1) ) ) - (func $f32x4.gt (; 61 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.gt (; 61 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.gt (local.get $0) (local.get $1) ) ) - (func $f32x4.le (; 62 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.le (; 62 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.le (local.get $0) (local.get $1) ) ) - (func $f32x4.ge (; 63 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.ge (; 63 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.ge (local.get $0) (local.get $1) ) ) - (func $f64x2.eq (; 64 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.eq (; 64 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.eq (local.get $0) (local.get $1) ) ) - (func $f64x2.ne (; 65 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.ne (; 65 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.ne (local.get $0) (local.get $1) ) ) - (func $f64x2.lt (; 66 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.lt (; 66 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.lt (local.get $0) (local.get $1) ) ) - (func $f64x2.gt (; 67 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.gt (; 67 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.gt (local.get $0) (local.get $1) ) ) - (func $f64x2.le (; 68 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.le (; 68 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.le (local.get $0) (local.get $1) ) ) - (func $f64x2.ge (; 69 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.ge (; 69 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.ge (local.get $0) (local.get $1) ) ) - (func $v128.not (; 70 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $v128.not (; 70 ;) (param $0 v128) (result v128) (v128.not (local.get $0) ) ) - (func $v128.and (; 71 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $v128.and (; 71 ;) (param $0 v128) (param $1 v128) (result v128) (v128.and (local.get $0) (local.get $1) ) ) - (func $v128.or (; 72 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $v128.or (; 72 ;) (param $0 v128) (param $1 v128) (result v128) (v128.or (local.get $0) (local.get $1) ) ) - (func $v128.xor (; 73 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $v128.xor (; 73 ;) (param $0 v128) (param $1 v128) (result v128) (v128.xor (local.get $0) (local.get $1) ) ) - (func $v128.andnot (; 74 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $v128.andnot (; 74 ;) (param $0 v128) (param $1 v128) (result v128) (v128.andnot (local.get $0) (local.get $1) ) ) - (func $v128.bitselect (; 75 ;) (type $FUNCSIG$VVVV) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $v128.bitselect (; 75 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (v128.bitselect (local.get $0) (local.get $1) (local.get $2) ) ) - (func $i8x16.neg (; 76 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i8x16.neg (; 76 ;) (param $0 v128) (result v128) (i8x16.neg (local.get $0) ) ) - (func $i8x16.any_true (; 77 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i8x16.any_true (; 77 ;) (param $0 v128) (result i32) (i8x16.any_true (local.get $0) ) ) - (func $i8x16.all_true (; 78 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i8x16.all_true (; 78 ;) (param $0 v128) (result i32) (i8x16.all_true (local.get $0) ) ) - (func $i8x16.shl (; 79 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i8x16.shl (; 79 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.shl (local.get $0) (local.get $1) ) ) - (func $i8x16.shr_s (; 80 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i8x16.shr_s (; 80 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.shr_s (local.get $0) (local.get $1) ) ) - (func $i8x16.shr_u (; 81 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i8x16.shr_u (; 81 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.shr_u (local.get $0) (local.get $1) ) ) - (func $i8x16.add (; 82 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.add (; 82 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.add (local.get $0) (local.get $1) ) ) - (func $i8x16.add_saturate_s (; 83 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.add_saturate_s (; 83 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.add_saturate_s (local.get $0) (local.get $1) ) ) - (func $i8x16.add_saturate_u (; 84 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.add_saturate_u (; 84 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.add_saturate_u (local.get $0) (local.get $1) ) ) - (func $i8x16.sub (; 85 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.sub (; 85 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.sub (local.get $0) (local.get $1) ) ) - (func $i8x16.sub_saturate_s (; 86 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.sub_saturate_s (; 86 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.sub_saturate_s (local.get $0) (local.get $1) ) ) - (func $i8x16.sub_saturate_u (; 87 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.sub_saturate_u (; 87 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.sub_saturate_u (local.get $0) (local.get $1) ) ) - (func $i8x16.mul (; 88 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.mul (; 88 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.mul (local.get $0) (local.get $1) ) ) - (func $i8x16.min_s (; 89 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.min_s (; 89 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.min_s (local.get $0) (local.get $1) ) ) - (func $i8x16.min_u (; 90 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.min_u (; 90 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.min_u (local.get $0) (local.get $1) ) ) - (func $i8x16.max_s (; 91 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.max_s (; 91 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.max_s (local.get $0) (local.get $1) ) ) - (func $i8x16.max_u (; 92 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.max_u (; 92 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.max_u (local.get $0) (local.get $1) ) ) - (func $i16x8.neg (; 93 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i16x8.neg (; 93 ;) (param $0 v128) (result v128) (i16x8.neg (local.get $0) ) ) - (func $i16x8.any_true (; 94 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i16x8.any_true (; 94 ;) (param $0 v128) (result i32) (i16x8.any_true (local.get $0) ) ) - (func $i16x8.all_true (; 95 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i16x8.all_true (; 95 ;) (param $0 v128) (result i32) (i16x8.all_true (local.get $0) ) ) - (func $i16x8.shl (; 96 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i16x8.shl (; 96 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.shl (local.get $0) (local.get $1) ) ) - (func $i16x8.shr_s (; 97 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i16x8.shr_s (; 97 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.shr_s (local.get $0) (local.get $1) ) ) - (func $i16x8.shr_u (; 98 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i16x8.shr_u (; 98 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.shr_u (local.get $0) (local.get $1) ) ) - (func $i16x8.add (; 99 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.add (; 99 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.add (local.get $0) (local.get $1) ) ) - (func $i16x8.add_saturate_s (; 100 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.add_saturate_s (; 100 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.add_saturate_s (local.get $0) (local.get $1) ) ) - (func $i16x8.add_saturate_u (; 101 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.add_saturate_u (; 101 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.add_saturate_u (local.get $0) (local.get $1) ) ) - (func $i16x8.sub (; 102 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.sub (; 102 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.sub (local.get $0) (local.get $1) ) ) - (func $i16x8.sub_saturate_s (; 103 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.sub_saturate_s (; 103 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.sub_saturate_s (local.get $0) (local.get $1) ) ) - (func $i16x8.sub_saturate_u (; 104 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.sub_saturate_u (; 104 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.sub_saturate_u (local.get $0) (local.get $1) ) ) - (func $i16x8.mul (; 105 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.mul (; 105 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.mul (local.get $0) (local.get $1) ) ) - (func $i16x8.min_s (; 106 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.min_s (; 106 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.min_s (local.get $0) (local.get $1) ) ) - (func $i16x8.min_u (; 107 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.min_u (; 107 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.min_u (local.get $0) (local.get $1) ) ) - (func $i16x8.max_s (; 108 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.max_s (; 108 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.max_s (local.get $0) (local.get $1) ) ) - (func $i16x8.max_u (; 109 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.max_u (; 109 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.max_u (local.get $0) (local.get $1) ) ) - (func $i32x4.neg (; 110 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i32x4.neg (; 110 ;) (param $0 v128) (result v128) (i32x4.neg (local.get $0) ) ) - (func $i32x4.any_true (; 111 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i32x4.any_true (; 111 ;) (param $0 v128) (result i32) (i32x4.any_true (local.get $0) ) ) - (func $i32x4.all_true (; 112 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i32x4.all_true (; 112 ;) (param $0 v128) (result i32) (i32x4.all_true (local.get $0) ) ) - (func $i32x4.shl (; 113 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i32x4.shl (; 113 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.shl (local.get $0) (local.get $1) ) ) - (func $i32x4.shr_s (; 114 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i32x4.shr_s (; 114 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.shr_s (local.get $0) (local.get $1) ) ) - (func $i32x4.shr_u (; 115 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i32x4.shr_u (; 115 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.shr_u (local.get $0) (local.get $1) ) ) - (func $i32x4.add (; 116 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.add (; 116 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.add (local.get $0) (local.get $1) ) ) - (func $i32x4.sub (; 117 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.sub (; 117 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.sub (local.get $0) (local.get $1) ) ) - (func $i32x4.mul (; 118 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.mul (; 118 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.mul (local.get $0) (local.get $1) ) ) - (func $i32x4.min_s (; 119 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.min_s (; 119 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.min_s (local.get $0) (local.get $1) ) ) - (func $i32x4.min_u (; 120 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.min_u (; 120 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.min_u (local.get $0) (local.get $1) ) ) - (func $i32x4.max_s (; 121 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.max_s (; 121 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.max_s (local.get $0) (local.get $1) ) ) - (func $i32x4.max_u (; 122 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.max_u (; 122 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.max_u (local.get $0) (local.get $1) ) ) - (func $i32x4.dot_i16x8_s (; 123 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.dot_i16x8_s (; 123 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.dot_i16x8_s (local.get $0) (local.get $1) ) ) - (func $i64x2.neg (; 124 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i64x2.neg (; 124 ;) (param $0 v128) (result v128) (i64x2.neg (local.get $0) ) ) - (func $i64x2.any_true (; 125 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i64x2.any_true (; 125 ;) (param $0 v128) (result i32) (i64x2.any_true (local.get $0) ) ) - (func $i64x2.all_true (; 126 ;) (type $FUNCSIG$iV) (param $0 v128) (result i32) + (func $i64x2.all_true (; 126 ;) (param $0 v128) (result i32) (i64x2.all_true (local.get $0) ) ) - (func $i64x2.shl (; 127 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i64x2.shl (; 127 ;) (param $0 v128) (param $1 i32) (result v128) (i64x2.shl (local.get $0) (local.get $1) ) ) - (func $i64x2.shr_s (; 128 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i64x2.shr_s (; 128 ;) (param $0 v128) (param $1 i32) (result v128) (i64x2.shr_s (local.get $0) (local.get $1) ) ) - (func $i64x2.shr_u (; 129 ;) (type $FUNCSIG$VVi) (param $0 v128) (param $1 i32) (result v128) + (func $i64x2.shr_u (; 129 ;) (param $0 v128) (param $1 i32) (result v128) (i64x2.shr_u (local.get $0) (local.get $1) ) ) - (func $i64x2.add (; 130 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i64x2.add (; 130 ;) (param $0 v128) (param $1 v128) (result v128) (i64x2.add (local.get $0) (local.get $1) ) ) - (func $i64x2.sub (; 131 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i64x2.sub (; 131 ;) (param $0 v128) (param $1 v128) (result v128) (i64x2.sub (local.get $0) (local.get $1) ) ) - (func $f32x4.add (; 132 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.add (; 132 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.add (local.get $0) (local.get $1) ) ) - (func $f32x4.sub (; 133 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.sub (; 133 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.sub (local.get $0) (local.get $1) ) ) - (func $f32x4.mul (; 134 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.mul (; 134 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.mul (local.get $0) (local.get $1) ) ) - (func $f32x4.div (; 135 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.div (; 135 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.div (local.get $0) (local.get $1) ) ) - (func $f32x4.min (; 136 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.min (; 136 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.min (local.get $0) (local.get $1) ) ) - (func $f32x4.max (; 137 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.max (; 137 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.max (local.get $0) (local.get $1) ) ) - (func $f32x4.abs (; 138 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $f32x4.abs (; 138 ;) (param $0 v128) (result v128) (f32x4.abs (local.get $0) ) ) - (func $f32x4.neg (; 139 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $f32x4.neg (; 139 ;) (param $0 v128) (result v128) (f32x4.neg (local.get $0) ) ) - (func $f32x4.sqrt (; 140 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $f32x4.sqrt (; 140 ;) (param $0 v128) (result v128) (f32x4.sqrt (local.get $0) ) ) - (func $f32x4.qfma (; 141 ;) (type $FUNCSIG$VVVV) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $f32x4.qfma (; 141 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f32x4.qfma (local.get $0) (local.get $1) (local.get $2) ) ) - (func $f32x4.qfms (; 142 ;) (type $FUNCSIG$VVVV) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $f32x4.qfms (; 142 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f32x4.qfms (local.get $0) (local.get $1) (local.get $2) ) ) - (func $f64x2.add (; 143 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.add (; 143 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.add (local.get $0) (local.get $1) ) ) - (func $f64x2.sub (; 144 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.sub (; 144 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.sub (local.get $0) (local.get $1) ) ) - (func $f64x2.mul (; 145 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.mul (; 145 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.mul (local.get $0) (local.get $1) ) ) - (func $f64x2.div (; 146 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.div (; 146 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.div (local.get $0) (local.get $1) ) ) - (func $f64x2.min (; 147 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.min (; 147 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.min (local.get $0) (local.get $1) ) ) - (func $f64x2.max (; 148 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.max (; 148 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.max (local.get $0) (local.get $1) ) ) - (func $f64x2.abs (; 149 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $f64x2.abs (; 149 ;) (param $0 v128) (result v128) (f64x2.abs (local.get $0) ) ) - (func $f64x2.neg (; 150 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $f64x2.neg (; 150 ;) (param $0 v128) (result v128) (f64x2.neg (local.get $0) ) ) - (func $f64x2.sqrt (; 151 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $f64x2.sqrt (; 151 ;) (param $0 v128) (result v128) (f64x2.sqrt (local.get $0) ) ) - (func $f64x2.qfma (; 152 ;) (type $FUNCSIG$VVVV) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $f64x2.qfma (; 152 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f64x2.qfma (local.get $0) (local.get $1) (local.get $2) ) ) - (func $f64x2.qfms (; 153 ;) (type $FUNCSIG$VVVV) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $f64x2.qfms (; 153 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f64x2.qfms (local.get $0) (local.get $1) (local.get $2) ) ) - (func $i32x4.trunc_sat_f32x4_s (; 154 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i32x4.trunc_sat_f32x4_s (; 154 ;) (param $0 v128) (result v128) (i32x4.trunc_sat_f32x4_s (local.get $0) ) ) - (func $i32x4.trunc_sat_f32x4_u (; 155 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i32x4.trunc_sat_f32x4_u (; 155 ;) (param $0 v128) (result v128) (i32x4.trunc_sat_f32x4_u (local.get $0) ) ) - (func $i64x2.trunc_sat_f64x2_s (; 156 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i64x2.trunc_sat_f64x2_s (; 156 ;) (param $0 v128) (result v128) (i64x2.trunc_sat_f64x2_s (local.get $0) ) ) - (func $i64x2.trunc_sat_f64x2_u (; 157 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i64x2.trunc_sat_f64x2_u (; 157 ;) (param $0 v128) (result v128) (i64x2.trunc_sat_f64x2_u (local.get $0) ) ) - (func $f32x4.convert_i32x4_s (; 158 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $f32x4.convert_i32x4_s (; 158 ;) (param $0 v128) (result v128) (f32x4.convert_i32x4_s (local.get $0) ) ) - (func $f32x4.convert_i32x4_u (; 159 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $f32x4.convert_i32x4_u (; 159 ;) (param $0 v128) (result v128) (f32x4.convert_i32x4_u (local.get $0) ) ) - (func $f64x2.convert_i64x2_s (; 160 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $f64x2.convert_i64x2_s (; 160 ;) (param $0 v128) (result v128) (f64x2.convert_i64x2_s (local.get $0) ) ) - (func $f64x2.convert_i64x2_u (; 161 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $f64x2.convert_i64x2_u (; 161 ;) (param $0 v128) (result v128) (f64x2.convert_i64x2_u (local.get $0) ) ) - (func $v8x16.load_splat (; 162 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $v8x16.load_splat (; 162 ;) (param $0 i32) (result v128) (v8x16.load_splat (local.get $0) ) ) - (func $v16x8.load_splat (; 163 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $v16x8.load_splat (; 163 ;) (param $0 i32) (result v128) (v16x8.load_splat (local.get $0) ) ) - (func $v32x4.load_splat (; 164 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $v32x4.load_splat (; 164 ;) (param $0 i32) (result v128) (v32x4.load_splat (local.get $0) ) ) - (func $v64x2.load_splat (; 165 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $v64x2.load_splat (; 165 ;) (param $0 i32) (result v128) (v64x2.load_splat (local.get $0) ) ) - (func $i8x16.narrow_i16x8_s (; 166 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.narrow_i16x8_s (; 166 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.narrow_i16x8_s (local.get $0) (local.get $1) ) ) - (func $i8x16.narrow_i16x8_u (; 167 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.narrow_i16x8_u (; 167 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.narrow_i16x8_u (local.get $0) (local.get $1) ) ) - (func $i16x8.narrow_i32x4_s (; 168 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.narrow_i32x4_s (; 168 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.narrow_i32x4_s (local.get $0) (local.get $1) ) ) - (func $i16x8.narrow_i32x4_u (; 169 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.narrow_i32x4_u (; 169 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.narrow_i32x4_u (local.get $0) (local.get $1) ) ) - (func $i16x8.widen_low_i8x16_s (; 170 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i16x8.widen_low_i8x16_s (; 170 ;) (param $0 v128) (result v128) (i16x8.widen_low_i8x16_s (local.get $0) ) ) - (func $i16x8.widen_high_i8x16_s (; 171 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i16x8.widen_high_i8x16_s (; 171 ;) (param $0 v128) (result v128) (i16x8.widen_high_i8x16_s (local.get $0) ) ) - (func $i16x8.widen_low_i8x16_u (; 172 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i16x8.widen_low_i8x16_u (; 172 ;) (param $0 v128) (result v128) (i16x8.widen_low_i8x16_u (local.get $0) ) ) - (func $i16x8.widen_high_i8x16_u (; 173 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i16x8.widen_high_i8x16_u (; 173 ;) (param $0 v128) (result v128) (i16x8.widen_high_i8x16_u (local.get $0) ) ) - (func $i32x4.widen_low_i16x8_s (; 174 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i32x4.widen_low_i16x8_s (; 174 ;) (param $0 v128) (result v128) (i32x4.widen_low_i16x8_s (local.get $0) ) ) - (func $i32x4.widen_high_i16x8_s (; 175 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i32x4.widen_high_i16x8_s (; 175 ;) (param $0 v128) (result v128) (i32x4.widen_high_i16x8_s (local.get $0) ) ) - (func $i32x4.widen_low_i16x8_u (; 176 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i32x4.widen_low_i16x8_u (; 176 ;) (param $0 v128) (result v128) (i32x4.widen_low_i16x8_u (local.get $0) ) ) - (func $i32x4.widen_high_i16x8_u (; 177 ;) (type $FUNCSIG$VV) (param $0 v128) (result v128) + (func $i32x4.widen_high_i16x8_u (; 177 ;) (param $0 v128) (result v128) (i32x4.widen_high_i16x8_u (local.get $0) ) ) - (func $i16x8.load8x8_u (; 178 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $i16x8.load8x8_u (; 178 ;) (param $0 i32) (result v128) (i16x8.load8x8_u (local.get $0) ) ) - (func $i16x8.load8x8_s (; 179 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $i16x8.load8x8_s (; 179 ;) (param $0 i32) (result v128) (i16x8.load8x8_s (local.get $0) ) ) - (func $i32x4.load16x4_s (; 180 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $i32x4.load16x4_s (; 180 ;) (param $0 i32) (result v128) (i32x4.load16x4_s (local.get $0) ) ) - (func $i32x4.load16x4_u (; 181 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $i32x4.load16x4_u (; 181 ;) (param $0 i32) (result v128) (i32x4.load16x4_u (local.get $0) ) ) - (func $i64x2.load32x2_s (; 182 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $i64x2.load32x2_s (; 182 ;) (param $0 i32) (result v128) (i64x2.load32x2_s (local.get $0) ) ) - (func $i64x2.load32x2_u (; 183 ;) (type $FUNCSIG$Vi) (param $0 i32) (result v128) + (func $i64x2.load32x2_u (; 183 ;) (param $0 i32) (result v128) (i64x2.load32x2_u (local.get $0) ) ) - (func $v8x16.swizzle (; 184 ;) (type $FUNCSIG$VVV) (param $0 v128) (param $1 v128) (result v128) + (func $v8x16.swizzle (; 184 ;) (param $0 v128) (param $1 v128) (result v128) (v8x16.swizzle (local.get $0) (local.get $1) diff --git a/test/simd.wast.fromBinary b/test/simd.wast.fromBinary index 2313e4f9b..ee13809f6 100644 --- a/test/simd.wast.fromBinary +++ b/test/simd.wast.fromBinary @@ -1,1054 +1,1054 @@ (module - (type $0 (func (param v128 v128) (result v128))) - (type $1 (func (param v128) (result v128))) - (type $2 (func (param v128 i32) (result v128))) - (type $3 (func (param i32) (result v128))) - (type $4 (func (param v128) (result i32))) - (type $5 (func (result v128))) - (type $6 (func (param v128 v128 v128) (result v128))) - (type $7 (func (param i32 v128))) - (type $8 (func (param v128) (result i64))) - (type $9 (func (param v128) (result f32))) - (type $10 (func (param v128) (result f64))) - (type $11 (func (param f32) (result v128))) - (type $12 (func (param f64) (result v128))) - (type $13 (func (param v128 i64) (result v128))) - (type $14 (func (param v128 f32) (result v128))) - (type $15 (func (param v128 f64) (result v128))) + (type $v128_v128_=>_v128 (func (param v128 v128) (result v128))) + (type $v128_=>_v128 (func (param v128) (result v128))) + (type $v128_i32_=>_v128 (func (param v128 i32) (result v128))) + (type $i32_=>_v128 (func (param i32) (result v128))) + (type $v128_=>_i32 (func (param v128) (result i32))) + (type $none_=>_v128 (func (result v128))) + (type $v128_v128_v128_=>_v128 (func (param v128 v128 v128) (result v128))) + (type $i32_v128_=>_none (func (param i32 v128))) + (type $v128_=>_i64 (func (param v128) (result i64))) + (type $v128_=>_f32 (func (param v128) (result f32))) + (type $v128_=>_f64 (func (param v128) (result f64))) + (type $f32_=>_v128 (func (param f32) (result v128))) + (type $f64_=>_v128 (func (param f64) (result v128))) + (type $v128_i64_=>_v128 (func (param v128 i64) (result v128))) + (type $v128_f32_=>_v128 (func (param v128 f32) (result v128))) + (type $v128_f64_=>_v128 (func (param v128 f64) (result v128))) (memory $0 1 1) - (func $v128.load (; 0 ;) (type $3) (param $0 i32) (result v128) + (func $v128.load (; 0 ;) (param $0 i32) (result v128) (v128.load (local.get $0) ) ) - (func $v128.store (; 1 ;) (type $7) (param $0 i32) (param $1 v128) + (func $v128.store (; 1 ;) (param $0 i32) (param $1 v128) (v128.store (local.get $0) (local.get $1) ) ) - (func $v128.const.i8x16 (; 2 ;) (type $5) (result v128) + (func $v128.const.i8x16 (; 2 ;) (result v128) (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) ) - (func $v128.const.i16x8 (; 3 ;) (type $5) (result v128) + (func $v128.const.i16x8 (; 3 ;) (result v128) (v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00080007) ) - (func $v128.const.i32x4 (; 4 ;) (type $5) (result v128) + (func $v128.const.i32x4 (; 4 ;) (result v128) (v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004) ) - (func $v128.const.i64x2 (; 5 ;) (type $5) (result v128) + (func $v128.const.i64x2 (; 5 ;) (result v128) (v128.const i32x4 0x00000001 0x00000000 0x00000002 0x00000000) ) - (func $v128.const.f32x4 (; 6 ;) (type $5) (result v128) + (func $v128.const.f32x4 (; 6 ;) (result v128) (v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000) ) - (func $v128.const.f64x2 (; 7 ;) (type $5) (result v128) + (func $v128.const.f64x2 (; 7 ;) (result v128) (v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000) ) - (func $v128.shuffle (; 8 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $v128.shuffle (; 8 ;) (param $0 v128) (param $1 v128) (result v128) (v8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 (local.get $0) (local.get $1) ) ) - (func $i8x16.splat (; 9 ;) (type $3) (param $0 i32) (result v128) + (func $i8x16.splat (; 9 ;) (param $0 i32) (result v128) (i8x16.splat (local.get $0) ) ) - (func $i8x16.extract_lane_s (; 10 ;) (type $4) (param $0 v128) (result i32) + (func $i8x16.extract_lane_s (; 10 ;) (param $0 v128) (result i32) (i8x16.extract_lane_s 0 (local.get $0) ) ) - (func $i8x16.extract_lane_u (; 11 ;) (type $4) (param $0 v128) (result i32) + (func $i8x16.extract_lane_u (; 11 ;) (param $0 v128) (result i32) (i8x16.extract_lane_u 0 (local.get $0) ) ) - (func $i8x16.replace_lane (; 12 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i8x16.replace_lane (; 12 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $i16x8.splat (; 13 ;) (type $3) (param $0 i32) (result v128) + (func $i16x8.splat (; 13 ;) (param $0 i32) (result v128) (i16x8.splat (local.get $0) ) ) - (func $i16x8.extract_lane_s (; 14 ;) (type $4) (param $0 v128) (result i32) + (func $i16x8.extract_lane_s (; 14 ;) (param $0 v128) (result i32) (i16x8.extract_lane_s 0 (local.get $0) ) ) - (func $i16x8.extract_lane_u (; 15 ;) (type $4) (param $0 v128) (result i32) + (func $i16x8.extract_lane_u (; 15 ;) (param $0 v128) (result i32) (i16x8.extract_lane_u 0 (local.get $0) ) ) - (func $i16x8.replace_lane (; 16 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i16x8.replace_lane (; 16 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $i32x4.splat (; 17 ;) (type $3) (param $0 i32) (result v128) + (func $i32x4.splat (; 17 ;) (param $0 i32) (result v128) (i32x4.splat (local.get $0) ) ) - (func $i32x4.extract_lane (; 18 ;) (type $4) (param $0 v128) (result i32) + (func $i32x4.extract_lane (; 18 ;) (param $0 v128) (result i32) (i32x4.extract_lane 0 (local.get $0) ) ) - (func $i32x4.replace_lane (; 19 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i32x4.replace_lane (; 19 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $i64x2.extract_lane (; 20 ;) (type $8) (param $0 v128) (result i64) + (func $i64x2.extract_lane (; 20 ;) (param $0 v128) (result i64) (i64x2.extract_lane 0 (local.get $0) ) ) - (func $i64x2.replace_lane (; 21 ;) (type $13) (param $0 v128) (param $1 i64) (result v128) + (func $i64x2.replace_lane (; 21 ;) (param $0 v128) (param $1 i64) (result v128) (i64x2.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $f32x4.splat (; 22 ;) (type $11) (param $0 f32) (result v128) + (func $f32x4.splat (; 22 ;) (param $0 f32) (result v128) (f32x4.splat (local.get $0) ) ) - (func $f32x4.extract_lane (; 23 ;) (type $9) (param $0 v128) (result f32) + (func $f32x4.extract_lane (; 23 ;) (param $0 v128) (result f32) (f32x4.extract_lane 0 (local.get $0) ) ) - (func $f32x4.replace_lane (; 24 ;) (type $14) (param $0 v128) (param $1 f32) (result v128) + (func $f32x4.replace_lane (; 24 ;) (param $0 v128) (param $1 f32) (result v128) (f32x4.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $f64x2.splat (; 25 ;) (type $12) (param $0 f64) (result v128) + (func $f64x2.splat (; 25 ;) (param $0 f64) (result v128) (f64x2.splat (local.get $0) ) ) - (func $f64x2.extract_lane (; 26 ;) (type $10) (param $0 v128) (result f64) + (func $f64x2.extract_lane (; 26 ;) (param $0 v128) (result f64) (f64x2.extract_lane 0 (local.get $0) ) ) - (func $f64x2.replace_lane (; 27 ;) (type $15) (param $0 v128) (param $1 f64) (result v128) + (func $f64x2.replace_lane (; 27 ;) (param $0 v128) (param $1 f64) (result v128) (f64x2.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $i8x16.eq (; 28 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.eq (; 28 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.eq (local.get $0) (local.get $1) ) ) - (func $i8x16.ne (; 29 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.ne (; 29 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.ne (local.get $0) (local.get $1) ) ) - (func $i8x16.lt_s (; 30 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.lt_s (; 30 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.lt_s (local.get $0) (local.get $1) ) ) - (func $i8x16.lt_u (; 31 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.lt_u (; 31 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.lt_u (local.get $0) (local.get $1) ) ) - (func $i8x16.gt_s (; 32 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.gt_s (; 32 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.gt_s (local.get $0) (local.get $1) ) ) - (func $i8x16.gt_u (; 33 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.gt_u (; 33 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.gt_u (local.get $0) (local.get $1) ) ) - (func $i8x16.le_s (; 34 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.le_s (; 34 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.le_s (local.get $0) (local.get $1) ) ) - (func $i8x16.le_u (; 35 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.le_u (; 35 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.le_u (local.get $0) (local.get $1) ) ) - (func $i8x16.ge_s (; 36 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.ge_s (; 36 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.ge_s (local.get $0) (local.get $1) ) ) - (func $i8x16.ge_u (; 37 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.ge_u (; 37 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.ge_u (local.get $0) (local.get $1) ) ) - (func $i16x8.eq (; 38 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.eq (; 38 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.eq (local.get $0) (local.get $1) ) ) - (func $i16x8.ne (; 39 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.ne (; 39 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.ne (local.get $0) (local.get $1) ) ) - (func $i16x8.lt_s (; 40 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.lt_s (; 40 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.lt_s (local.get $0) (local.get $1) ) ) - (func $i16x8.lt_u (; 41 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.lt_u (; 41 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.lt_u (local.get $0) (local.get $1) ) ) - (func $i16x8.gt_s (; 42 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.gt_s (; 42 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.gt_s (local.get $0) (local.get $1) ) ) - (func $i16x8.gt_u (; 43 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.gt_u (; 43 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.gt_u (local.get $0) (local.get $1) ) ) - (func $i16x8.le_s (; 44 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.le_s (; 44 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.le_s (local.get $0) (local.get $1) ) ) - (func $i16x8.le_u (; 45 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.le_u (; 45 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.le_u (local.get $0) (local.get $1) ) ) - (func $i16x8.ge_s (; 46 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.ge_s (; 46 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.ge_s (local.get $0) (local.get $1) ) ) - (func $i16x8.ge_u (; 47 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.ge_u (; 47 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.ge_u (local.get $0) (local.get $1) ) ) - (func $i32x4.eq (; 48 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.eq (; 48 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.eq (local.get $0) (local.get $1) ) ) - (func $i32x4.ne (; 49 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.ne (; 49 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.ne (local.get $0) (local.get $1) ) ) - (func $i32x4.lt_s (; 50 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.lt_s (; 50 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.lt_s (local.get $0) (local.get $1) ) ) - (func $i32x4.lt_u (; 51 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.lt_u (; 51 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.lt_u (local.get $0) (local.get $1) ) ) - (func $i32x4.gt_s (; 52 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.gt_s (; 52 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.gt_s (local.get $0) (local.get $1) ) ) - (func $i32x4.gt_u (; 53 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.gt_u (; 53 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.gt_u (local.get $0) (local.get $1) ) ) - (func $i32x4.le_s (; 54 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.le_s (; 54 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.le_s (local.get $0) (local.get $1) ) ) - (func $i32x4.le_u (; 55 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.le_u (; 55 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.le_u (local.get $0) (local.get $1) ) ) - (func $i32x4.ge_s (; 56 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.ge_s (; 56 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.ge_s (local.get $0) (local.get $1) ) ) - (func $i32x4.ge_u (; 57 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.ge_u (; 57 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.ge_u (local.get $0) (local.get $1) ) ) - (func $f32x4.eq (; 58 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.eq (; 58 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.eq (local.get $0) (local.get $1) ) ) - (func $f32x4.ne (; 59 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.ne (; 59 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.ne (local.get $0) (local.get $1) ) ) - (func $f32x4.lt (; 60 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.lt (; 60 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.lt (local.get $0) (local.get $1) ) ) - (func $f32x4.gt (; 61 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.gt (; 61 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.gt (local.get $0) (local.get $1) ) ) - (func $f32x4.le (; 62 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.le (; 62 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.le (local.get $0) (local.get $1) ) ) - (func $f32x4.ge (; 63 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.ge (; 63 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.ge (local.get $0) (local.get $1) ) ) - (func $f64x2.eq (; 64 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.eq (; 64 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.eq (local.get $0) (local.get $1) ) ) - (func $f64x2.ne (; 65 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.ne (; 65 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.ne (local.get $0) (local.get $1) ) ) - (func $f64x2.lt (; 66 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.lt (; 66 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.lt (local.get $0) (local.get $1) ) ) - (func $f64x2.gt (; 67 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.gt (; 67 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.gt (local.get $0) (local.get $1) ) ) - (func $f64x2.le (; 68 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.le (; 68 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.le (local.get $0) (local.get $1) ) ) - (func $f64x2.ge (; 69 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.ge (; 69 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.ge (local.get $0) (local.get $1) ) ) - (func $v128.not (; 70 ;) (type $1) (param $0 v128) (result v128) + (func $v128.not (; 70 ;) (param $0 v128) (result v128) (v128.not (local.get $0) ) ) - (func $v128.and (; 71 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $v128.and (; 71 ;) (param $0 v128) (param $1 v128) (result v128) (v128.and (local.get $0) (local.get $1) ) ) - (func $v128.or (; 72 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $v128.or (; 72 ;) (param $0 v128) (param $1 v128) (result v128) (v128.or (local.get $0) (local.get $1) ) ) - (func $v128.xor (; 73 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $v128.xor (; 73 ;) (param $0 v128) (param $1 v128) (result v128) (v128.xor (local.get $0) (local.get $1) ) ) - (func $v128.andnot (; 74 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $v128.andnot (; 74 ;) (param $0 v128) (param $1 v128) (result v128) (v128.andnot (local.get $0) (local.get $1) ) ) - (func $v128.bitselect (; 75 ;) (type $6) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $v128.bitselect (; 75 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (v128.bitselect (local.get $0) (local.get $1) (local.get $2) ) ) - (func $i8x16.neg (; 76 ;) (type $1) (param $0 v128) (result v128) + (func $i8x16.neg (; 76 ;) (param $0 v128) (result v128) (i8x16.neg (local.get $0) ) ) - (func $i8x16.any_true (; 77 ;) (type $4) (param $0 v128) (result i32) + (func $i8x16.any_true (; 77 ;) (param $0 v128) (result i32) (i8x16.any_true (local.get $0) ) ) - (func $i8x16.all_true (; 78 ;) (type $4) (param $0 v128) (result i32) + (func $i8x16.all_true (; 78 ;) (param $0 v128) (result i32) (i8x16.all_true (local.get $0) ) ) - (func $i8x16.shl (; 79 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i8x16.shl (; 79 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.shl (local.get $0) (local.get $1) ) ) - (func $i8x16.shr_s (; 80 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i8x16.shr_s (; 80 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.shr_s (local.get $0) (local.get $1) ) ) - (func $i8x16.shr_u (; 81 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i8x16.shr_u (; 81 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.shr_u (local.get $0) (local.get $1) ) ) - (func $i8x16.add (; 82 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.add (; 82 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.add (local.get $0) (local.get $1) ) ) - (func $i8x16.add_saturate_s (; 83 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.add_saturate_s (; 83 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.add_saturate_s (local.get $0) (local.get $1) ) ) - (func $i8x16.add_saturate_u (; 84 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.add_saturate_u (; 84 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.add_saturate_u (local.get $0) (local.get $1) ) ) - (func $i8x16.sub (; 85 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.sub (; 85 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.sub (local.get $0) (local.get $1) ) ) - (func $i8x16.sub_saturate_s (; 86 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.sub_saturate_s (; 86 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.sub_saturate_s (local.get $0) (local.get $1) ) ) - (func $i8x16.sub_saturate_u (; 87 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.sub_saturate_u (; 87 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.sub_saturate_u (local.get $0) (local.get $1) ) ) - (func $i8x16.mul (; 88 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.mul (; 88 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.mul (local.get $0) (local.get $1) ) ) - (func $i8x16.min_s (; 89 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.min_s (; 89 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.min_s (local.get $0) (local.get $1) ) ) - (func $i8x16.min_u (; 90 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.min_u (; 90 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.min_u (local.get $0) (local.get $1) ) ) - (func $i8x16.max_s (; 91 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.max_s (; 91 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.max_s (local.get $0) (local.get $1) ) ) - (func $i8x16.max_u (; 92 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.max_u (; 92 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.max_u (local.get $0) (local.get $1) ) ) - (func $i16x8.neg (; 93 ;) (type $1) (param $0 v128) (result v128) + (func $i16x8.neg (; 93 ;) (param $0 v128) (result v128) (i16x8.neg (local.get $0) ) ) - (func $i16x8.any_true (; 94 ;) (type $4) (param $0 v128) (result i32) + (func $i16x8.any_true (; 94 ;) (param $0 v128) (result i32) (i16x8.any_true (local.get $0) ) ) - (func $i16x8.all_true (; 95 ;) (type $4) (param $0 v128) (result i32) + (func $i16x8.all_true (; 95 ;) (param $0 v128) (result i32) (i16x8.all_true (local.get $0) ) ) - (func $i16x8.shl (; 96 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i16x8.shl (; 96 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.shl (local.get $0) (local.get $1) ) ) - (func $i16x8.shr_s (; 97 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i16x8.shr_s (; 97 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.shr_s (local.get $0) (local.get $1) ) ) - (func $i16x8.shr_u (; 98 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i16x8.shr_u (; 98 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.shr_u (local.get $0) (local.get $1) ) ) - (func $i16x8.add (; 99 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.add (; 99 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.add (local.get $0) (local.get $1) ) ) - (func $i16x8.add_saturate_s (; 100 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.add_saturate_s (; 100 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.add_saturate_s (local.get $0) (local.get $1) ) ) - (func $i16x8.add_saturate_u (; 101 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.add_saturate_u (; 101 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.add_saturate_u (local.get $0) (local.get $1) ) ) - (func $i16x8.sub (; 102 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.sub (; 102 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.sub (local.get $0) (local.get $1) ) ) - (func $i16x8.sub_saturate_s (; 103 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.sub_saturate_s (; 103 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.sub_saturate_s (local.get $0) (local.get $1) ) ) - (func $i16x8.sub_saturate_u (; 104 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.sub_saturate_u (; 104 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.sub_saturate_u (local.get $0) (local.get $1) ) ) - (func $i16x8.mul (; 105 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.mul (; 105 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.mul (local.get $0) (local.get $1) ) ) - (func $i16x8.min_s (; 106 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.min_s (; 106 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.min_s (local.get $0) (local.get $1) ) ) - (func $i16x8.min_u (; 107 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.min_u (; 107 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.min_u (local.get $0) (local.get $1) ) ) - (func $i16x8.max_s (; 108 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.max_s (; 108 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.max_s (local.get $0) (local.get $1) ) ) - (func $i16x8.max_u (; 109 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.max_u (; 109 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.max_u (local.get $0) (local.get $1) ) ) - (func $i32x4.neg (; 110 ;) (type $1) (param $0 v128) (result v128) + (func $i32x4.neg (; 110 ;) (param $0 v128) (result v128) (i32x4.neg (local.get $0) ) ) - (func $i32x4.any_true (; 111 ;) (type $4) (param $0 v128) (result i32) + (func $i32x4.any_true (; 111 ;) (param $0 v128) (result i32) (i32x4.any_true (local.get $0) ) ) - (func $i32x4.all_true (; 112 ;) (type $4) (param $0 v128) (result i32) + (func $i32x4.all_true (; 112 ;) (param $0 v128) (result i32) (i32x4.all_true (local.get $0) ) ) - (func $i32x4.shl (; 113 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i32x4.shl (; 113 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.shl (local.get $0) (local.get $1) ) ) - (func $i32x4.shr_s (; 114 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i32x4.shr_s (; 114 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.shr_s (local.get $0) (local.get $1) ) ) - (func $i32x4.shr_u (; 115 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i32x4.shr_u (; 115 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.shr_u (local.get $0) (local.get $1) ) ) - (func $i32x4.add (; 116 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.add (; 116 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.add (local.get $0) (local.get $1) ) ) - (func $i32x4.sub (; 117 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.sub (; 117 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.sub (local.get $0) (local.get $1) ) ) - (func $i32x4.mul (; 118 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.mul (; 118 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.mul (local.get $0) (local.get $1) ) ) - (func $i32x4.min_s (; 119 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.min_s (; 119 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.min_s (local.get $0) (local.get $1) ) ) - (func $i32x4.min_u (; 120 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.min_u (; 120 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.min_u (local.get $0) (local.get $1) ) ) - (func $i32x4.max_s (; 121 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.max_s (; 121 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.max_s (local.get $0) (local.get $1) ) ) - (func $i32x4.max_u (; 122 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.max_u (; 122 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.max_u (local.get $0) (local.get $1) ) ) - (func $i32x4.dot_i16x8_s (; 123 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i32x4.dot_i16x8_s (; 123 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.dot_i16x8_s (local.get $0) (local.get $1) ) ) - (func $i64x2.neg (; 124 ;) (type $1) (param $0 v128) (result v128) + (func $i64x2.neg (; 124 ;) (param $0 v128) (result v128) (i64x2.neg (local.get $0) ) ) - (func $i64x2.any_true (; 125 ;) (type $4) (param $0 v128) (result i32) + (func $i64x2.any_true (; 125 ;) (param $0 v128) (result i32) (i64x2.any_true (local.get $0) ) ) - (func $i64x2.all_true (; 126 ;) (type $4) (param $0 v128) (result i32) + (func $i64x2.all_true (; 126 ;) (param $0 v128) (result i32) (i64x2.all_true (local.get $0) ) ) - (func $i64x2.shl (; 127 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i64x2.shl (; 127 ;) (param $0 v128) (param $1 i32) (result v128) (i64x2.shl (local.get $0) (local.get $1) ) ) - (func $i64x2.shr_s (; 128 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i64x2.shr_s (; 128 ;) (param $0 v128) (param $1 i32) (result v128) (i64x2.shr_s (local.get $0) (local.get $1) ) ) - (func $i64x2.shr_u (; 129 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $i64x2.shr_u (; 129 ;) (param $0 v128) (param $1 i32) (result v128) (i64x2.shr_u (local.get $0) (local.get $1) ) ) - (func $i64x2.add (; 130 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i64x2.add (; 130 ;) (param $0 v128) (param $1 v128) (result v128) (i64x2.add (local.get $0) (local.get $1) ) ) - (func $i64x2.sub (; 131 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i64x2.sub (; 131 ;) (param $0 v128) (param $1 v128) (result v128) (i64x2.sub (local.get $0) (local.get $1) ) ) - (func $f32x4.add (; 132 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.add (; 132 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.add (local.get $0) (local.get $1) ) ) - (func $f32x4.sub (; 133 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.sub (; 133 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.sub (local.get $0) (local.get $1) ) ) - (func $f32x4.mul (; 134 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.mul (; 134 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.mul (local.get $0) (local.get $1) ) ) - (func $f32x4.div (; 135 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.div (; 135 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.div (local.get $0) (local.get $1) ) ) - (func $f32x4.min (; 136 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.min (; 136 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.min (local.get $0) (local.get $1) ) ) - (func $f32x4.max (; 137 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f32x4.max (; 137 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.max (local.get $0) (local.get $1) ) ) - (func $f32x4.abs (; 138 ;) (type $1) (param $0 v128) (result v128) + (func $f32x4.abs (; 138 ;) (param $0 v128) (result v128) (f32x4.abs (local.get $0) ) ) - (func $f32x4.neg (; 139 ;) (type $1) (param $0 v128) (result v128) + (func $f32x4.neg (; 139 ;) (param $0 v128) (result v128) (f32x4.neg (local.get $0) ) ) - (func $f32x4.sqrt (; 140 ;) (type $1) (param $0 v128) (result v128) + (func $f32x4.sqrt (; 140 ;) (param $0 v128) (result v128) (f32x4.sqrt (local.get $0) ) ) - (func $f32x4.qfma (; 141 ;) (type $6) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $f32x4.qfma (; 141 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f32x4.qfma (local.get $0) (local.get $1) (local.get $2) ) ) - (func $f32x4.qfms (; 142 ;) (type $6) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $f32x4.qfms (; 142 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f32x4.qfms (local.get $0) (local.get $1) (local.get $2) ) ) - (func $f64x2.add (; 143 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.add (; 143 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.add (local.get $0) (local.get $1) ) ) - (func $f64x2.sub (; 144 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.sub (; 144 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.sub (local.get $0) (local.get $1) ) ) - (func $f64x2.mul (; 145 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.mul (; 145 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.mul (local.get $0) (local.get $1) ) ) - (func $f64x2.div (; 146 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.div (; 146 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.div (local.get $0) (local.get $1) ) ) - (func $f64x2.min (; 147 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.min (; 147 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.min (local.get $0) (local.get $1) ) ) - (func $f64x2.max (; 148 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $f64x2.max (; 148 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.max (local.get $0) (local.get $1) ) ) - (func $f64x2.abs (; 149 ;) (type $1) (param $0 v128) (result v128) + (func $f64x2.abs (; 149 ;) (param $0 v128) (result v128) (f64x2.abs (local.get $0) ) ) - (func $f64x2.neg (; 150 ;) (type $1) (param $0 v128) (result v128) + (func $f64x2.neg (; 150 ;) (param $0 v128) (result v128) (f64x2.neg (local.get $0) ) ) - (func $f64x2.sqrt (; 151 ;) (type $1) (param $0 v128) (result v128) + (func $f64x2.sqrt (; 151 ;) (param $0 v128) (result v128) (f64x2.sqrt (local.get $0) ) ) - (func $f64x2.qfma (; 152 ;) (type $6) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $f64x2.qfma (; 152 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f64x2.qfma (local.get $0) (local.get $1) (local.get $2) ) ) - (func $f64x2.qfms (; 153 ;) (type $6) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $f64x2.qfms (; 153 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f64x2.qfms (local.get $0) (local.get $1) (local.get $2) ) ) - (func $i32x4.trunc_sat_f32x4_s (; 154 ;) (type $1) (param $0 v128) (result v128) + (func $i32x4.trunc_sat_f32x4_s (; 154 ;) (param $0 v128) (result v128) (i32x4.trunc_sat_f32x4_s (local.get $0) ) ) - (func $i32x4.trunc_sat_f32x4_u (; 155 ;) (type $1) (param $0 v128) (result v128) + (func $i32x4.trunc_sat_f32x4_u (; 155 ;) (param $0 v128) (result v128) (i32x4.trunc_sat_f32x4_u (local.get $0) ) ) - (func $i64x2.trunc_sat_f64x2_s (; 156 ;) (type $1) (param $0 v128) (result v128) + (func $i64x2.trunc_sat_f64x2_s (; 156 ;) (param $0 v128) (result v128) (i64x2.trunc_sat_f64x2_s (local.get $0) ) ) - (func $i64x2.trunc_sat_f64x2_u (; 157 ;) (type $1) (param $0 v128) (result v128) + (func $i64x2.trunc_sat_f64x2_u (; 157 ;) (param $0 v128) (result v128) (i64x2.trunc_sat_f64x2_u (local.get $0) ) ) - (func $f32x4.convert_i32x4_s (; 158 ;) (type $1) (param $0 v128) (result v128) + (func $f32x4.convert_i32x4_s (; 158 ;) (param $0 v128) (result v128) (f32x4.convert_i32x4_s (local.get $0) ) ) - (func $f32x4.convert_i32x4_u (; 159 ;) (type $1) (param $0 v128) (result v128) + (func $f32x4.convert_i32x4_u (; 159 ;) (param $0 v128) (result v128) (f32x4.convert_i32x4_u (local.get $0) ) ) - (func $f64x2.convert_i64x2_s (; 160 ;) (type $1) (param $0 v128) (result v128) + (func $f64x2.convert_i64x2_s (; 160 ;) (param $0 v128) (result v128) (f64x2.convert_i64x2_s (local.get $0) ) ) - (func $f64x2.convert_i64x2_u (; 161 ;) (type $1) (param $0 v128) (result v128) + (func $f64x2.convert_i64x2_u (; 161 ;) (param $0 v128) (result v128) (f64x2.convert_i64x2_u (local.get $0) ) ) - (func $v8x16.load_splat (; 162 ;) (type $3) (param $0 i32) (result v128) + (func $v8x16.load_splat (; 162 ;) (param $0 i32) (result v128) (v8x16.load_splat (local.get $0) ) ) - (func $v16x8.load_splat (; 163 ;) (type $3) (param $0 i32) (result v128) + (func $v16x8.load_splat (; 163 ;) (param $0 i32) (result v128) (v16x8.load_splat (local.get $0) ) ) - (func $v32x4.load_splat (; 164 ;) (type $3) (param $0 i32) (result v128) + (func $v32x4.load_splat (; 164 ;) (param $0 i32) (result v128) (v32x4.load_splat (local.get $0) ) ) - (func $v64x2.load_splat (; 165 ;) (type $3) (param $0 i32) (result v128) + (func $v64x2.load_splat (; 165 ;) (param $0 i32) (result v128) (v64x2.load_splat (local.get $0) ) ) - (func $i8x16.narrow_i16x8_s (; 166 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.narrow_i16x8_s (; 166 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.narrow_i16x8_s (local.get $0) (local.get $1) ) ) - (func $i8x16.narrow_i16x8_u (; 167 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i8x16.narrow_i16x8_u (; 167 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.narrow_i16x8_u (local.get $0) (local.get $1) ) ) - (func $i16x8.narrow_i32x4_s (; 168 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.narrow_i32x4_s (; 168 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.narrow_i32x4_s (local.get $0) (local.get $1) ) ) - (func $i16x8.narrow_i32x4_u (; 169 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $i16x8.narrow_i32x4_u (; 169 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.narrow_i32x4_u (local.get $0) (local.get $1) ) ) - (func $i16x8.widen_low_i8x16_s (; 170 ;) (type $1) (param $0 v128) (result v128) + (func $i16x8.widen_low_i8x16_s (; 170 ;) (param $0 v128) (result v128) (i16x8.widen_low_i8x16_s (local.get $0) ) ) - (func $i16x8.widen_high_i8x16_s (; 171 ;) (type $1) (param $0 v128) (result v128) + (func $i16x8.widen_high_i8x16_s (; 171 ;) (param $0 v128) (result v128) (i16x8.widen_high_i8x16_s (local.get $0) ) ) - (func $i16x8.widen_low_i8x16_u (; 172 ;) (type $1) (param $0 v128) (result v128) + (func $i16x8.widen_low_i8x16_u (; 172 ;) (param $0 v128) (result v128) (i16x8.widen_low_i8x16_u (local.get $0) ) ) - (func $i16x8.widen_high_i8x16_u (; 173 ;) (type $1) (param $0 v128) (result v128) + (func $i16x8.widen_high_i8x16_u (; 173 ;) (param $0 v128) (result v128) (i16x8.widen_high_i8x16_u (local.get $0) ) ) - (func $i32x4.widen_low_i16x8_s (; 174 ;) (type $1) (param $0 v128) (result v128) + (func $i32x4.widen_low_i16x8_s (; 174 ;) (param $0 v128) (result v128) (i32x4.widen_low_i16x8_s (local.get $0) ) ) - (func $i32x4.widen_high_i16x8_s (; 175 ;) (type $1) (param $0 v128) (result v128) + (func $i32x4.widen_high_i16x8_s (; 175 ;) (param $0 v128) (result v128) (i32x4.widen_high_i16x8_s (local.get $0) ) ) - (func $i32x4.widen_low_i16x8_u (; 176 ;) (type $1) (param $0 v128) (result v128) + (func $i32x4.widen_low_i16x8_u (; 176 ;) (param $0 v128) (result v128) (i32x4.widen_low_i16x8_u (local.get $0) ) ) - (func $i32x4.widen_high_i16x8_u (; 177 ;) (type $1) (param $0 v128) (result v128) + (func $i32x4.widen_high_i16x8_u (; 177 ;) (param $0 v128) (result v128) (i32x4.widen_high_i16x8_u (local.get $0) ) ) - (func $i16x8.load8x8_u (; 178 ;) (type $3) (param $0 i32) (result v128) + (func $i16x8.load8x8_u (; 178 ;) (param $0 i32) (result v128) (i16x8.load8x8_u (local.get $0) ) ) - (func $i16x8.load8x8_s (; 179 ;) (type $3) (param $0 i32) (result v128) + (func $i16x8.load8x8_s (; 179 ;) (param $0 i32) (result v128) (i16x8.load8x8_s (local.get $0) ) ) - (func $i32x4.load16x4_s (; 180 ;) (type $3) (param $0 i32) (result v128) + (func $i32x4.load16x4_s (; 180 ;) (param $0 i32) (result v128) (i32x4.load16x4_s (local.get $0) ) ) - (func $i32x4.load16x4_u (; 181 ;) (type $3) (param $0 i32) (result v128) + (func $i32x4.load16x4_u (; 181 ;) (param $0 i32) (result v128) (i32x4.load16x4_u (local.get $0) ) ) - (func $i64x2.load32x2_s (; 182 ;) (type $3) (param $0 i32) (result v128) + (func $i64x2.load32x2_s (; 182 ;) (param $0 i32) (result v128) (i64x2.load32x2_s (local.get $0) ) ) - (func $i64x2.load32x2_u (; 183 ;) (type $3) (param $0 i32) (result v128) + (func $i64x2.load32x2_u (; 183 ;) (param $0 i32) (result v128) (i64x2.load32x2_u (local.get $0) ) ) - (func $v8x16.swizzle (; 184 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $v8x16.swizzle (; 184 ;) (param $0 v128) (param $1 v128) (result v128) (v8x16.swizzle (local.get $0) (local.get $1) diff --git a/test/simd.wast.fromBinary.noDebugInfo b/test/simd.wast.fromBinary.noDebugInfo index d4315cc62..80983aae0 100644 --- a/test/simd.wast.fromBinary.noDebugInfo +++ b/test/simd.wast.fromBinary.noDebugInfo @@ -1,1054 +1,1054 @@ (module - (type $0 (func (param v128 v128) (result v128))) - (type $1 (func (param v128) (result v128))) - (type $2 (func (param v128 i32) (result v128))) - (type $3 (func (param i32) (result v128))) - (type $4 (func (param v128) (result i32))) - (type $5 (func (result v128))) - (type $6 (func (param v128 v128 v128) (result v128))) - (type $7 (func (param i32 v128))) - (type $8 (func (param v128) (result i64))) - (type $9 (func (param v128) (result f32))) - (type $10 (func (param v128) (result f64))) - (type $11 (func (param f32) (result v128))) - (type $12 (func (param f64) (result v128))) - (type $13 (func (param v128 i64) (result v128))) - (type $14 (func (param v128 f32) (result v128))) - (type $15 (func (param v128 f64) (result v128))) + (type $v128_v128_=>_v128 (func (param v128 v128) (result v128))) + (type $v128_=>_v128 (func (param v128) (result v128))) + (type $v128_i32_=>_v128 (func (param v128 i32) (result v128))) + (type $i32_=>_v128 (func (param i32) (result v128))) + (type $v128_=>_i32 (func (param v128) (result i32))) + (type $none_=>_v128 (func (result v128))) + (type $v128_v128_v128_=>_v128 (func (param v128 v128 v128) (result v128))) + (type $i32_v128_=>_none (func (param i32 v128))) + (type $v128_=>_i64 (func (param v128) (result i64))) + (type $v128_=>_f32 (func (param v128) (result f32))) + (type $v128_=>_f64 (func (param v128) (result f64))) + (type $f32_=>_v128 (func (param f32) (result v128))) + (type $f64_=>_v128 (func (param f64) (result v128))) + (type $v128_i64_=>_v128 (func (param v128 i64) (result v128))) + (type $v128_f32_=>_v128 (func (param v128 f32) (result v128))) + (type $v128_f64_=>_v128 (func (param v128 f64) (result v128))) (memory $0 1 1) - (func $0 (; 0 ;) (type $3) (param $0 i32) (result v128) + (func $0 (; 0 ;) (param $0 i32) (result v128) (v128.load (local.get $0) ) ) - (func $1 (; 1 ;) (type $7) (param $0 i32) (param $1 v128) + (func $1 (; 1 ;) (param $0 i32) (param $1 v128) (v128.store (local.get $0) (local.get $1) ) ) - (func $2 (; 2 ;) (type $5) (result v128) + (func $2 (; 2 ;) (result v128) (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) ) - (func $3 (; 3 ;) (type $5) (result v128) + (func $3 (; 3 ;) (result v128) (v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00080007) ) - (func $4 (; 4 ;) (type $5) (result v128) + (func $4 (; 4 ;) (result v128) (v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004) ) - (func $5 (; 5 ;) (type $5) (result v128) + (func $5 (; 5 ;) (result v128) (v128.const i32x4 0x00000001 0x00000000 0x00000002 0x00000000) ) - (func $6 (; 6 ;) (type $5) (result v128) + (func $6 (; 6 ;) (result v128) (v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000) ) - (func $7 (; 7 ;) (type $5) (result v128) + (func $7 (; 7 ;) (result v128) (v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000) ) - (func $8 (; 8 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $8 (; 8 ;) (param $0 v128) (param $1 v128) (result v128) (v8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 (local.get $0) (local.get $1) ) ) - (func $9 (; 9 ;) (type $3) (param $0 i32) (result v128) + (func $9 (; 9 ;) (param $0 i32) (result v128) (i8x16.splat (local.get $0) ) ) - (func $10 (; 10 ;) (type $4) (param $0 v128) (result i32) + (func $10 (; 10 ;) (param $0 v128) (result i32) (i8x16.extract_lane_s 0 (local.get $0) ) ) - (func $11 (; 11 ;) (type $4) (param $0 v128) (result i32) + (func $11 (; 11 ;) (param $0 v128) (result i32) (i8x16.extract_lane_u 0 (local.get $0) ) ) - (func $12 (; 12 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $12 (; 12 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $13 (; 13 ;) (type $3) (param $0 i32) (result v128) + (func $13 (; 13 ;) (param $0 i32) (result v128) (i16x8.splat (local.get $0) ) ) - (func $14 (; 14 ;) (type $4) (param $0 v128) (result i32) + (func $14 (; 14 ;) (param $0 v128) (result i32) (i16x8.extract_lane_s 0 (local.get $0) ) ) - (func $15 (; 15 ;) (type $4) (param $0 v128) (result i32) + (func $15 (; 15 ;) (param $0 v128) (result i32) (i16x8.extract_lane_u 0 (local.get $0) ) ) - (func $16 (; 16 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $16 (; 16 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $17 (; 17 ;) (type $3) (param $0 i32) (result v128) + (func $17 (; 17 ;) (param $0 i32) (result v128) (i32x4.splat (local.get $0) ) ) - (func $18 (; 18 ;) (type $4) (param $0 v128) (result i32) + (func $18 (; 18 ;) (param $0 v128) (result i32) (i32x4.extract_lane 0 (local.get $0) ) ) - (func $19 (; 19 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $19 (; 19 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $20 (; 20 ;) (type $8) (param $0 v128) (result i64) + (func $20 (; 20 ;) (param $0 v128) (result i64) (i64x2.extract_lane 0 (local.get $0) ) ) - (func $21 (; 21 ;) (type $13) (param $0 v128) (param $1 i64) (result v128) + (func $21 (; 21 ;) (param $0 v128) (param $1 i64) (result v128) (i64x2.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $22 (; 22 ;) (type $11) (param $0 f32) (result v128) + (func $22 (; 22 ;) (param $0 f32) (result v128) (f32x4.splat (local.get $0) ) ) - (func $23 (; 23 ;) (type $9) (param $0 v128) (result f32) + (func $23 (; 23 ;) (param $0 v128) (result f32) (f32x4.extract_lane 0 (local.get $0) ) ) - (func $24 (; 24 ;) (type $14) (param $0 v128) (param $1 f32) (result v128) + (func $24 (; 24 ;) (param $0 v128) (param $1 f32) (result v128) (f32x4.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $25 (; 25 ;) (type $12) (param $0 f64) (result v128) + (func $25 (; 25 ;) (param $0 f64) (result v128) (f64x2.splat (local.get $0) ) ) - (func $26 (; 26 ;) (type $10) (param $0 v128) (result f64) + (func $26 (; 26 ;) (param $0 v128) (result f64) (f64x2.extract_lane 0 (local.get $0) ) ) - (func $27 (; 27 ;) (type $15) (param $0 v128) (param $1 f64) (result v128) + (func $27 (; 27 ;) (param $0 v128) (param $1 f64) (result v128) (f64x2.replace_lane 0 (local.get $0) (local.get $1) ) ) - (func $28 (; 28 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $28 (; 28 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.eq (local.get $0) (local.get $1) ) ) - (func $29 (; 29 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $29 (; 29 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.ne (local.get $0) (local.get $1) ) ) - (func $30 (; 30 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $30 (; 30 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.lt_s (local.get $0) (local.get $1) ) ) - (func $31 (; 31 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $31 (; 31 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.lt_u (local.get $0) (local.get $1) ) ) - (func $32 (; 32 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $32 (; 32 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.gt_s (local.get $0) (local.get $1) ) ) - (func $33 (; 33 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $33 (; 33 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.gt_u (local.get $0) (local.get $1) ) ) - (func $34 (; 34 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $34 (; 34 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.le_s (local.get $0) (local.get $1) ) ) - (func $35 (; 35 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $35 (; 35 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.le_u (local.get $0) (local.get $1) ) ) - (func $36 (; 36 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $36 (; 36 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.ge_s (local.get $0) (local.get $1) ) ) - (func $37 (; 37 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $37 (; 37 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.ge_u (local.get $0) (local.get $1) ) ) - (func $38 (; 38 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $38 (; 38 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.eq (local.get $0) (local.get $1) ) ) - (func $39 (; 39 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $39 (; 39 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.ne (local.get $0) (local.get $1) ) ) - (func $40 (; 40 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $40 (; 40 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.lt_s (local.get $0) (local.get $1) ) ) - (func $41 (; 41 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $41 (; 41 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.lt_u (local.get $0) (local.get $1) ) ) - (func $42 (; 42 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $42 (; 42 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.gt_s (local.get $0) (local.get $1) ) ) - (func $43 (; 43 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $43 (; 43 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.gt_u (local.get $0) (local.get $1) ) ) - (func $44 (; 44 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $44 (; 44 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.le_s (local.get $0) (local.get $1) ) ) - (func $45 (; 45 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $45 (; 45 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.le_u (local.get $0) (local.get $1) ) ) - (func $46 (; 46 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $46 (; 46 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.ge_s (local.get $0) (local.get $1) ) ) - (func $47 (; 47 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $47 (; 47 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.ge_u (local.get $0) (local.get $1) ) ) - (func $48 (; 48 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $48 (; 48 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.eq (local.get $0) (local.get $1) ) ) - (func $49 (; 49 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $49 (; 49 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.ne (local.get $0) (local.get $1) ) ) - (func $50 (; 50 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $50 (; 50 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.lt_s (local.get $0) (local.get $1) ) ) - (func $51 (; 51 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $51 (; 51 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.lt_u (local.get $0) (local.get $1) ) ) - (func $52 (; 52 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $52 (; 52 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.gt_s (local.get $0) (local.get $1) ) ) - (func $53 (; 53 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $53 (; 53 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.gt_u (local.get $0) (local.get $1) ) ) - (func $54 (; 54 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $54 (; 54 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.le_s (local.get $0) (local.get $1) ) ) - (func $55 (; 55 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $55 (; 55 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.le_u (local.get $0) (local.get $1) ) ) - (func $56 (; 56 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $56 (; 56 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.ge_s (local.get $0) (local.get $1) ) ) - (func $57 (; 57 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $57 (; 57 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.ge_u (local.get $0) (local.get $1) ) ) - (func $58 (; 58 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $58 (; 58 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.eq (local.get $0) (local.get $1) ) ) - (func $59 (; 59 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $59 (; 59 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.ne (local.get $0) (local.get $1) ) ) - (func $60 (; 60 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $60 (; 60 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.lt (local.get $0) (local.get $1) ) ) - (func $61 (; 61 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $61 (; 61 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.gt (local.get $0) (local.get $1) ) ) - (func $62 (; 62 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $62 (; 62 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.le (local.get $0) (local.get $1) ) ) - (func $63 (; 63 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $63 (; 63 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.ge (local.get $0) (local.get $1) ) ) - (func $64 (; 64 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $64 (; 64 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.eq (local.get $0) (local.get $1) ) ) - (func $65 (; 65 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $65 (; 65 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.ne (local.get $0) (local.get $1) ) ) - (func $66 (; 66 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $66 (; 66 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.lt (local.get $0) (local.get $1) ) ) - (func $67 (; 67 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $67 (; 67 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.gt (local.get $0) (local.get $1) ) ) - (func $68 (; 68 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $68 (; 68 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.le (local.get $0) (local.get $1) ) ) - (func $69 (; 69 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $69 (; 69 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.ge (local.get $0) (local.get $1) ) ) - (func $70 (; 70 ;) (type $1) (param $0 v128) (result v128) + (func $70 (; 70 ;) (param $0 v128) (result v128) (v128.not (local.get $0) ) ) - (func $71 (; 71 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $71 (; 71 ;) (param $0 v128) (param $1 v128) (result v128) (v128.and (local.get $0) (local.get $1) ) ) - (func $72 (; 72 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $72 (; 72 ;) (param $0 v128) (param $1 v128) (result v128) (v128.or (local.get $0) (local.get $1) ) ) - (func $73 (; 73 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $73 (; 73 ;) (param $0 v128) (param $1 v128) (result v128) (v128.xor (local.get $0) (local.get $1) ) ) - (func $74 (; 74 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $74 (; 74 ;) (param $0 v128) (param $1 v128) (result v128) (v128.andnot (local.get $0) (local.get $1) ) ) - (func $75 (; 75 ;) (type $6) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $75 (; 75 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (v128.bitselect (local.get $0) (local.get $1) (local.get $2) ) ) - (func $76 (; 76 ;) (type $1) (param $0 v128) (result v128) + (func $76 (; 76 ;) (param $0 v128) (result v128) (i8x16.neg (local.get $0) ) ) - (func $77 (; 77 ;) (type $4) (param $0 v128) (result i32) + (func $77 (; 77 ;) (param $0 v128) (result i32) (i8x16.any_true (local.get $0) ) ) - (func $78 (; 78 ;) (type $4) (param $0 v128) (result i32) + (func $78 (; 78 ;) (param $0 v128) (result i32) (i8x16.all_true (local.get $0) ) ) - (func $79 (; 79 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $79 (; 79 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.shl (local.get $0) (local.get $1) ) ) - (func $80 (; 80 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $80 (; 80 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.shr_s (local.get $0) (local.get $1) ) ) - (func $81 (; 81 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $81 (; 81 ;) (param $0 v128) (param $1 i32) (result v128) (i8x16.shr_u (local.get $0) (local.get $1) ) ) - (func $82 (; 82 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $82 (; 82 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.add (local.get $0) (local.get $1) ) ) - (func $83 (; 83 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $83 (; 83 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.add_saturate_s (local.get $0) (local.get $1) ) ) - (func $84 (; 84 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $84 (; 84 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.add_saturate_u (local.get $0) (local.get $1) ) ) - (func $85 (; 85 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $85 (; 85 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.sub (local.get $0) (local.get $1) ) ) - (func $86 (; 86 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $86 (; 86 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.sub_saturate_s (local.get $0) (local.get $1) ) ) - (func $87 (; 87 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $87 (; 87 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.sub_saturate_u (local.get $0) (local.get $1) ) ) - (func $88 (; 88 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $88 (; 88 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.mul (local.get $0) (local.get $1) ) ) - (func $89 (; 89 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $89 (; 89 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.min_s (local.get $0) (local.get $1) ) ) - (func $90 (; 90 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $90 (; 90 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.min_u (local.get $0) (local.get $1) ) ) - (func $91 (; 91 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $91 (; 91 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.max_s (local.get $0) (local.get $1) ) ) - (func $92 (; 92 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $92 (; 92 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.max_u (local.get $0) (local.get $1) ) ) - (func $93 (; 93 ;) (type $1) (param $0 v128) (result v128) + (func $93 (; 93 ;) (param $0 v128) (result v128) (i16x8.neg (local.get $0) ) ) - (func $94 (; 94 ;) (type $4) (param $0 v128) (result i32) + (func $94 (; 94 ;) (param $0 v128) (result i32) (i16x8.any_true (local.get $0) ) ) - (func $95 (; 95 ;) (type $4) (param $0 v128) (result i32) + (func $95 (; 95 ;) (param $0 v128) (result i32) (i16x8.all_true (local.get $0) ) ) - (func $96 (; 96 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $96 (; 96 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.shl (local.get $0) (local.get $1) ) ) - (func $97 (; 97 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $97 (; 97 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.shr_s (local.get $0) (local.get $1) ) ) - (func $98 (; 98 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $98 (; 98 ;) (param $0 v128) (param $1 i32) (result v128) (i16x8.shr_u (local.get $0) (local.get $1) ) ) - (func $99 (; 99 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $99 (; 99 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.add (local.get $0) (local.get $1) ) ) - (func $100 (; 100 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $100 (; 100 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.add_saturate_s (local.get $0) (local.get $1) ) ) - (func $101 (; 101 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $101 (; 101 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.add_saturate_u (local.get $0) (local.get $1) ) ) - (func $102 (; 102 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $102 (; 102 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.sub (local.get $0) (local.get $1) ) ) - (func $103 (; 103 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $103 (; 103 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.sub_saturate_s (local.get $0) (local.get $1) ) ) - (func $104 (; 104 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $104 (; 104 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.sub_saturate_u (local.get $0) (local.get $1) ) ) - (func $105 (; 105 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $105 (; 105 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.mul (local.get $0) (local.get $1) ) ) - (func $106 (; 106 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $106 (; 106 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.min_s (local.get $0) (local.get $1) ) ) - (func $107 (; 107 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $107 (; 107 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.min_u (local.get $0) (local.get $1) ) ) - (func $108 (; 108 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $108 (; 108 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.max_s (local.get $0) (local.get $1) ) ) - (func $109 (; 109 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $109 (; 109 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.max_u (local.get $0) (local.get $1) ) ) - (func $110 (; 110 ;) (type $1) (param $0 v128) (result v128) + (func $110 (; 110 ;) (param $0 v128) (result v128) (i32x4.neg (local.get $0) ) ) - (func $111 (; 111 ;) (type $4) (param $0 v128) (result i32) + (func $111 (; 111 ;) (param $0 v128) (result i32) (i32x4.any_true (local.get $0) ) ) - (func $112 (; 112 ;) (type $4) (param $0 v128) (result i32) + (func $112 (; 112 ;) (param $0 v128) (result i32) (i32x4.all_true (local.get $0) ) ) - (func $113 (; 113 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $113 (; 113 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.shl (local.get $0) (local.get $1) ) ) - (func $114 (; 114 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $114 (; 114 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.shr_s (local.get $0) (local.get $1) ) ) - (func $115 (; 115 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $115 (; 115 ;) (param $0 v128) (param $1 i32) (result v128) (i32x4.shr_u (local.get $0) (local.get $1) ) ) - (func $116 (; 116 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $116 (; 116 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.add (local.get $0) (local.get $1) ) ) - (func $117 (; 117 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $117 (; 117 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.sub (local.get $0) (local.get $1) ) ) - (func $118 (; 118 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $118 (; 118 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.mul (local.get $0) (local.get $1) ) ) - (func $119 (; 119 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $119 (; 119 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.min_s (local.get $0) (local.get $1) ) ) - (func $120 (; 120 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $120 (; 120 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.min_u (local.get $0) (local.get $1) ) ) - (func $121 (; 121 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $121 (; 121 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.max_s (local.get $0) (local.get $1) ) ) - (func $122 (; 122 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $122 (; 122 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.max_u (local.get $0) (local.get $1) ) ) - (func $123 (; 123 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $123 (; 123 ;) (param $0 v128) (param $1 v128) (result v128) (i32x4.dot_i16x8_s (local.get $0) (local.get $1) ) ) - (func $124 (; 124 ;) (type $1) (param $0 v128) (result v128) + (func $124 (; 124 ;) (param $0 v128) (result v128) (i64x2.neg (local.get $0) ) ) - (func $125 (; 125 ;) (type $4) (param $0 v128) (result i32) + (func $125 (; 125 ;) (param $0 v128) (result i32) (i64x2.any_true (local.get $0) ) ) - (func $126 (; 126 ;) (type $4) (param $0 v128) (result i32) + (func $126 (; 126 ;) (param $0 v128) (result i32) (i64x2.all_true (local.get $0) ) ) - (func $127 (; 127 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $127 (; 127 ;) (param $0 v128) (param $1 i32) (result v128) (i64x2.shl (local.get $0) (local.get $1) ) ) - (func $128 (; 128 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $128 (; 128 ;) (param $0 v128) (param $1 i32) (result v128) (i64x2.shr_s (local.get $0) (local.get $1) ) ) - (func $129 (; 129 ;) (type $2) (param $0 v128) (param $1 i32) (result v128) + (func $129 (; 129 ;) (param $0 v128) (param $1 i32) (result v128) (i64x2.shr_u (local.get $0) (local.get $1) ) ) - (func $130 (; 130 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $130 (; 130 ;) (param $0 v128) (param $1 v128) (result v128) (i64x2.add (local.get $0) (local.get $1) ) ) - (func $131 (; 131 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $131 (; 131 ;) (param $0 v128) (param $1 v128) (result v128) (i64x2.sub (local.get $0) (local.get $1) ) ) - (func $132 (; 132 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $132 (; 132 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.add (local.get $0) (local.get $1) ) ) - (func $133 (; 133 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $133 (; 133 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.sub (local.get $0) (local.get $1) ) ) - (func $134 (; 134 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $134 (; 134 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.mul (local.get $0) (local.get $1) ) ) - (func $135 (; 135 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $135 (; 135 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.div (local.get $0) (local.get $1) ) ) - (func $136 (; 136 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $136 (; 136 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.min (local.get $0) (local.get $1) ) ) - (func $137 (; 137 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $137 (; 137 ;) (param $0 v128) (param $1 v128) (result v128) (f32x4.max (local.get $0) (local.get $1) ) ) - (func $138 (; 138 ;) (type $1) (param $0 v128) (result v128) + (func $138 (; 138 ;) (param $0 v128) (result v128) (f32x4.abs (local.get $0) ) ) - (func $139 (; 139 ;) (type $1) (param $0 v128) (result v128) + (func $139 (; 139 ;) (param $0 v128) (result v128) (f32x4.neg (local.get $0) ) ) - (func $140 (; 140 ;) (type $1) (param $0 v128) (result v128) + (func $140 (; 140 ;) (param $0 v128) (result v128) (f32x4.sqrt (local.get $0) ) ) - (func $141 (; 141 ;) (type $6) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $141 (; 141 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f32x4.qfma (local.get $0) (local.get $1) (local.get $2) ) ) - (func $142 (; 142 ;) (type $6) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $142 (; 142 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f32x4.qfms (local.get $0) (local.get $1) (local.get $2) ) ) - (func $143 (; 143 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $143 (; 143 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.add (local.get $0) (local.get $1) ) ) - (func $144 (; 144 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $144 (; 144 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.sub (local.get $0) (local.get $1) ) ) - (func $145 (; 145 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $145 (; 145 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.mul (local.get $0) (local.get $1) ) ) - (func $146 (; 146 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $146 (; 146 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.div (local.get $0) (local.get $1) ) ) - (func $147 (; 147 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $147 (; 147 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.min (local.get $0) (local.get $1) ) ) - (func $148 (; 148 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $148 (; 148 ;) (param $0 v128) (param $1 v128) (result v128) (f64x2.max (local.get $0) (local.get $1) ) ) - (func $149 (; 149 ;) (type $1) (param $0 v128) (result v128) + (func $149 (; 149 ;) (param $0 v128) (result v128) (f64x2.abs (local.get $0) ) ) - (func $150 (; 150 ;) (type $1) (param $0 v128) (result v128) + (func $150 (; 150 ;) (param $0 v128) (result v128) (f64x2.neg (local.get $0) ) ) - (func $151 (; 151 ;) (type $1) (param $0 v128) (result v128) + (func $151 (; 151 ;) (param $0 v128) (result v128) (f64x2.sqrt (local.get $0) ) ) - (func $152 (; 152 ;) (type $6) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $152 (; 152 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f64x2.qfma (local.get $0) (local.get $1) (local.get $2) ) ) - (func $153 (; 153 ;) (type $6) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (func $153 (; 153 ;) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) (f64x2.qfms (local.get $0) (local.get $1) (local.get $2) ) ) - (func $154 (; 154 ;) (type $1) (param $0 v128) (result v128) + (func $154 (; 154 ;) (param $0 v128) (result v128) (i32x4.trunc_sat_f32x4_s (local.get $0) ) ) - (func $155 (; 155 ;) (type $1) (param $0 v128) (result v128) + (func $155 (; 155 ;) (param $0 v128) (result v128) (i32x4.trunc_sat_f32x4_u (local.get $0) ) ) - (func $156 (; 156 ;) (type $1) (param $0 v128) (result v128) + (func $156 (; 156 ;) (param $0 v128) (result v128) (i64x2.trunc_sat_f64x2_s (local.get $0) ) ) - (func $157 (; 157 ;) (type $1) (param $0 v128) (result v128) + (func $157 (; 157 ;) (param $0 v128) (result v128) (i64x2.trunc_sat_f64x2_u (local.get $0) ) ) - (func $158 (; 158 ;) (type $1) (param $0 v128) (result v128) + (func $158 (; 158 ;) (param $0 v128) (result v128) (f32x4.convert_i32x4_s (local.get $0) ) ) - (func $159 (; 159 ;) (type $1) (param $0 v128) (result v128) + (func $159 (; 159 ;) (param $0 v128) (result v128) (f32x4.convert_i32x4_u (local.get $0) ) ) - (func $160 (; 160 ;) (type $1) (param $0 v128) (result v128) + (func $160 (; 160 ;) (param $0 v128) (result v128) (f64x2.convert_i64x2_s (local.get $0) ) ) - (func $161 (; 161 ;) (type $1) (param $0 v128) (result v128) + (func $161 (; 161 ;) (param $0 v128) (result v128) (f64x2.convert_i64x2_u (local.get $0) ) ) - (func $162 (; 162 ;) (type $3) (param $0 i32) (result v128) + (func $162 (; 162 ;) (param $0 i32) (result v128) (v8x16.load_splat (local.get $0) ) ) - (func $163 (; 163 ;) (type $3) (param $0 i32) (result v128) + (func $163 (; 163 ;) (param $0 i32) (result v128) (v16x8.load_splat (local.get $0) ) ) - (func $164 (; 164 ;) (type $3) (param $0 i32) (result v128) + (func $164 (; 164 ;) (param $0 i32) (result v128) (v32x4.load_splat (local.get $0) ) ) - (func $165 (; 165 ;) (type $3) (param $0 i32) (result v128) + (func $165 (; 165 ;) (param $0 i32) (result v128) (v64x2.load_splat (local.get $0) ) ) - (func $166 (; 166 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $166 (; 166 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.narrow_i16x8_s (local.get $0) (local.get $1) ) ) - (func $167 (; 167 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $167 (; 167 ;) (param $0 v128) (param $1 v128) (result v128) (i8x16.narrow_i16x8_u (local.get $0) (local.get $1) ) ) - (func $168 (; 168 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $168 (; 168 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.narrow_i32x4_s (local.get $0) (local.get $1) ) ) - (func $169 (; 169 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $169 (; 169 ;) (param $0 v128) (param $1 v128) (result v128) (i16x8.narrow_i32x4_u (local.get $0) (local.get $1) ) ) - (func $170 (; 170 ;) (type $1) (param $0 v128) (result v128) + (func $170 (; 170 ;) (param $0 v128) (result v128) (i16x8.widen_low_i8x16_s (local.get $0) ) ) - (func $171 (; 171 ;) (type $1) (param $0 v128) (result v128) + (func $171 (; 171 ;) (param $0 v128) (result v128) (i16x8.widen_high_i8x16_s (local.get $0) ) ) - (func $172 (; 172 ;) (type $1) (param $0 v128) (result v128) + (func $172 (; 172 ;) (param $0 v128) (result v128) (i16x8.widen_low_i8x16_u (local.get $0) ) ) - (func $173 (; 173 ;) (type $1) (param $0 v128) (result v128) + (func $173 (; 173 ;) (param $0 v128) (result v128) (i16x8.widen_high_i8x16_u (local.get $0) ) ) - (func $174 (; 174 ;) (type $1) (param $0 v128) (result v128) + (func $174 (; 174 ;) (param $0 v128) (result v128) (i32x4.widen_low_i16x8_s (local.get $0) ) ) - (func $175 (; 175 ;) (type $1) (param $0 v128) (result v128) + (func $175 (; 175 ;) (param $0 v128) (result v128) (i32x4.widen_high_i16x8_s (local.get $0) ) ) - (func $176 (; 176 ;) (type $1) (param $0 v128) (result v128) + (func $176 (; 176 ;) (param $0 v128) (result v128) (i32x4.widen_low_i16x8_u (local.get $0) ) ) - (func $177 (; 177 ;) (type $1) (param $0 v128) (result v128) + (func $177 (; 177 ;) (param $0 v128) (result v128) (i32x4.widen_high_i16x8_u (local.get $0) ) ) - (func $178 (; 178 ;) (type $3) (param $0 i32) (result v128) + (func $178 (; 178 ;) (param $0 i32) (result v128) (i16x8.load8x8_u (local.get $0) ) ) - (func $179 (; 179 ;) (type $3) (param $0 i32) (result v128) + (func $179 (; 179 ;) (param $0 i32) (result v128) (i16x8.load8x8_s (local.get $0) ) ) - (func $180 (; 180 ;) (type $3) (param $0 i32) (result v128) + (func $180 (; 180 ;) (param $0 i32) (result v128) (i32x4.load16x4_s (local.get $0) ) ) - (func $181 (; 181 ;) (type $3) (param $0 i32) (result v128) + (func $181 (; 181 ;) (param $0 i32) (result v128) (i32x4.load16x4_u (local.get $0) ) ) - (func $182 (; 182 ;) (type $3) (param $0 i32) (result v128) + (func $182 (; 182 ;) (param $0 i32) (result v128) (i64x2.load32x2_s (local.get $0) ) ) - (func $183 (; 183 ;) (type $3) (param $0 i32) (result v128) + (func $183 (; 183 ;) (param $0 i32) (result v128) (i64x2.load32x2_u (local.get $0) ) ) - (func $184 (; 184 ;) (type $0) (param $0 v128) (param $1 v128) (result v128) + (func $184 (; 184 ;) (param $0 v128) (param $1 v128) (result v128) (v8x16.swizzle (local.get $0) (local.get $1) diff --git a/test/stacky.wasm.fromBinary b/test/stacky.wasm.fromBinary index 6fd623022..f7d01b451 100644 --- a/test/stacky.wasm.fromBinary +++ b/test/stacky.wasm.fromBinary @@ -1,8 +1,8 @@ (module - (type $0 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 256 256) (export "add" (func $0)) - (func $0 (; 0 ;) (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $0 (; 0 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (i32.add (block (result i32) diff --git a/test/table-import.wast.from-wast b/test/table-import.wast.from-wast index 32a7b5383..724eb95ec 100644 --- a/test/table-import.wast.from-wast +++ b/test/table-import.wast.from-wast @@ -1,9 +1,9 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (import "env" "table" (table $0 1 1 funcref)) (elem (i32.const 0) $foo) (memory $0 0) - (func $foo (; 0 ;) (type $0) + (func $foo (; 0 ;) (nop) ) ) diff --git a/test/table-import.wast.fromBinary b/test/table-import.wast.fromBinary index 83d9b0111..7c34cc193 100644 --- a/test/table-import.wast.fromBinary +++ b/test/table-import.wast.fromBinary @@ -1,9 +1,9 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (import "env" "table" (table $timport$0 1 1 funcref)) (elem (i32.const 0) $foo) (memory $0 0) - (func $foo (; 0 ;) (type $0) + (func $foo (; 0 ;) (nop) ) ) diff --git a/test/table-import.wast.fromBinary.noDebugInfo b/test/table-import.wast.fromBinary.noDebugInfo index 43775cbe3..6c747dca1 100644 --- a/test/table-import.wast.fromBinary.noDebugInfo +++ b/test/table-import.wast.fromBinary.noDebugInfo @@ -1,9 +1,9 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (import "env" "table" (table $timport$0 1 1 funcref)) (elem (i32.const 0) $0) (memory $0 0) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (nop) ) ) diff --git a/test/tail-call.wast.from-wast b/test/tail-call.wast.from-wast index b05b2f3d6..2f673a044 100644 --- a/test/tail-call.wast.from-wast +++ b/test/tail-call.wast.from-wast @@ -1,12 +1,12 @@ (module - (type $void (func)) + (type $none_=>_none (func)) (table $0 1 1 funcref) (elem (i32.const 0) $foo) - (func $foo (; 0 ;) (type $void) + (func $foo (; 0 ;) (return_call $bar) ) - (func $bar (; 1 ;) (type $void) - (return_call_indirect (type $void) + (func $bar (; 1 ;) + (return_call_indirect (type $none_=>_none) (i32.const 0) ) ) diff --git a/test/tail-call.wast.fromBinary b/test/tail-call.wast.fromBinary index 15c1e61b0..3e50bd890 100644 --- a/test/tail-call.wast.fromBinary +++ b/test/tail-call.wast.fromBinary @@ -1,12 +1,12 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (table $0 1 1 funcref) (elem (i32.const 0) $foo) - (func $foo (; 0 ;) (type $0) + (func $foo (; 0 ;) (return_call $bar) ) - (func $bar (; 1 ;) (type $0) - (return_call_indirect (type $0) + (func $bar (; 1 ;) + (return_call_indirect (type $none_=>_none) (i32.const 0) ) ) diff --git a/test/tail-call.wast.fromBinary.noDebugInfo b/test/tail-call.wast.fromBinary.noDebugInfo index 1523db761..3babe3906 100644 --- a/test/tail-call.wast.fromBinary.noDebugInfo +++ b/test/tail-call.wast.fromBinary.noDebugInfo @@ -1,12 +1,12 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (table $0 1 1 funcref) (elem (i32.const 0) $0) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (return_call $1) ) - (func $1 (; 1 ;) (type $0) - (return_call_indirect (type $0) + (func $1 (; 1 ;) + (return_call_indirect (type $none_=>_none) (i32.const 0) ) ) diff --git a/test/threads.fromasm b/test/threads.fromasm index c189b208b..eb2692f7f 100644 --- a/test/threads.fromasm +++ b/test/threads.fromasm @@ -1,4 +1,5 @@ (module + (type $none_=>_none (func)) (import "env" "memory" (memory $memory (shared 256 256))) (data (global.get $__memory_base) "threads.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/threads.fromasm.clamp b/test/threads.fromasm.clamp index c189b208b..eb2692f7f 100644 --- a/test/threads.fromasm.clamp +++ b/test/threads.fromasm.clamp @@ -1,4 +1,5 @@ (module + (type $none_=>_none (func)) (import "env" "memory" (memory $memory (shared 256 256))) (data (global.get $__memory_base) "threads.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/threads.fromasm.clamp.no-opts b/test/threads.fromasm.clamp.no-opts index 2f3b0b77d..9634dc08d 100644 --- a/test/threads.fromasm.clamp.no-opts +++ b/test/threads.fromasm.clamp.no-opts @@ -1,4 +1,5 @@ (module + (type $none_=>_none (func)) (import "env" "memory" (memory $memory (shared 256 256))) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/threads.fromasm.imprecise b/test/threads.fromasm.imprecise index 44628a684..648b853bb 100644 --- a/test/threads.fromasm.imprecise +++ b/test/threads.fromasm.imprecise @@ -1,4 +1,5 @@ (module + (type $none_=>_none (func)) (import "env" "memory" (memory $memory (shared 256 256))) (export "test" (func $test)) (func $test (; 0 ;) (; has Stack IR ;) diff --git a/test/threads.fromasm.imprecise.no-opts b/test/threads.fromasm.imprecise.no-opts index 2f3b0b77d..9634dc08d 100644 --- a/test/threads.fromasm.imprecise.no-opts +++ b/test/threads.fromasm.imprecise.no-opts @@ -1,4 +1,5 @@ (module + (type $none_=>_none (func)) (import "env" "memory" (memory $memory (shared 256 256))) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/threads.fromasm.no-opts b/test/threads.fromasm.no-opts index 2f3b0b77d..9634dc08d 100644 --- a/test/threads.fromasm.no-opts +++ b/test/threads.fromasm.no-opts @@ -1,4 +1,5 @@ (module + (type $none_=>_none (func)) (import "env" "memory" (memory $memory (shared 256 256))) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/threads.wasm-only.fromasm b/test/threads.wasm-only.fromasm index abe8312a7..feffb31d1 100644 --- a/test/threads.wasm-only.fromasm +++ b/test/threads.wasm-only.fromasm @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) (import "env" "memory" (memory $memory (shared 256 256))) (data (global.get $__memory_base) "threads.wasm-only.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/threads.wasm-only.fromasm.clamp b/test/threads.wasm-only.fromasm.clamp index abe8312a7..feffb31d1 100644 --- a/test/threads.wasm-only.fromasm.clamp +++ b/test/threads.wasm-only.fromasm.clamp @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) (import "env" "memory" (memory $memory (shared 256 256))) (data (global.get $__memory_base) "threads.wasm-only.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/threads.wasm-only.fromasm.clamp.no-opts b/test/threads.wasm-only.fromasm.clamp.no-opts index 01aff9a75..488c0df50 100644 --- a/test/threads.wasm-only.fromasm.clamp.no-opts +++ b/test/threads.wasm-only.fromasm.clamp.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) (import "env" "memory" (memory $memory (shared 256 256))) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/threads.wasm-only.fromasm.imprecise b/test/threads.wasm-only.fromasm.imprecise index 9426be3eb..ad256696b 100644 --- a/test/threads.wasm-only.fromasm.imprecise +++ b/test/threads.wasm-only.fromasm.imprecise @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) (import "env" "memory" (memory $memory (shared 256 256))) (import "env" "setTempRet0" (func $setTempRet0 (param i32))) (export "test64" (func $legalstub$test64)) diff --git a/test/threads.wasm-only.fromasm.imprecise.no-opts b/test/threads.wasm-only.fromasm.imprecise.no-opts index 01aff9a75..488c0df50 100644 --- a/test/threads.wasm-only.fromasm.imprecise.no-opts +++ b/test/threads.wasm-only.fromasm.imprecise.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) (import "env" "memory" (memory $memory (shared 256 256))) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/threads.wasm-only.fromasm.no-opts b/test/threads.wasm-only.fromasm.no-opts index 01aff9a75..488c0df50 100644 --- a/test/threads.wasm-only.fromasm.no-opts +++ b/test/threads.wasm-only.fromasm.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_i64 (func (result i64))) (import "env" "memory" (memory $memory (shared 256 256))) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/try-body-multiple-insts.wasm.fromBinary b/test/try-body-multiple-insts.wasm.fromBinary index f52a1a3dc..cbb0d6f18 100644 --- a/test/try-body-multiple-insts.wasm.fromBinary +++ b/test/try-body-multiple-insts.wasm.fromBinary @@ -1,12 +1,12 @@ (module - (type $0 (func)) - (func $0 (; 0 ;) (type $0) + (type $none_=>_none (func)) + (func $0 (; 0 ;) (nop) ) - (func $1 (; 1 ;) (type $0) + (func $1 (; 1 ;) (nop) ) - (func $2 (; 2 ;) (type $0) + (func $2 (; 2 ;) (local $0 exnref) (try (block diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm index a4e6c24d7..1e93fb8de 100644 --- a/test/two_sides.fromasm +++ b/test/two_sides.fromasm @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$id (func (param f64) (result i32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "two_sides.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/two_sides.fromasm.clamp b/test/two_sides.fromasm.clamp index 1521c9de7..2a7522e9f 100644 --- a/test/two_sides.fromasm.clamp +++ b/test/two_sides.fromasm.clamp @@ -1,4 +1,6 @@ (module + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "two_sides.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/two_sides.fromasm.clamp.no-opts b/test/two_sides.fromasm.clamp.no-opts index 0034f3a53..d6cae78ec 100644 --- a/test/two_sides.fromasm.clamp.no-opts +++ b/test/two_sides.fromasm.clamp.no-opts @@ -1,4 +1,6 @@ (module + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/two_sides.fromasm.imprecise b/test/two_sides.fromasm.imprecise index 370a6928b..41e34c125 100644 --- a/test/two_sides.fromasm.imprecise +++ b/test/two_sides.fromasm.imprecise @@ -1,4 +1,5 @@ (module + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (export "_test" (func $_test)) (func $_test (; 0 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 f64) diff --git a/test/two_sides.fromasm.imprecise.no-opts b/test/two_sides.fromasm.imprecise.no-opts index 6c0e4ebbb..babf999ec 100644 --- a/test/two_sides.fromasm.imprecise.no-opts +++ b/test/two_sides.fromasm.imprecise.no-opts @@ -1,4 +1,5 @@ (module + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/two_sides.fromasm.no-opts b/test/two_sides.fromasm.no-opts index 74c2c3acb..b49a5c33c 100644 --- a/test/two_sides.fromasm.no-opts +++ b/test/two_sides.fromasm.no-opts @@ -1,5 +1,6 @@ (module - (type $FUNCSIG$id (func (param f64) (result i32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/unit.fromasm b/test/unit.fromasm index 1080e7092..2196a3ae8 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -1,13 +1,24 @@ (module - (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$idi (func (param f64 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f32_=>_none (func (param f32))) + (type $none_=>_f64 (func (result f64))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32 i32 i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_f64_f32_=>_none (func (param i32 f64 f32))) + (type $f32_f64_=>_none (func (param f32 f64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f64_i32_=>_i32 (func (param f64 i32) (result i32))) + (type $none_=>_f32 (func (result f32))) + (type $i32_f32_f64_=>_f32 (func (param i32 f32 f64) (result f32))) + (type $f64_=>_f64 (func (param f64) (result f64))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "unit.asm.js") (import "env" "table" (table $table 25 25 funcref)) @@ -233,13 +244,13 @@ (f64.const -0) ) (func $neg (; 20 ;) (; has Stack IR ;) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (f32.const -0) (i32.const 9) ) ) (func $cneg (; 21 ;) (; has Stack IR ;) (param $0 f32) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (local.get $0) (i32.const 9) ) @@ -270,7 +281,7 @@ ) ) (func $cneg_nosemicolon (; 23 ;) (; has Stack IR ;) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 1) (i32.const 17) ) @@ -1089,13 +1100,13 @@ ) ) (func $relocatableAndModules (; 56 ;) (; has Stack IR ;) (result i32) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 10) ) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 20) ) - (call_indirect (type $FUNCSIG$idi) + (call_indirect (type $f64_i32_=>_i32) (f64.const 1.5) (i32.const 200) (i32.const 30) @@ -1115,11 +1126,11 @@ (f64.const 100) ) ) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 0) (i32.const 17) ) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 0) (block (result i32) (global.set $Int diff --git a/test/unit.fromasm.clamp b/test/unit.fromasm.clamp index b98fe30c6..d3c3c7b14 100644 --- a/test/unit.fromasm.clamp +++ b/test/unit.fromasm.clamp @@ -1,12 +1,24 @@ (module - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$idi (func (param f64 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f32_=>_none (func (param f32))) + (type $none_=>_f64 (func (result f64))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32 i32 i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_f64_f32_=>_none (func (param i32 f64 f32))) + (type $f32_f64_=>_none (func (param f32 f64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f64_i32_=>_i32 (func (param f64 i32) (result i32))) + (type $none_=>_f32 (func (result f32))) + (type $i32_f32_f64_=>_f32 (func (param i32 f32 f64) (result f32))) + (type $f64_=>_f64 (func (param f64) (result f64))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "unit.asm.js") (import "env" "table" (table $table 25 25 funcref)) @@ -281,13 +293,13 @@ (f64.const -0) ) (func $neg (; 21 ;) (; has Stack IR ;) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (f32.const -0) (i32.const 9) ) ) (func $cneg (; 22 ;) (; has Stack IR ;) (param $0 f32) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (local.get $0) (i32.const 9) ) @@ -318,7 +330,7 @@ ) ) (func $cneg_nosemicolon (; 24 ;) (; has Stack IR ;) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 1) (i32.const 17) ) @@ -1137,13 +1149,13 @@ ) ) (func $relocatableAndModules (; 57 ;) (; has Stack IR ;) (result i32) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 10) ) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 20) ) - (call_indirect (type $FUNCSIG$idi) + (call_indirect (type $f64_i32_=>_i32) (f64.const 1.5) (i32.const 200) (i32.const 30) @@ -1158,11 +1170,11 @@ (f64.const 100) ) ) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 0) (i32.const 17) ) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 0) (block (result i32) (global.set $Int diff --git a/test/unit.fromasm.clamp.no-opts b/test/unit.fromasm.clamp.no-opts index 672d73320..e790a36c1 100644 --- a/test/unit.fromasm.clamp.no-opts +++ b/test/unit.fromasm.clamp.no-opts @@ -1,12 +1,27 @@ (module - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$idi (func (param f64 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f32_=>_none (func (param f32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $none_=>_f64 (func (result f64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $none_=>_f32 (func (result f32))) + (type $i32_=>_f32 (func (param i32) (result f32))) + (type $f64_=>_f64 (func (param f64) (result f64))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32 i32 i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_f64_f32_=>_none (func (param i32 f64 f32))) + (type $f32_f64_=>_none (func (param f32 f64))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_i32_=>_i32 (func (param f64 i32) (result i32))) + (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) + (type $i32_f32_f64_=>_f32 (func (param i32 f32 f64) (result f32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 25 25 funcref)) (elem (global.get $__table_base) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii) @@ -616,7 +631,7 @@ (local.get $x) ) ) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (local.get $x) (i32.add (i32.and @@ -628,7 +643,7 @@ ) ) (func $cneg (; 29 ;) (param $x f32) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (local.get $x) (i32.add (i32.and @@ -678,7 +693,7 @@ ) ) (func $cneg_nosemicolon (; 32 ;) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 1) (i32.add (i32.and @@ -2000,14 +2015,14 @@ ) ) (func $relocatableAndModules (; 71 ;) (result i32) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 10) ) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 20) ) (return - (call_indirect (type $FUNCSIG$idi) + (call_indirect (type $f64_i32_=>_i32) (f64.const 1.5) (i32.const 200) (i32.const 30) @@ -2113,7 +2128,7 @@ (local $i1 i32) (local.set $i1 (block (result i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 0) (i32.add (i32.and @@ -2129,7 +2144,7 @@ ) (func $emterpretify_assertions_safeHeap (; 79 ;) (local $i1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $i1) (i32.add (i32.and diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 04528ad47..584e46d9f 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -1,12 +1,23 @@ (module - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$idi (func (param f64 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f32_=>_none (func (param f32))) + (type $none_=>_f64 (func (result f64))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32 i32 i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_f64_f32_=>_none (func (param i32 f64 f32))) + (type $f32_f64_=>_none (func (param f32 f64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $f64_i32_=>_i32 (func (param f64 i32) (result i32))) + (type $none_=>_f32 (func (result f32))) + (type $i32_f32_f64_=>_f32 (func (param i32 f32 f64) (result f32))) + (type $f64_=>_f64 (func (param f64) (result f64))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 25 25 funcref)) (elem (global.get $__table_base) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $fr $cneg $fr $fr $fr $fr $fr $fr $vi $vi $vi $vi $vi $vi $vi $vi $ii) @@ -221,13 +232,13 @@ (f64.const -0) ) (func $neg (; 19 ;) (; has Stack IR ;) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (f32.const -0) (i32.const 9) ) ) (func $cneg (; 20 ;) (; has Stack IR ;) (param $0 f32) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (local.get $0) (i32.const 9) ) @@ -258,7 +269,7 @@ ) ) (func $cneg_nosemicolon (; 22 ;) (; has Stack IR ;) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 1) (i32.const 17) ) @@ -1077,13 +1088,13 @@ ) ) (func $relocatableAndModules (; 55 ;) (; has Stack IR ;) (result i32) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 10) ) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 20) ) - (call_indirect (type $FUNCSIG$idi) + (call_indirect (type $f64_i32_=>_i32) (f64.const 1.5) (i32.const 200) (i32.const 30) @@ -1093,11 +1104,11 @@ (local.get $1) ) (func $keepAlive (; 57 ;) (; has Stack IR ;) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 0) (i32.const 17) ) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 0) (block (result i32) (global.set $Int diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index b2b0a5f40..619dc88c1 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -1,12 +1,26 @@ (module - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$idi (func (param f64 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f32_=>_none (func (param f32))) + (type $none_=>_f64 (func (result f64))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $none_=>_f32 (func (result f32))) + (type $i32_=>_f32 (func (param i32) (result f32))) + (type $f64_=>_f64 (func (param f64) (result f64))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32 i32 i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_f64_f32_=>_none (func (param i32 f64 f32))) + (type $f32_f64_=>_none (func (param f32 f64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $f64_i32_=>_i32 (func (param f64 i32) (result i32))) + (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) + (type $i32_f32_f64_=>_f32 (func (param i32 f32 f64) (result f32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 25 25 funcref)) (elem (global.get $__table_base) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii) @@ -527,7 +541,7 @@ (local.get $x) ) ) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (local.get $x) (i32.add (i32.and @@ -539,7 +553,7 @@ ) ) (func $cneg (; 25 ;) (param $x f32) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (local.get $x) (i32.add (i32.and @@ -589,7 +603,7 @@ ) ) (func $cneg_nosemicolon (; 28 ;) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 1) (i32.add (i32.and @@ -1911,14 +1925,14 @@ ) ) (func $relocatableAndModules (; 67 ;) (result i32) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 10) ) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 20) ) (return - (call_indirect (type $FUNCSIG$idi) + (call_indirect (type $f64_i32_=>_i32) (f64.const 1.5) (i32.const 200) (i32.const 30) @@ -1998,7 +2012,7 @@ (local $i1 i32) (local.set $i1 (block (result i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 0) (i32.add (i32.and @@ -2014,7 +2028,7 @@ ) (func $emterpretify_assertions_safeHeap (; 74 ;) (local $i1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $i1) (i32.add (i32.and diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 84dcdf881..14b13d7ed 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -1,13 +1,26 @@ (module - (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$idi (func (param f64 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f32_=>_none (func (param f32))) + (type $none_=>_f64 (func (result f64))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $none_=>_f32 (func (result f32))) + (type $i32_=>_f32 (func (param i32) (result f32))) + (type $f64_=>_f64 (func (param f64) (result f64))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32 i32 i32))) + (type $i32_f32_=>_none (func (param i32 f32))) + (type $i32_f64_f32_=>_none (func (param i32 f64 f32))) + (type $f32_f64_=>_none (func (param f32 f64))) + (type $f64_i32_=>_i32 (func (param f64 i32) (result i32))) + (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) + (type $i32_f32_f64_=>_f32 (func (param i32 f32 f64) (result f32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 25 25 funcref)) (elem (global.get $__table_base) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii) @@ -568,7 +581,7 @@ (local.get $x) ) ) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (local.get $x) (i32.add (i32.and @@ -580,7 +593,7 @@ ) ) (func $cneg (; 28 ;) (param $x f32) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (local.get $x) (i32.add (i32.and @@ -630,7 +643,7 @@ ) ) (func $cneg_nosemicolon (; 31 ;) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 1) (i32.add (i32.and @@ -1952,14 +1965,14 @@ ) ) (func $relocatableAndModules (; 70 ;) (result i32) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 10) ) - (call_indirect (type $FUNCSIG$v) + (call_indirect (type $none_=>_none) (i32.const 20) ) (return - (call_indirect (type $FUNCSIG$idi) + (call_indirect (type $f64_i32_=>_i32) (f64.const 1.5) (i32.const 200) (i32.const 30) @@ -2039,7 +2052,7 @@ (local $i1 i32) (local.set $i1 (block (result i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (i32.const 0) (i32.add (i32.and @@ -2055,7 +2068,7 @@ ) (func $emterpretify_assertions_safeHeap (; 77 ;) (local $i1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $i1) (i32.add (i32.and diff --git a/test/unit.wast.from-wast b/test/unit.wast.from-wast index b88a78059..bba5203e0 100644 --- a/test/unit.wast.from-wast +++ b/test/unit.wast.from-wast @@ -1,14 +1,14 @@ (module - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $4 (func (result f64))) - (type $5 (func (result i32))) - (type $6 (func (param i32) (result i32))) - (type $7 (func (param f64) (result f64))) - (type $8 (func (result i64))) - (type $9 (func (param i32 i64))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $f32_=>_none (func (param f32))) + (type $none_=>_f64 (func (result f64))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i64_=>_none (func (param i32 i64))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi)) (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) @@ -17,7 +17,7 @@ (table $0 10 funcref) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) (export "big_negative" (func $big_negative)) - (func $big_negative (; 3 ;) (type $FUNCSIG$v) + (func $big_negative (; 3 ;) (local $temp f64) (block $block0 (local.set $temp @@ -37,7 +37,7 @@ ) ) ) - (func $importedDoubles (; 4 ;) (type $4) (result f64) + (func $importedDoubles (; 4 ;) (result f64) (local $temp f64) (block $topmost (result f64) (local.set $temp @@ -89,7 +89,7 @@ (f64.const 1.2) ) ) - (func $doubleCompares (; 5 ;) (type $FUNCSIG$ddd) (param $x f64) (param $y f64) (result f64) + (func $doubleCompares (; 5 ;) (param $x f64) (param $y f64) (result f64) (local $t f64) (local $Int f64) (local $Double i32) @@ -133,14 +133,14 @@ (local.get $y) ) ) - (func $intOps (; 6 ;) (type $5) (result i32) + (func $intOps (; 6 ;) (result i32) (local $x i32) (i32.eq (local.get $x) (i32.const 0) ) ) - (func $hexLiterals (; 7 ;) (type $FUNCSIG$v) + (func $hexLiterals (; 7 ;) (drop (i32.add (i32.add @@ -151,7 +151,7 @@ ) ) ) - (func $conversions (; 8 ;) (type $FUNCSIG$v) + (func $conversions (; 8 ;) (local $i i32) (local $d f64) (block $block0 @@ -175,7 +175,7 @@ ) ) ) - (func $seq (; 9 ;) (type $FUNCSIG$v) + (func $seq (; 9 ;) (local $J f64) (local.set $J (f64.sub @@ -194,7 +194,7 @@ ) ) ) - (func $switcher (; 10 ;) (type $6) (param $x i32) (result i32) + (func $switcher (; 10 ;) (param $x i32) (result i32) (block $topmost (result i32) (block $switch$0 (block $switch-default$3 @@ -280,18 +280,18 @@ (i32.const 0) ) ) - (func $blocker (; 11 ;) (type $FUNCSIG$v) + (func $blocker (; 11 ;) (block $label$break$L (br $label$break$L) ) ) - (func $frem (; 12 ;) (type $4) (result f64) + (func $frem (; 12 ;) (result f64) (call $f64-rem (f64.const 5.5) (f64.const 1.2) ) ) - (func $big_uint_div_u (; 13 ;) (type $5) (result i32) + (func $big_uint_div_u (; 13 ;) (result i32) (local $x i32) (block $topmost (result i32) (local.set $x @@ -306,7 +306,7 @@ (local.get $x) ) ) - (func $fr (; 14 ;) (type $FUNCSIG$vf) (param $x f32) + (func $fr (; 14 ;) (param $x f32) (local $y f32) (local $z f64) (block $block0 @@ -332,10 +332,10 @@ ) ) ) - (func $negZero (; 15 ;) (type $4) (result f64) + (func $negZero (; 15 ;) (result f64) (f64.const -0) ) - (func $abs (; 16 ;) (type $FUNCSIG$v) + (func $abs (; 16 ;) (local $x i32) (local $y f64) (local $z f32) @@ -371,7 +371,7 @@ ) ) ) - (func $neg (; 17 ;) (type $FUNCSIG$v) + (func $neg (; 17 ;) (local $x f32) (block $block0 (local.set $x @@ -379,7 +379,7 @@ (local.get $x) ) ) - (call_indirect (type $FUNCSIG$vf) + (call_indirect (type $f32_=>_none) (local.get $x) (i32.add (i32.and @@ -391,8 +391,8 @@ ) ) ) - (func $cneg (; 18 ;) (type $FUNCSIG$vf) (param $x f32) - (call_indirect (type $FUNCSIG$vf) + (func $cneg (; 18 ;) (param $x f32) + (call_indirect (type $f32_=>_none) (local.get $x) (i32.add (i32.and @@ -403,7 +403,7 @@ ) ) ) - (func $___syscall_ret (; 19 ;) (type $FUNCSIG$v) + (func $___syscall_ret (; 19 ;) (local $$0 i32) (drop (i32.gt_u @@ -415,13 +415,13 @@ ) ) ) - (func $z (; 20 ;) (type $FUNCSIG$v) + (func $z (; 20 ;) (nop) ) - (func $w (; 21 ;) (type $FUNCSIG$v) + (func $w (; 21 ;) (nop) ) - (func $block_and_after (; 22 ;) (type $5) (result i32) + (func $block_and_after (; 22 ;) (result i32) (block $waka (drop (i32.const 1) @@ -430,7 +430,7 @@ ) (i32.const 0) ) - (func $loop-roundtrip (; 23 ;) (type $7) (param $0 f64) (result f64) + (func $loop-roundtrip (; 23 ;) (param $0 f64) (result f64) (loop $loop-in1 (result f64) (drop (local.get $0) @@ -438,21 +438,21 @@ (local.get $0) ) ) - (func $big-i64 (; 24 ;) (type $8) (result i64) + (func $big-i64 (; 24 ;) (result i64) (i64.const -9218868437227405313) ) - (func $i64-store32 (; 25 ;) (type $9) (param $0 i32) (param $1 i64) + (func $i64-store32 (; 25 ;) (param $0 i32) (param $1 i64) (i64.store32 (local.get $0) (local.get $1) ) ) - (func $return-unreachable (; 26 ;) (type $5) (result i32) + (func $return-unreachable (; 26 ;) (result i32) (return (i32.const 1) ) ) - (func $unreachable-block (; 27 ;) (type $5) (result i32) + (func $unreachable-block (; 27 ;) (result i32) (f64.abs (block $block (drop @@ -464,7 +464,7 @@ ) ) ) - (func $unreachable-block-toplevel (; 28 ;) (type $5) (result i32) + (func $unreachable-block-toplevel (; 28 ;) (result i32) (block $block (drop (i32.const 1) @@ -474,7 +474,7 @@ ) ) ) - (func $unreachable-block0 (; 29 ;) (type $5) (result i32) + (func $unreachable-block0 (; 29 ;) (result i32) (f64.abs (block $block (return @@ -483,14 +483,14 @@ ) ) ) - (func $unreachable-block0-toplevel (; 30 ;) (type $5) (result i32) + (func $unreachable-block0-toplevel (; 30 ;) (result i32) (block $block (return (i32.const 2) ) ) ) - (func $unreachable-block-with-br (; 31 ;) (type $5) (result i32) + (func $unreachable-block-with-br (; 31 ;) (result i32) (block $block (drop (i32.const 1) @@ -499,7 +499,7 @@ ) (i32.const 1) ) - (func $unreachable-if (; 32 ;) (type $5) (result i32) + (func $unreachable-if (; 32 ;) (result i32) (f64.abs (if (i32.const 3) @@ -512,7 +512,7 @@ ) ) ) - (func $unreachable-if-toplevel (; 33 ;) (type $5) (result i32) + (func $unreachable-if-toplevel (; 33 ;) (result i32) (if (i32.const 3) (return @@ -523,7 +523,7 @@ ) ) ) - (func $unreachable-loop (; 34 ;) (type $5) (result i32) + (func $unreachable-loop (; 34 ;) (result i32) (f64.abs (loop $loop-in (nop) @@ -533,7 +533,7 @@ ) ) ) - (func $unreachable-loop0 (; 35 ;) (type $5) (result i32) + (func $unreachable-loop0 (; 35 ;) (result i32) (f64.abs (loop $loop-in (return @@ -542,7 +542,7 @@ ) ) ) - (func $unreachable-loop-toplevel (; 36 ;) (type $5) (result i32) + (func $unreachable-loop-toplevel (; 36 ;) (result i32) (loop $loop-in (nop) (return @@ -550,14 +550,14 @@ ) ) ) - (func $unreachable-loop0-toplevel (; 37 ;) (type $5) (result i32) + (func $unreachable-loop0-toplevel (; 37 ;) (result i32) (loop $loop-in (return (i32.const 1) ) ) ) - (func $unreachable-ifs (; 38 ;) (type $FUNCSIG$v) + (func $unreachable-ifs (; 38 ;) (if (unreachable) (nop) @@ -602,7 +602,7 @@ (unreachable) ) ) - (func $unreachable-if-arm (; 39 ;) (type $FUNCSIG$v) + (func $unreachable-if-arm (; 39 ;) (if (i32.const 1) (block $block diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary index d999ca394..9564e9eca 100644 --- a/test/unit.wast.fromBinary +++ b/test/unit.wast.fromBinary @@ -1,14 +1,14 @@ (module - (type $0 (func (result i32))) - (type $1 (func)) - (type $2 (func (param f32))) - (type $3 (func (result f64))) - (type $4 (func (param f64 f64) (result f64))) - (type $5 (func (param i32 i64))) - (type $6 (func (param i32) (result i32))) - (type $7 (func (param f64) (result i32))) - (type $8 (func (result i64))) - (type $9 (func (param f64) (result f64))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $f32_=>_none (func (param f32))) + (type $none_=>_f64 (func (result f64))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i64_=>_none (func (param i32 i64))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi)) (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) @@ -17,7 +17,7 @@ (table $0 10 funcref) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) (export "big_negative" (func $big_negative)) - (func $big_negative (; 3 ;) (type $1) + (func $big_negative (; 3 ;) (local $0 f64) (local.set $0 (f64.const -2147483648) @@ -35,7 +35,7 @@ (f64.const -0.039625) ) ) - (func $importedDoubles (; 4 ;) (type $3) (result f64) + (func $importedDoubles (; 4 ;) (result f64) (local $0 f64) (block $label$1 (result f64) (local.set $0 @@ -87,7 +87,7 @@ (f64.const 1.2) ) ) - (func $doubleCompares (; 5 ;) (type $4) (param $0 f64) (param $1 f64) (result f64) + (func $doubleCompares (; 5 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 f64) (local $4 f64) @@ -131,14 +131,14 @@ (local.get $1) ) ) - (func $intOps (; 6 ;) (type $0) (result i32) + (func $intOps (; 6 ;) (result i32) (local $0 i32) (i32.eq (local.get $0) (i32.const 0) ) ) - (func $hexLiterals (; 7 ;) (type $1) + (func $hexLiterals (; 7 ;) (drop (i32.add (i32.add @@ -149,7 +149,7 @@ ) ) ) - (func $conversions (; 8 ;) (type $1) + (func $conversions (; 8 ;) (local $0 i32) (local $1 f64) (local.set $0 @@ -171,7 +171,7 @@ ) ) ) - (func $seq (; 9 ;) (type $1) + (func $seq (; 9 ;) (local $0 f64) (local.set $0 (f64.sub @@ -190,7 +190,7 @@ ) ) ) - (func $switcher (; 10 ;) (type $6) (param $0 i32) (result i32) + (func $switcher (; 10 ;) (param $0 i32) (result i32) (block $label$1 (result i32) (block $label$2 (block $label$3 @@ -268,18 +268,18 @@ (i32.const 0) ) ) - (func $blocker (; 11 ;) (type $1) + (func $blocker (; 11 ;) (block $label$1 (br $label$1) ) ) - (func $frem (; 12 ;) (type $3) (result f64) + (func $frem (; 12 ;) (result f64) (call $f64-rem (f64.const 5.5) (f64.const 1.2) ) ) - (func $big_uint_div_u (; 13 ;) (type $0) (result i32) + (func $big_uint_div_u (; 13 ;) (result i32) (local $0 i32) (local.set $0 (i32.and @@ -292,7 +292,7 @@ ) (local.get $0) ) - (func $fr (; 14 ;) (type $2) (param $0 f32) + (func $fr (; 14 ;) (param $0 f32) (local $1 f32) (local $2 f64) (drop @@ -316,10 +316,10 @@ (f32.const 0) ) ) - (func $negZero (; 15 ;) (type $3) (result f64) + (func $negZero (; 15 ;) (result f64) (f64.const -0) ) - (func $abs (; 16 ;) (type $1) + (func $abs (; 16 ;) (local $0 i32) (local $1 i32) (local $2 f32) @@ -353,14 +353,14 @@ ) ) ) - (func $neg (; 17 ;) (type $1) + (func $neg (; 17 ;) (local $0 f32) (local.set $0 (f32.neg (local.get $0) ) ) - (call_indirect (type $2) + (call_indirect (type $f32_=>_none) (local.get $0) (i32.add (i32.and @@ -371,8 +371,8 @@ ) ) ) - (func $cneg (; 18 ;) (type $2) (param $0 f32) - (call_indirect (type $2) + (func $cneg (; 18 ;) (param $0 f32) + (call_indirect (type $f32_=>_none) (local.get $0) (i32.add (i32.and @@ -383,7 +383,7 @@ ) ) ) - (func $___syscall_ret (; 19 ;) (type $1) + (func $___syscall_ret (; 19 ;) (local $0 i32) (drop (i32.gt_u @@ -395,13 +395,13 @@ ) ) ) - (func $z (; 20 ;) (type $1) + (func $z (; 20 ;) (nop) ) - (func $w (; 21 ;) (type $1) + (func $w (; 21 ;) (nop) ) - (func $block_and_after (; 22 ;) (type $0) (result i32) + (func $block_and_after (; 22 ;) (result i32) (block $label$1 (drop (i32.const 1) @@ -410,7 +410,7 @@ ) (i32.const 0) ) - (func $loop-roundtrip (; 23 ;) (type $9) (param $0 f64) (result f64) + (func $loop-roundtrip (; 23 ;) (param $0 f64) (result f64) (loop $label$1 (result f64) (drop (local.get $0) @@ -418,21 +418,21 @@ (local.get $0) ) ) - (func $big-i64 (; 24 ;) (type $8) (result i64) + (func $big-i64 (; 24 ;) (result i64) (i64.const -9218868437227405313) ) - (func $i64-store32 (; 25 ;) (type $5) (param $0 i32) (param $1 i64) + (func $i64-store32 (; 25 ;) (param $0 i32) (param $1 i64) (i64.store32 (local.get $0) (local.get $1) ) ) - (func $return-unreachable (; 26 ;) (type $0) (result i32) + (func $return-unreachable (; 26 ;) (result i32) (return (i32.const 1) ) ) - (func $unreachable-block (; 27 ;) (type $0) (result i32) + (func $unreachable-block (; 27 ;) (result i32) (block $label$1 (drop (i32.const 1) @@ -442,7 +442,7 @@ ) ) ) - (func $unreachable-block-toplevel (; 28 ;) (type $0) (result i32) + (func $unreachable-block-toplevel (; 28 ;) (result i32) (drop (i32.const 1) ) @@ -450,19 +450,19 @@ (i32.const 2) ) ) - (func $unreachable-block0 (; 29 ;) (type $0) (result i32) + (func $unreachable-block0 (; 29 ;) (result i32) (block $label$1 (return (i32.const 2) ) ) ) - (func $unreachable-block0-toplevel (; 30 ;) (type $0) (result i32) + (func $unreachable-block0-toplevel (; 30 ;) (result i32) (return (i32.const 2) ) ) - (func $unreachable-block-with-br (; 31 ;) (type $0) (result i32) + (func $unreachable-block-with-br (; 31 ;) (result i32) (block $label$1 (drop (i32.const 1) @@ -471,7 +471,7 @@ ) (i32.const 1) ) - (func $unreachable-if (; 32 ;) (type $0) (result i32) + (func $unreachable-if (; 32 ;) (result i32) (if (i32.const 3) (return @@ -482,7 +482,7 @@ ) ) ) - (func $unreachable-if-toplevel (; 33 ;) (type $0) (result i32) + (func $unreachable-if-toplevel (; 33 ;) (result i32) (if (i32.const 3) (return @@ -493,7 +493,7 @@ ) ) ) - (func $unreachable-loop (; 34 ;) (type $0) (result i32) + (func $unreachable-loop (; 34 ;) (result i32) (loop $label$1 (nop) (return @@ -501,14 +501,14 @@ ) ) ) - (func $unreachable-loop0 (; 35 ;) (type $0) (result i32) + (func $unreachable-loop0 (; 35 ;) (result i32) (loop $label$1 (return (i32.const 1) ) ) ) - (func $unreachable-loop-toplevel (; 36 ;) (type $0) (result i32) + (func $unreachable-loop-toplevel (; 36 ;) (result i32) (loop $label$1 (nop) (return @@ -516,17 +516,17 @@ ) ) ) - (func $unreachable-loop0-toplevel (; 37 ;) (type $0) (result i32) + (func $unreachable-loop0-toplevel (; 37 ;) (result i32) (loop $label$1 (return (i32.const 1) ) ) ) - (func $unreachable-ifs (; 38 ;) (type $1) + (func $unreachable-ifs (; 38 ;) (unreachable) ) - (func $unreachable-if-arm (; 39 ;) (type $1) + (func $unreachable-if-arm (; 39 ;) (if (i32.const 1) (nop) diff --git a/test/unit.wast.fromBinary.noDebugInfo b/test/unit.wast.fromBinary.noDebugInfo index ebbb44386..8ad733079 100644 --- a/test/unit.wast.fromBinary.noDebugInfo +++ b/test/unit.wast.fromBinary.noDebugInfo @@ -1,14 +1,14 @@ (module - (type $0 (func (result i32))) - (type $1 (func)) - (type $2 (func (param f32))) - (type $3 (func (result f64))) - (type $4 (func (param f64 f64) (result f64))) - (type $5 (func (param i32 i64))) - (type $6 (func (param i32) (result i32))) - (type $7 (func (param f64) (result i32))) - (type $8 (func (result i64))) - (type $9 (func (param f64) (result f64))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $f32_=>_none (func (param f32))) + (type $none_=>_f64 (func (result f64))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i64_=>_none (func (param i32 i64))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (import "env" "_emscripten_asm_const_vi" (func $fimport$0)) (import "asm2wasm" "f64-to-int" (func $fimport$1 (param f64) (result i32))) (import "asm2wasm" "f64-rem" (func $fimport$2 (param f64 f64) (result f64))) @@ -17,7 +17,7 @@ (table $0 10 funcref) (elem (i32.const 0) $17 $0 $17 $17 $18 $18 $1 $18 $17 $15) (export "big_negative" (func $0)) - (func $0 (; 3 ;) (type $1) + (func $0 (; 3 ;) (local $0 f64) (local.set $0 (f64.const -2147483648) @@ -35,7 +35,7 @@ (f64.const -0.039625) ) ) - (func $1 (; 4 ;) (type $3) (result f64) + (func $1 (; 4 ;) (result f64) (local $0 f64) (block $label$1 (result f64) (local.set $0 @@ -87,7 +87,7 @@ (f64.const 1.2) ) ) - (func $2 (; 5 ;) (type $4) (param $0 f64) (param $1 f64) (result f64) + (func $2 (; 5 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 f64) (local $4 f64) @@ -131,14 +131,14 @@ (local.get $1) ) ) - (func $3 (; 6 ;) (type $0) (result i32) + (func $3 (; 6 ;) (result i32) (local $0 i32) (i32.eq (local.get $0) (i32.const 0) ) ) - (func $4 (; 7 ;) (type $1) + (func $4 (; 7 ;) (drop (i32.add (i32.add @@ -149,7 +149,7 @@ ) ) ) - (func $5 (; 8 ;) (type $1) + (func $5 (; 8 ;) (local $0 i32) (local $1 f64) (local.set $0 @@ -171,7 +171,7 @@ ) ) ) - (func $6 (; 9 ;) (type $1) + (func $6 (; 9 ;) (local $0 f64) (local.set $0 (f64.sub @@ -190,7 +190,7 @@ ) ) ) - (func $7 (; 10 ;) (type $6) (param $0 i32) (result i32) + (func $7 (; 10 ;) (param $0 i32) (result i32) (block $label$1 (result i32) (block $label$2 (block $label$3 @@ -268,18 +268,18 @@ (i32.const 0) ) ) - (func $8 (; 11 ;) (type $1) + (func $8 (; 11 ;) (block $label$1 (br $label$1) ) ) - (func $9 (; 12 ;) (type $3) (result f64) + (func $9 (; 12 ;) (result f64) (call $fimport$2 (f64.const 5.5) (f64.const 1.2) ) ) - (func $10 (; 13 ;) (type $0) (result i32) + (func $10 (; 13 ;) (result i32) (local $0 i32) (local.set $0 (i32.and @@ -292,7 +292,7 @@ ) (local.get $0) ) - (func $11 (; 14 ;) (type $2) (param $0 f32) + (func $11 (; 14 ;) (param $0 f32) (local $1 f32) (local $2 f64) (drop @@ -316,10 +316,10 @@ (f32.const 0) ) ) - (func $12 (; 15 ;) (type $3) (result f64) + (func $12 (; 15 ;) (result f64) (f64.const -0) ) - (func $13 (; 16 ;) (type $1) + (func $13 (; 16 ;) (local $0 i32) (local $1 i32) (local $2 f32) @@ -353,14 +353,14 @@ ) ) ) - (func $14 (; 17 ;) (type $1) + (func $14 (; 17 ;) (local $0 f32) (local.set $0 (f32.neg (local.get $0) ) ) - (call_indirect (type $2) + (call_indirect (type $f32_=>_none) (local.get $0) (i32.add (i32.and @@ -371,8 +371,8 @@ ) ) ) - (func $15 (; 18 ;) (type $2) (param $0 f32) - (call_indirect (type $2) + (func $15 (; 18 ;) (param $0 f32) + (call_indirect (type $f32_=>_none) (local.get $0) (i32.add (i32.and @@ -383,7 +383,7 @@ ) ) ) - (func $16 (; 19 ;) (type $1) + (func $16 (; 19 ;) (local $0 i32) (drop (i32.gt_u @@ -395,13 +395,13 @@ ) ) ) - (func $17 (; 20 ;) (type $1) + (func $17 (; 20 ;) (nop) ) - (func $18 (; 21 ;) (type $1) + (func $18 (; 21 ;) (nop) ) - (func $19 (; 22 ;) (type $0) (result i32) + (func $19 (; 22 ;) (result i32) (block $label$1 (drop (i32.const 1) @@ -410,7 +410,7 @@ ) (i32.const 0) ) - (func $20 (; 23 ;) (type $9) (param $0 f64) (result f64) + (func $20 (; 23 ;) (param $0 f64) (result f64) (loop $label$1 (result f64) (drop (local.get $0) @@ -418,21 +418,21 @@ (local.get $0) ) ) - (func $21 (; 24 ;) (type $8) (result i64) + (func $21 (; 24 ;) (result i64) (i64.const -9218868437227405313) ) - (func $22 (; 25 ;) (type $5) (param $0 i32) (param $1 i64) + (func $22 (; 25 ;) (param $0 i32) (param $1 i64) (i64.store32 (local.get $0) (local.get $1) ) ) - (func $23 (; 26 ;) (type $0) (result i32) + (func $23 (; 26 ;) (result i32) (return (i32.const 1) ) ) - (func $24 (; 27 ;) (type $0) (result i32) + (func $24 (; 27 ;) (result i32) (block $label$1 (drop (i32.const 1) @@ -442,7 +442,7 @@ ) ) ) - (func $25 (; 28 ;) (type $0) (result i32) + (func $25 (; 28 ;) (result i32) (drop (i32.const 1) ) @@ -450,19 +450,19 @@ (i32.const 2) ) ) - (func $26 (; 29 ;) (type $0) (result i32) + (func $26 (; 29 ;) (result i32) (block $label$1 (return (i32.const 2) ) ) ) - (func $27 (; 30 ;) (type $0) (result i32) + (func $27 (; 30 ;) (result i32) (return (i32.const 2) ) ) - (func $28 (; 31 ;) (type $0) (result i32) + (func $28 (; 31 ;) (result i32) (block $label$1 (drop (i32.const 1) @@ -471,7 +471,7 @@ ) (i32.const 1) ) - (func $29 (; 32 ;) (type $0) (result i32) + (func $29 (; 32 ;) (result i32) (if (i32.const 3) (return @@ -482,7 +482,7 @@ ) ) ) - (func $30 (; 33 ;) (type $0) (result i32) + (func $30 (; 33 ;) (result i32) (if (i32.const 3) (return @@ -493,7 +493,7 @@ ) ) ) - (func $31 (; 34 ;) (type $0) (result i32) + (func $31 (; 34 ;) (result i32) (loop $label$1 (nop) (return @@ -501,14 +501,14 @@ ) ) ) - (func $32 (; 35 ;) (type $0) (result i32) + (func $32 (; 35 ;) (result i32) (loop $label$1 (return (i32.const 1) ) ) ) - (func $33 (; 36 ;) (type $0) (result i32) + (func $33 (; 36 ;) (result i32) (loop $label$1 (nop) (return @@ -516,17 +516,17 @@ ) ) ) - (func $34 (; 37 ;) (type $0) (result i32) + (func $34 (; 37 ;) (result i32) (loop $label$1 (return (i32.const 1) ) ) ) - (func $35 (; 38 ;) (type $1) + (func $35 (; 38 ;) (unreachable) ) - (func $36 (; 39 ;) (type $1) + (func $36 (; 39 ;) (if (i32.const 1) (nop) diff --git a/test/unreachable-code.wast.from-wast b/test/unreachable-code.wast.from-wast index 40cf52db6..10e4b0f70 100644 --- a/test/unreachable-code.wast.from-wast +++ b/test/unreachable-code.wast.from-wast @@ -1,19 +1,19 @@ (module - (type $FUNCSIG$v (func)) - (func $a (; 0 ;) (type $FUNCSIG$v) + (type $none_=>_none (func)) + (func $a (; 0 ;) (if (i32.const 1) (unreachable) ) ) - (func $b (; 1 ;) (type $FUNCSIG$v) + (func $b (; 1 ;) (if (i32.const 1) (unreachable) (unreachable) ) ) - (func $a-block (; 2 ;) (type $FUNCSIG$v) + (func $a-block (; 2 ;) (block $block (if (i32.const 1) @@ -21,7 +21,7 @@ ) ) ) - (func $b-block (; 3 ;) (type $FUNCSIG$v) + (func $b-block (; 3 ;) (block $block (if (i32.const 1) @@ -30,7 +30,7 @@ ) ) ) - (func $a-prepost (; 4 ;) (type $FUNCSIG$v) + (func $a-prepost (; 4 ;) (nop) (if (i32.const 1) @@ -38,7 +38,7 @@ ) (nop) ) - (func $b-prepost (; 5 ;) (type $FUNCSIG$v) + (func $b-prepost (; 5 ;) (nop) (if (i32.const 1) @@ -47,7 +47,7 @@ ) (nop) ) - (func $a-block-prepost (; 6 ;) (type $FUNCSIG$v) + (func $a-block-prepost (; 6 ;) (nop) (block $block (if @@ -57,7 +57,7 @@ ) (nop) ) - (func $b-block-prepost (; 7 ;) (type $FUNCSIG$v) + (func $b-block-prepost (; 7 ;) (nop) (block $block (if @@ -68,7 +68,7 @@ ) (nop) ) - (func $recurse (; 8 ;) (type $FUNCSIG$v) + (func $recurse (; 8 ;) (block $a (nop) (block $b @@ -79,7 +79,7 @@ (nop) ) ) - (func $recurse-b (; 9 ;) (type $FUNCSIG$v) + (func $recurse-b (; 9 ;) (block $a (nop) (block $b diff --git a/test/unreachable-code.wast.fromBinary b/test/unreachable-code.wast.fromBinary index ea73045a1..79349a88d 100644 --- a/test/unreachable-code.wast.fromBinary +++ b/test/unreachable-code.wast.fromBinary @@ -1,32 +1,32 @@ (module - (type $0 (func)) - (func $a (; 0 ;) (type $0) + (type $none_=>_none (func)) + (func $a (; 0 ;) (if (i32.const 1) (unreachable) ) ) - (func $b (; 1 ;) (type $0) + (func $b (; 1 ;) (if (i32.const 1) (unreachable) (unreachable) ) ) - (func $a-block (; 2 ;) (type $0) + (func $a-block (; 2 ;) (if (i32.const 1) (unreachable) ) ) - (func $b-block (; 3 ;) (type $0) + (func $b-block (; 3 ;) (if (i32.const 1) (unreachable) (unreachable) ) ) - (func $a-prepost (; 4 ;) (type $0) + (func $a-prepost (; 4 ;) (nop) (if (i32.const 1) @@ -34,7 +34,7 @@ ) (nop) ) - (func $b-prepost (; 5 ;) (type $0) + (func $b-prepost (; 5 ;) (nop) (if (i32.const 1) @@ -42,7 +42,7 @@ (unreachable) ) ) - (func $a-block-prepost (; 6 ;) (type $0) + (func $a-block-prepost (; 6 ;) (nop) (block $label$1 (if @@ -52,7 +52,7 @@ ) (nop) ) - (func $b-block-prepost (; 7 ;) (type $0) + (func $b-block-prepost (; 7 ;) (nop) (block $label$1 (if @@ -62,7 +62,7 @@ ) ) ) - (func $recurse (; 8 ;) (type $0) + (func $recurse (; 8 ;) (nop) (block $label$1 (nop) @@ -70,7 +70,7 @@ ) (nop) ) - (func $recurse-b (; 9 ;) (type $0) + (func $recurse-b (; 9 ;) (block $label$1 (nop) (block $label$2 diff --git a/test/unreachable-code.wast.fromBinary.noDebugInfo b/test/unreachable-code.wast.fromBinary.noDebugInfo index 724152093..d8c89d7f2 100644 --- a/test/unreachable-code.wast.fromBinary.noDebugInfo +++ b/test/unreachable-code.wast.fromBinary.noDebugInfo @@ -1,32 +1,32 @@ (module - (type $0 (func)) - (func $0 (; 0 ;) (type $0) + (type $none_=>_none (func)) + (func $0 (; 0 ;) (if (i32.const 1) (unreachable) ) ) - (func $1 (; 1 ;) (type $0) + (func $1 (; 1 ;) (if (i32.const 1) (unreachable) (unreachable) ) ) - (func $2 (; 2 ;) (type $0) + (func $2 (; 2 ;) (if (i32.const 1) (unreachable) ) ) - (func $3 (; 3 ;) (type $0) + (func $3 (; 3 ;) (if (i32.const 1) (unreachable) (unreachable) ) ) - (func $4 (; 4 ;) (type $0) + (func $4 (; 4 ;) (nop) (if (i32.const 1) @@ -34,7 +34,7 @@ ) (nop) ) - (func $5 (; 5 ;) (type $0) + (func $5 (; 5 ;) (nop) (if (i32.const 1) @@ -42,7 +42,7 @@ (unreachable) ) ) - (func $6 (; 6 ;) (type $0) + (func $6 (; 6 ;) (nop) (block $label$1 (if @@ -52,7 +52,7 @@ ) (nop) ) - (func $7 (; 7 ;) (type $0) + (func $7 (; 7 ;) (nop) (block $label$1 (if @@ -62,7 +62,7 @@ ) ) ) - (func $8 (; 8 ;) (type $0) + (func $8 (; 8 ;) (nop) (block $label$1 (nop) @@ -70,7 +70,7 @@ ) (nop) ) - (func $9 (; 9 ;) (type $0) + (func $9 (; 9 ;) (block $label$1 (nop) (block $label$2 diff --git a/test/unreachable-import_wasm-only.fromasm b/test/unreachable-import_wasm-only.fromasm index 2330e364c..103f81f8e 100644 --- a/test/unreachable-import_wasm-only.fromasm +++ b/test/unreachable-import_wasm-only.fromasm @@ -1,4 +1,5 @@ (module + (type $i32_=>_none (func (param i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "unreachable-import_wasm-only.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/unreachable-import_wasm-only.fromasm.clamp b/test/unreachable-import_wasm-only.fromasm.clamp index 2330e364c..103f81f8e 100644 --- a/test/unreachable-import_wasm-only.fromasm.clamp +++ b/test/unreachable-import_wasm-only.fromasm.clamp @@ -1,4 +1,5 @@ (module + (type $i32_=>_none (func (param i32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "unreachable-import_wasm-only.asm.js") (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/unreachable-import_wasm-only.fromasm.clamp.no-opts b/test/unreachable-import_wasm-only.fromasm.clamp.no-opts index 93def8b65..a218a5787 100644 --- a/test/unreachable-import_wasm-only.fromasm.clamp.no-opts +++ b/test/unreachable-import_wasm-only.fromasm.clamp.no-opts @@ -1,6 +1,7 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/unreachable-import_wasm-only.fromasm.imprecise b/test/unreachable-import_wasm-only.fromasm.imprecise index 27b05f2f1..f225fcc28 100644 --- a/test/unreachable-import_wasm-only.fromasm.imprecise +++ b/test/unreachable-import_wasm-only.fromasm.imprecise @@ -1,4 +1,5 @@ (module + (type $i32_=>_none (func (param i32))) (import "env" "memory" (memory $memory 256 256)) (export "__ZN10WasmAssertC2Ev__async_cb" (func $__ZN10WasmAssertC2Ev__async_cb)) (func $__ZN10WasmAssertC2Ev__async_cb (; 0 ;) (; has Stack IR ;) (param $0 i32) diff --git a/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts b/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts index 93def8b65..a218a5787 100644 --- a/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts +++ b/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts @@ -1,6 +1,7 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/unreachable-import_wasm-only.fromasm.no-opts b/test/unreachable-import_wasm-only.fromasm.no-opts index 93def8b65..a218a5787 100644 --- a/test/unreachable-import_wasm-only.fromasm.no-opts +++ b/test/unreachable-import_wasm-only.fromasm.no-opts @@ -1,6 +1,7 @@ (module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/unreachable-instr-type.wast.from-wast b/test/unreachable-instr-type.wast.from-wast index 2e3a87b49..172eec579 100644 --- a/test/unreachable-instr-type.wast.from-wast +++ b/test/unreachable-instr-type.wast.from-wast @@ -1,7 +1,7 @@ (module - (type $FUNCSIG$v (func)) + (type $none_=>_none (func)) (memory $0 (shared 1 1)) - (func $test (; 0 ;) (type $FUNCSIG$v) + (func $test (; 0 ;) (i32.load (unreachable) ) diff --git a/test/unreachable-instr-type.wast.fromBinary b/test/unreachable-instr-type.wast.fromBinary index 32838581a..1951e1f91 100644 --- a/test/unreachable-instr-type.wast.fromBinary +++ b/test/unreachable-instr-type.wast.fromBinary @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 (shared 1 1)) - (func $test (; 0 ;) (type $0) + (func $test (; 0 ;) (unreachable) ) ) diff --git a/test/unreachable-instr-type.wast.fromBinary.noDebugInfo b/test/unreachable-instr-type.wast.fromBinary.noDebugInfo index 16237ef69..8e3bea709 100644 --- a/test/unreachable-instr-type.wast.fromBinary.noDebugInfo +++ b/test/unreachable-instr-type.wast.fromBinary.noDebugInfo @@ -1,7 +1,7 @@ (module - (type $0 (func)) + (type $none_=>_none (func)) (memory $0 (shared 1 1)) - (func $0 (; 0 ;) (type $0) + (func $0 (; 0 ;) (unreachable) ) ) diff --git a/test/unreachable-pops.wasm.fromBinary b/test/unreachable-pops.wasm.fromBinary index 1f571bf39..242a51a84 100644 --- a/test/unreachable-pops.wasm.fromBinary +++ b/test/unreachable-pops.wasm.fromBinary @@ -1,6 +1,6 @@ (module - (type $0 (func (result i32))) - (func $0 (; 0 ;) (type $0) (result i32) + (type $none_=>_i32 (func (result i32))) + (func $0 (; 0 ;) (result i32) (block $label$1 (result i32) (unreachable) ) diff --git a/test/untaken-br_if.wast.from-wast b/test/untaken-br_if.wast.from-wast index a6e664e9c..a7106b322 100644 --- a/test/untaken-br_if.wast.from-wast +++ b/test/untaken-br_if.wast.from-wast @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$f (func (result f32))) - (func $binaryify-untaken-br_if (; 0 ;) (type $FUNCSIG$f) (result f32) + (type $none_=>_f32 (func (result f32))) + (func $binaryify-untaken-br_if (; 0 ;) (result f32) (if (result f32) (i32.const 1) (unreachable) diff --git a/test/untaken-br_if.wast.fromBinary b/test/untaken-br_if.wast.fromBinary index efdbded26..bba21ae32 100644 --- a/test/untaken-br_if.wast.fromBinary +++ b/test/untaken-br_if.wast.fromBinary @@ -1,6 +1,6 @@ (module - (type $0 (func (result f32))) - (func $binaryify-untaken-br_if (; 0 ;) (type $0) (result f32) + (type $none_=>_f32 (func (result f32))) + (func $binaryify-untaken-br_if (; 0 ;) (result f32) (if (result f32) (i32.const 1) (unreachable) diff --git a/test/untaken-br_if.wast.fromBinary.noDebugInfo b/test/untaken-br_if.wast.fromBinary.noDebugInfo index 15135f562..e7cf7b379 100644 --- a/test/untaken-br_if.wast.fromBinary.noDebugInfo +++ b/test/untaken-br_if.wast.fromBinary.noDebugInfo @@ -1,6 +1,6 @@ (module - (type $0 (func (result f32))) - (func $0 (; 0 ;) (type $0) (result f32) + (type $none_=>_f32 (func (result f32))) + (func $0 (; 0 ;) (result f32) (if (result f32) (i32.const 1) (unreachable) diff --git a/test/use-import-and-drop.fromasm.clamp.no-opts b/test/use-import-and-drop.fromasm.clamp.no-opts index 55cb06af9..37c89c03a 100644 --- a/test/use-import-and-drop.fromasm.clamp.no-opts +++ b/test/use-import-and-drop.fromasm.clamp.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/use-import-and-drop.fromasm.imprecise.no-opts b/test/use-import-and-drop.fromasm.imprecise.no-opts index 55cb06af9..37c89c03a 100644 --- a/test/use-import-and-drop.fromasm.imprecise.no-opts +++ b/test/use-import-and-drop.fromasm.imprecise.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/use-import-and-drop.fromasm.no-opts b/test/use-import-and-drop.fromasm.no-opts index 55cb06af9..37c89c03a 100644 --- a/test/use-import-and-drop.fromasm.no-opts +++ b/test/use-import-and-drop.fromasm.no-opts @@ -1,5 +1,7 @@ (module - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 0 0 funcref)) (import "env" "__memory_base" (global $__memory_base i32)) diff --git a/test/wasm-only.fromasm b/test/wasm-only.fromasm index f8439bc89..0f9e369c0 100644 --- a/test/wasm-only.fromasm +++ b/test/wasm-only.fromasm @@ -1,8 +1,19 @@ (module - (type $FUNCSIG$ff (func (param f32) (result f32))) - (type $FUNCSIG$vi (func (param i32))) - (type $legaltype$illegalImport (func (param f64 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $f32_=>_none (func (param f32))) + (type $f64_=>_none (func (param f64))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_f64_=>_none (func (param i32 i32 i32 f64))) + (type $i32_i64_f64_=>_none (func (param i32 i64 f64))) + (type $i64_=>_none (func (param i64))) + (type $f64_i32_i32_i32_=>_none (func (param f64 i32 i32 i32))) + (type $f64_i64_i32_=>_none (func (param f64 i64 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "wasm-only.asm.js") (import "env" "table" (table $table 3 3 funcref)) diff --git a/test/wasm-only.fromasm.clamp b/test/wasm-only.fromasm.clamp index f8439bc89..0f9e369c0 100644 --- a/test/wasm-only.fromasm.clamp +++ b/test/wasm-only.fromasm.clamp @@ -1,8 +1,19 @@ (module - (type $FUNCSIG$ff (func (param f32) (result f32))) - (type $FUNCSIG$vi (func (param i32))) - (type $legaltype$illegalImport (func (param f64 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $f32_=>_none (func (param f32))) + (type $f64_=>_none (func (param f64))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_f64_=>_none (func (param i32 i32 i32 f64))) + (type $i32_i64_f64_=>_none (func (param i32 i64 f64))) + (type $i64_=>_none (func (param i64))) + (type $f64_i32_i32_i32_=>_none (func (param f64 i32 i32 i32))) + (type $f64_i64_i32_=>_none (func (param f64 i64 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (data (global.get $__memory_base) "wasm-only.asm.js") (import "env" "table" (table $table 3 3 funcref)) diff --git a/test/wasm-only.fromasm.clamp.no-opts b/test/wasm-only.fromasm.clamp.no-opts index 1f82cff4b..5e53e9476 100644 --- a/test/wasm-only.fromasm.clamp.no-opts +++ b/test/wasm-only.fromasm.clamp.no-opts @@ -1,13 +1,22 @@ (module - (type $FUNCSIG$vdji (func (param f64 i64 i32))) - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$ff (func (param f32) (result f32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $legaltype$illegalImport (func (param f64 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (type $legaltype$illegalImportResult (func (result i32))) - (type $legaltype$do_i64 (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i64 (func (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_none (func (param i64))) + (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_i32_f64_=>_none (func (param i32 i32 i32 f64))) + (type $i32_i64_f64_=>_none (func (param i32 i64 f64))) + (type $f64_i32_i32_i32_=>_none (func (param f64 i32 i32 i32))) + (type $f64_i64_i32_=>_none (func (param f64 i64 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 3 3 funcref)) (elem (global.get $__table_base) $legalfunc$illegalImport $_fabsf $legalfunc$do_i64) diff --git a/test/wasm-only.fromasm.imprecise b/test/wasm-only.fromasm.imprecise index d5efe8d23..49caef5e8 100644 --- a/test/wasm-only.fromasm.imprecise +++ b/test/wasm-only.fromasm.imprecise @@ -1,8 +1,16 @@ (module - (type $FUNCSIG$ff (func (param f32) (result f32))) - (type $FUNCSIG$vi (func (param i32))) - (type $legaltype$illegalImport (func (param f64 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_f64_=>_none (func (param i32 i32 i32 f64))) + (type $i32_i64_f64_=>_none (func (param i32 i64 f64))) + (type $i64_=>_none (func (param i64))) + (type $f64_i32_i32_i32_=>_none (func (param f64 i32 i32 i32))) + (type $f64_i64_i32_=>_none (func (param f64 i64 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i64 (func (result i64))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 3 3 funcref)) (elem (global.get $__table_base) $legalfunc$illegalImport $_fabsf $legalfunc$do_i64) diff --git a/test/wasm-only.fromasm.imprecise.no-opts b/test/wasm-only.fromasm.imprecise.no-opts index 5b189d071..711be55a3 100644 --- a/test/wasm-only.fromasm.imprecise.no-opts +++ b/test/wasm-only.fromasm.imprecise.no-opts @@ -1,13 +1,20 @@ (module - (type $FUNCSIG$vdji (func (param f64 i64 i32))) - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$ff (func (param f32) (result f32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $legaltype$illegalImport (func (param f64 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (type $legaltype$illegalImportResult (func (result i32))) - (type $legaltype$do_i64 (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i64 (func (result i64))) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_none (func (param i64))) + (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_i32_f64_=>_none (func (param i32 i32 i32 f64))) + (type $i32_i64_f64_=>_none (func (param i32 i64 f64))) + (type $f64_i32_i32_i32_=>_none (func (param f64 i32 i32 i32))) + (type $f64_i64_i32_=>_none (func (param f64 i64 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 3 3 funcref)) (elem (global.get $__table_base) $legalfunc$illegalImport $_fabsf $legalfunc$do_i64) diff --git a/test/wasm-only.fromasm.no-opts b/test/wasm-only.fromasm.no-opts index 1f82cff4b..5e53e9476 100644 --- a/test/wasm-only.fromasm.no-opts +++ b/test/wasm-only.fromasm.no-opts @@ -1,13 +1,22 @@ (module - (type $FUNCSIG$vdji (func (param f64 i64 i32))) - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$ff (func (param f32) (result f32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $legaltype$illegalImport (func (param f64 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (type $legaltype$illegalImportResult (func (result i32))) - (type $legaltype$do_i64 (func (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i64 (func (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_none (func (param i64))) + (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_i32_f64_=>_none (func (param i32 i32 i32 f64))) + (type $i32_i64_f64_=>_none (func (param i32 i64 f64))) + (type $f64_i32_i32_i32_=>_none (func (param f64 i32 i32 i32))) + (type $f64_i64_i32_=>_none (func (param f64 i64 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $f32_=>_f32 (func (param f32) (result f32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 3 3 funcref)) (elem (global.get $__table_base) $legalfunc$illegalImport $_fabsf $legalfunc$do_i64) |