summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-11-25 15:46:56 -0800
committerGitHub <noreply@github.com>2019-11-25 15:46:56 -0800
commit8a70121a421204e05d020c67294e7e517c2d15d2 (patch)
treeda493f5ee5c8a3dfd18fba7518e05d25b1a71fba
parentd90583cf509c3f21b3b5136d3872b097c5f2800c (diff)
downloadbinaryen-8a70121a421204e05d020c67294e7e517c2d15d2.tar.gz
binaryen-8a70121a421204e05d020c67294e7e517c2d15d2.tar.bz2
binaryen-8a70121a421204e05d020c67294e7e517c2d15d2.zip
Remove FunctionType from Event (#2466)
This is the start of a larger refactoring to remove FunctionType entirely and store types and signatures directly on the entities that use them. This PR updates BrOnExn and Events to remove their use of FunctionType and makes the BinaryWriter traverse the module and collect types rather than using the global FunctionType list. While we are collecting types, we also sort them by frequency as an optimization. Remaining uses of FunctionType in Function, CallIndirect, and parsing will be removed in a future PR.
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/binaryen-c.cpp43
-rw-r--r--src/binaryen-c.h18
-rw-r--r--src/ir/ExpressionManipulator.cpp2
-rw-r--r--src/ir/ReFinalize.cpp2
-rw-r--r--src/ir/branch-utils.h2
-rw-r--r--src/ir/module-utils.h61
-rw-r--r--src/ir/type-updating.h2
-rw-r--r--src/js/binaryen.js-post.js11
-rw-r--r--src/pass.h2
-rw-r--r--src/passes/Print.cpp4
-rw-r--r--src/passes/RemoveUnusedModuleElements.cpp3
-rw-r--r--src/tools/fuzzing.h12
-rw-r--r--src/wasm-binary.h10
-rw-r--r--src/wasm-builder.h18
-rw-r--r--src/wasm-type.h20
-rw-r--r--src/wasm.h12
-rw-r--r--src/wasm/wasm-binary.cpp156
-rw-r--r--src/wasm/wasm-s-parser.cpp21
-rw-r--r--src/wasm/wasm-stack.cpp4
-rw-r--r--src/wasm/wasm-type.cpp37
-rw-r--r--src/wasm/wasm-validator.cpp23
-rw-r--r--src/wasm/wasm.cpp12
-rw-r--r--test/binaryen.js/event.js7
-rw-r--r--test/binaryen.js/event.js.txt6
-rw-r--r--test/binaryen.js/exception-handling.js3
-rw-r--r--test/binaryen.js/exception-handling.js.txt1
-rw-r--r--test/binaryen.js/kitchen-sink.js11
-rw-r--r--test/binaryen.js/kitchen-sink.js.txt43
-rw-r--r--test/debugInfo.fromasm.clamp.no-opts.map2
-rw-r--r--test/debugInfo.fromasm.imprecise.no-opts.map2
-rw-r--r--test/debugInfo.fromasm.no-opts.map2
-rw-r--r--test/debugInfo.fromasm.read-written16
-rw-r--r--test/duplicate_types.wast.fromBinary15
-rw-r--r--test/duplicate_types.wast.fromBinary.noDebugInfo15
-rw-r--r--test/events.wast.fromBinary4
-rw-r--r--test/events.wast.fromBinary.noDebugInfo4
-rw-r--r--test/example/c-api-kitchen-sink.c6
-rw-r--r--test/example/c-api-kitchen-sink.txt22
-rw-r--r--test/example/c-api-kitchen-sink.txt.txt3
-rw-r--r--test/example/c-api-unused-mem.txt5
-rw-r--r--test/exception-handling.wast.fromBinary14
-rw-r--r--test/exception-handling.wast.fromBinary.noDebugInfo14
-rw-r--r--test/extra-unreachable.wast.fromBinary6
-rw-r--r--test/extra-unreachable.wast.fromBinary.noDebugInfo6
-rw-r--r--test/grow_memory.wast.fromBinary8
-rw-r--r--test/grow_memory.wast.fromBinary.noDebugInfo8
-rw-r--r--test/metadce/rooted-export.wast.dced1
-rw-r--r--test/min.wast.fromBinary16
-rw-r--r--test/min.wast.fromBinary.noDebugInfo16
-rw-r--r--test/passes/converge_O3_metrics.bin.txt250
-rw-r--r--test/passes/remove-unused-module-elements_all-features.txt2
-rw-r--r--test/passes/remove-unused-nonfunction-module-elements_all-features.txt1
-rw-r--r--test/passes/translate-to-fuzz_all-features.txt1665
-rw-r--r--test/passes/translate-to-fuzz_no-fuzz-nans_all-features.txt974
-rw-r--r--test/polymorphic_stack.wast.fromBinary26
-rw-r--r--test/polymorphic_stack.wast.fromBinary.noDebugInfo26
-rw-r--r--test/simd.wast.fromBinary370
-rw-r--r--test/simd.wast.fromBinary.noDebugInfo370
-rw-r--r--test/unit.wast.fromBinary64
-rw-r--r--test/unit.wast.fromBinary.noDebugInfo64
61 files changed, 1489 insertions, 3056 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e987ba311..bc074e094 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -282,7 +282,7 @@ SET(wasm_dis_SOURCES
)
ADD_EXECUTABLE(wasm-dis
${wasm_dis_SOURCES})
-TARGET_LINK_LIBRARIES(wasm-dis passes wasm asmjs ir cfg support)
+TARGET_LINK_LIBRARIES(wasm-dis wasm asmjs emscripten-optimizer passes ir cfg support wasm)
SET_PROPERTY(TARGET wasm-dis PROPERTY CXX_STANDARD 14)
SET_PROPERTY(TARGET wasm-dis PROPERTY CXX_STANDARD_REQUIRED ON)
INSTALL(TARGETS wasm-dis DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp
index d33f40cdb..509e9b569 100644
--- a/src/binaryen-c.cpp
+++ b/src/binaryen-c.cpp
@@ -3262,19 +3262,18 @@ void BinaryenRemoveGlobal(BinaryenModuleRef module, const char* name) {
BinaryenEventRef BinaryenAddEvent(BinaryenModuleRef module,
const char* name,
uint32_t attribute,
- BinaryenFunctionTypeRef type) {
+ BinaryenType params,
+ BinaryenType results) {
if (tracing) {
std::cout << " BinaryenAddEvent(the_module, \"" << name << "\", "
- << attribute << ", functionTypes[" << functionTypes[type]
- << "]);\n";
+ << attribute << ", " << params << ", " << results << ");\n";
}
auto* wasm = (Module*)module;
auto* ret = new Event();
ret->name = name;
ret->attribute = attribute;
- ret->type = ((FunctionType*)type)->name;
- ret->params = ((FunctionType*)type)->params;
+ ret->sig = Signature(Type(params), Type(results));
wasm->addEvent(ret);
return ret;
}
@@ -3378,22 +3377,22 @@ void BinaryenAddEventImport(BinaryenModuleRef module,
const char* externalModuleName,
const char* externalBaseName,
uint32_t attribute,
- BinaryenFunctionTypeRef eventType) {
+ BinaryenType params,
+ BinaryenType results) {
auto* wasm = (Module*)module;
auto* ret = new Event();
if (tracing) {
std::cout << " BinaryenAddEventImport(the_module, \"" << internalName
<< "\", \"" << externalModuleName << "\", \"" << externalBaseName
- << "\", " << attribute << ", functionTypes["
- << functionTypes[eventType] << "]);\n";
+ << "\", " << attribute << ", " << params << ", " << results
+ << ");\n";
}
ret->name = internalName;
ret->module = externalModuleName;
ret->base = externalBaseName;
- ret->type = ((FunctionType*)eventType)->name;
- ret->params = ((FunctionType*)eventType)->params;
+ ret->sig = Signature(Type(params), Type(results));
wasm->addEvent(ret);
}
@@ -4315,31 +4314,21 @@ int BinaryenEventGetAttribute(BinaryenEventRef event) {
return ((Event*)event)->attribute;
}
-const char* BinaryenEventGetType(BinaryenEventRef event) {
+BinaryenType BinaryenEventGetParams(BinaryenEventRef event) {
if (tracing) {
- std::cout << " BinaryenEventGetType(events[" << events[event] << "]);\n";
+ std::cout << " BinaryenEventGetParams(events[" << events[event] << "]);\n";
}
- return ((Event*)event)->type.c_str();
+ return ((Event*)event)->sig.params;
}
-BinaryenIndex BinaryenEventGetNumParams(BinaryenEventRef event) {
- if (tracing) {
- std::cout << " BinaryenEventGetNumParams(events[" << events[event]
- << "]);\n";
- }
- return ((Event*)event)->params.size();
-}
-BinaryenType BinaryenEventGetParam(BinaryenEventRef event,
- BinaryenIndex index) {
+BinaryenType BinaryenEventGetResults(BinaryenEventRef event) {
if (tracing) {
- std::cout << " BinaryenEventGetParam(events[" << events[event] << "], "
- << index << ");\n";
+ std::cout << " BinaryenEventGetResults(events[" << events[event]
+ << "]);\n";
}
- auto* fn = (Event*)event;
- assert(index < fn->params.size());
- return fn->params[index];
+ return ((Event*)event)->sig.results;
}
//
diff --git a/src/binaryen-c.h b/src/binaryen-c.h
index 726129983..b5d023400 100644
--- a/src/binaryen-c.h
+++ b/src/binaryen-c.h
@@ -1118,7 +1118,8 @@ BINARYEN_API void BinaryenAddEventImport(BinaryenModuleRef module,
const char* externalModuleName,
const char* externalBaseName,
uint32_t attribute,
- BinaryenFunctionTypeRef eventType);
+ BinaryenType params,
+ BinaryenType results);
// Exports
@@ -1164,7 +1165,8 @@ typedef void* BinaryenEventRef;
BINARYEN_API BinaryenEventRef BinaryenAddEvent(BinaryenModuleRef module,
const char* name,
uint32_t attribute,
- BinaryenFunctionTypeRef type);
+ BinaryenType params,
+ BinaryenType results);
BINARYEN_API BinaryenEventRef BinaryenGetEvent(BinaryenModuleRef module,
const char* name);
BINARYEN_API void BinaryenRemoveEvent(BinaryenModuleRef module,
@@ -1437,14 +1439,10 @@ BinaryenGlobalGetInitExpr(BinaryenGlobalRef global);
BINARYEN_API const char* BinaryenEventGetName(BinaryenEventRef event);
// Gets the attribute of the specified `Event`.
BINARYEN_API int BinaryenEventGetAttribute(BinaryenEventRef event);
-// Gets the name of the `FunctionType` associated with the specified `Event`.
-BINARYEN_API const char* BinaryenEventGetType(BinaryenEventRef event);
-// Gets the number of parameters of the specified `Event`.
-BINARYEN_API BinaryenIndex BinaryenEventGetNumParams(BinaryenEventRef event);
-// Gets the type of the parameter at the specified index of the specified
-// `Event`.
-BINARYEN_API BinaryenType BinaryenEventGetParam(BinaryenEventRef event,
- BinaryenIndex index);
+// Gets the parameters type of the specified `Event`.
+BINARYEN_API BinaryenType BinaryenEventGetParams(BinaryenEventRef event);
+// Gets the results type of the specified `Event`.
+BINARYEN_API BinaryenType BinaryenEventGetResults(BinaryenEventRef event);
//
// ========== Import Operations ==========
diff --git a/src/ir/ExpressionManipulator.cpp b/src/ir/ExpressionManipulator.cpp
index fdefbb2e0..2542e5743 100644
--- a/src/ir/ExpressionManipulator.cpp
+++ b/src/ir/ExpressionManipulator.cpp
@@ -242,7 +242,7 @@ flexibleCopy(Expression* original, Module& wasm, CustomCopier custom) {
}
Expression* visitBrOnExn(BrOnExn* curr) {
return builder.makeBrOnExn(
- curr->name, curr->event, copy(curr->exnref), curr->eventParams);
+ curr->name, curr->event, copy(curr->exnref), curr->sent);
}
Expression* visitNop(Nop* curr) { return builder.makeNop(); }
Expression* visitUnreachable(Unreachable* curr) {
diff --git a/src/ir/ReFinalize.cpp b/src/ir/ReFinalize.cpp
index 9ee109f5e..007a7ee55 100644
--- a/src/ir/ReFinalize.cpp
+++ b/src/ir/ReFinalize.cpp
@@ -164,7 +164,7 @@ void ReFinalize::visitThrow(Throw* curr) { curr->finalize(); }
void ReFinalize::visitRethrow(Rethrow* curr) { curr->finalize(); }
void ReFinalize::visitBrOnExn(BrOnExn* curr) {
curr->finalize();
- updateBreakValueType(curr->name, curr->getSingleSentType());
+ updateBreakValueType(curr->name, curr->sent);
}
void ReFinalize::visitNop(Nop* curr) { curr->finalize(); }
void ReFinalize::visitUnreachable(Unreachable* curr) { curr->finalize(); }
diff --git a/src/ir/branch-utils.h b/src/ir/branch-utils.h
index 976dd72ec..c4ff26c0c 100644
--- a/src/ir/branch-utils.h
+++ b/src/ir/branch-utils.h
@@ -221,7 +221,7 @@ struct BranchSeeker : public PostWalker<BranchSeeker> {
}
// check the br_on_exn
if (curr->name == target) {
- noteFound(curr->getSingleSentType());
+ noteFound(curr->sent);
}
}
diff --git a/src/ir/module-utils.h b/src/ir/module-utils.h
index 52765035c..0fd478551 100644
--- a/src/ir/module-utils.h
+++ b/src/ir/module-utils.h
@@ -38,51 +38,25 @@ struct BinaryIndexes {
std::unordered_map<Name, Index> eventIndexes;
BinaryIndexes(Module& wasm) {
- auto addGlobal = [&](Global* curr) {
- auto index = globalIndexes.size();
- globalIndexes[curr->name] = index;
- };
- for (auto& curr : wasm.globals) {
- if (curr->imported()) {
- addGlobal(curr.get());
- }
- }
- for (auto& curr : wasm.globals) {
- if (!curr->imported()) {
- addGlobal(curr.get());
- }
- }
- assert(globalIndexes.size() == wasm.globals.size());
- auto addFunction = [&](Function* curr) {
- auto index = functionIndexes.size();
- functionIndexes[curr->name] = index;
- };
- for (auto& curr : wasm.functions) {
- if (curr->imported()) {
- addFunction(curr.get());
+ auto addIndexes = [&](auto& source, auto& indexes) {
+ auto addIndex = [&](auto* curr) {
+ auto index = indexes.size();
+ indexes[curr->name] = index;
+ };
+ for (auto& curr : source) {
+ if (curr->imported()) {
+ addIndex(curr.get());
+ }
}
- }
- for (auto& curr : wasm.functions) {
- if (!curr->imported()) {
- addFunction(curr.get());
+ for (auto& curr : source) {
+ if (!curr->imported()) {
+ addIndex(curr.get());
+ }
}
- }
- assert(functionIndexes.size() == wasm.functions.size());
- auto addEvent = [&](Event* curr) {
- auto index = eventIndexes.size();
- eventIndexes[curr->name] = index;
};
- for (auto& curr : wasm.events) {
- if (curr->imported()) {
- addEvent(curr.get());
- }
- }
- for (auto& curr : wasm.events) {
- if (!curr->imported()) {
- addEvent(curr.get());
- }
- }
- assert(eventIndexes.size() == wasm.events.size());
+ addIndexes(wasm.functions, functionIndexes);
+ addIndexes(wasm.globals, globalIndexes);
+ addIndexes(wasm.events, eventIndexes);
}
};
@@ -126,8 +100,7 @@ inline Event* copyEvent(Event* event, Module& out) {
auto* ret = new Event();
ret->name = event->name;
ret->attribute = event->attribute;
- ret->type = event->type;
- ret->params = event->params;
+ ret->sig = event->sig;
out.addEvent(ret);
return ret;
}
diff --git a/src/ir/type-updating.h b/src/ir/type-updating.h
index 1fa891ec1..d64ae0158 100644
--- a/src/ir/type-updating.h
+++ b/src/ir/type-updating.h
@@ -154,7 +154,7 @@ struct TypeUpdater
} else if (auto* sw = curr->dynCast<Switch>()) {
applySwitchChanges(sw, change);
} else if (auto* br = curr->dynCast<BrOnExn>()) {
- noteBreakChange(br->name, change, br->getSingleSentType());
+ noteBreakChange(br->name, change, br->sent);
}
}
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index 1f2c414e5..d5943176e 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -2057,9 +2057,9 @@ function wrapModule(module, self) {
return Module['_BinaryenRemoveGlobal'](module, strToStack(name));
});
}
- self['addEvent'] = function(name, attribute, eventType) {
+ self['addEvent'] = function(name, attribute, params, results) {
return preserveStack(function() {
- return Module['_BinaryenAddEvent'](module, strToStack(name), attribute, eventType);
+ return Module['_BinaryenAddEvent'](module, strToStack(name), attribute, params, results);
});
};
self['getEvent'] = function(name) {
@@ -2092,9 +2092,9 @@ function wrapModule(module, self) {
return Module['_BinaryenAddGlobalImport'](module, strToStack(internalName), strToStack(externalModuleName), strToStack(externalBaseName), globalType, mutable);
});
};
- self['addEventImport'] = function(internalName, externalModuleName, externalBaseName, attribute, eventType) {
+ self['addEventImport'] = function(internalName, externalModuleName, externalBaseName, attribute, params, results) {
return preserveStack(function() {
- return Module['_BinaryenAddEventImport'](module, strToStack(internalName), strToStack(externalModuleName), strToStack(externalBaseName), attribute, eventType);
+ return Module['_BinaryenAddEventImport'](module, strToStack(internalName), strToStack(externalModuleName), strToStack(externalBaseName), attribute, params, results);
});
};
self['addExport'] = // deprecated
@@ -2740,7 +2740,8 @@ Module['getEventInfo'] = function(event_) {
'module': UTF8ToString(Module['_BinaryenEventImportGetModule'](event_)),
'base': UTF8ToString(Module['_BinaryenEventImportGetBase'](event_)),
'attribute': Module['_BinaryenEventGetAttribute'](event_),
- 'type': UTF8ToString(Module['_BinaryenEventGetType'](event_))
+ 'params': Module['_BinaryenEventGetParams'](event_),
+ 'results': Module['_BinaryenEventGetResults'](event_)
};
};
diff --git a/src/pass.h b/src/pass.h
index 0d0b14883..46b603f00 100644
--- a/src/pass.h
+++ b/src/pass.h
@@ -268,7 +268,7 @@ public:
// should always be safe *unless* you do something in the pass that makes it
// not thread-safe; in other words, the Module and Function objects and
// so forth are set up so that Functions can be processed in parallel, so
- // if you do not ad global state that could be raced on, your pass could be
+ // if you do not add global state that could be raced on, your pass could be
// function-parallel.
//
// Function-parallel passes create an instance of the Walker class per
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index f51bccf27..fef4ac01d 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -2056,7 +2056,7 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> {
o << "(event ";
printName(curr->name, o);
o << maybeSpace << "(attr " << curr->attribute << ')' << maybeSpace;
- o << ParamType(Type(curr->params));
+ o << ParamType(curr->sig.params);
o << "))";
o << maybeNewLine;
}
@@ -2066,7 +2066,7 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> {
printMedium(o, "event ");
printName(curr->name, o);
o << maybeSpace << "(attr " << curr->attribute << ')' << maybeSpace;
- o << ParamType(Type(curr->params));
+ o << ParamType(curr->sig.params);
o << ")" << maybeNewLine;
}
void printTableHeader(Table* curr) {
diff --git a/src/passes/RemoveUnusedModuleElements.cpp b/src/passes/RemoveUnusedModuleElements.cpp
index 806545adf..20ce284f7 100644
--- a/src/passes/RemoveUnusedModuleElements.cpp
+++ b/src/passes/RemoveUnusedModuleElements.cpp
@@ -301,9 +301,6 @@ struct RemoveUnusedModuleElements : public Pass {
for (auto* call : analyzer.indirectCalls) {
call->fullType = canonicalize(call->fullType);
}
- for (auto* event : analyzer.events) {
- event->type = canonicalize(event->type);
- }
// remove no-longer used types
module->functionTypes.erase(
std::remove_if(module->functionTypes.begin(),
diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h
index fe4a3955a..571dad79e 100644
--- a/src/tools/fuzzing.h
+++ b/src/tools/fuzzing.h
@@ -406,20 +406,14 @@ private:
Index num = upTo(3);
for (size_t i = 0; i < num; i++) {
// Events should have void return type and at least one param type
- Type type = pick(i32, i64, f32, f64);
- std::string sig = std::string("v") + getSig(type);
std::vector<Type> params;
- params.push_back(type);
Index numValues = upToSquared(MAX_PARAMS - 1);
- for (Index i = 0; i < numValues; i++) {
- type = pick(i32, i64, f32, f64);
- sig += getSig(type);
- params.push_back(type);
+ for (Index i = 0; i < numValues + 1; i++) {
+ params.push_back(pick(i32, i64, f32, f64));
}
auto* event = builder.makeEvent(std::string("event$") + std::to_string(i),
WASM_EVENT_ATTRIBUTE_EXCEPTION,
- ensureFunctionType(sig, &wasm)->name,
- std::move(params));
+ Signature(Type(params), Type::none));
wasm.addEvent(event);
}
}
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 7014fd875..78fd72e38 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -1002,7 +1002,6 @@ public:
void writeStart();
void writeMemory();
void writeTypes();
- int32_t getFunctionTypeIndex(Name type);
void writeImports();
void writeFunctionSignatures();
@@ -1014,9 +1013,10 @@ public:
void writeDataSegments();
void writeEvents();
- uint32_t getFunctionIndex(Name name);
- uint32_t getGlobalIndex(Name name);
- uint32_t getEventIndex(Name name);
+ uint32_t getFunctionIndex(Name name) const;
+ uint32_t getGlobalIndex(Name name) const;
+ uint32_t getEventIndex(Name name) const;
+ uint32_t getTypeIndex(Signature sig) const;
void writeFunctionTableDeclaration();
void writeTableElements();
@@ -1060,6 +1060,8 @@ private:
BufferWithRandomAccess& o;
bool debug;
ModuleUtils::BinaryIndexes indexes;
+ std::unordered_map<Signature, Index> typeIndexes;
+ std::vector<Signature> types;
bool debugInfo = true;
std::ostream* sourceMap = nullptr;
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index 87b1f0306..533f83d94 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -541,19 +541,16 @@ public:
return ret;
}
BrOnExn* makeBrOnExn(Name name, Event* event, Expression* exnref) {
- return makeBrOnExn(name, event->name, exnref, event->params);
+ return makeBrOnExn(name, event->name, exnref, event->sig.params);
}
- BrOnExn* makeBrOnExn(Name name,
- Name event,
- Expression* exnref,
- std::vector<Type>& eventParams) {
+ BrOnExn* makeBrOnExn(Name name, Name event, Expression* exnref, Type sent) {
auto* ret = allocator.alloc<BrOnExn>();
ret->name = name;
ret->event = event;
ret->exnref = exnref;
// Copy params info into BrOnExn, because it is necessary when BrOnExn is
// refinalized without the module.
- ret->eventParams = eventParams;
+ ret->sent = sent;
ret->finalize();
return ret;
}
@@ -765,16 +762,11 @@ public:
return glob;
}
- // TODO Remove 'type' parameter once we remove FunctionType
- static Event* makeEvent(Name name,
- uint32_t attribute,
- Name type,
- std::vector<Type>&& params) {
+ static Event* makeEvent(Name name, uint32_t attribute, Signature sig) {
auto* event = new Event;
event->name = name;
event->attribute = attribute;
- event->type = type;
- event->params = params;
+ event->sig = sig;
return event;
}
};
diff --git a/src/wasm-type.h b/src/wasm-type.h
index 371d3216f..7b3845aec 100644
--- a/src/wasm-type.h
+++ b/src/wasm-type.h
@@ -74,6 +74,9 @@ public:
bool operator!=(const Type& other) const { return id != other.id; }
bool operator!=(const ValueType& other) const { return id != other; }
+ // Order types by some notion of simplicity
+ bool operator<(const Type& other) const;
+
// Allows for using Types in switch statements
constexpr operator uint32_t() const { return id; }
std::string toString() const;
@@ -97,6 +100,18 @@ std::ostream& operator<<(std::ostream& os, Type t);
std::ostream& operator<<(std::ostream& os, ParamType t);
std::ostream& operator<<(std::ostream& os, ResultType t);
+struct Signature {
+ Type params;
+ Type results;
+ Signature() = default;
+ Signature(Type params, Type results) : params(params), results(results) {}
+ bool operator==(const Signature& other) const {
+ return params == other.params && results == other.results;
+ }
+ bool operator!=(const Signature& other) const { return !(*this == other); }
+ bool operator<(const Signature& other) const;
+};
+
constexpr Type none = Type::none;
constexpr Type i32 = Type::i32;
constexpr Type i64 = Type::i64;
@@ -114,4 +129,9 @@ Type reinterpretType(Type type);
} // namespace wasm
+template<> class std::hash<wasm::Signature> {
+public:
+ size_t operator()(const wasm::Signature& sig) const;
+};
+
#endif // wasm_wasm_type_h
diff --git a/src/wasm.h b/src/wasm.h
index 77eeea5d3..08b85402e 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1123,10 +1123,9 @@ public:
Expression* exnref;
// This is duplicate info of param types stored in Event, but this is required
// for us to know the type of the value sent to the target block.
- std::vector<Type> eventParams;
+ Type sent;
void finalize();
- Type getSingleSentType();
};
// Globals
@@ -1320,14 +1319,7 @@ public:
Name name;
// Kind of event. Currently only WASM_EVENT_ATTRIBUTE_EXCEPTION is possible.
uint32_t attribute = WASM_EVENT_ATTRIBUTE_EXCEPTION;
- // Type string in the format of function type. Return type is considered as a
- // void type. So if you have an event whose type is (i32, i32), the type
- // string will be "vii".
- Name type;
- // This is duplicate info of 'Name type', but we store this anyway because
- // we plan to remove FunctionType in future.
- // TODO remove either this or FunctionType
- std::vector<Type> params;
+ Signature sig;
};
// "Opaque" data, not part of the core wasm spec, that is held in binaries.
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index 8f2fe3fe7..2336da912 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -16,6 +16,7 @@
#include <algorithm>
#include <fstream>
+#include <shared_mutex>
#include "support/bits.h"
#include "wasm-binary.h"
@@ -24,15 +25,74 @@
namespace wasm {
void WasmBinaryWriter::prepare() {
- // we need function types for all our functions
- for (auto& func : wasm->functions) {
- if (func->type.isNull()) {
- func->type = ensureFunctionType(getSig(func.get()), wasm)->name;
+ // Collect function types and their frequencies
+ using Counts = std::unordered_map<Signature, size_t>;
+ using AtomicCounts = std::unordered_map<Signature, std::atomic_size_t>;
+ Counts counts;
+ for (auto& curr : wasm->functions) {
+ counts[Signature(Type(curr->params), curr->result)]++;
+ }
+ for (auto& curr : wasm->events) {
+ counts[curr->sig]++;
+ }
+
+ // Parallelize collection of call_indirect type counts
+ struct TypeCounter : WalkerPass<PostWalker<TypeCounter>> {
+ AtomicCounts& counts;
+ std::shared_timed_mutex& mutex;
+ TypeCounter(AtomicCounts& counts, std::shared_timed_mutex& mutex)
+ : counts(counts), mutex(mutex) {}
+ bool isFunctionParallel() override { return true; }
+ bool modifiesBinaryenIR() override { return false; }
+ void visitCallIndirect(CallIndirect* curr) {
+ auto* type = getModule()->getFunctionType(curr->fullType);
+ Signature sig(Type(type->params), type->result);
+ {
+ std::shared_lock<std::shared_timed_mutex> lock(mutex);
+ auto it = counts.find(sig);
+ if (it != counts.end()) {
+ it->second++;
+ return;
+ }
+ }
+ {
+ std::lock_guard<std::shared_timed_mutex> lock(mutex);
+ counts[sig]++;
+ }
+ }
+ Pass* create() override { return new TypeCounter(counts, mutex); }
+ };
+
+ std::shared_timed_mutex mutex;
+ AtomicCounts parallelCounts;
+ for (auto& kv : counts) {
+ parallelCounts[kv.first] = 0;
+ }
+
+ TypeCounter counter(parallelCounts, mutex);
+ PassRunner runner(wasm);
+ runner.setIsNested(true);
+ counter.run(&runner, wasm);
+
+ for (auto& kv : parallelCounts) {
+ counts[kv.first] += kv.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;
}
- // TODO: depending on upstream flux
- // https://github.com/WebAssembly/spec/pull/301 might want this:
- // assert(!func->type.isNull());
+ });
+ for (Index i = 0; i < sorted.size(); ++i) {
+ typeIndexes[sorted[i].first] = i;
+ types.push_back(sorted[i].first);
}
+
importInfo = wasm::make_unique<ImportInfo>(*wasm);
}
@@ -173,43 +233,30 @@ void WasmBinaryWriter::writeMemory() {
}
void WasmBinaryWriter::writeTypes() {
- if (wasm->functionTypes.size() == 0) {
+ if (types.size() == 0) {
return;
}
if (debug) {
std::cerr << "== writeTypes" << std::endl;
}
auto start = startSection(BinaryConsts::Section::Type);
- o << U32LEB(wasm->functionTypes.size());
- for (auto& type : wasm->functionTypes) {
+ o << U32LEB(types.size());
+ for (Index i = 0; i < types.size(); ++i) {
+ Signature& sig = types[i];
if (debug) {
- std::cerr << "write one" << std::endl;
+ std::cerr << "write " << sig.params << " -> " << sig.results << std::endl;
}
o << S32LEB(BinaryConsts::EncodedType::Func);
- o << U32LEB(type->params.size());
- for (auto param : type->params) {
- o << binaryType(param);
- }
- if (type->result == none) {
- o << U32LEB(0);
- } else {
- o << U32LEB(1);
- o << binaryType(type->result);
+ for (auto& sigType : {sig.params, sig.results}) {
+ o << U32LEB(sigType.size());
+ for (auto type : sigType.expand()) {
+ o << binaryType(type);
+ }
}
}
finishSection(start);
}
-int32_t WasmBinaryWriter::getFunctionTypeIndex(Name type) {
- // TODO: optimize
- for (size_t i = 0; i < wasm->functionTypes.size(); i++) {
- if (wasm->functionTypes[i]->name == type) {
- return i;
- }
- }
- abort();
-}
-
void WasmBinaryWriter::writeImports() {
auto num = importInfo->getNumImports();
if (num == 0) {
@@ -230,7 +277,7 @@ void WasmBinaryWriter::writeImports() {
}
writeImportHeader(func);
o << U32LEB(int32_t(ExternalKind::Function));
- o << U32LEB(getFunctionTypeIndex(func->type));
+ o << U32LEB(getTypeIndex(Signature(Type(func->params), func->result)));
});
ModuleUtils::iterImportedGlobals(*wasm, [&](Global* global) {
if (debug) {
@@ -248,7 +295,7 @@ void WasmBinaryWriter::writeImports() {
writeImportHeader(event);
o << U32LEB(int32_t(ExternalKind::Event));
o << U32LEB(event->attribute);
- o << U32LEB(getFunctionTypeIndex(event->type));
+ o << U32LEB(getTypeIndex(event->sig));
});
if (wasm->memory.imported()) {
if (debug) {
@@ -289,7 +336,7 @@ void WasmBinaryWriter::writeFunctionSignatures() {
if (debug) {
std::cerr << "write one" << std::endl;
}
- o << U32LEB(getFunctionTypeIndex(func->type));
+ o << U32LEB(getTypeIndex(Signature(Type(func->params), func->result)));
});
finishSection(start);
}
@@ -451,19 +498,28 @@ void WasmBinaryWriter::writeDataSegments() {
finishSection(start);
}
-uint32_t WasmBinaryWriter::getFunctionIndex(Name name) {
- assert(indexes.functionIndexes.count(name));
- return indexes.functionIndexes[name];
+uint32_t WasmBinaryWriter::getFunctionIndex(Name name) const {
+ auto it = indexes.functionIndexes.find(name);
+ assert(it != indexes.functionIndexes.end());
+ return it->second;
+}
+
+uint32_t WasmBinaryWriter::getGlobalIndex(Name name) const {
+ auto it = indexes.globalIndexes.find(name);
+ assert(it != indexes.globalIndexes.end());
+ return it->second;
}
-uint32_t WasmBinaryWriter::getGlobalIndex(Name name) {
- assert(indexes.globalIndexes.count(name));
- return indexes.globalIndexes[name];
+uint32_t WasmBinaryWriter::getEventIndex(Name name) const {
+ auto it = indexes.eventIndexes.find(name);
+ assert(it != indexes.eventIndexes.end());
+ return it->second;
}
-uint32_t WasmBinaryWriter::getEventIndex(Name name) {
- assert(indexes.eventIndexes.count(name));
- return indexes.eventIndexes[name];
+uint32_t WasmBinaryWriter::getTypeIndex(Signature sig) const {
+ auto it = typeIndexes.find(sig);
+ assert(it != typeIndexes.end());
+ return it->second;
}
void WasmBinaryWriter::writeFunctionTableDeclaration() {
@@ -521,7 +577,7 @@ void WasmBinaryWriter::writeEvents() {
std::cerr << "write one" << std::endl;
}
o << U32LEB(event->attribute);
- o << U32LEB(getFunctionTypeIndex(event->type));
+ o << U32LEB(getTypeIndex(event->sig));
});
finishSection(start);
@@ -1364,10 +1420,9 @@ void WasmBinaryBuilder::readImports() {
throwError("invalid event index " + std::to_string(index) + " / " +
std::to_string(wasm.functionTypes.size()));
}
- Name type = wasm.functionTypes[index]->name;
- std::vector<Type> params = wasm.functionTypes[index]->params;
+ Type params = Type(wasm.functionTypes[index]->params);
auto* curr =
- builder.makeEvent(name, attribute, type, std::move(params));
+ builder.makeEvent(name, attribute, Signature(params, Type::none));
curr->module = module;
curr->base = base;
wasm.addEvent(curr);
@@ -2039,10 +2094,9 @@ void WasmBinaryBuilder::readEvents() {
throwError("invalid event index " + std::to_string(typeIndex) + " / " +
std::to_string(wasm.functionTypes.size()));
}
- Name type = wasm.functionTypes[typeIndex]->name;
- std::vector<Type> params = wasm.functionTypes[typeIndex]->params;
+ Type params = Type(wasm.functionTypes[typeIndex]->params);
wasm.addEvent(Builder::makeEvent(
- "event$" + std::to_string(i), attribute, type, std::move(params)));
+ "event$" + std::to_string(i), attribute, Signature(params, Type::none)));
}
}
@@ -4603,7 +4657,7 @@ void WasmBinaryBuilder::visitThrow(Throw* curr) {
}
auto* event = wasm.events[index].get();
curr->event = event->name;
- size_t num = event->params.size();
+ size_t num = event->sig.params.size();
curr->operands.resize(num);
for (size_t i = 0; i < num; i++) {
curr->operands[num - i - 1] = popNonVoidExpression();
@@ -4637,7 +4691,7 @@ void WasmBinaryBuilder::visitBrOnExn(BrOnExn* curr) {
// Copy params info into BrOnExn, because it is necessary when BrOnExn is
// refinalized without the module.
- curr->eventParams = event->params;
+ curr->sent = event->sig.params;
curr->finalize();
}
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index 307c94375..3a761fd17 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -1859,7 +1859,7 @@ Expression* SExpressionWasmBuilder::makeBrOnExn(Element& s) {
assert(event && "br_on_exn's event must exist");
// Copy params info into BrOnExn, because it is necessary when BrOnExn is
// refinalized without the module.
- ret->eventParams = event->params;
+ ret->sent = event->sig.params;
ret->finalize();
return ret;
}
@@ -2193,7 +2193,6 @@ void SExpressionWasmBuilder::parseImport(Element& s) {
j = parseMemoryLimits(inner, j);
}
} else if (kind == ExternalKind::Event) {
- FunctionType* functionType = nullptr;
auto event = make_unique<Event>();
if (j >= inner.size()) {
throw ParseException("event does not have an attribute", s.line, s.col);
@@ -2203,12 +2202,14 @@ void SExpressionWasmBuilder::parseImport(Element& s) {
throw ParseException("invalid attribute", attrElem.line, attrElem.col);
}
event->attribute = atoi(attrElem[1]->c_str());
- Type fakeResult; // just to call parseTypeUse
- j = parseTypeUse(inner, j, functionType, event->params, fakeResult);
+ std::vector<Type> paramTypes;
+ FunctionType* fakeFunctionType; // just to call parseTypeUse
+ Type results;
+ j = parseTypeUse(inner, j, fakeFunctionType, paramTypes, results);
event->name = name;
event->module = module;
event->base = base;
- event->type = functionType->name;
+ event->sig = Signature(Type(paramTypes), results);
wasm.addEvent(event.release());
}
// If there are more elements, they are invalid
@@ -2514,11 +2515,11 @@ void SExpressionWasmBuilder::parseEvent(Element& s, bool preParseImport) {
event->attribute = atoi(attrElem[1]->c_str());
// Parse typeuse
- FunctionType* functionType = nullptr;
- Type fakeResult; // just co call parseTypeUse
- i = parseTypeUse(s, i, functionType, event->params, fakeResult);
- assert(functionType && "functionType should've been set by parseTypeUse");
- event->type = functionType->name;
+ 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);
// 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 c1d4f1222..f1aaff93e 100644
--- a/src/wasm/wasm-stack.cpp
+++ b/src/wasm/wasm-stack.cpp
@@ -68,7 +68,9 @@ void BinaryInstWriter::visitCall(Call* curr) {
void BinaryInstWriter::visitCallIndirect(CallIndirect* curr) {
int8_t op =
curr->isReturn ? BinaryConsts::RetCallIndirect : BinaryConsts::CallIndirect;
- o << op << U32LEB(parent.getFunctionTypeIndex(curr->fullType))
+ auto* type = parent.getModule()->getFunctionType(curr->fullType);
+ Signature sig(Type(type->params), type->result);
+ o << op << U32LEB(parent.getTypeIndex(sig))
<< U32LEB(0); // Reserved flags field
}
diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp
index 9d0f9b108..e114a5540 100644
--- a/src/wasm/wasm-type.cpp
+++ b/src/wasm/wasm-type.cpp
@@ -19,22 +19,28 @@
#include <sstream>
#include <unordered_map>
-#include "wasm-type.h"
-#include "wasm-features.h"
-
#include "compiler-support.h"
+#include "support/hash.h"
+#include "wasm-features.h"
+#include "wasm-type.h"
template<> class std::hash<std::vector<wasm::Type>> {
public:
size_t operator()(const std::vector<wasm::Type>& types) const {
- size_t res = 0;
+ uint32_t res = wasm::rehash(0, uint32_t(types.size()));
for (auto vt : types) {
- res ^= std::hash<uint32_t>{}(vt);
+ res = wasm::rehash(res, uint32_t(vt));
}
return res;
}
};
+size_t std::hash<wasm::Signature>::
+operator()(const wasm::Signature& sig) const {
+ return std::hash<uint64_t>{}(uint64_t(sig.params) << 32 |
+ uint64_t(sig.results));
+}
+
namespace wasm {
namespace {
@@ -123,6 +129,27 @@ const std::vector<Type>& Type::expand() const {
return *typeLists[id].get();
}
+bool Type::operator<(const Type& other) const {
+ const std::vector<Type>& these = expand();
+ const std::vector<Type>& others = other.expand();
+ return std::lexicographical_compare(
+ these.begin(),
+ these.end(),
+ others.begin(),
+ others.end(),
+ [](const Type& a, const Type& b) { return uint32_t(a) < uint32_t(b); });
+}
+
+bool Signature::operator<(const Signature& other) const {
+ if (results < other.results) {
+ return true;
+ } else if (other.results < results) {
+ return false;
+ } else {
+ return params < other.params;
+ }
+}
+
namespace {
std::ostream&
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 05cb45d25..d3f03b76c 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -1703,14 +1703,15 @@ void FunctionValidator::visitThrow(Throw* curr) {
if (!shouldBeTrue(!!event, curr, "throw's event must exist")) {
return;
}
- if (!shouldBeTrue(curr->operands.size() == event->params.size(),
+ if (!shouldBeTrue(curr->operands.size() == event->sig.params.size(),
curr,
"event's param numbers must match")) {
return;
}
+ const std::vector<Type>& paramTypes = event->sig.params.expand();
for (size_t i = 0; i < curr->operands.size(); i++) {
if (!shouldBeEqualOrFirstIsUnreachable(curr->operands[i]->type,
- event->params[i],
+ paramTypes[i],
curr->operands[i],
"event param types must match") &&
!info.quiet) {
@@ -1731,10 +1732,10 @@ void FunctionValidator::visitRethrow(Rethrow* curr) {
void FunctionValidator::visitBrOnExn(BrOnExn* curr) {
Event* event = getModule()->getEventOrNull(curr->event);
shouldBeTrue(event != nullptr, curr, "br_on_exn's event must exist");
- shouldBeTrue(event->params == curr->eventParams,
+ shouldBeTrue(event->sig.params == curr->sent,
curr,
"br_on_exn's event params and event's params are different");
- noteBreak(curr->name, curr->getSingleSentType(), curr);
+ noteBreak(curr->name, curr->sent, curr);
shouldBeTrue(curr->exnref->type == unreachable ||
curr->exnref->type == exnref,
curr,
@@ -2110,23 +2111,19 @@ static void validateEvents(Module& module, ValidationInfo& info) {
"Module has events (event-handling is disabled)");
}
for (auto& curr : module.events) {
- info.shouldBeTrue(
- curr->type.is(), curr->name, "Event should have a valid type");
- FunctionType* ft = module.getFunctionType(curr->type);
- info.shouldBeEqual(
- ft->result, none, curr->name, "Event type's result type should be none");
info.shouldBeEqual(curr->attribute,
(unsigned)0,
curr->attribute,
"Currently only attribute 0 is supported");
- for (auto type : curr->params) {
+ info.shouldBeEqual(curr->sig.results,
+ Type(Type::none),
+ curr->name,
+ "Event type's result type should be none");
+ for (auto type : curr->sig.params.expand()) {
info.shouldBeTrue(type.isInteger() || type.isFloat(),
curr->name,
"Values in an event should have integer or float type");
}
- info.shouldBeTrue(curr->params == ft->params,
- curr->name,
- "Event's function type and internal type should match");
}
}
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index b137044b2..b71f7d854 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -219,7 +219,7 @@ struct TypeSeeker : public PostWalker<TypeSeeker> {
void visitBrOnExn(BrOnExn* curr) {
if (curr->name == targetName) {
- types.push_back(curr->getSingleSentType());
+ types.push_back(curr->sent);
}
}
@@ -924,16 +924,6 @@ void BrOnExn::finalize() {
}
}
-// br_on_exn's type is exnref, which it pushes onto the stack when it is not
-// taken, but the type of the value it pushes onto the stack when it is taken
-// should be the event type. So this is the type we 'send' to the block end when
-// it is taken. Currently we don't support multi value return from a block, we
-// pick the type of the first param from the event.
-// TODO Remove this function and generalize event type after multi-value support
-Type BrOnExn::getSingleSentType() {
- return eventParams.empty() ? none : eventParams.front();
-}
-
void Push::finalize() {
if (value->type == unreachable) {
type = unreachable;
diff --git a/test/binaryen.js/event.js b/test/binaryen.js/event.js
index 01ef43165..3931b3440 100644
--- a/test/binaryen.js/event.js
+++ b/test/binaryen.js/event.js
@@ -13,10 +13,9 @@ function cleanInfo(info) {
var module = new Binaryen.Module();
module.setFeatures(Binaryen.Features.ExceptionHandling);
-var vi = module.addFunctionType("vi", Binaryen.none, [Binaryen.i32]);
-var vif = module.addFunctionType("vif", Binaryen.none, [Binaryen.i32, Binaryen.f32]);
+var pairType = Binaryen.createType([Binaryen.i32, Binaryen.f32]);
-var event_ = module.addEvent("a-event", 0, vi);
+var event_ = module.addEvent("a-event", 0, Binaryen.i32, Binaryen.none);
console.log("GetEvent is equal: " + (event_ === module.getEvent("a-event")));
@@ -24,7 +23,7 @@ var eventInfo = Binaryen.getEventInfo(event_);
console.log("getEventInfo=" + JSON.stringify(cleanInfo(eventInfo)));
module.addEventExport("a-event", "a-event-exp");
-module.addEventImport("a-event-imp", "module", "base", 0, vif);
+module.addEventImport("a-event-imp", "module", "base", 0, pairType, Binaryen.none);
assert(module.validate());
console.log(module.emitText());
diff --git a/test/binaryen.js/event.js.txt b/test/binaryen.js/event.js.txt
index 233f4b037..51e35dc4c 100644
--- a/test/binaryen.js/event.js.txt
+++ b/test/binaryen.js/event.js.txt
@@ -1,16 +1,12 @@
GetEvent is equal: true
-getEventInfo={"name":"a-event","module":"","base":"","attribute":0,"type":"vi"}
+getEventInfo={"name":"a-event","module":"","base":"","attribute":0,"params":2,"results":0}
(module
- (type $vi (func (param i32)))
- (type $vif (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 $vi (func (param i32)))
- (type $vif (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 adf67d2fa..00faf8f26 100644
--- a/test/binaryen.js/exception-handling.js
+++ b/test/binaryen.js/exception-handling.js
@@ -20,8 +20,7 @@ var module = new Binaryen.Module();
module.setFeatures(Binaryen.Features.ExceptionHandling);
var v = module.addFunctionType("v", Binaryen.none, []);
-var vi = module.addFunctionType("vi", Binaryen.none, [Binaryen.i32]);
-var event_ = module.addEvent("e", 0, vi);
+var event_ = module.addEvent("e", 0, Binaryen.i32, Binaryen.none);
// (try
// (throw $e (i32.const 0))
diff --git a/test/binaryen.js/exception-handling.js.txt b/test/binaryen.js/exception-handling.js.txt
index 7c31efac2..04887dc31 100644
--- a/test/binaryen.js/exception-handling.js.txt
+++ b/test/binaryen.js/exception-handling.js.txt
@@ -1,6 +1,5 @@
(module
(type $v (func))
- (type $vi (func (param i32)))
(event $e (attr 0) (param i32))
(func $test (; 0 ;) (type $v)
(local $0 exnref)
diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js
index be5038d22..8c2ebc783 100644
--- a/test/binaryen.js/kitchen-sink.js
+++ b/test/binaryen.js/kitchen-sink.js
@@ -157,8 +157,7 @@ function test_core() {
module = new Binaryen.Module();
// Create an event
- var vi = module.addFunctionType("vi", Binaryen.none, [Binaryen.i32]);
- var event_ = module.addEvent("a-event", 0, vi);
+ var event_ = module.addEvent("a-event", 0, Binaryen.i32, Binaryen.none);
// Literals and consts
@@ -563,7 +562,7 @@ function test_core() {
module.addFunctionImport("an-imported", "module", "base", fiF);
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, vi);
+ module.addEventImport("a-event-imp", "module", "base", 0, Binaryen.i32, Binaryen.none);
// Exports
@@ -823,14 +822,13 @@ function test_binaries() {
module = new Binaryen.Module();
module.setFeatures(Binaryen.Features.All);
var iii = module.addFunctionType("iii", Binaryen.i32, [ Binaryen.i32, Binaryen.i32 ]);
- var vii = module.addFunctionType("vii", Binaryen.none, [ 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 initExpr = module.i32.const(3);
var global = module.addGlobal("a-global", Binaryen.i32, false, initExpr)
- var event_ = module.addEvent("a-event", 0, vii);
+ var event_ = module.addEvent("a-event", 0, Binaryen.createType([Binaryen.i32, Binaryen.i32]), Binaryen.none);
Binaryen.setDebugInfo(true); // include names section
buffer = module.emitBinary();
Binaryen.setDebugInfo(false);
@@ -901,14 +899,13 @@ function test_parsing() {
module.setFeatures(Binaryen.Features.All);
var iii = module.addFunctionType("iii", Binaryen.i32, [ Binaryen.i32, Binaryen.i32 ]);
- var vi = module.addFunctionType("vi", Binaryen.none, [ 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 initExpr = module.i32.const(3);
var global = module.addGlobal("a-global", Binaryen.i32, false, initExpr)
- var event_ = module.addEvent("a-event", 0, vi);
+ var event_ = module.addEvent("a-event", 0, Binaryen.i32, Binaryen.none);
text = module.emitText();
module.dispose();
module = null;
diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt
index 61e5df269..1bf9eaea8 100644
--- a/test/binaryen.js/kitchen-sink.js.txt
+++ b/test/binaryen.js/kitchen-sink.js.txt
@@ -84,11 +84,10 @@ getExpressionInfo(i64.const)={"id":14,"type":3,"value":{"low":6,"high":7}}
getExpressionInfo(f32.const)={"id":14,"type":4,"value":8.5}
getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5}
(module
- (type $vi (func (param i32)))
(type $iiIfF (func (param i32 i64 f32 f64) (result i32)))
(type $fiF (func (param i32 f64) (result f32)))
(type $v (func))
- (type $4 (func))
+ (type $3 (func))
(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)))
@@ -1768,11 +1767,10 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5}
)
(module
- (type $vi (func (param i32)))
(type $iiIfF (func (param i32 i64 f32 f64) (result i32)))
(type $fiF (func (param i32 f64) (result f32)))
(type $v (func))
- (type $4 (func))
+ (type $3 (func))
(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)))
@@ -3923,11 +3921,11 @@ optimized:
module loaded from binary form:
(module
- (type $0 (func (param i32 i32) (result i32)))
- (type $1 (func (param i32 i32)))
+ (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 $0) (param $0 i32) (param $1 i32) (result i32)
+ (func $adder (; 0 ;) (type $1) (param $0 i32) (param $1 i32) (result i32)
(i32.add
(local.get $0)
(local.get $1)
@@ -3979,11 +3977,7 @@ int main() {
RelooperRef the_relooper = NULL;
the_module = BinaryenModuleCreate();
expressions[size_t(NULL)] = BinaryenExpressionRef(NULL);
- {
- BinaryenType paramTypes[] = { 2 };
- functionTypes[0] = BinaryenAddFunctionType(the_module, "vi", 0, paramTypes, 1);
- }
- BinaryenAddEvent(the_module, "a-event", 0, functionTypes[0]);
+ 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));
@@ -3992,7 +3986,7 @@ int main() {
expressions[6] = BinaryenConst(the_module, BinaryenLiteralFloat64(NAN));
{
BinaryenType paramTypes[] = { 2, 3, 4, 5 };
- functionTypes[1] = BinaryenAddFunctionType(the_module, "iiIfF", 2, paramTypes, 4);
+ functionTypes[0] = BinaryenAddFunctionType(the_module, "iiIfF", 2, paramTypes, 4);
}
expressions[7] = BinaryenConst(the_module, BinaryenLiteralInt32(1));
expressions[8] = BinaryenConst(the_module, BinaryenLiteralInt32(2));
@@ -5729,18 +5723,18 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5}
}
{
BinaryenType varTypes[] = { 2, 8 };
- functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[1], varTypes, 2, expressions[814]);
+ 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[2] = BinaryenAddFunctionType(the_module, "fiF", 4, paramTypes, 2);
+ functionTypes[1] = BinaryenAddFunctionType(the_module, "fiF", 4, paramTypes, 2);
}
- BinaryenAddFunctionImport(the_module, "an-imported", "module", "base", functionTypes[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, functionTypes[0]);
+ 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");
@@ -5775,28 +5769,27 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5}
}
{
BinaryenType paramTypes[] = { 0 };
- functionTypes[3] = BinaryenAddFunctionType(the_module, "v", 0, 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[3], varTypes, 0, expressions[818]);
+ functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[2], varTypes, 0, expressions[818]);
}
BinaryenSetStart(the_module, functions[1]);
{
BinaryenType paramTypes[] = { 0 };
- functionTypes[4] = BinaryenAddFunctionType(the_module, NULL, 0, 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 $vi (func (param i32)))
(type $iiIfF (func (param i32 i64 f32 f64) (result i32)))
(type $fiF (func (param i32 f64) (result f32)))
(type $v (func))
- (type $4 (func))
+ (type $3 (func))
(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)))
@@ -7478,11 +7471,10 @@ getExpressionInfo(f64.const)={"id":14,"type":5,"value":9.5}
BinaryenModuleValidate(the_module);
BinaryenModulePrint(the_module);
(module
- (type $vi (func (param i32)))
(type $iiIfF (func (param i32 i64 f32 f64) (result i32)))
(type $fiF (func (param i32 f64) (result f32)))
(type $v (func))
- (type $4 (func))
+ (type $3 (func))
(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)))
@@ -10150,7 +10142,6 @@ optimized:
test_parsing text:
(module
(type $iii (func (param i32 i32) (result i32)))
- (type $vi (func (param 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)
@@ -10164,7 +10155,7 @@ test_parsing text:
module loaded from text form:
(module
(type $iii (func (param i32 i32) (result i32)))
- (type $vi (func (param i32)))
+ (type $FUNCSIG$vi (func (param 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)
diff --git a/test/debugInfo.fromasm.clamp.no-opts.map b/test/debugInfo.fromasm.clamp.no-opts.map
index ae1c41157..fe7dbc563 100644
--- a/test/debugInfo.fromasm.clamp.no-opts.map
+++ b/test/debugInfo.fromasm.clamp.no-opts.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"qMAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA,KCjsCA,OACA,OACA,OACA,MAEA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"gMAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA,KCjsCA,OACA,OACA,OACA,MAEA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.imprecise.no-opts.map b/test/debugInfo.fromasm.imprecise.no-opts.map
index 4bc2b7738..b96bd8766 100644
--- a/test/debugInfo.fromasm.imprecise.no-opts.map
+++ b/test/debugInfo.fromasm.imprecise.no-opts.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"oMAIA,IACA,ICyylTA,aC7vlTA,OAkDA,SCnGA,OACA,OACA,sBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA,KCjsCA,OACA,OACA,OACA,MAEA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"+LAIA,IACA,ICyylTA,aC7vlTA,OAkDA,SCnGA,OACA,OACA,sBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA,KCjsCA,OACA,OACA,OACA,MAEA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.no-opts.map b/test/debugInfo.fromasm.no-opts.map
index ae1c41157..fe7dbc563 100644
--- a/test/debugInfo.fromasm.no-opts.map
+++ b/test/debugInfo.fromasm.no-opts.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"qMAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA,KCjsCA,OACA,OACA,OACA,MAEA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"gMAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA,KCjsCA,OACA,OACA,OACA,MAEA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.read-written b/test/debugInfo.fromasm.read-written
index 362d828a3..3459a2cf8 100644
--- a/test/debugInfo.fromasm.read-written
+++ b/test/debugInfo.fromasm.read-written
@@ -1,6 +1,6 @@
(module
- (type $0 (func (param i32 i32) (result i32)))
- (type $1 (func (param i32) (result i32)))
+ (type $0 (func (param i32) (result i32)))
+ (type $1 (func (param i32 i32) (result i32)))
(type $2 (func))
(import "env" "memory" (memory $1 256 256))
(data (global.get $gimport$0) "debugInfo.asm.js")
@@ -12,14 +12,14 @@
(export "switch_reach" (func $switch_reach))
(export "nofile" (func $nofile))
(export "inlineInto" (func $inlineInto))
- (func $add (; 0 ;) (type $0) (param $0 i32) (param $1 i32) (result i32)
+ (func $add (; 0 ;) (type $1) (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 $1) (param $0 i32) (result i32)
+ (func $ret (; 1 ;) (type $0) (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 $0) (param $0 i32) (param $1 i32) (result i32)
+ (func $opts (; 2 ;) (type $1) (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 $1) (param $0 i32) (result i32)
+ (func $fib (; 3 ;) (type $0) (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 $1) (param $0 i32) (result i32)
+ (func $switch_reach (; 4 ;) (type $0) (param $0 i32) (result i32)
(local $1 i32)
(local.set $1
(block $label$1 (result i32)
@@ -176,7 +176,7 @@
;;@ (unknown):1337:0
(call $nofile)
)
- (func $inlineInto (; 6 ;) (type $0) (param $0 i32) (param $1 i32) (result i32)
+ (func $inlineInto (; 6 ;) (type $1) (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.fromBinary b/test/duplicate_types.wast.fromBinary
index b38198087..1b198ac95 100644
--- a/test/duplicate_types.wast.fromBinary
+++ b/test/duplicate_types.wast.fromBinary
@@ -1,17 +1,10 @@
(module
- (type $0 (func))
- (type $1 (func))
- (type $2 (func))
- (type $3 (func (param i32)))
- (type $4 (func (param i32)))
- (type $5 (func (param i32)))
- (type $6 (func (param i32) (result f32)))
- (type $7 (func (param i32) (result f32)))
- (type $8 (func (param i32) (result i32)))
- (func $f0 (; 0 ;) (type $3) (param $0 i32)
+ (type $0 (func (param i32)))
+ (type $1 (func (param i32) (result i32)))
+ (func $f0 (; 0 ;) (type $0) (param $0 i32)
(nop)
)
- (func $f1 (; 1 ;) (type $8) (param $0 i32) (result i32)
+ (func $f1 (; 1 ;) (type $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 c266462a8..356c96fb0 100644
--- a/test/duplicate_types.wast.fromBinary.noDebugInfo
+++ b/test/duplicate_types.wast.fromBinary.noDebugInfo
@@ -1,17 +1,10 @@
(module
- (type $0 (func))
- (type $1 (func))
- (type $2 (func))
- (type $3 (func (param i32)))
- (type $4 (func (param i32)))
- (type $5 (func (param i32)))
- (type $6 (func (param i32) (result f32)))
- (type $7 (func (param i32) (result f32)))
- (type $8 (func (param i32) (result i32)))
- (func $0 (; 0 ;) (type $3) (param $0 i32)
+ (type $0 (func (param i32)))
+ (type $1 (func (param i32) (result i32)))
+ (func $0 (; 0 ;) (type $0) (param $0 i32)
(nop)
)
- (func $1 (; 1 ;) (type $8) (param $0 i32) (result i32)
+ (func $1 (; 1 ;) (type $1) (param $0 i32) (result i32)
(i32.const 0)
)
)
diff --git a/test/events.wast.fromBinary b/test/events.wast.fromBinary
index d4b65f40a..f1d18fa87 100644
--- a/test/events.wast.fromBinary
+++ b/test/events.wast.fromBinary
@@ -1,6 +1,6 @@
(module
- (type $0 (func (param i32)))
- (type $1 (func (param i32 f32)))
+ (type $0 (func (param i32 f32)))
+ (type $1 (func (param i32)))
(type $2 (func))
(import "env" "im0" (event $eimport$0 (attr 0) (param i32)))
(import "env" "im1" (event $eimport$1 (attr 0) (param i32 f32)))
diff --git a/test/events.wast.fromBinary.noDebugInfo b/test/events.wast.fromBinary.noDebugInfo
index d4b65f40a..f1d18fa87 100644
--- a/test/events.wast.fromBinary.noDebugInfo
+++ b/test/events.wast.fromBinary.noDebugInfo
@@ -1,6 +1,6 @@
(module
- (type $0 (func (param i32)))
- (type $1 (func (param i32 f32)))
+ (type $0 (func (param i32 f32)))
+ (type $1 (func (param i32)))
(type $2 (func))
(import "env" "im0" (event $eimport$0 (attr 0) (param i32)))
(import "env" "im1" (event $eimport$1 (attr 0) (param i32 f32)))
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index 68d7e82ea..f438015b8 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -272,10 +272,8 @@ void test_core() {
temp15 = makeInt32(module, 110), temp16 = makeInt64(module, 111);
// Events
- BinaryenType eparams[1] = {BinaryenTypeInt32()};
- BinaryenFunctionTypeRef vi =
- BinaryenAddFunctionType(module, "vi", BinaryenTypeNone(), eparams, 1);
- BinaryenAddEvent(module, "a-event", 0, vi);
+ BinaryenAddEvent(
+ module, "a-event", 0, BinaryenTypeInt32(), BinaryenTypeNone());
// Exception handling
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index 2c58a9777..7583a216b 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -24,10 +24,9 @@ BinaryenFeatureAll: 511
)
(module
(type $iiIfF (func (param i32 i64 f32 f64) (result i32)))
- (type $vi (func (param i32)))
(type $fiF (func (param i32 f64) (result f32)))
(type $v (func))
- (type $4 (func))
+ (type $3 (func))
(import "module" "base" (func $an-imported (param i32 f64) (result f32)))
(memory $0 (shared 1 256))
(data (i32.const 10) "hello, world")
@@ -2285,11 +2284,7 @@ int main() {
expressions[31] = BinaryenConst(the_module, BinaryenLiteralInt32(11));
expressions[32] = BinaryenConst(the_module, BinaryenLiteralInt32(110));
expressions[33] = BinaryenConst(the_module, BinaryenLiteralInt64(111));
- {
- BinaryenType paramTypes[] = { 2 };
- functionTypes[1] = BinaryenAddFunctionType(the_module, "vi", 0, paramTypes, 1);
- }
- BinaryenAddEvent(the_module, "a-event", 0, functionTypes[1]);
+ BinaryenAddEvent(the_module, "a-event", 0, 2, 0);
expressions[34] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
{
BinaryenExpressionRef operands[] = { expressions[34] };
@@ -3963,9 +3958,9 @@ int main() {
globals[1] = BinaryenAddGlobal(the_module, "a-mutable-global", 4, 1, expressions[796]);
{
BinaryenType paramTypes[] = { 2, 5 };
- functionTypes[2] = BinaryenAddFunctionType(the_module, "fiF", 4, paramTypes, 2);
+ functionTypes[1] = BinaryenAddFunctionType(the_module, "fiF", 4, paramTypes, 2);
}
- BinaryenAddFunctionImport(the_module, "an-imported", "module", "base", functionTypes[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));
@@ -3985,17 +3980,17 @@ int main() {
}
{
BinaryenType paramTypes[] = { 0 };
- functionTypes[3] = BinaryenAddFunctionType(the_module, "v", 0, 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[3], varTypes, 0, expressions[799]);
+ functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[2], varTypes, 0, expressions[799]);
}
BinaryenSetStart(the_module, functions[1]);
{
BinaryenType paramTypes[] = { 0 };
- functionTypes[4] = BinaryenAddFunctionType(the_module, NULL, 0, paramTypes, 0);
+ functionTypes[3] = BinaryenAddFunctionType(the_module, NULL, 0, paramTypes, 0);
}
BinaryenModuleAutoDrop(the_module);
BinaryenModuleSetFeatures(the_module, 511);
@@ -4004,10 +3999,9 @@ int main() {
BinaryenModulePrint(the_module);
(module
(type $iiIfF (func (param i32 i64 f32 f64) (result i32)))
- (type $vi (func (param i32)))
(type $fiF (func (param i32 f64) (result f32)))
(type $v (func))
- (type $4 (func))
+ (type $3 (func))
(import "module" "base" (func $an-imported (param i32 f64) (result f32)))
(memory $0 (shared 1 256))
(data (i32.const 10) "hello, world")
diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt
index ada00077f..92f620e73 100644
--- a/test/example/c-api-kitchen-sink.txt.txt
+++ b/test/example/c-api-kitchen-sink.txt.txt
@@ -3,10 +3,9 @@
)
(module
(type $iiIfF (func (param i32 i64 f32 f64) (result i32)))
- (type $vi (func (param i32)))
(type $fiF (func (param i32 f64) (result f32)))
(type $v (func))
- (type $4 (func))
+ (type $3 (func))
(import "module" "base" (func $an-imported (param i32 f64) (result f32)))
(memory $0 (shared 1 256))
(data (i32.const 10) "hello, world")
diff --git a/test/example/c-api-unused-mem.txt b/test/example/c-api-unused-mem.txt
index 41ce79ae0..56cd3a948 100644
--- a/test/example/c-api-unused-mem.txt
+++ b/test/example/c-api-unused-mem.txt
@@ -37,10 +37,9 @@
(call $main)
)
)
-151
+148
(module
(type $0 (func))
- (type $1 (func))
(memory $0 1024 1024)
(export "memory" (memory $0))
(export "main" (func $main))
@@ -70,7 +69,7 @@
(unreachable)
)
)
- (func $__wasm_start (; 1 ;) (type $1)
+ (func $__wasm_start (; 1 ;) (type $0)
(i32.store
(i32.const 0)
(i32.const 65535)
diff --git a/test/exception-handling.wast.fromBinary b/test/exception-handling.wast.fromBinary
index 2317f4c42..043eadf87 100644
--- a/test/exception-handling.wast.fromBinary
+++ b/test/exception-handling.wast.fromBinary
@@ -1,18 +1,18 @@
(module
- (type $0 (func (param exnref) (result exnref)))
- (type $1 (func))
- (type $2 (func (param i32)))
+ (type $0 (func))
+ (type $1 (func (param i32)))
+ (type $2 (func (param exnref) (result exnref)))
(event $event$0 (attr 0) (param i32))
- (func $exnref_test (; 0 ;) (type $0) (param $0 exnref) (result exnref)
+ (func $exnref_test (; 0 ;) (type $2) (param $0 exnref) (result exnref)
(local.get $0)
)
- (func $foo (; 1 ;) (type $1)
+ (func $foo (; 1 ;) (type $0)
(nop)
)
- (func $bar (; 2 ;) (type $1)
+ (func $bar (; 2 ;) (type $0)
(nop)
)
- (func $eh_test (; 3 ;) (type $1)
+ (func $eh_test (; 3 ;) (type $0)
(local $0 exnref)
(try
(throw $event$0
diff --git a/test/exception-handling.wast.fromBinary.noDebugInfo b/test/exception-handling.wast.fromBinary.noDebugInfo
index fca25f7d5..4242c1395 100644
--- a/test/exception-handling.wast.fromBinary.noDebugInfo
+++ b/test/exception-handling.wast.fromBinary.noDebugInfo
@@ -1,18 +1,18 @@
(module
- (type $0 (func (param exnref) (result exnref)))
- (type $1 (func))
- (type $2 (func (param i32)))
+ (type $0 (func))
+ (type $1 (func (param i32)))
+ (type $2 (func (param exnref) (result exnref)))
(event $event$0 (attr 0) (param i32))
- (func $0 (; 0 ;) (type $0) (param $0 exnref) (result exnref)
+ (func $0 (; 0 ;) (type $2) (param $0 exnref) (result exnref)
(local.get $0)
)
- (func $1 (; 1 ;) (type $1)
+ (func $1 (; 1 ;) (type $0)
(nop)
)
- (func $2 (; 2 ;) (type $1)
+ (func $2 (; 2 ;) (type $0)
(nop)
)
- (func $3 (; 3 ;) (type $1)
+ (func $3 (; 3 ;) (type $0)
(local $0 exnref)
(try
(throw $event$0
diff --git a/test/extra-unreachable.wast.fromBinary b/test/extra-unreachable.wast.fromBinary
index c921e925e..3c3c5f71c 100644
--- a/test/extra-unreachable.wast.fromBinary
+++ b/test/extra-unreachable.wast.fromBinary
@@ -1,12 +1,12 @@
(module
(type $0 (func))
- (type $1 (func (param i32) (result i32)))
- (type $2 (func (param i32)))
+ (type $1 (func (param i32)))
+ (type $2 (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 $1) (param $0 i32) (result i32)
+ (func $foo (; 0 ;) (type $2) (param $0 i32) (result i32)
(i32.const 0)
)
(func $test_function_block (; 1 ;) (type $0)
diff --git a/test/extra-unreachable.wast.fromBinary.noDebugInfo b/test/extra-unreachable.wast.fromBinary.noDebugInfo
index 1cb1e02de..4be633808 100644
--- a/test/extra-unreachable.wast.fromBinary.noDebugInfo
+++ b/test/extra-unreachable.wast.fromBinary.noDebugInfo
@@ -1,12 +1,12 @@
(module
(type $0 (func))
- (type $1 (func (param i32) (result i32)))
- (type $2 (func (param i32)))
+ (type $1 (func (param i32)))
+ (type $2 (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 $1) (param $0 i32) (result i32)
+ (func $0 (; 0 ;) (type $2) (param $0 i32) (result i32)
(i32.const 0)
)
(func $1 (; 1 ;) (type $0)
diff --git a/test/grow_memory.wast.fromBinary b/test/grow_memory.wast.fromBinary
index 706495c97..8a54e4a7c 100644
--- a/test/grow_memory.wast.fromBinary
+++ b/test/grow_memory.wast.fromBinary
@@ -1,16 +1,16 @@
(module
- (type $0 (func (param i32) (result i32)))
- (type $1 (func (result i32)))
+ (type $0 (func (result i32)))
+ (type $1 (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 $0 i32) (result i32)
+ (func $0 (; 0 ;) (type $1) (param $0 i32) (result i32)
(memory.grow
(local.get $0)
)
)
- (func $1 (; 1 ;) (type $1) (result i32)
+ (func $1 (; 1 ;) (type $0) (result i32)
(memory.size)
)
)
diff --git a/test/grow_memory.wast.fromBinary.noDebugInfo b/test/grow_memory.wast.fromBinary.noDebugInfo
index 706495c97..8a54e4a7c 100644
--- a/test/grow_memory.wast.fromBinary.noDebugInfo
+++ b/test/grow_memory.wast.fromBinary.noDebugInfo
@@ -1,16 +1,16 @@
(module
- (type $0 (func (param i32) (result i32)))
- (type $1 (func (result i32)))
+ (type $0 (func (result i32)))
+ (type $1 (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 $0 i32) (result i32)
+ (func $0 (; 0 ;) (type $1) (param $0 i32) (result i32)
(memory.grow
(local.get $0)
)
)
- (func $1 (; 1 ;) (type $1) (result i32)
+ (func $1 (; 1 ;) (type $0) (result i32)
(memory.size)
)
)
diff --git a/test/metadce/rooted-export.wast.dced b/test/metadce/rooted-export.wast.dced
index 7eef01f40..fd4d10226 100644
--- a/test/metadce/rooted-export.wast.dced
+++ b/test/metadce/rooted-export.wast.dced
@@ -1,6 +1,5 @@
(module
(type $FUNCSIG$v (func))
- (type $FUNCSIG$vi (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))
diff --git a/test/min.wast.fromBinary b/test/min.wast.fromBinary
index 94a138e0c..837a4f559 100644
--- a/test/min.wast.fromBinary
+++ b/test/min.wast.fromBinary
@@ -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 $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)))
(memory $0 256 256)
(export "floats" (func $floats))
- (func $floats (; 0 ;) (type $0) (param $0 f32) (result f32)
+ (func $floats (; 0 ;) (type $3) (param $0 f32) (result f32)
(local $1 f32)
(f32.add
(local.get $1)
(local.get $0)
)
)
- (func $neg (; 1 ;) (type $1) (param $0 i32) (param $1 i32) (result f32)
+ (func $neg (; 1 ;) (type $2) (param $0 i32) (param $1 i32) (result f32)
(local $2 f32)
(local.tee $2
(f32.neg
@@ -28,7 +28,7 @@
)
)
)
- (func $littleswitch (; 2 ;) (type $2) (param $0 i32) (result i32)
+ (func $littleswitch (; 2 ;) (type $0) (param $0 i32) (result i32)
(block $label$1 (result i32)
(block $label$2
(block $label$3
@@ -48,7 +48,7 @@
)
)
)
- (func $f1 (; 3 ;) (type $3) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $f1 (; 3 ;) (type $1) (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 adbfce26d..87311d395 100644
--- a/test/min.wast.fromBinary.noDebugInfo
+++ b/test/min.wast.fromBinary.noDebugInfo
@@ -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 $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)))
(memory $0 256 256)
(export "floats" (func $0))
- (func $0 (; 0 ;) (type $0) (param $0 f32) (result f32)
+ (func $0 (; 0 ;) (type $3) (param $0 f32) (result f32)
(local $1 f32)
(f32.add
(local.get $1)
(local.get $0)
)
)
- (func $1 (; 1 ;) (type $1) (param $0 i32) (param $1 i32) (result f32)
+ (func $1 (; 1 ;) (type $2) (param $0 i32) (param $1 i32) (result f32)
(local $2 f32)
(local.tee $2
(f32.neg
@@ -28,7 +28,7 @@
)
)
)
- (func $2 (; 2 ;) (type $2) (param $0 i32) (result i32)
+ (func $2 (; 2 ;) (type $0) (param $0 i32) (result i32)
(block $label$1 (result i32)
(block $label$2
(block $label$3
@@ -48,7 +48,7 @@
)
)
)
- (func $3 (; 3 ;) (type $3) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $3 (; 3 ;) (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local.get $2)
)
)
diff --git a/test/passes/converge_O3_metrics.bin.txt b/test/passes/converge_O3_metrics.bin.txt
index 1c7a3275e..c8c1f8edb 100644
--- a/test/passes/converge_O3_metrics.bin.txt
+++ b/test/passes/converge_O3_metrics.bin.txt
@@ -273,7 +273,6 @@ total
(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 $FUNCSIG$v (func))
(import "env" "memory" (memory $1 256 256))
(data (i32.const 2948) "\03")
(data (i32.const 6828) "\04")
@@ -295,252 +294,7 @@ total
(func $_malloc (; 2 ;) (; has Stack IR ;) (type $2) (param $0 i32) (result i32)
(i32.const 0)
)
- (func $___stdio_write (; 3 ;) (; has Stack IR ;) (type $0) (param $0 i32) (param $1 i32) (result i32)
- (i32.store
- (i32.const 8)
- (local.get $0)
- )
- (i32.store
- (i32.const 12)
- (local.get $1)
- )
- (i32.store
- (local.tee $0
- (global.get $global$0)
- )
- (i32.const 1)
- )
- (i32.store offset=8
- (local.get $0)
- (i32.const 2)
- )
- (drop
- (if (result i32)
- (call $import$0
- (i32.const 146)
- (local.get $0)
- )
- (i32.const -1)
- (i32.const 0)
- )
- )
- (i32.const 1)
- )
- (func $_main (; 4 ;) (; has Stack IR ;) (type $7) (result i32)
- (local $0 i32)
- (local $1 i32)
- (local.set $1
- (i32.load offset=24
- (i32.add
- (i32.load
- (i32.add
- (i32.load
- (i32.const 18100)
- )
- (i32.const -12)
- )
- )
- (i32.const 18100)
- )
- )
- )
- (if
- (block (result i32)
- (local.set $0
- (i32.const 10888)
- )
- (loop $label$3
- (br_if $label$3
- (i32.load8_s
- (local.tee $0
- (i32.add
- (local.get $0)
- (i32.const 1)
- )
- )
- )
- )
- )
- (local.tee $0
- (i32.sub
- (local.get $0)
- (i32.const 10888)
- )
- )
- )
- (block $label$2
- (br_if $label$2
- (call_indirect (type $1)
- (local.get $1)
- (i32.const 10888)
- (local.get $0)
- (i32.add
- (i32.load offset=48
- (i32.load
- (local.get $1)
- )
- )
- (i32.const 8)
- )
- )
- )
- )
- )
- (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)
- (global.set $global$0
- (i32.const 32)
- )
- (call $___stdio_write
- (local.get $1)
- (local.get $2)
- )
- )
- (func $__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE3putEc (; 6 ;) (; has Stack IR ;) (type $FUNCSIG$v)
- (local $0 i32)
- (local $1 i32)
- (block $label$1
- (br_if $label$1
- (if (result i32)
- (i32.load
- (i32.add
- (local.tee $1
- (local.tee $0
- (i32.load
- (i32.add
- (i32.load
- (i32.add
- (i32.load
- (i32.const 18100)
- )
- (i32.const -12)
- )
- )
- (i32.const 18124)
- )
- )
- )
- )
- (i32.const 24)
- )
- )
- (i32.const 0)
- (call_indirect (type $0)
- (local.get $1)
- (i32.const 10)
- (i32.add
- (i32.load offset=52
- (i32.load
- (local.get $0)
- )
- )
- (i32.const 422)
- )
- )
- )
- )
- )
- )
- (func $__ZNSt3__211__stdoutbufIcE8overflowEi (; 7 ;) (; has Stack IR ;) (type $0) (param $0 i32) (param $1 i32) (result i32)
- (i32.store8
- (i32.const 0)
- (local.get $1)
- )
- (drop
- (call_indirect (type $1)
- (i32.const 0)
- (i32.const 0)
- (i32.const 1)
- (i32.add
- (i32.load offset=36
- (i32.load
- (i32.add
- (local.get $0)
- (i32.const 32)
- )
- )
- )
- (i32.const 8)
- )
- )
- )
- (i32.const 0)
- )
- (func $__ZNSt3__211__stdoutbufIcE6xsputnEPKci (; 8 ;) (; has Stack IR ;) (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (drop
- (call_indirect (type $1)
- (i32.const 0)
- (local.get $1)
- (local.get $2)
- (i32.add
- (i32.load offset=36
- (i32.load offset=32
- (local.get $0)
- )
- )
- (i32.const 8)
- )
- )
- )
- (i32.const 0)
- )
-)
-total
- [events] : 0
- [exports] : 2
- [funcs] : 8
- [globals] : 1
- [imports] : 3
- [memory-data] : 28
- [table-data] : 429
- [total] : 132
- [vars] : 4
- binary : 12
- block : 8
- break : 3
- call : 3
- call_indirect : 4
- const : 47
- drop : 3
- global.get : 1
- global.set : 1
- if : 3
- load : 16
- local.get : 18
- local.set : 7
- 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 $FUNCSIG$v (func))
- (import "env" "memory" (memory $1 256 256))
- (data (i32.const 2948) "\03")
- (data (i32.const 6828) "\04")
- (data (i32.const 7028) "\0d\00\00\00\06")
- (data (i32.const 10888) "hello, world!")
- (data (i32.const 18100) "\b8\1a")
- (data (i32.const 18128) ",I")
- (data (i32.const 18732) "D\1b")
- (data (i32.const 18764) "`\0b")
- (import "env" "table" (table $timport$2 478 478 funcref))
- (elem (i32.const 0) $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $___stdout_write $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $__ZNSt3__211__stdoutbufIcE6xsputnEPKci $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $b0 $__ZNSt3__211__stdoutbufIcE8overflowEi)
- (import "env" "___syscall146" (func $import$0 (param i32 i32) (result i32)))
- (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)
- (i32.const 0)
- )
- (func $_malloc (; 2 ;) (; has Stack IR ;) (type $2) (param $0 i32) (result i32)
- (i32.const 0)
- )
- (func $___stdio_write (; 3 ;) (; has Stack IR ;) (type $0) (param $0 i32) (param $1 i32) (result i32)
+ (func $___stdio_write (; 3 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
(i32.store
(i32.const 8)
(local.get $0)
@@ -643,7 +397,7 @@ total
(local.get $2)
)
)
- (func $__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE3putEc (; 6 ;) (; has Stack IR ;) (type $FUNCSIG$v)
+ (func $__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE3putEc (; 6 ;) (; has Stack IR ;)
(local $0 i32)
(local $1 i32)
(block $label$1
diff --git a/test/passes/remove-unused-module-elements_all-features.txt b/test/passes/remove-unused-module-elements_all-features.txt
index 87e21a012..98e08c186 100644
--- a/test/passes/remove-unused-module-elements_all-features.txt
+++ b/test/passes/remove-unused-module-elements_all-features.txt
@@ -279,9 +279,7 @@
)
)
(module
- (type $0 (func (param i32)))
(type $FUNCSIG$v (func))
- (type $FUNCSIG$vj (func (param i64)))
(event $e-export (attr 0) (param i64))
(event $e-throw (attr 0) (param i32))
(event $e-bronexn (attr 0) (param i32))
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 e08bf1eb2..b3ace30d0 100644
--- a/test/passes/remove-unused-nonfunction-module-elements_all-features.txt
+++ b/test/passes/remove-unused-nonfunction-module-elements_all-features.txt
@@ -331,7 +331,6 @@
)
(module
(type $0 (func (param i32)))
- (type $FUNCSIG$vj (func (param i64)))
(event $e1 (attr 0) (param i64))
(export "e1" (event $e1))
(func $f (; 0 ;) (type $0) (param $0 i32)
diff --git a/test/passes/translate-to-fuzz_all-features.txt b/test/passes/translate-to-fuzz_all-features.txt
index 79367fd5d..ce0d33e14 100644
--- a/test/passes/translate-to-fuzz_all-features.txt
+++ b/test/passes/translate-to-fuzz_all-features.txt
@@ -1,16 +1,15 @@
(module
(type $FUNCSIG$i (func (result i32)))
- (type $FUNCSIG$viffjf (func (param i32 f32 f32 i64 f32)))
(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$id (func (param f64) (result i32)))
- (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
- (type $FUNCSIG$iji (func (param i64 i32) (result i32)))
+ (type $FUNCSIG$d (func (result f64)))
(type $FUNCSIG$v (func))
- (type $FUNCSIG$ffjj (func (param f32 i64 i64) (result f32)))
+ (type $FUNCSIG$ji (func (param i32) (result i64)))
+ (type $FUNCSIG$ff (func (param f32) (result f32)))
+ (type $FUNCSIG$fi (func (param i32) (result f32)))
(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,23 +17,25 @@
(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 funcref)
- (elem (i32.const 0) $func_8 $func_9 $func_9 $func_11)
+ (table $0 4 4 funcref)
+ (elem (i32.const 0) $func_11 $func_13 $func_15 $func_15)
(global $global$0 (mut i32) (i32.const 975663930))
(global $global$1 (mut i32) (i32.const 2066300474))
(global $global$2 (mut i64) (i64.const 20510))
(global $global$3 (mut f32) (f32.const -2147483648))
(global $global$4 (mut v128) (v128.const i32x4 0x7f002833 0x580000fe 0x59750500 0x01ff002f))
(global $hangLimit (mut i32) (i32.const 10))
- (event $event$0 (attr 0) (param i32 f32 f32 i64 f32))
+ (event $event$0 (attr 0) (param f64 f32))
(export "hashMemory" (func $hashMemory))
(export "memory" (memory $0))
- (export "func_7" (func $func_7))
- (export "func_8" (func $func_8))
(export "func_9" (func $func_9))
(export "func_9_invoker" (func $func_9_invoker))
(export "func_11_invoker" (func $func_11_invoker))
(export "func_13" (func $func_13))
+ (export "func_14" (func $func_14))
+ (export "func_15" (func $func_15))
+ (export "func_16_invoker" (func $func_16_invoker))
+ (export "func_18_invoker" (func $func_18_invoker))
(export "hangLimitInitializer" (func $hangLimitInitializer))
(func $hashMemory (; 5 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
@@ -267,14 +268,14 @@
)
(local.get $0)
)
- (func $func_6 (; 6 ;) (param $0 v128) (param $1 f32) (param $2 i32) (param $3 f64) (param $4 v128) (param $5 i64) (result i32)
+ (func $func_6 (; 6 ;) (param $0 i64) (param $1 v128) (param $2 i64) (result f64)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (i32.const 1)
+ (f64.const -1)
)
)
(global.set $hangLimit
@@ -284,20 +285,13 @@
)
)
)
- (block $label$0
- (local.set $3
- (local.tee $3
- (f64.const -nan:0xfffffffffffe9)
- )
- )
- (return
- (local.get $2)
- )
- )
+ (f64.const 16970)
)
- (func $func_7 (; 7 ;) (type $FUNCSIG$id) (param $0 f64) (result i32)
+ (func $func_7 (; 7 ;) (result i32)
+ (local $0 f32)
(local $1 f32)
(local $2 i32)
+ (local $3 v128)
(block
(if
(i32.eqz
@@ -315,23 +309,34 @@
)
)
(block $label$0
- (local.set $2
- (local.get $2)
+ (call $log-i32
+ (call $hashMemory)
+ )
+ (local.set $3
+ (v128.const i32x4 0x3b681019 0x00000000 0xfffeff80 0x0054060b)
)
(return
- (local.get $2)
+ (i32.const -65535)
)
)
)
- (func $func_8 (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
- (local $2 v128)
+ (func $func_8 (; 8 ;) (param $0 f64) (param $1 f32) (param $2 v128) (param $3 f64) (result f32)
+ (local $4 i32)
+ (local $5 f32)
+ (local $6 i64)
+ (local $7 i64)
+ (local $8 i32)
+ (local $9 v128)
+ (local $10 i64)
+ (local $11 i64)
+ (local $12 f64)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (i32.const 228)
+ (local.get $5)
)
)
(global.set $hangLimit
@@ -341,30 +346,31 @@
)
)
)
- (local.tee $0
- (local.tee $0
- (local.tee $0
- (i32.const 1477910104)
- )
+ (block $label$0
+ (call $log-f32
+ (local.get $5)
+ )
+ (return
+ (f32.const 203013.03125)
)
)
)
- (func $func_9 (; 9 ;) (type $FUNCSIG$iji) (param $0 i64) (param $1 i32) (result i32)
- (local $2 f64)
- (local $3 i64)
- (local $4 f64)
- (local $5 i32)
- (local $6 f64)
- (local $7 v128)
- (local $8 i64)
- (local $9 f64)
+ (func $func_9 (; 9 ;) (type $FUNCSIG$d) (result f64)
+ (local $0 f32)
+ (local $1 f64)
+ (local $2 v128)
+ (local $3 i32)
+ (local $4 i64)
+ (local $5 f32)
+ (local $6 i32)
+ (local $7 i64)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (i32.const 20761)
+ (local.get $1)
)
)
(global.set $hangLimit
@@ -375,23 +381,11 @@
)
)
(block $label$0
- (block $label$1
- (call $log-f64
- (local.tee $2
- (local.tee $9
- (local.tee $6
- (local.tee $9
- (local.tee $4
- (local.get $2)
- )
- )
- )
- )
- )
- )
- (local.set $2
- (f64.const 7569651134721150320538329e227)
- )
+ (call $log-v128
+ (v128.const i32x4 0x77367f7e 0x00000045 0x40000000 0x0000007f)
+ )
+ (local.set $2
+ (v128.const i32x4 0xbc400000 0x0000fd80 0x0043186f 0xc5c72600)
)
(return
(local.get $1)
@@ -400,22 +394,28 @@
)
(func $func_9_invoker (; 10 ;) (type $FUNCSIG$v)
(drop
- (call $func_9
- (i64.const -549755813888)
- (i32.const -91)
- )
+ (call $func_9)
)
)
- (func $func_11 (; 11 ;) (param $0 i32) (param $1 i32) (param $2 v128)
- (local $3 i64)
- (local $4 f32)
- (local $5 i32)
+ (func $func_11 (; 11 ;) (result f32)
+ (local $0 v128)
+ (local $1 f32)
+ (local $2 v128)
+ (local $3 f32)
+ (local $4 v128)
+ (local $5 v128)
+ (local $6 i64)
+ (local $7 f32)
+ (local $8 i32)
+ (local $9 f64)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
- (return)
+ (return
+ (f32.const 10961.05859375)
+ )
)
(global.set $hangLimit
(i32.sub
@@ -424,55 +424,60 @@
)
)
)
- (block $label$0
- (call $log-f32
- (local.tee $4
- (local.tee $4
- (local.tee $4
- (f32.const 65449)
- )
- )
- )
- )
- )
+ (local.get $7)
)
(func $func_11_invoker (; 12 ;) (type $FUNCSIG$v)
- (call $func_11
- (i32.const 235475987)
- (i32.const 0)
- (v128.const i32x4 0x00000b08 0x00000405 0x61606b6a 0x02000000)
+ (drop
+ (call $func_11)
+ )
+ (drop
+ (call $func_11)
)
(call $log-i32
(call $hashMemory)
)
- (call $func_11
- (i32.const 1547916878)
- (i32.const 740500009)
- (v128.const i32x4 0x4702041e 0x1a1f4844 0x00000001 0x80000000)
+ (drop
+ (call $func_11)
)
- (call $func_11
- (i32.const -4)
- (i32.const -16777216)
- (v128.const i32x4 0xc0000000 0x00000010 0x00000800 0x45444f4a)
+ (drop
+ (call $func_11)
+ )
+ (drop
+ (call $func_11)
)
(call $log-i32
(call $hashMemory)
)
- (call $func_11
- (i32.const -32)
- (i32.const -32768)
- (v128.const i32x4 0x0000021c 0x00000000 0x1b676b1c 0x0c1e0902)
+ (drop
+ (call $func_11)
+ )
+ (drop
+ (call $func_11)
)
)
- (func $func_13 (; 13 ;) (type $FUNCSIG$ffjj) (param $0 f32) (param $1 i64) (param $2 i64) (result f32)
- (local $3 i32)
+ (func $func_13 (; 13 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64)
+ (local $1 f32)
+ (local $2 f32)
+ (local $3 v128)
+ (local $4 f32)
+ (local $5 v128)
+ (local $6 i64)
+ (local $7 i32)
+ (local $8 v128)
+ (local $9 f64)
+ (local $10 i64)
+ (local $11 i64)
+ (local $12 i64)
+ (local $13 v128)
+ (local $14 i32)
+ (local $15 v128)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (local.get $0)
+ (local.get $12)
)
)
(global.set $hangLimit
@@ -482,1013 +487,48 @@
)
)
)
- (block $label$0 (result f32)
- (local.set $1
- (i64.const -268435456)
+ (i64.const 2)
+ )
+ (func $func_14 (; 14 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32)
+ (local $1 f32)
+ (local $2 f32)
+ (local $3 i64)
+ (local $4 f64)
+ (local $5 i32)
+ (local $6 f32)
+ (local $7 f32)
+ (local $8 f64)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (f32.const -4294967296)
+ )
)
- (if (result f32)
- (if (result i32)
- (i32.eqz
- (block $label$1
- (loop $label$2
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block
- (block $label$3
- (call $log-i32
- (call $hashMemory)
- )
- (drop
- (loop $label$4
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block $label$5
- (nop)
- (br $label$2)
- )
- )
- )
- )
- (br_if $label$2
- (block $label$6 (result i32)
- (local.get $3)
- )
- )
- (local.set $0
- (br_if $label$0
- (local.tee $0
- (local.tee $0
- (f32.const -65536)
- )
- )
- (i32.eqz
- (local.get $3)
- )
- )
- )
- )
- )
- (return
- (f32.const 825.2233276367188)
- )
- )
- )
- (local.get $3)
- (if (result i32)
- (i32.eqz
- (if (result i32)
- (i32.eqz
- (if (result i32)
- (if (result i32)
- (i32.eqz
- (if (result i32)
- (i32.eqz
- (if (result i32)
- (if (result i32)
- (i32.eqz
- (if (result i32)
- (i32.eqz
- (if (result i32)
- (i32.eqz
- (local.get $3)
- )
- (i32.const 57)
- (i32.const -1)
- )
- )
- (i32.const -32767)
- (block $label$7
- (local.set $0
- (f32.const 16)
- )
- (return
- (local.get $0)
- )
- )
- )
- )
- (block $label$8 (result i32)
- (block $label$9
- (loop $label$10
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (local.set $3
- (local.get $3)
- )
- )
- (br_if $label$9
- (local.get $3)
- )
- )
- (i32.const 1195918659)
- )
- (local.tee $3
- (if (result i32)
- (i32.const -13)
- (local.get $3)
- (local.get $3)
- )
- )
- )
- (block $label$11 (result i32)
- (local.set $0
- (local.tee $0
- (local.tee $0
- (loop $label$12 (result f32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (local.get $0)
- )
- )
- )
- )
- (br_if $label$11
- (call_indirect (type $FUNCSIG$iji)
- (global.get $global$2)
- (loop $label$17 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const -72057594037927936)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (nop)
- (br_if $label$17
- (local.get $3)
- )
- (i32.const -2048)
- )
- )
- (i32.const 1)
- )
- (local.tee $3
- (loop $label$13 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const -2147483648)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (loop $label$14
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const 9.55175480028511e-38)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block
- (br_if $label$14
- (local.tee $3
- (local.tee $3
- (br_if $label$11
- (local.get $3)
- (i32.eqz
- (block $label$15
- (nop)
- (br $label$13)
- )
- )
- )
- )
- )
- )
- (br_if $label$14
- (i32.eqz
- (local.get $3)
- )
- )
- (local.tee $3
- (block $label$16
- (nop)
- (br $label$13)
- )
- )
- )
- )
- (br_if $label$13
- (local.get $3)
- )
- (local.get $3)
- )
- )
- )
- )
- )
- (block $label$18 (result i32)
- (nop)
- (i32.const 255)
- )
- )
- )
- (block $label$19 (result i32)
- (nop)
- (i32.const 486998794)
- )
- (block $label$20 (result i32)
- (local.set $0
- (br_if $label$0
- (f32.const 1.9017128799693354e-30)
- (local.tee $3
- (local.tee $3
- (local.get $3)
- )
- )
- )
- )
- (loop $label$21 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (block $label$22
- (local.set $2
- (local.get $1)
- )
- (block $label$23
- (local.set $2
- (i64.const 5208777217870088520)
- )
- (f32.store offset=3 align=1
- (i32.and
- (local.tee $3
- (local.get $3)
- )
- (i32.const 15)
- )
- (local.tee $0
- (f32.const 1.8919776323400583e-07)
- )
- )
- )
- )
- (br_if $label$21
- (loop $label$24 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const 0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (block $label$25
- (local.set $3
- (loop $label$26 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const -1.1754943508222875e-38)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (global.get $global$0)
- )
- )
- (loop $label$27
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const -4611686018427387904)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block
- (block $label$28
- (local.set $0
- (f32.const 16668)
- )
- (call $log-i64
- (i64.const 274877906944)
- )
- )
- (br_if $label$27
- (i32.eqz
- (local.tee $3
- (local.get $3)
- )
- )
- )
- (if
- (i32.eqz
- (local.tee $3
- (i32.const 33817656)
- )
- )
- (br_if $label$25
- (i32.eqz
- (i32.const 8)
- )
- )
- (nop)
- )
- )
- )
- )
- (br_if $label$24
- (i32.eqz
- (i32.const 110)
- )
- )
- (br_if $label$20
- (loop $label$29 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (local.tee $3
- (call $func_6
- (v128.const i32x4 0x4847080b 0xe740fc6d 0x49037f13 0x00000058)
- (loop $label$30 (result f32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const 2147483648)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result f32)
- (nop)
- (br_if $label$30
- (local.get $3)
- )
- (local.get $0)
- )
- )
- (i32.const -32768)
- (f64.const 2654)
- (v128.const i32x4 0x140a0215 0x00000000 0xffffffe0 0xffffffff)
- (local.tee $2
- (block $label$31 (result i64)
- (drop
- (local.get $0)
- )
- (i64.const 9007199254740992)
- )
- )
- )
- )
- )
- (br_if $label$20
- (local.get $3)
- (i32.eqz
- (i32.const 64)
- )
- )
- )
- )
- )
- )
- (loop $label$32 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (loop $label$33
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block
- (block $label$34
- (local.set $0
- (local.get $0)
- )
- (nop)
- )
- (br_if $label$33
- (i32.const -4096)
- )
- (br_if $label$32
- (i32.eqz
- (local.get $3)
- )
- )
- )
- )
- (br_if $label$32
- (i32.eqz
- (local.get $3)
- )
- )
- (local.tee $3
- (br_if $label$20
- (local.get $3)
- (i32.eqz
- (i32.const -2147483647)
- )
- )
- )
- )
- )
- )
- )
- )
- )
- )
- (local.get $3)
- (if (result i32)
- (if (result i32)
- (if (result i32)
- (if (result i32)
- (i32.eqz
- (i32.const 1)
- )
- (local.get $3)
- (i32.const -2147483647)
- )
- (block $label$35 (result i32)
- (loop $label$36
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block
- (nop)
- (br_if $label$36
- (i32.const 1343620356)
- )
- (call $log-f64
- (f64.const -9223372036854775808)
- )
- )
- )
- (br_if $label$35
- (loop $label$37 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const -1.1754943508222875e-38)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (local.set $1
- (loop $label$38 (result i64)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const -4611686018427387904)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i64)
- (local.set $0
- (f32.const -2)
- )
- (br_if $label$38
- (local.get $3)
- )
- (local.get $2)
- )
- )
- )
- (br_if $label$37
- (i32.eqz
- (local.tee $3
- (local.tee $3
- (i32.const 32769)
- )
- )
- )
- )
- (i32.const -536870912)
- )
- )
- (atomic.notify offset=22
- (i32.and
- (local.get $3)
- (i32.const 15)
- )
- (i32.const 0)
- )
- )
- )
- (i32.popcnt
- (i32.const -32767)
- )
- )
- (block $label$39
- (local.set $2
- (local.tee $1
- (local.get $2)
- )
- )
- (return
- (f32.const 5032882404183666657449511e6)
- )
- )
- (local.tee $3
- (local.tee $3
- (local.tee $3
- (local.get $3)
- )
- )
- )
- )
- (block $label$40 (result i32)
- (call $log-f64
- (f64.const -8589934592)
- )
- (local.tee $3
- (loop $label$41 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (block $label$42
- (call $log-f32
- (local.tee $0
- (local.get $0)
- )
- )
- (call $log-i32
- (call $hashMemory)
- )
- )
- (br_if $label$41
- (loop $label$43 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (block $label$44
- (nop)
- (if
- (local.get $3)
- (nop)
- (nop)
- )
- )
- (br_if $label$43
- (i32.eqz
- (loop $label$45 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (local.set $1
- (i64.const 939010426552585997)
- )
- (br_if $label$45
- (i32.eqz
- (local.tee $3
- (i32.const 5912)
- )
- )
- )
- (i32.const -63)
- )
- )
- )
- )
- (loop $label$46 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (br_if $label$40
- (local.get $3)
- (if (result i32)
- (i32.eqz
- (i32.const 512)
- )
- (local.get $3)
- (local.get $3)
- )
- )
- )
- )
- )
- )
- (loop $label$47 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (nop)
- (br_if $label$47
- (i32.eqz
- (local.tee $3
- (local.tee $3
- (local.get $3)
- )
- )
- )
- )
- (i32.const 2147483647)
- )
- )
- )
- )
- )
- )
- (local.tee $3
- (local.tee $3
- (i32.const 175536653)
- )
- )
- )
- )
- (block $label$48 (result i32)
- (local.get $3)
- )
- (block $label$49
- (local.set $3
- (i32.const 16)
- )
- (return
- (f32.const -134217728)
- )
- )
- )
- )
- (block $label$50 (result i32)
- (local.tee $0
- (loop $label$51
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block $label$52
- (local.set $0
- (loop $label$53 (result f32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block $label$54 (result f32)
- (br_if $label$51
- (i32.eqz
- (local.get $3)
- )
- )
- (local.tee $0
- (loop $label$55 (result f32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const -4294967296)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result f32)
- (block $label$56
- (nop)
- (nop)
- )
- (br_if $label$55
- (local.tee $3
- (local.get $3)
- )
- )
- (loop $label$57 (result f32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const -nan:0x7fffa5)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result f32)
- (local.set $0
- (local.get $0)
- )
- (br_if $label$57
- (i32.const 1246381131)
- )
- (local.get $0)
- )
- )
- )
- )
- )
- )
- )
- )
- (return
- (f32.const -9223372036854775808)
- )
- )
- )
- )
- (loop $label$58 (result i32)
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$0
+ (block $label$1
+ (local.set $6
+ (local.tee $1
+ (local.tee $0
+ (local.tee $7
+ (local.tee $1
+ (loop $label$2 (result f32)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (local.get $0)
+ (local.get $6)
)
)
(global.set $hangLimit
@@ -1498,60 +538,35 @@
)
)
)
- (block (result i32)
- (block $label$59
- (br_if $label$59
- (local.tee $3
- (local.tee $3
- (local.tee $3
- (local.tee $3
- (local.tee $3
- (local.tee $3
- (loop $label$60 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const 35184372088832)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (nop)
- (br_if $label$60
- (i32.eqz
- (local.get $3)
- )
- )
- (local.get $3)
- )
- )
- )
- )
- )
+ (block $label$3 (result f32)
+ (local.tee $2
+ (loop $label$4 (result f32)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (f32.const -3402823466385288598117041e14)
+ )
+ )
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
)
)
)
- )
- (if
- (block
- (block
- (loop $label$67
+ (local.tee $2
+ (local.tee $2
+ (loop $label$5 (result f32)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (local.get $0)
+ (f32.const -nan:0x7fffe6)
)
)
(global.set $hangLimit
@@ -1561,211 +576,197 @@
)
)
)
- (block $label$68
- (loop $label$69
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block $label$70
- (nop)
- (nop)
- )
- )
- (br $label$59)
- )
- )
- (local.tee $3
- (local.tee $3
- (local.tee $3
- (br_if $label$50
- (local.tee $3
- (i32.const 103)
- )
- (block $label$66
- (local.set $0
- (local.get $0)
- )
- (br $label$58)
- )
- )
- )
- )
- )
- )
- (drop
- (br_if $label$50
- (loop $label$63 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (br_if $label$63
- (local.tee $3
- (local.get $3)
- )
- )
- (br_if $label$63
- (loop $label$64 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block $label$65 (result i32)
- (if
- (i32.eqz
- (i32.const 1060645162)
- )
- (nop)
- (local.set $0
- (local.get $0)
- )
- )
- (local.tee $3
- (i32.const 32767)
- )
- )
- )
- )
- (local.tee $3
- (local.get $3)
- )
- )
- )
- (if (result i32)
- (i32.eqz
- (i32.const 1246448731)
- )
- (block $label$61 (result i32)
- (nop)
- (local.tee $3
- (loop $label$62 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (nop)
- (br_if $label$62
- (i32.const -32766)
- )
- (local.get $3)
- )
- )
- )
- )
- (local.get $3)
- )
- )
- )
- )
- (block $label$71
- (br_if $label$71
- (local.tee $3
- (local.tee $3
- (local.tee $3
- (local.tee $3
- (local.get $3)
- )
- )
- )
+ (f32.const 35184372088832)
)
)
- (nop)
)
- (local.set $0
- (br_if $label$0
- (local.get $0)
- (local.tee $3
- (local.tee $3
- (local.tee $3
- (i32.const 8388608)
- )
- )
- )
- )
- )
- )
- )
- (br_if $label$58
- (i32.eqz
- (i32.const -256)
)
)
- (i32.const 29)
)
)
)
- (block $label$72 (result i32)
- (i32.const -21)
- )
)
)
- (block $label$73 (result i32)
- (local.get $3)
+ )
+ )
+ (br_if $label$1
+ (i32.eqz
+ (local.get $5)
+ )
+ )
+ )
+ (return
+ (f32.const 65521)
+ )
+ )
+ )
+ (func $func_15 (; 15 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32)
+ (local $1 f32)
+ (local $2 f64)
+ (local $3 v128)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (f32.const -65536)
+ )
+ )
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (f64x2.splat
+ (return
+ (f32.const 1)
+ )
+ )
+ )
+ (func $func_16 (; 16 ;) (result i32)
+ (local $0 i32)
+ (local $1 i64)
+ (local $2 v128)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (i32.const 84558856)
+ )
+ )
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$0 (result i32)
+ (nop)
+ (br_if $label$0
+ (i32.const 16777216)
+ (i32.eqz
+ (i32.const 524288)
+ )
+ )
+ )
+ )
+ (func $func_16_invoker (; 17 ;) (type $FUNCSIG$v)
+ (drop
+ (call $func_16)
+ )
+ (call $log-i32
+ (call $hashMemory)
+ )
+ (drop
+ (call $func_16)
+ )
+ )
+ (func $func_18 (; 18 ;) (result v128)
+ (local $0 v128)
+ (local $1 v128)
+ (local $2 v128)
+ (local $3 f64)
+ (local $4 i32)
+ (local $5 f32)
+ (local $6 i32)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 v128)
+ (local $11 i32)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (local.get $10)
+ )
+ )
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (local.tee $1
+ (local.tee $1
+ (loop $label$0 (result v128)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (v128.const i32x4 0xffe00000 0xc1efffff 0x571e0419 0x031f1e04)
+ )
)
- (block $label$74 (result i32)
- (local.get $3)
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
+ )
)
)
+ (block $label$1 (result v128)
+ (nop)
+ (local.get $0)
+ )
)
- (f32.const -4398046511104)
- (block $label$75 (result f32)
- (local.get $0)
+ )
+ )
+ )
+ (func $func_18_invoker (; 19 ;) (type $FUNCSIG$v)
+ (drop
+ (call $func_18)
+ )
+ (drop
+ (call $func_18)
+ )
+ (call $log-i32
+ (call $hashMemory)
+ )
+ (drop
+ (call $func_18)
+ )
+ (call $log-i32
+ (call $hashMemory)
+ )
+ )
+ (func $func_20 (; 20 ;) (param $0 i64) (param $1 f32) (param $2 i32) (param $3 i32) (result v128)
+ (local $4 i64)
+ (local $5 f64)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (v128.const i32x4 0x4e000000 0x4f000000 0x45821000 0x7f7fffff)
+ )
+ )
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
)
)
)
+ (block $label$0 (result v128)
+ (local.set $1
+ (local.get $1)
+ )
+ (v128.const i32x4 0x00001c1f 0x00000000 0x36387d30 0x00000000)
+ )
)
- (func $hangLimitInitializer (; 14 ;)
+ (func $hangLimitInitializer (; 21 ;)
(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 efd1da34a..679462896 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,15 +1,16 @@
(module
(type $FUNCSIG$i (func (result i32)))
- (type $FUNCSIG$viffjf (func (param i32 f32 f32 i64 f32)))
(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$id (func (param f64) (result i32)))
- (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
- (type $FUNCSIG$iji (func (param i64 i32) (result i32)))
+ (type $FUNCSIG$d (func (result f64)))
(type $FUNCSIG$v (func))
+ (type $FUNCSIG$ji (func (param i32) (result i64)))
+ (type $FUNCSIG$ff (func (param f32) (result f32)))
+ (type $FUNCSIG$fi (func (param i32) (result f32)))
+ (type $FUNCSIG$Vjfii (func (param i64 f32 i32 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,22 +18,26 @@
(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 5 funcref)
- (elem (i32.const 0) $func_8 $func_9 $func_9 $func_11 $func_13)
+ (table $0 4 4 funcref)
+ (elem (i32.const 0) $func_11 $func_13 $func_15 $func_15)
(global $global$0 (mut i32) (i32.const 975663930))
(global $global$1 (mut i32) (i32.const 2066300474))
(global $global$2 (mut i64) (i64.const 20510))
(global $global$3 (mut f32) (f32.const -2147483648))
(global $global$4 (mut v128) (v128.const i32x4 0x7f002833 0x580000fe 0x59750500 0x01ff002f))
(global $hangLimit (mut i32) (i32.const 10))
- (event $event$0 (attr 0) (param i32 f32 f32 i64 f32))
+ (event $event$0 (attr 0) (param f64 f32))
(export "hashMemory" (func $hashMemory))
(export "memory" (memory $0))
- (export "func_7" (func $func_7))
- (export "func_8" (func $func_8))
(export "func_9" (func $func_9))
(export "func_9_invoker" (func $func_9_invoker))
(export "func_11_invoker" (func $func_11_invoker))
+ (export "func_13" (func $func_13))
+ (export "func_14" (func $func_14))
+ (export "func_15" (func $func_15))
+ (export "func_16_invoker" (func $func_16_invoker))
+ (export "func_18_invoker" (func $func_18_invoker))
+ (export "func_20" (func $func_20))
(export "hangLimitInitializer" (func $hangLimitInitializer))
(func $hashMemory (; 5 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
@@ -265,14 +270,14 @@
)
(local.get $0)
)
- (func $func_6 (; 6 ;) (param $0 v128) (param $1 f32) (param $2 i32) (param $3 f64) (param $4 v128) (param $5 i64) (result i32)
+ (func $func_6 (; 6 ;) (param $0 i64) (param $1 v128) (param $2 i64) (result f64)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (i32.const 1)
+ (f64.const -1)
)
)
(global.set $hangLimit
@@ -282,20 +287,13 @@
)
)
)
- (block $label$0
- (local.set $3
- (local.tee $3
- (f64.const 0)
- )
- )
- (return
- (local.get $2)
- )
- )
+ (f64.const 16970)
)
- (func $func_7 (; 7 ;) (type $FUNCSIG$id) (param $0 f64) (result i32)
+ (func $func_7 (; 7 ;) (result i32)
+ (local $0 f32)
(local $1 f32)
(local $2 i32)
+ (local $3 v128)
(block
(if
(i32.eqz
@@ -313,23 +311,34 @@
)
)
(block $label$0
- (local.set $2
- (local.get $2)
+ (call $log-i32
+ (call $hashMemory)
+ )
+ (local.set $3
+ (v128.const i32x4 0x3b681019 0x00000000 0xfffeff80 0x0054060b)
)
(return
- (local.get $2)
+ (i32.const -65535)
)
)
)
- (func $func_8 (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
- (local $2 v128)
+ (func $func_8 (; 8 ;) (param $0 f64) (param $1 f32) (param $2 v128) (param $3 f64) (result f32)
+ (local $4 i32)
+ (local $5 f32)
+ (local $6 i64)
+ (local $7 i64)
+ (local $8 i32)
+ (local $9 v128)
+ (local $10 i64)
+ (local $11 i64)
+ (local $12 f64)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (i32.const 228)
+ (local.get $5)
)
)
(global.set $hangLimit
@@ -339,30 +348,31 @@
)
)
)
- (local.tee $0
- (local.tee $0
- (local.tee $0
- (i32.const 1477910104)
- )
+ (block $label$0
+ (call $log-f32
+ (local.get $5)
+ )
+ (return
+ (f32.const 203013.03125)
)
)
)
- (func $func_9 (; 9 ;) (type $FUNCSIG$iji) (param $0 i64) (param $1 i32) (result i32)
- (local $2 f64)
- (local $3 i64)
- (local $4 f64)
- (local $5 i32)
- (local $6 f64)
- (local $7 v128)
- (local $8 i64)
- (local $9 f64)
+ (func $func_9 (; 9 ;) (type $FUNCSIG$d) (result f64)
+ (local $0 f32)
+ (local $1 f64)
+ (local $2 v128)
+ (local $3 i32)
+ (local $4 i64)
+ (local $5 f32)
+ (local $6 i32)
+ (local $7 i64)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (i32.const 20761)
+ (local.get $1)
)
)
(global.set $hangLimit
@@ -373,23 +383,11 @@
)
)
(block $label$0
- (block $label$1
- (call $log-f64
- (local.tee $2
- (local.tee $9
- (local.tee $6
- (local.tee $9
- (local.tee $4
- (local.get $2)
- )
- )
- )
- )
- )
- )
- (local.set $2
- (f64.const 7569651134721150320538329e227)
- )
+ (call $log-v128
+ (v128.const i32x4 0x77367f7e 0x00000045 0x40000000 0x0000007f)
+ )
+ (local.set $2
+ (v128.const i32x4 0xbc400000 0x0000fd80 0x0043186f 0xc5c72600)
)
(return
(local.get $1)
@@ -398,22 +396,28 @@
)
(func $func_9_invoker (; 10 ;) (type $FUNCSIG$v)
(drop
- (call $func_9
- (i64.const -549755813888)
- (i32.const -91)
- )
+ (call $func_9)
)
)
- (func $func_11 (; 11 ;) (param $0 i32) (param $1 i32) (param $2 v128)
- (local $3 i64)
- (local $4 f32)
- (local $5 i32)
+ (func $func_11 (; 11 ;) (result f32)
+ (local $0 v128)
+ (local $1 f32)
+ (local $2 v128)
+ (local $3 f32)
+ (local $4 v128)
+ (local $5 v128)
+ (local $6 i64)
+ (local $7 f32)
+ (local $8 i32)
+ (local $9 f64)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
- (return)
+ (return
+ (f32.const 10961.05859375)
+ )
)
(global.set $hangLimit
(i32.sub
@@ -422,55 +426,60 @@
)
)
)
- (block $label$0
- (call $log-f32
- (local.tee $4
- (local.tee $4
- (local.tee $4
- (f32.const 65449)
- )
- )
- )
- )
- )
+ (local.get $7)
)
(func $func_11_invoker (; 12 ;) (type $FUNCSIG$v)
- (call $func_11
- (i32.const 235475987)
- (i32.const 0)
- (v128.const i32x4 0x00000b08 0x00000405 0x61606b6a 0x02000000)
+ (drop
+ (call $func_11)
+ )
+ (drop
+ (call $func_11)
)
(call $log-i32
(call $hashMemory)
)
- (call $func_11
- (i32.const 1547916878)
- (i32.const 740500009)
- (v128.const i32x4 0x4702041e 0x1a1f4844 0x00000001 0x80000000)
+ (drop
+ (call $func_11)
+ )
+ (drop
+ (call $func_11)
)
- (call $func_11
- (i32.const -4)
- (i32.const -16777216)
- (v128.const i32x4 0xc0000000 0x00000010 0x00000800 0x45444f4a)
+ (drop
+ (call $func_11)
)
(call $log-i32
(call $hashMemory)
)
- (call $func_11
- (i32.const -32)
- (i32.const -32768)
- (v128.const i32x4 0x0000021c 0x00000000 0x1b676b1c 0x0c1e0902)
+ (drop
+ (call $func_11)
+ )
+ (drop
+ (call $func_11)
)
)
- (func $func_13 (; 13 ;) (param $0 f32) (param $1 i64) (param $2 i64) (result f32)
- (local $3 i32)
+ (func $func_13 (; 13 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64)
+ (local $1 f32)
+ (local $2 f32)
+ (local $3 v128)
+ (local $4 f32)
+ (local $5 v128)
+ (local $6 i64)
+ (local $7 i32)
+ (local $8 v128)
+ (local $9 f64)
+ (local $10 i64)
+ (local $11 i64)
+ (local $12 i64)
+ (local $13 v128)
+ (local $14 i32)
+ (local $15 v128)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (f32.const 0)
+ (local.get $12)
)
)
(global.set $hangLimit
@@ -480,46 +489,67 @@
)
)
)
- (block $label$0 (result f32)
- (local.set $1
- (i64.const -268435456)
- )
- (if (result f32)
+ (i64.const 2)
+ )
+ (func $func_14 (; 14 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32)
+ (local $1 f32)
+ (local $2 f32)
+ (local $3 i64)
+ (local $4 f64)
+ (local $5 i32)
+ (local $6 f32)
+ (local $7 f32)
+ (local $8 f64)
+ (block
+ (if
(i32.eqz
- (if (result i32)
- (i32.eqz
- (block $label$1
- (loop $label$2
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const 23900)
+ (global.get $hangLimit)
+ )
+ (return
+ (f32.const -4294967296)
+ )
+ )
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$0
+ (block $label$1
+ (local.set $6
+ (local.tee $1
+ (local.tee $0
+ (local.tee $7
+ (local.tee $1
+ (loop $label$2 (result f32)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (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
- (call $hashMemory)
- )
- (drop
- (loop $label$4
+ (block $label$3 (result f32)
+ (local.tee $2
+ (loop $label$4 (result f32)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (local.get $0)
+ (f32.const -3402823466385288598117041e14)
)
)
(global.set $hangLimit
@@ -529,115 +559,16 @@
)
)
)
- (block $label$5
- (nop)
- (br $label$2)
- )
- )
- )
- )
- (br_if $label$2
- (block $label$6 (result i32)
- (local.get $3)
- )
- )
- (local.set $0
- (br_if $label$0
- (local.tee $0
- (local.tee $0
- (f32.const -65536)
- )
- )
- (i32.eqz
- (local.get $3)
- )
- )
- )
- )
- )
- (return
- (f32.const 825.2233276367188)
- )
- )
- )
- (local.get $3)
- (if (result i32)
- (i32.eqz
- (if (result i32)
- (i32.eqz
- (if (result i32)
- (if (result i32)
- (i32.eqz
- (if (result i32)
- (i32.eqz
- (if (result i32)
- (i32.eqz
- (local.get $3)
- )
- (i32.const 57)
- (i32.const -1)
- )
- )
- (i32.const -32767)
- (block $label$7
- (local.set $0
- (f32.const 16)
- )
- (return
- (local.get $0)
- )
- )
- )
- )
- (block $label$8 (result i32)
- (block $label$9
- (loop $label$10
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (local.set $3
- (local.get $3)
- )
- )
- (br_if $label$9
- (local.get $3)
- )
- )
- (i32.const 1195918659)
- )
- (local.tee $3
- (if (result i32)
- (i32.const -13)
- (local.get $3)
- (local.get $3)
- )
- )
- )
- (block $label$11 (result i32)
- (local.set $0
- (local.tee $0
- (local.tee $0
- (loop $label$12 (result f32)
+ (local.tee $2
+ (local.tee $2
+ (loop $label$5 (result f32)
(block
(if
(i32.eqz
(global.get $hangLimit)
)
(return
- (local.get $0)
+ (f32.const 0)
)
)
(global.set $hangLimit
@@ -647,403 +578,7 @@
)
)
)
- (local.get $0)
- )
- )
- )
- )
- (br_if $label$11
- (call_indirect (type $FUNCSIG$iji)
- (global.get $global$2)
- (loop $label$17 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (nop)
- (br_if $label$17
- (local.get $3)
- )
- (i32.const -2048)
- )
- )
- (i32.const 1)
- )
- (local.tee $3
- (loop $label$13 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const 13)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (loop $label$14
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block
- (br_if $label$14
- (local.tee $3
- (local.tee $3
- (br_if $label$11
- (local.get $3)
- (i32.eqz
- (block $label$15
- (nop)
- (br $label$13)
- )
- )
- )
- )
- )
- )
- (br_if $label$14
- (i32.eqz
- (local.get $3)
- )
- )
- (local.tee $3
- (block $label$16
- (nop)
- (br $label$13)
- )
- )
- )
- )
- (br_if $label$13
- (local.get $3)
- )
- (local.get $3)
- )
- )
- )
- )
- )
- (block $label$18 (result i32)
- (nop)
- (i32.const 255)
- )
- )
- )
- (block $label$19 (result i32)
- (nop)
- (i32.const 486998794)
- )
- (block $label$20 (result i32)
- (local.set $0
- (br_if $label$0
- (f32.const 1.9017128799693354e-30)
- (local.tee $3
- (local.tee $3
- (local.get $3)
- )
- )
- )
- )
- (loop $label$21 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (block $label$22
- (local.set $2
- (local.get $1)
- )
- (block $label$23
- (local.set $2
- (i64.const 5208777217870088520)
- )
- (f32.store offset=3 align=1
- (i32.and
- (local.tee $3
- (local.get $3)
- )
- (i32.const 15)
- )
- (local.tee $0
- (f32.const 1.8919776323400583e-07)
- )
- )
- )
- )
- (br_if $label$21
- (loop $label$24 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (block $label$25
- (local.set $3
- (loop $label$26 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const 2147483648)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (global.get $global$0)
- )
- )
- (loop $label$27
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (f32.const -3402823466385288598117041e14)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block
- (block $label$28
- (local.set $0
- (f32.const 16668)
- )
- (call $log-i64
- (i64.const 274877906944)
- )
- )
- (br_if $label$27
- (i32.eqz
- (local.tee $3
- (local.get $3)
- )
- )
- )
- (if
- (i32.eqz
- (local.tee $3
- (i32.const 33817656)
- )
- )
- (br_if $label$25
- (i32.eqz
- (i32.const 8)
- )
- )
- (nop)
- )
- )
- )
- )
- (br_if $label$24
- (i32.eqz
- (i32.const 110)
- )
- )
- (br_if $label$20
- (loop $label$29 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (local.tee $3
- (call $func_6
- (v128.const i32x4 0x4847080b 0xe740fc6d 0x49037f13 0x00000058)
- (loop $label$30 (result f32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result f32)
- (nop)
- (br_if $label$30
- (local.get $3)
- )
- (local.get $0)
- )
- )
- (i32.const -32768)
- (f64.const 2654)
- (v128.const i32x4 0x140a0215 0x00000000 0xffffffe0 0xffffffff)
- (local.tee $2
- (block $label$31 (result i64)
- (drop
- (local.get $0)
- )
- (i64.const 9007199254740992)
- )
- )
- )
- )
- )
- (br_if $label$20
- (local.get $3)
- (i32.eqz
- (i32.const 64)
- )
- )
- )
- )
- )
- )
- (loop $label$32 (result i32)
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i32)
- (loop $label$33
- (block
- (if
- (i32.eqz
- (global.get $hangLimit)
- )
- (return
- (local.get $0)
- )
- )
- (global.set $hangLimit
- (i32.sub
- (global.get $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block
- (block $label$34
- (local.set $0
- (local.get $0)
- )
- (nop)
- )
- (br_if $label$33
- (i32.const -4096)
- )
- (br_if $label$32
- (i32.eqz
- (local.get $3)
- )
- )
- )
- )
- (br_if $label$32
- (i32.eqz
- (local.get $3)
- )
- )
- (local.tee $3
- (br_if $label$20
- (local.get $3)
- (i32.eqz
- (i32.const -2147483647)
- )
+ (f32.const 35184372088832)
)
)
)
@@ -1053,26 +588,187 @@
)
)
)
- (local.get $3)
- (block $label$73 (result i32)
- (i32.popcnt
- (i32.const -32767)
- )
+ )
+ )
+ )
+ (br_if $label$1
+ (i32.eqz
+ (local.get $5)
+ )
+ )
+ )
+ (return
+ (f32.const 65521)
+ )
+ )
+ )
+ (func $func_15 (; 15 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32)
+ (local $1 f32)
+ (local $2 f64)
+ (local $3 v128)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (f32.const -65536)
+ )
+ )
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (f64x2.splat
+ (return
+ (f32.const 1)
+ )
+ )
+ )
+ (func $func_16 (; 16 ;) (result i32)
+ (local $0 i32)
+ (local $1 i64)
+ (local $2 v128)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (i32.const 84558856)
+ )
+ )
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$0 (result i32)
+ (nop)
+ (br_if $label$0
+ (i32.const 16777216)
+ (i32.eqz
+ (i32.const 524288)
+ )
+ )
+ )
+ )
+ (func $func_16_invoker (; 17 ;) (type $FUNCSIG$v)
+ (drop
+ (call $func_16)
+ )
+ (call $log-i32
+ (call $hashMemory)
+ )
+ (drop
+ (call $func_16)
+ )
+ )
+ (func $func_18 (; 18 ;) (result v128)
+ (local $0 v128)
+ (local $1 v128)
+ (local $2 v128)
+ (local $3 f64)
+ (local $4 i32)
+ (local $5 f32)
+ (local $6 i32)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 v128)
+ (local $11 i32)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (local.get $10)
+ )
+ )
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (local.tee $1
+ (local.tee $1
+ (loop $label$0 (result v128)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (v128.const i32x4 0xffe00000 0xc1efffff 0x571e0419 0x031f1e04)
)
)
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$1 (result v128)
+ (nop)
+ (local.get $0)
)
)
- (local.get $0)
- (f32.const 1.1985586025063025e-39)
)
)
)
- (func $hangLimitInitializer (; 14 ;)
+ (func $func_18_invoker (; 19 ;) (type $FUNCSIG$v)
+ (drop
+ (call $func_18)
+ )
+ (drop
+ (call $func_18)
+ )
+ (call $log-i32
+ (call $hashMemory)
+ )
+ (drop
+ (call $func_18)
+ )
+ (call $log-i32
+ (call $hashMemory)
+ )
+ )
+ (func $func_20 (; 20 ;) (type $FUNCSIG$Vjfii) (param $0 i64) (param $1 f32) (param $2 i32) (param $3 i32) (result v128)
+ (local $4 i64)
+ (local $5 f64)
+ (block
+ (if
+ (i32.eqz
+ (global.get $hangLimit)
+ )
+ (return
+ (v128.const i32x4 0x00000000 0x40c11580 0x00000000 0xb8100000)
+ )
+ )
+ (global.set $hangLimit
+ (i32.sub
+ (global.get $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (v128.const i32x4 0x00000000 0x80000000 0x00000078 0x00000000)
+ )
+ (func $hangLimitInitializer (; 21 ;)
(global.set $hangLimit
(i32.const 10)
)
)
- (func $deNan32 (; 15 ;) (param $0 f32) (result f32)
+ (func $deNan32 (; 22 ;) (param $0 f32) (result f32)
(if (result f32)
(f32.eq
(local.get $0)
@@ -1082,7 +778,7 @@
(f32.const 0)
)
)
- (func $deNan64 (; 16 ;) (param $0 f64) (result f64)
+ (func $deNan64 (; 23 ;) (param $0 f64) (result f64)
(if (result f64)
(f64.eq
(local.get $0)
diff --git a/test/polymorphic_stack.wast.fromBinary b/test/polymorphic_stack.wast.fromBinary
index 0bda9153a..3083b5bf9 100644
--- a/test/polymorphic_stack.wast.fromBinary
+++ b/test/polymorphic_stack.wast.fromBinary
@@ -1,32 +1,32 @@
(module
- (type $0 (func (param i32) (result i32)))
- (type $1 (func (result i32)))
- (type $2 (func (param i32)))
- (type $3 (func))
+ (type $0 (func (result i32)))
+ (type $1 (func (param i32) (result i32)))
+ (type $2 (func))
+ (type $3 (func (param i32)))
(import "env" "table" (table $timport$0 9 9 funcref))
- (func $break-and-binary (; 0 ;) (type $1) (result i32)
+ (func $break-and-binary (; 0 ;) (type $0) (result i32)
(block $label$1 (result i32)
(unreachable)
)
)
- (func $call-and-unary (; 1 ;) (type $0) (param $0 i32) (result i32)
+ (func $call-and-unary (; 1 ;) (type $1) (param $0 i32) (result i32)
(unreachable)
)
- (func $tee (; 2 ;) (type $2) (param $0 i32)
+ (func $tee (; 2 ;) (type $3) (param $0 i32)
(local $1 f32)
(unreachable)
)
- (func $tee2 (; 3 ;) (type $3)
+ (func $tee2 (; 3 ;) (type $2)
(local $0 f32)
(if
(i32.const 259)
(unreachable)
)
)
- (func $select (; 4 ;) (type $3)
+ (func $select (; 4 ;) (type $2)
(unreachable)
)
- (func $untaken-break-should-have-value (; 5 ;) (type $1) (result i32)
+ (func $untaken-break-should-have-value (; 5 ;) (type $0) (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 $0) (param $0 i32) (result i32)
+ (func $unreachable-in-block-but-code-before (; 6 ;) (type $1) (param $0 i32) (result i32)
(if
(local.get $0)
(return
@@ -53,14 +53,14 @@
)
)
)
- (func $br_table_unreachable_to_also_unreachable (; 7 ;) (type $1) (result i32)
+ (func $br_table_unreachable_to_also_unreachable (; 7 ;) (type $0) (result i32)
(block $label$1 (result i32)
(block $label$2 (result i32)
(unreachable)
)
)
)
- (func $untaken-br_if (; 8 ;) (type $1) (result i32)
+ (func $untaken-br_if (; 8 ;) (type $0) (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 538a15d0b..a4cd0081c 100644
--- a/test/polymorphic_stack.wast.fromBinary.noDebugInfo
+++ b/test/polymorphic_stack.wast.fromBinary.noDebugInfo
@@ -1,32 +1,32 @@
(module
- (type $0 (func (param i32) (result i32)))
- (type $1 (func (result i32)))
- (type $2 (func (param i32)))
- (type $3 (func))
+ (type $0 (func (result i32)))
+ (type $1 (func (param i32) (result i32)))
+ (type $2 (func))
+ (type $3 (func (param i32)))
(import "env" "table" (table $timport$0 9 9 funcref))
- (func $0 (; 0 ;) (type $1) (result i32)
+ (func $0 (; 0 ;) (type $0) (result i32)
(block $label$1 (result i32)
(unreachable)
)
)
- (func $1 (; 1 ;) (type $0) (param $0 i32) (result i32)
+ (func $1 (; 1 ;) (type $1) (param $0 i32) (result i32)
(unreachable)
)
- (func $2 (; 2 ;) (type $2) (param $0 i32)
+ (func $2 (; 2 ;) (type $3) (param $0 i32)
(local $1 f32)
(unreachable)
)
- (func $3 (; 3 ;) (type $3)
+ (func $3 (; 3 ;) (type $2)
(local $0 f32)
(if
(i32.const 259)
(unreachable)
)
)
- (func $4 (; 4 ;) (type $3)
+ (func $4 (; 4 ;) (type $2)
(unreachable)
)
- (func $5 (; 5 ;) (type $1) (result i32)
+ (func $5 (; 5 ;) (type $0) (result i32)
(block $label$1 (result i32)
(block $label$2
(drop
@@ -37,7 +37,7 @@
(unreachable)
)
)
- (func $6 (; 6 ;) (type $0) (param $0 i32) (result i32)
+ (func $6 (; 6 ;) (type $1) (param $0 i32) (result i32)
(if
(local.get $0)
(return
@@ -53,14 +53,14 @@
)
)
)
- (func $7 (; 7 ;) (type $1) (result i32)
+ (func $7 (; 7 ;) (type $0) (result i32)
(block $label$1 (result i32)
(block $label$2 (result i32)
(unreachable)
)
)
)
- (func $8 (; 8 ;) (type $1) (result i32)
+ (func $8 (; 8 ;) (type $0) (result i32)
(block $label$1 (result i32)
(block $label$2
(if
diff --git a/test/simd.wast.fromBinary b/test/simd.wast.fromBinary
index 6aa5637c3..2313e4f9b 100644
--- a/test/simd.wast.fromBinary
+++ b/test/simd.wast.fromBinary
@@ -1,57 +1,57 @@
(module
- (type $0 (func (param i32) (result v128)))
- (type $1 (func (param i32 v128)))
- (type $2 (func (result v128)))
- (type $3 (func (param v128 v128) (result v128)))
+ (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 (param v128 i32) (result v128)))
- (type $6 (func (param v128) (result i64)))
- (type $7 (func (param v128 i64) (result v128)))
- (type $8 (func (param f32) (result v128)))
+ (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 f32) (result v128)))
- (type $11 (func (param f64) (result v128)))
- (type $12 (func (param v128) (result f64)))
- (type $13 (func (param v128 f64) (result v128)))
- (type $14 (func (param v128) (result v128)))
- (type $15 (func (param v128 v128 v128) (result v128)))
+ (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)))
(memory $0 1 1)
- (func $v128.load (; 0 ;) (type $0) (param $0 i32) (result v128)
+ (func $v128.load (; 0 ;) (type $3) (param $0 i32) (result v128)
(v128.load
(local.get $0)
)
)
- (func $v128.store (; 1 ;) (type $1) (param $0 i32) (param $1 v128)
+ (func $v128.store (; 1 ;) (type $7) (param $0 i32) (param $1 v128)
(v128.store
(local.get $0)
(local.get $1)
)
)
- (func $v128.const.i8x16 (; 2 ;) (type $2) (result v128)
+ (func $v128.const.i8x16 (; 2 ;) (type $5) (result v128)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
)
- (func $v128.const.i16x8 (; 3 ;) (type $2) (result v128)
+ (func $v128.const.i16x8 (; 3 ;) (type $5) (result v128)
(v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00080007)
)
- (func $v128.const.i32x4 (; 4 ;) (type $2) (result v128)
+ (func $v128.const.i32x4 (; 4 ;) (type $5) (result v128)
(v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004)
)
- (func $v128.const.i64x2 (; 5 ;) (type $2) (result v128)
+ (func $v128.const.i64x2 (; 5 ;) (type $5) (result v128)
(v128.const i32x4 0x00000001 0x00000000 0x00000002 0x00000000)
)
- (func $v128.const.f32x4 (; 6 ;) (type $2) (result v128)
+ (func $v128.const.f32x4 (; 6 ;) (type $5) (result v128)
(v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000)
)
- (func $v128.const.f64x2 (; 7 ;) (type $2) (result v128)
+ (func $v128.const.f64x2 (; 7 ;) (type $5) (result v128)
(v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000)
)
- (func $v128.shuffle (; 8 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $v128.shuffle (; 8 ;) (type $0) (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 $0) (param $0 i32) (result v128)
+ (func $i8x16.splat (; 9 ;) (type $3) (param $0 i32) (result v128)
(i8x16.splat
(local.get $0)
)
@@ -66,13 +66,13 @@
(local.get $0)
)
)
- (func $i8x16.replace_lane (; 12 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i8x16.replace_lane (; 12 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i8x16.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.splat (; 13 ;) (type $0) (param $0 i32) (result v128)
+ (func $i16x8.splat (; 13 ;) (type $3) (param $0 i32) (result v128)
(i16x8.splat
(local.get $0)
)
@@ -87,13 +87,13 @@
(local.get $0)
)
)
- (func $i16x8.replace_lane (; 16 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i16x8.replace_lane (; 16 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i16x8.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.splat (; 17 ;) (type $0) (param $0 i32) (result v128)
+ (func $i32x4.splat (; 17 ;) (type $3) (param $0 i32) (result v128)
(i32x4.splat
(local.get $0)
)
@@ -103,24 +103,24 @@
(local.get $0)
)
)
- (func $i32x4.replace_lane (; 19 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i32x4.replace_lane (; 19 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i32x4.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $i64x2.extract_lane (; 20 ;) (type $6) (param $0 v128) (result i64)
+ (func $i64x2.extract_lane (; 20 ;) (type $8) (param $0 v128) (result i64)
(i64x2.extract_lane 0
(local.get $0)
)
)
- (func $i64x2.replace_lane (; 21 ;) (type $7) (param $0 v128) (param $1 i64) (result v128)
+ (func $i64x2.replace_lane (; 21 ;) (type $13) (param $0 v128) (param $1 i64) (result v128)
(i64x2.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.splat (; 22 ;) (type $8) (param $0 f32) (result v128)
+ (func $f32x4.splat (; 22 ;) (type $11) (param $0 f32) (result v128)
(f32x4.splat
(local.get $0)
)
@@ -130,317 +130,317 @@
(local.get $0)
)
)
- (func $f32x4.replace_lane (; 24 ;) (type $10) (param $0 v128) (param $1 f32) (result v128)
+ (func $f32x4.replace_lane (; 24 ;) (type $14) (param $0 v128) (param $1 f32) (result v128)
(f32x4.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.splat (; 25 ;) (type $11) (param $0 f64) (result v128)
+ (func $f64x2.splat (; 25 ;) (type $12) (param $0 f64) (result v128)
(f64x2.splat
(local.get $0)
)
)
- (func $f64x2.extract_lane (; 26 ;) (type $12) (param $0 v128) (result f64)
+ (func $f64x2.extract_lane (; 26 ;) (type $10) (param $0 v128) (result f64)
(f64x2.extract_lane 0
(local.get $0)
)
)
- (func $f64x2.replace_lane (; 27 ;) (type $13) (param $0 v128) (param $1 f64) (result v128)
+ (func $f64x2.replace_lane (; 27 ;) (type $15) (param $0 v128) (param $1 f64) (result v128)
(f64x2.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.eq (; 28 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.eq (; 28 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.eq
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.ne (; 29 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.ne (; 29 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.ne
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.lt_s (; 30 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.lt_s (; 30 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.lt_s
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.lt_u (; 31 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.lt_u (; 31 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.lt_u
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.gt_s (; 32 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.gt_s (; 32 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.gt_s
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.gt_u (; 33 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.gt_u (; 33 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.gt_u
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.le_s (; 34 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.le_s (; 34 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.le_s
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.le_u (; 35 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.le_u (; 35 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.le_u
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.ge_s (; 36 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.ge_s (; 36 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.ge_s
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.ge_u (; 37 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.ge_u (; 37 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.ge_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.eq (; 38 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.eq (; 38 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.eq
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.ne (; 39 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.ne (; 39 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.ne
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.lt_s (; 40 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.lt_s (; 40 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.lt_s
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.lt_u (; 41 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.lt_u (; 41 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.lt_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.gt_s (; 42 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.gt_s (; 42 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.gt_s
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.gt_u (; 43 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.gt_u (; 43 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.gt_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.le_s (; 44 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.le_s (; 44 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.le_s
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.le_u (; 45 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.le_u (; 45 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.le_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.ge_s (; 46 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.ge_s (; 46 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.ge_s
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.ge_u (; 47 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.ge_u (; 47 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.ge_u
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.eq (; 48 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.eq (; 48 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.eq
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.ne (; 49 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.ne (; 49 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.ne
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.lt_s (; 50 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.lt_s (; 50 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.lt_s
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.lt_u (; 51 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.lt_u (; 51 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.lt_u
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.gt_s (; 52 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.gt_s (; 52 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.gt_s
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.gt_u (; 53 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.gt_u (; 53 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.gt_u
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.le_s (; 54 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.le_s (; 54 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.le_s
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.le_u (; 55 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.le_u (; 55 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.le_u
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.ge_s (; 56 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.ge_s (; 56 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.ge_s
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.ge_u (; 57 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.ge_u (; 57 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.ge_u
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.eq (; 58 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.eq (; 58 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.eq
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.ne (; 59 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.ne (; 59 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.ne
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.lt (; 60 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.lt (; 60 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.lt
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.gt (; 61 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.gt (; 61 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.gt
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.le (; 62 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.le (; 62 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.le
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.ge (; 63 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.ge (; 63 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.ge
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.eq (; 64 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.eq (; 64 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.eq
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.ne (; 65 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.ne (; 65 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.ne
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.lt (; 66 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.lt (; 66 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.lt
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.gt (; 67 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.gt (; 67 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.gt
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.le (; 68 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.le (; 68 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.le
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.ge (; 69 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.ge (; 69 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.ge
(local.get $0)
(local.get $1)
)
)
- (func $v128.not (; 70 ;) (type $14) (param $0 v128) (result v128)
+ (func $v128.not (; 70 ;) (type $1) (param $0 v128) (result v128)
(v128.not
(local.get $0)
)
)
- (func $v128.and (; 71 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $v128.and (; 71 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(v128.and
(local.get $0)
(local.get $1)
)
)
- (func $v128.or (; 72 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $v128.or (; 72 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(v128.or
(local.get $0)
(local.get $1)
)
)
- (func $v128.xor (; 73 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $v128.xor (; 73 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(v128.xor
(local.get $0)
(local.get $1)
)
)
- (func $v128.andnot (; 74 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $v128.andnot (; 74 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(v128.andnot
(local.get $0)
(local.get $1)
)
)
- (func $v128.bitselect (; 75 ;) (type $15) (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $v128.bitselect (; 75 ;) (type $6) (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 $14) (param $0 v128) (result v128)
+ (func $i8x16.neg (; 76 ;) (type $1) (param $0 v128) (result v128)
(i8x16.neg
(local.get $0)
)
@@ -455,91 +455,91 @@
(local.get $0)
)
)
- (func $i8x16.shl (; 79 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i8x16.shl (; 79 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i8x16.shl
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.shr_s (; 80 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i8x16.shr_s (; 80 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i8x16.shr_s
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.shr_u (; 81 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i8x16.shr_u (; 81 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i8x16.shr_u
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.add (; 82 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.add (; 82 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.add
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.add_saturate_s (; 83 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.add_saturate_s (; 83 ;) (type $0) (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 $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.add_saturate_u (; 84 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.add_saturate_u
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.sub (; 85 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.sub (; 85 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.sub
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.sub_saturate_s (; 86 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.sub_saturate_s (; 86 ;) (type $0) (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 $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.sub_saturate_u (; 87 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.sub_saturate_u
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.mul (; 88 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.mul (; 88 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.mul
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.min_s (; 89 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.min_s (; 89 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.min_s
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.min_u (; 90 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.min_u (; 90 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.min_u
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.max_s (; 91 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.max_s (; 91 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.max_s
(local.get $0)
(local.get $1)
)
)
- (func $i8x16.max_u (; 92 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.max_u (; 92 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.max_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.neg (; 93 ;) (type $14) (param $0 v128) (result v128)
+ (func $i16x8.neg (; 93 ;) (type $1) (param $0 v128) (result v128)
(i16x8.neg
(local.get $0)
)
@@ -554,91 +554,91 @@
(local.get $0)
)
)
- (func $i16x8.shl (; 96 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i16x8.shl (; 96 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i16x8.shl
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.shr_s (; 97 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i16x8.shr_s (; 97 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i16x8.shr_s
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.shr_u (; 98 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i16x8.shr_u (; 98 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i16x8.shr_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.add (; 99 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.add (; 99 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.add
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.add_saturate_s (; 100 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.add_saturate_s (; 100 ;) (type $0) (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 $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.add_saturate_u (; 101 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.add_saturate_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.sub (; 102 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.sub (; 102 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.sub
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.sub_saturate_s (; 103 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.sub_saturate_s (; 103 ;) (type $0) (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 $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.sub_saturate_u (; 104 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.sub_saturate_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.mul (; 105 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.mul (; 105 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.mul
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.min_s (; 106 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.min_s (; 106 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.min_s
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.min_u (; 107 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.min_u (; 107 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.min_u
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.max_s (; 108 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.max_s (; 108 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.max_s
(local.get $0)
(local.get $1)
)
)
- (func $i16x8.max_u (; 109 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.max_u (; 109 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.max_u
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.neg (; 110 ;) (type $14) (param $0 v128) (result v128)
+ (func $i32x4.neg (; 110 ;) (type $1) (param $0 v128) (result v128)
(i32x4.neg
(local.get $0)
)
@@ -653,73 +653,73 @@
(local.get $0)
)
)
- (func $i32x4.shl (; 113 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i32x4.shl (; 113 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i32x4.shl
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.shr_s (; 114 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i32x4.shr_s (; 114 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i32x4.shr_s
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.shr_u (; 115 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i32x4.shr_u (; 115 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i32x4.shr_u
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.add (; 116 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.add (; 116 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.add
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.sub (; 117 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.sub (; 117 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.sub
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.mul (; 118 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.mul (; 118 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.mul
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.min_s (; 119 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.min_s (; 119 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.min_s
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.min_u (; 120 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.min_u (; 120 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.min_u
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.max_s (; 121 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.max_s (; 121 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.max_s
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.max_u (; 122 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.max_u (; 122 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.max_u
(local.get $0)
(local.get $1)
)
)
- (func $i32x4.dot_i16x8_s (; 123 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i32x4.dot_i16x8_s (; 123 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.dot_i16x8_s
(local.get $0)
(local.get $1)
)
)
- (func $i64x2.neg (; 124 ;) (type $14) (param $0 v128) (result v128)
+ (func $i64x2.neg (; 124 ;) (type $1) (param $0 v128) (result v128)
(i64x2.neg
(local.get $0)
)
@@ -734,321 +734,321 @@
(local.get $0)
)
)
- (func $i64x2.shl (; 127 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i64x2.shl (; 127 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i64x2.shl
(local.get $0)
(local.get $1)
)
)
- (func $i64x2.shr_s (; 128 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i64x2.shr_s (; 128 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i64x2.shr_s
(local.get $0)
(local.get $1)
)
)
- (func $i64x2.shr_u (; 129 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $i64x2.shr_u (; 129 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i64x2.shr_u
(local.get $0)
(local.get $1)
)
)
- (func $i64x2.add (; 130 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i64x2.add (; 130 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i64x2.add
(local.get $0)
(local.get $1)
)
)
- (func $i64x2.sub (; 131 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i64x2.sub (; 131 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i64x2.sub
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.add (; 132 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.add (; 132 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.add
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.sub (; 133 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.sub (; 133 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.sub
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.mul (; 134 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.mul (; 134 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.mul
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.div (; 135 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.div (; 135 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.div
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.min (; 136 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.min (; 136 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.min
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.max (; 137 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f32x4.max (; 137 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.max
(local.get $0)
(local.get $1)
)
)
- (func $f32x4.abs (; 138 ;) (type $14) (param $0 v128) (result v128)
+ (func $f32x4.abs (; 138 ;) (type $1) (param $0 v128) (result v128)
(f32x4.abs
(local.get $0)
)
)
- (func $f32x4.neg (; 139 ;) (type $14) (param $0 v128) (result v128)
+ (func $f32x4.neg (; 139 ;) (type $1) (param $0 v128) (result v128)
(f32x4.neg
(local.get $0)
)
)
- (func $f32x4.sqrt (; 140 ;) (type $14) (param $0 v128) (result v128)
+ (func $f32x4.sqrt (; 140 ;) (type $1) (param $0 v128) (result v128)
(f32x4.sqrt
(local.get $0)
)
)
- (func $f32x4.qfma (; 141 ;) (type $15) (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $f32x4.qfma (; 141 ;) (type $6) (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 $15) (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $f32x4.qfms (; 142 ;) (type $6) (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 $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.add (; 143 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.add
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.sub (; 144 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.sub (; 144 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.sub
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.mul (; 145 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.mul (; 145 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.mul
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.div (; 146 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.div (; 146 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.div
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.min (; 147 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.min (; 147 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.min
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.max (; 148 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $f64x2.max (; 148 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.max
(local.get $0)
(local.get $1)
)
)
- (func $f64x2.abs (; 149 ;) (type $14) (param $0 v128) (result v128)
+ (func $f64x2.abs (; 149 ;) (type $1) (param $0 v128) (result v128)
(f64x2.abs
(local.get $0)
)
)
- (func $f64x2.neg (; 150 ;) (type $14) (param $0 v128) (result v128)
+ (func $f64x2.neg (; 150 ;) (type $1) (param $0 v128) (result v128)
(f64x2.neg
(local.get $0)
)
)
- (func $f64x2.sqrt (; 151 ;) (type $14) (param $0 v128) (result v128)
+ (func $f64x2.sqrt (; 151 ;) (type $1) (param $0 v128) (result v128)
(f64x2.sqrt
(local.get $0)
)
)
- (func $f64x2.qfma (; 152 ;) (type $15) (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $f64x2.qfma (; 152 ;) (type $6) (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 $15) (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $f64x2.qfms (; 153 ;) (type $6) (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 $14) (param $0 v128) (result v128)
+ (func $i32x4.trunc_sat_f32x4_s (; 154 ;) (type $1) (param $0 v128) (result v128)
(i32x4.trunc_sat_f32x4_s
(local.get $0)
)
)
- (func $i32x4.trunc_sat_f32x4_u (; 155 ;) (type $14) (param $0 v128) (result v128)
+ (func $i32x4.trunc_sat_f32x4_u (; 155 ;) (type $1) (param $0 v128) (result v128)
(i32x4.trunc_sat_f32x4_u
(local.get $0)
)
)
- (func $i64x2.trunc_sat_f64x2_s (; 156 ;) (type $14) (param $0 v128) (result v128)
+ (func $i64x2.trunc_sat_f64x2_s (; 156 ;) (type $1) (param $0 v128) (result v128)
(i64x2.trunc_sat_f64x2_s
(local.get $0)
)
)
- (func $i64x2.trunc_sat_f64x2_u (; 157 ;) (type $14) (param $0 v128) (result v128)
+ (func $i64x2.trunc_sat_f64x2_u (; 157 ;) (type $1) (param $0 v128) (result v128)
(i64x2.trunc_sat_f64x2_u
(local.get $0)
)
)
- (func $f32x4.convert_i32x4_s (; 158 ;) (type $14) (param $0 v128) (result v128)
+ (func $f32x4.convert_i32x4_s (; 158 ;) (type $1) (param $0 v128) (result v128)
(f32x4.convert_i32x4_s
(local.get $0)
)
)
- (func $f32x4.convert_i32x4_u (; 159 ;) (type $14) (param $0 v128) (result v128)
+ (func $f32x4.convert_i32x4_u (; 159 ;) (type $1) (param $0 v128) (result v128)
(f32x4.convert_i32x4_u
(local.get $0)
)
)
- (func $f64x2.convert_i64x2_s (; 160 ;) (type $14) (param $0 v128) (result v128)
+ (func $f64x2.convert_i64x2_s (; 160 ;) (type $1) (param $0 v128) (result v128)
(f64x2.convert_i64x2_s
(local.get $0)
)
)
- (func $f64x2.convert_i64x2_u (; 161 ;) (type $14) (param $0 v128) (result v128)
+ (func $f64x2.convert_i64x2_u (; 161 ;) (type $1) (param $0 v128) (result v128)
(f64x2.convert_i64x2_u
(local.get $0)
)
)
- (func $v8x16.load_splat (; 162 ;) (type $0) (param $0 i32) (result v128)
+ (func $v8x16.load_splat (; 162 ;) (type $3) (param $0 i32) (result v128)
(v8x16.load_splat
(local.get $0)
)
)
- (func $v16x8.load_splat (; 163 ;) (type $0) (param $0 i32) (result v128)
+ (func $v16x8.load_splat (; 163 ;) (type $3) (param $0 i32) (result v128)
(v16x8.load_splat
(local.get $0)
)
)
- (func $v32x4.load_splat (; 164 ;) (type $0) (param $0 i32) (result v128)
+ (func $v32x4.load_splat (; 164 ;) (type $3) (param $0 i32) (result v128)
(v32x4.load_splat
(local.get $0)
)
)
- (func $v64x2.load_splat (; 165 ;) (type $0) (param $0 i32) (result v128)
+ (func $v64x2.load_splat (; 165 ;) (type $3) (param $0 i32) (result v128)
(v64x2.load_splat
(local.get $0)
)
)
- (func $i8x16.narrow_i16x8_s (; 166 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.narrow_i16x8_s (; 166 ;) (type $0) (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 $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i8x16.narrow_i16x8_u (; 167 ;) (type $0) (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 $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.narrow_i32x4_s (; 168 ;) (type $0) (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 $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $i16x8.narrow_i32x4_u (; 169 ;) (type $0) (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 $14) (param $0 v128) (result v128)
+ (func $i16x8.widen_low_i8x16_s (; 170 ;) (type $1) (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_s
(local.get $0)
)
)
- (func $i16x8.widen_high_i8x16_s (; 171 ;) (type $14) (param $0 v128) (result v128)
+ (func $i16x8.widen_high_i8x16_s (; 171 ;) (type $1) (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_s
(local.get $0)
)
)
- (func $i16x8.widen_low_i8x16_u (; 172 ;) (type $14) (param $0 v128) (result v128)
+ (func $i16x8.widen_low_i8x16_u (; 172 ;) (type $1) (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_u
(local.get $0)
)
)
- (func $i16x8.widen_high_i8x16_u (; 173 ;) (type $14) (param $0 v128) (result v128)
+ (func $i16x8.widen_high_i8x16_u (; 173 ;) (type $1) (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_u
(local.get $0)
)
)
- (func $i32x4.widen_low_i16x8_s (; 174 ;) (type $14) (param $0 v128) (result v128)
+ (func $i32x4.widen_low_i16x8_s (; 174 ;) (type $1) (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_s
(local.get $0)
)
)
- (func $i32x4.widen_high_i16x8_s (; 175 ;) (type $14) (param $0 v128) (result v128)
+ (func $i32x4.widen_high_i16x8_s (; 175 ;) (type $1) (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_s
(local.get $0)
)
)
- (func $i32x4.widen_low_i16x8_u (; 176 ;) (type $14) (param $0 v128) (result v128)
+ (func $i32x4.widen_low_i16x8_u (; 176 ;) (type $1) (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_u
(local.get $0)
)
)
- (func $i32x4.widen_high_i16x8_u (; 177 ;) (type $14) (param $0 v128) (result v128)
+ (func $i32x4.widen_high_i16x8_u (; 177 ;) (type $1) (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_u
(local.get $0)
)
)
- (func $i16x8.load8x8_u (; 178 ;) (type $0) (param $0 i32) (result v128)
+ (func $i16x8.load8x8_u (; 178 ;) (type $3) (param $0 i32) (result v128)
(i16x8.load8x8_u
(local.get $0)
)
)
- (func $i16x8.load8x8_s (; 179 ;) (type $0) (param $0 i32) (result v128)
+ (func $i16x8.load8x8_s (; 179 ;) (type $3) (param $0 i32) (result v128)
(i16x8.load8x8_s
(local.get $0)
)
)
- (func $i32x4.load16x4_s (; 180 ;) (type $0) (param $0 i32) (result v128)
+ (func $i32x4.load16x4_s (; 180 ;) (type $3) (param $0 i32) (result v128)
(i32x4.load16x4_s
(local.get $0)
)
)
- (func $i32x4.load16x4_u (; 181 ;) (type $0) (param $0 i32) (result v128)
+ (func $i32x4.load16x4_u (; 181 ;) (type $3) (param $0 i32) (result v128)
(i32x4.load16x4_u
(local.get $0)
)
)
- (func $i64x2.load32x2_s (; 182 ;) (type $0) (param $0 i32) (result v128)
+ (func $i64x2.load32x2_s (; 182 ;) (type $3) (param $0 i32) (result v128)
(i64x2.load32x2_s
(local.get $0)
)
)
- (func $i64x2.load32x2_u (; 183 ;) (type $0) (param $0 i32) (result v128)
+ (func $i64x2.load32x2_u (; 183 ;) (type $3) (param $0 i32) (result v128)
(i64x2.load32x2_u
(local.get $0)
)
)
- (func $v8x16.swizzle (; 184 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $v8x16.swizzle (; 184 ;) (type $0) (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 3cacec11d..d4315cc62 100644
--- a/test/simd.wast.fromBinary.noDebugInfo
+++ b/test/simd.wast.fromBinary.noDebugInfo
@@ -1,57 +1,57 @@
(module
- (type $0 (func (param i32) (result v128)))
- (type $1 (func (param i32 v128)))
- (type $2 (func (result v128)))
- (type $3 (func (param v128 v128) (result v128)))
+ (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 (param v128 i32) (result v128)))
- (type $6 (func (param v128) (result i64)))
- (type $7 (func (param v128 i64) (result v128)))
- (type $8 (func (param f32) (result v128)))
+ (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 f32) (result v128)))
- (type $11 (func (param f64) (result v128)))
- (type $12 (func (param v128) (result f64)))
- (type $13 (func (param v128 f64) (result v128)))
- (type $14 (func (param v128) (result v128)))
- (type $15 (func (param v128 v128 v128) (result v128)))
+ (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)))
(memory $0 1 1)
- (func $0 (; 0 ;) (type $0) (param $0 i32) (result v128)
+ (func $0 (; 0 ;) (type $3) (param $0 i32) (result v128)
(v128.load
(local.get $0)
)
)
- (func $1 (; 1 ;) (type $1) (param $0 i32) (param $1 v128)
+ (func $1 (; 1 ;) (type $7) (param $0 i32) (param $1 v128)
(v128.store
(local.get $0)
(local.get $1)
)
)
- (func $2 (; 2 ;) (type $2) (result v128)
+ (func $2 (; 2 ;) (type $5) (result v128)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
)
- (func $3 (; 3 ;) (type $2) (result v128)
+ (func $3 (; 3 ;) (type $5) (result v128)
(v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00080007)
)
- (func $4 (; 4 ;) (type $2) (result v128)
+ (func $4 (; 4 ;) (type $5) (result v128)
(v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004)
)
- (func $5 (; 5 ;) (type $2) (result v128)
+ (func $5 (; 5 ;) (type $5) (result v128)
(v128.const i32x4 0x00000001 0x00000000 0x00000002 0x00000000)
)
- (func $6 (; 6 ;) (type $2) (result v128)
+ (func $6 (; 6 ;) (type $5) (result v128)
(v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000)
)
- (func $7 (; 7 ;) (type $2) (result v128)
+ (func $7 (; 7 ;) (type $5) (result v128)
(v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000)
)
- (func $8 (; 8 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $8 (; 8 ;) (type $0) (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 $0) (param $0 i32) (result v128)
+ (func $9 (; 9 ;) (type $3) (param $0 i32) (result v128)
(i8x16.splat
(local.get $0)
)
@@ -66,13 +66,13 @@
(local.get $0)
)
)
- (func $12 (; 12 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $12 (; 12 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i8x16.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $13 (; 13 ;) (type $0) (param $0 i32) (result v128)
+ (func $13 (; 13 ;) (type $3) (param $0 i32) (result v128)
(i16x8.splat
(local.get $0)
)
@@ -87,13 +87,13 @@
(local.get $0)
)
)
- (func $16 (; 16 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $16 (; 16 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i16x8.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $17 (; 17 ;) (type $0) (param $0 i32) (result v128)
+ (func $17 (; 17 ;) (type $3) (param $0 i32) (result v128)
(i32x4.splat
(local.get $0)
)
@@ -103,24 +103,24 @@
(local.get $0)
)
)
- (func $19 (; 19 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $19 (; 19 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i32x4.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $20 (; 20 ;) (type $6) (param $0 v128) (result i64)
+ (func $20 (; 20 ;) (type $8) (param $0 v128) (result i64)
(i64x2.extract_lane 0
(local.get $0)
)
)
- (func $21 (; 21 ;) (type $7) (param $0 v128) (param $1 i64) (result v128)
+ (func $21 (; 21 ;) (type $13) (param $0 v128) (param $1 i64) (result v128)
(i64x2.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $22 (; 22 ;) (type $8) (param $0 f32) (result v128)
+ (func $22 (; 22 ;) (type $11) (param $0 f32) (result v128)
(f32x4.splat
(local.get $0)
)
@@ -130,317 +130,317 @@
(local.get $0)
)
)
- (func $24 (; 24 ;) (type $10) (param $0 v128) (param $1 f32) (result v128)
+ (func $24 (; 24 ;) (type $14) (param $0 v128) (param $1 f32) (result v128)
(f32x4.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $25 (; 25 ;) (type $11) (param $0 f64) (result v128)
+ (func $25 (; 25 ;) (type $12) (param $0 f64) (result v128)
(f64x2.splat
(local.get $0)
)
)
- (func $26 (; 26 ;) (type $12) (param $0 v128) (result f64)
+ (func $26 (; 26 ;) (type $10) (param $0 v128) (result f64)
(f64x2.extract_lane 0
(local.get $0)
)
)
- (func $27 (; 27 ;) (type $13) (param $0 v128) (param $1 f64) (result v128)
+ (func $27 (; 27 ;) (type $15) (param $0 v128) (param $1 f64) (result v128)
(f64x2.replace_lane 0
(local.get $0)
(local.get $1)
)
)
- (func $28 (; 28 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $28 (; 28 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.eq
(local.get $0)
(local.get $1)
)
)
- (func $29 (; 29 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $29 (; 29 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.ne
(local.get $0)
(local.get $1)
)
)
- (func $30 (; 30 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $30 (; 30 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.lt_s
(local.get $0)
(local.get $1)
)
)
- (func $31 (; 31 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $31 (; 31 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.lt_u
(local.get $0)
(local.get $1)
)
)
- (func $32 (; 32 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $32 (; 32 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.gt_s
(local.get $0)
(local.get $1)
)
)
- (func $33 (; 33 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $33 (; 33 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.gt_u
(local.get $0)
(local.get $1)
)
)
- (func $34 (; 34 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $34 (; 34 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.le_s
(local.get $0)
(local.get $1)
)
)
- (func $35 (; 35 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $35 (; 35 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.le_u
(local.get $0)
(local.get $1)
)
)
- (func $36 (; 36 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $36 (; 36 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.ge_s
(local.get $0)
(local.get $1)
)
)
- (func $37 (; 37 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $37 (; 37 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.ge_u
(local.get $0)
(local.get $1)
)
)
- (func $38 (; 38 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $38 (; 38 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.eq
(local.get $0)
(local.get $1)
)
)
- (func $39 (; 39 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $39 (; 39 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.ne
(local.get $0)
(local.get $1)
)
)
- (func $40 (; 40 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $40 (; 40 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.lt_s
(local.get $0)
(local.get $1)
)
)
- (func $41 (; 41 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $41 (; 41 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.lt_u
(local.get $0)
(local.get $1)
)
)
- (func $42 (; 42 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $42 (; 42 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.gt_s
(local.get $0)
(local.get $1)
)
)
- (func $43 (; 43 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $43 (; 43 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.gt_u
(local.get $0)
(local.get $1)
)
)
- (func $44 (; 44 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $44 (; 44 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.le_s
(local.get $0)
(local.get $1)
)
)
- (func $45 (; 45 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $45 (; 45 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.le_u
(local.get $0)
(local.get $1)
)
)
- (func $46 (; 46 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $46 (; 46 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.ge_s
(local.get $0)
(local.get $1)
)
)
- (func $47 (; 47 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $47 (; 47 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.ge_u
(local.get $0)
(local.get $1)
)
)
- (func $48 (; 48 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $48 (; 48 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.eq
(local.get $0)
(local.get $1)
)
)
- (func $49 (; 49 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $49 (; 49 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.ne
(local.get $0)
(local.get $1)
)
)
- (func $50 (; 50 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $50 (; 50 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.lt_s
(local.get $0)
(local.get $1)
)
)
- (func $51 (; 51 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $51 (; 51 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.lt_u
(local.get $0)
(local.get $1)
)
)
- (func $52 (; 52 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $52 (; 52 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.gt_s
(local.get $0)
(local.get $1)
)
)
- (func $53 (; 53 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $53 (; 53 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.gt_u
(local.get $0)
(local.get $1)
)
)
- (func $54 (; 54 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $54 (; 54 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.le_s
(local.get $0)
(local.get $1)
)
)
- (func $55 (; 55 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $55 (; 55 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.le_u
(local.get $0)
(local.get $1)
)
)
- (func $56 (; 56 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $56 (; 56 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.ge_s
(local.get $0)
(local.get $1)
)
)
- (func $57 (; 57 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $57 (; 57 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.ge_u
(local.get $0)
(local.get $1)
)
)
- (func $58 (; 58 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $58 (; 58 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.eq
(local.get $0)
(local.get $1)
)
)
- (func $59 (; 59 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $59 (; 59 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.ne
(local.get $0)
(local.get $1)
)
)
- (func $60 (; 60 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $60 (; 60 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.lt
(local.get $0)
(local.get $1)
)
)
- (func $61 (; 61 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $61 (; 61 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.gt
(local.get $0)
(local.get $1)
)
)
- (func $62 (; 62 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $62 (; 62 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.le
(local.get $0)
(local.get $1)
)
)
- (func $63 (; 63 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $63 (; 63 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.ge
(local.get $0)
(local.get $1)
)
)
- (func $64 (; 64 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $64 (; 64 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.eq
(local.get $0)
(local.get $1)
)
)
- (func $65 (; 65 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $65 (; 65 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.ne
(local.get $0)
(local.get $1)
)
)
- (func $66 (; 66 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $66 (; 66 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.lt
(local.get $0)
(local.get $1)
)
)
- (func $67 (; 67 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $67 (; 67 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.gt
(local.get $0)
(local.get $1)
)
)
- (func $68 (; 68 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $68 (; 68 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.le
(local.get $0)
(local.get $1)
)
)
- (func $69 (; 69 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $69 (; 69 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.ge
(local.get $0)
(local.get $1)
)
)
- (func $70 (; 70 ;) (type $14) (param $0 v128) (result v128)
+ (func $70 (; 70 ;) (type $1) (param $0 v128) (result v128)
(v128.not
(local.get $0)
)
)
- (func $71 (; 71 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $71 (; 71 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(v128.and
(local.get $0)
(local.get $1)
)
)
- (func $72 (; 72 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $72 (; 72 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(v128.or
(local.get $0)
(local.get $1)
)
)
- (func $73 (; 73 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $73 (; 73 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(v128.xor
(local.get $0)
(local.get $1)
)
)
- (func $74 (; 74 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $74 (; 74 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(v128.andnot
(local.get $0)
(local.get $1)
)
)
- (func $75 (; 75 ;) (type $15) (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $75 (; 75 ;) (type $6) (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 $14) (param $0 v128) (result v128)
+ (func $76 (; 76 ;) (type $1) (param $0 v128) (result v128)
(i8x16.neg
(local.get $0)
)
@@ -455,91 +455,91 @@
(local.get $0)
)
)
- (func $79 (; 79 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $79 (; 79 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i8x16.shl
(local.get $0)
(local.get $1)
)
)
- (func $80 (; 80 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $80 (; 80 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i8x16.shr_s
(local.get $0)
(local.get $1)
)
)
- (func $81 (; 81 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $81 (; 81 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i8x16.shr_u
(local.get $0)
(local.get $1)
)
)
- (func $82 (; 82 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $82 (; 82 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.add
(local.get $0)
(local.get $1)
)
)
- (func $83 (; 83 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $83 (; 83 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.add_saturate_s
(local.get $0)
(local.get $1)
)
)
- (func $84 (; 84 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $84 (; 84 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.add_saturate_u
(local.get $0)
(local.get $1)
)
)
- (func $85 (; 85 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $85 (; 85 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.sub
(local.get $0)
(local.get $1)
)
)
- (func $86 (; 86 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $86 (; 86 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.sub_saturate_s
(local.get $0)
(local.get $1)
)
)
- (func $87 (; 87 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $87 (; 87 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.sub_saturate_u
(local.get $0)
(local.get $1)
)
)
- (func $88 (; 88 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $88 (; 88 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.mul
(local.get $0)
(local.get $1)
)
)
- (func $89 (; 89 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $89 (; 89 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.min_s
(local.get $0)
(local.get $1)
)
)
- (func $90 (; 90 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $90 (; 90 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.min_u
(local.get $0)
(local.get $1)
)
)
- (func $91 (; 91 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $91 (; 91 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.max_s
(local.get $0)
(local.get $1)
)
)
- (func $92 (; 92 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $92 (; 92 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.max_u
(local.get $0)
(local.get $1)
)
)
- (func $93 (; 93 ;) (type $14) (param $0 v128) (result v128)
+ (func $93 (; 93 ;) (type $1) (param $0 v128) (result v128)
(i16x8.neg
(local.get $0)
)
@@ -554,91 +554,91 @@
(local.get $0)
)
)
- (func $96 (; 96 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $96 (; 96 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i16x8.shl
(local.get $0)
(local.get $1)
)
)
- (func $97 (; 97 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $97 (; 97 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i16x8.shr_s
(local.get $0)
(local.get $1)
)
)
- (func $98 (; 98 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $98 (; 98 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i16x8.shr_u
(local.get $0)
(local.get $1)
)
)
- (func $99 (; 99 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $99 (; 99 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.add
(local.get $0)
(local.get $1)
)
)
- (func $100 (; 100 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $100 (; 100 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.add_saturate_s
(local.get $0)
(local.get $1)
)
)
- (func $101 (; 101 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $101 (; 101 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.add_saturate_u
(local.get $0)
(local.get $1)
)
)
- (func $102 (; 102 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $102 (; 102 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.sub
(local.get $0)
(local.get $1)
)
)
- (func $103 (; 103 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $103 (; 103 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.sub_saturate_s
(local.get $0)
(local.get $1)
)
)
- (func $104 (; 104 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $104 (; 104 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.sub_saturate_u
(local.get $0)
(local.get $1)
)
)
- (func $105 (; 105 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $105 (; 105 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.mul
(local.get $0)
(local.get $1)
)
)
- (func $106 (; 106 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $106 (; 106 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.min_s
(local.get $0)
(local.get $1)
)
)
- (func $107 (; 107 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $107 (; 107 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.min_u
(local.get $0)
(local.get $1)
)
)
- (func $108 (; 108 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $108 (; 108 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.max_s
(local.get $0)
(local.get $1)
)
)
- (func $109 (; 109 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $109 (; 109 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.max_u
(local.get $0)
(local.get $1)
)
)
- (func $110 (; 110 ;) (type $14) (param $0 v128) (result v128)
+ (func $110 (; 110 ;) (type $1) (param $0 v128) (result v128)
(i32x4.neg
(local.get $0)
)
@@ -653,73 +653,73 @@
(local.get $0)
)
)
- (func $113 (; 113 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $113 (; 113 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i32x4.shl
(local.get $0)
(local.get $1)
)
)
- (func $114 (; 114 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $114 (; 114 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i32x4.shr_s
(local.get $0)
(local.get $1)
)
)
- (func $115 (; 115 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $115 (; 115 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i32x4.shr_u
(local.get $0)
(local.get $1)
)
)
- (func $116 (; 116 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $116 (; 116 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.add
(local.get $0)
(local.get $1)
)
)
- (func $117 (; 117 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $117 (; 117 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.sub
(local.get $0)
(local.get $1)
)
)
- (func $118 (; 118 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $118 (; 118 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.mul
(local.get $0)
(local.get $1)
)
)
- (func $119 (; 119 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $119 (; 119 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.min_s
(local.get $0)
(local.get $1)
)
)
- (func $120 (; 120 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $120 (; 120 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.min_u
(local.get $0)
(local.get $1)
)
)
- (func $121 (; 121 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $121 (; 121 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.max_s
(local.get $0)
(local.get $1)
)
)
- (func $122 (; 122 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $122 (; 122 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.max_u
(local.get $0)
(local.get $1)
)
)
- (func $123 (; 123 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $123 (; 123 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i32x4.dot_i16x8_s
(local.get $0)
(local.get $1)
)
)
- (func $124 (; 124 ;) (type $14) (param $0 v128) (result v128)
+ (func $124 (; 124 ;) (type $1) (param $0 v128) (result v128)
(i64x2.neg
(local.get $0)
)
@@ -734,321 +734,321 @@
(local.get $0)
)
)
- (func $127 (; 127 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $127 (; 127 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i64x2.shl
(local.get $0)
(local.get $1)
)
)
- (func $128 (; 128 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $128 (; 128 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i64x2.shr_s
(local.get $0)
(local.get $1)
)
)
- (func $129 (; 129 ;) (type $5) (param $0 v128) (param $1 i32) (result v128)
+ (func $129 (; 129 ;) (type $2) (param $0 v128) (param $1 i32) (result v128)
(i64x2.shr_u
(local.get $0)
(local.get $1)
)
)
- (func $130 (; 130 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $130 (; 130 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i64x2.add
(local.get $0)
(local.get $1)
)
)
- (func $131 (; 131 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $131 (; 131 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i64x2.sub
(local.get $0)
(local.get $1)
)
)
- (func $132 (; 132 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $132 (; 132 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.add
(local.get $0)
(local.get $1)
)
)
- (func $133 (; 133 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $133 (; 133 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.sub
(local.get $0)
(local.get $1)
)
)
- (func $134 (; 134 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $134 (; 134 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.mul
(local.get $0)
(local.get $1)
)
)
- (func $135 (; 135 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $135 (; 135 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.div
(local.get $0)
(local.get $1)
)
)
- (func $136 (; 136 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $136 (; 136 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.min
(local.get $0)
(local.get $1)
)
)
- (func $137 (; 137 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $137 (; 137 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f32x4.max
(local.get $0)
(local.get $1)
)
)
- (func $138 (; 138 ;) (type $14) (param $0 v128) (result v128)
+ (func $138 (; 138 ;) (type $1) (param $0 v128) (result v128)
(f32x4.abs
(local.get $0)
)
)
- (func $139 (; 139 ;) (type $14) (param $0 v128) (result v128)
+ (func $139 (; 139 ;) (type $1) (param $0 v128) (result v128)
(f32x4.neg
(local.get $0)
)
)
- (func $140 (; 140 ;) (type $14) (param $0 v128) (result v128)
+ (func $140 (; 140 ;) (type $1) (param $0 v128) (result v128)
(f32x4.sqrt
(local.get $0)
)
)
- (func $141 (; 141 ;) (type $15) (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $141 (; 141 ;) (type $6) (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 $15) (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $142 (; 142 ;) (type $6) (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 $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $143 (; 143 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.add
(local.get $0)
(local.get $1)
)
)
- (func $144 (; 144 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $144 (; 144 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.sub
(local.get $0)
(local.get $1)
)
)
- (func $145 (; 145 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $145 (; 145 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.mul
(local.get $0)
(local.get $1)
)
)
- (func $146 (; 146 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $146 (; 146 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.div
(local.get $0)
(local.get $1)
)
)
- (func $147 (; 147 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $147 (; 147 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.min
(local.get $0)
(local.get $1)
)
)
- (func $148 (; 148 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $148 (; 148 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(f64x2.max
(local.get $0)
(local.get $1)
)
)
- (func $149 (; 149 ;) (type $14) (param $0 v128) (result v128)
+ (func $149 (; 149 ;) (type $1) (param $0 v128) (result v128)
(f64x2.abs
(local.get $0)
)
)
- (func $150 (; 150 ;) (type $14) (param $0 v128) (result v128)
+ (func $150 (; 150 ;) (type $1) (param $0 v128) (result v128)
(f64x2.neg
(local.get $0)
)
)
- (func $151 (; 151 ;) (type $14) (param $0 v128) (result v128)
+ (func $151 (; 151 ;) (type $1) (param $0 v128) (result v128)
(f64x2.sqrt
(local.get $0)
)
)
- (func $152 (; 152 ;) (type $15) (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $152 (; 152 ;) (type $6) (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 $15) (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $153 (; 153 ;) (type $6) (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 $14) (param $0 v128) (result v128)
+ (func $154 (; 154 ;) (type $1) (param $0 v128) (result v128)
(i32x4.trunc_sat_f32x4_s
(local.get $0)
)
)
- (func $155 (; 155 ;) (type $14) (param $0 v128) (result v128)
+ (func $155 (; 155 ;) (type $1) (param $0 v128) (result v128)
(i32x4.trunc_sat_f32x4_u
(local.get $0)
)
)
- (func $156 (; 156 ;) (type $14) (param $0 v128) (result v128)
+ (func $156 (; 156 ;) (type $1) (param $0 v128) (result v128)
(i64x2.trunc_sat_f64x2_s
(local.get $0)
)
)
- (func $157 (; 157 ;) (type $14) (param $0 v128) (result v128)
+ (func $157 (; 157 ;) (type $1) (param $0 v128) (result v128)
(i64x2.trunc_sat_f64x2_u
(local.get $0)
)
)
- (func $158 (; 158 ;) (type $14) (param $0 v128) (result v128)
+ (func $158 (; 158 ;) (type $1) (param $0 v128) (result v128)
(f32x4.convert_i32x4_s
(local.get $0)
)
)
- (func $159 (; 159 ;) (type $14) (param $0 v128) (result v128)
+ (func $159 (; 159 ;) (type $1) (param $0 v128) (result v128)
(f32x4.convert_i32x4_u
(local.get $0)
)
)
- (func $160 (; 160 ;) (type $14) (param $0 v128) (result v128)
+ (func $160 (; 160 ;) (type $1) (param $0 v128) (result v128)
(f64x2.convert_i64x2_s
(local.get $0)
)
)
- (func $161 (; 161 ;) (type $14) (param $0 v128) (result v128)
+ (func $161 (; 161 ;) (type $1) (param $0 v128) (result v128)
(f64x2.convert_i64x2_u
(local.get $0)
)
)
- (func $162 (; 162 ;) (type $0) (param $0 i32) (result v128)
+ (func $162 (; 162 ;) (type $3) (param $0 i32) (result v128)
(v8x16.load_splat
(local.get $0)
)
)
- (func $163 (; 163 ;) (type $0) (param $0 i32) (result v128)
+ (func $163 (; 163 ;) (type $3) (param $0 i32) (result v128)
(v16x8.load_splat
(local.get $0)
)
)
- (func $164 (; 164 ;) (type $0) (param $0 i32) (result v128)
+ (func $164 (; 164 ;) (type $3) (param $0 i32) (result v128)
(v32x4.load_splat
(local.get $0)
)
)
- (func $165 (; 165 ;) (type $0) (param $0 i32) (result v128)
+ (func $165 (; 165 ;) (type $3) (param $0 i32) (result v128)
(v64x2.load_splat
(local.get $0)
)
)
- (func $166 (; 166 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $166 (; 166 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.narrow_i16x8_s
(local.get $0)
(local.get $1)
)
)
- (func $167 (; 167 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $167 (; 167 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i8x16.narrow_i16x8_u
(local.get $0)
(local.get $1)
)
)
- (func $168 (; 168 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $168 (; 168 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.narrow_i32x4_s
(local.get $0)
(local.get $1)
)
)
- (func $169 (; 169 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $169 (; 169 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(i16x8.narrow_i32x4_u
(local.get $0)
(local.get $1)
)
)
- (func $170 (; 170 ;) (type $14) (param $0 v128) (result v128)
+ (func $170 (; 170 ;) (type $1) (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_s
(local.get $0)
)
)
- (func $171 (; 171 ;) (type $14) (param $0 v128) (result v128)
+ (func $171 (; 171 ;) (type $1) (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_s
(local.get $0)
)
)
- (func $172 (; 172 ;) (type $14) (param $0 v128) (result v128)
+ (func $172 (; 172 ;) (type $1) (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_u
(local.get $0)
)
)
- (func $173 (; 173 ;) (type $14) (param $0 v128) (result v128)
+ (func $173 (; 173 ;) (type $1) (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_u
(local.get $0)
)
)
- (func $174 (; 174 ;) (type $14) (param $0 v128) (result v128)
+ (func $174 (; 174 ;) (type $1) (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_s
(local.get $0)
)
)
- (func $175 (; 175 ;) (type $14) (param $0 v128) (result v128)
+ (func $175 (; 175 ;) (type $1) (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_s
(local.get $0)
)
)
- (func $176 (; 176 ;) (type $14) (param $0 v128) (result v128)
+ (func $176 (; 176 ;) (type $1) (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_u
(local.get $0)
)
)
- (func $177 (; 177 ;) (type $14) (param $0 v128) (result v128)
+ (func $177 (; 177 ;) (type $1) (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_u
(local.get $0)
)
)
- (func $178 (; 178 ;) (type $0) (param $0 i32) (result v128)
+ (func $178 (; 178 ;) (type $3) (param $0 i32) (result v128)
(i16x8.load8x8_u
(local.get $0)
)
)
- (func $179 (; 179 ;) (type $0) (param $0 i32) (result v128)
+ (func $179 (; 179 ;) (type $3) (param $0 i32) (result v128)
(i16x8.load8x8_s
(local.get $0)
)
)
- (func $180 (; 180 ;) (type $0) (param $0 i32) (result v128)
+ (func $180 (; 180 ;) (type $3) (param $0 i32) (result v128)
(i32x4.load16x4_s
(local.get $0)
)
)
- (func $181 (; 181 ;) (type $0) (param $0 i32) (result v128)
+ (func $181 (; 181 ;) (type $3) (param $0 i32) (result v128)
(i32x4.load16x4_u
(local.get $0)
)
)
- (func $182 (; 182 ;) (type $0) (param $0 i32) (result v128)
+ (func $182 (; 182 ;) (type $3) (param $0 i32) (result v128)
(i64x2.load32x2_s
(local.get $0)
)
)
- (func $183 (; 183 ;) (type $0) (param $0 i32) (result v128)
+ (func $183 (; 183 ;) (type $3) (param $0 i32) (result v128)
(i64x2.load32x2_u
(local.get $0)
)
)
- (func $184 (; 184 ;) (type $3) (param $0 v128) (param $1 v128) (result v128)
+ (func $184 (; 184 ;) (type $0) (param $0 v128) (param $1 v128) (result v128)
(v8x16.swizzle
(local.get $0)
(local.get $1)
diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary
index 9dce93afa..d999ca394 100644
--- a/test/unit.wast.fromBinary
+++ b/test/unit.wast.fromBinary
@@ -1,14 +1,14 @@
(module
- (type $0 (func (param f32)))
+ (type $0 (func (result i32)))
(type $1 (func))
- (type $2 (func (param f64) (result i32)))
- (type $3 (func (param f64 f64) (result f64)))
- (type $4 (func (result f64)))
- (type $5 (func (result i32)))
+ (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 f64)))
+ (type $7 (func (param f64) (result i32)))
(type $8 (func (result i64)))
- (type $9 (func (param i32 i64)))
+ (type $9 (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)))
@@ -35,7 +35,7 @@
(f64.const -0.039625)
)
)
- (func $importedDoubles (; 4 ;) (type $4) (result f64)
+ (func $importedDoubles (; 4 ;) (type $3) (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 $3) (param $0 f64) (param $1 f64) (result f64)
+ (func $doubleCompares (; 5 ;) (type $4) (param $0 f64) (param $1 f64) (result f64)
(local $2 i32)
(local $3 f64)
(local $4 f64)
@@ -131,7 +131,7 @@
(local.get $1)
)
)
- (func $intOps (; 6 ;) (type $5) (result i32)
+ (func $intOps (; 6 ;) (type $0) (result i32)
(local $0 i32)
(i32.eq
(local.get $0)
@@ -273,13 +273,13 @@
(br $label$1)
)
)
- (func $frem (; 12 ;) (type $4) (result f64)
+ (func $frem (; 12 ;) (type $3) (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 ;) (type $0) (result i32)
(local $0 i32)
(local.set $0
(i32.and
@@ -292,7 +292,7 @@
)
(local.get $0)
)
- (func $fr (; 14 ;) (type $0) (param $0 f32)
+ (func $fr (; 14 ;) (type $2) (param $0 f32)
(local $1 f32)
(local $2 f64)
(drop
@@ -316,7 +316,7 @@
(f32.const 0)
)
)
- (func $negZero (; 15 ;) (type $4) (result f64)
+ (func $negZero (; 15 ;) (type $3) (result f64)
(f64.const -0)
)
(func $abs (; 16 ;) (type $1)
@@ -360,7 +360,7 @@
(local.get $0)
)
)
- (call_indirect (type $0)
+ (call_indirect (type $2)
(local.get $0)
(i32.add
(i32.and
@@ -371,8 +371,8 @@
)
)
)
- (func $cneg (; 18 ;) (type $0) (param $0 f32)
- (call_indirect (type $0)
+ (func $cneg (; 18 ;) (type $2) (param $0 f32)
+ (call_indirect (type $2)
(local.get $0)
(i32.add
(i32.and
@@ -401,7 +401,7 @@
(func $w (; 21 ;) (type $1)
(nop)
)
- (func $block_and_after (; 22 ;) (type $5) (result i32)
+ (func $block_and_after (; 22 ;) (type $0) (result i32)
(block $label$1
(drop
(i32.const 1)
@@ -410,7 +410,7 @@
)
(i32.const 0)
)
- (func $loop-roundtrip (; 23 ;) (type $7) (param $0 f64) (result f64)
+ (func $loop-roundtrip (; 23 ;) (type $9) (param $0 f64) (result f64)
(loop $label$1 (result f64)
(drop
(local.get $0)
@@ -421,18 +421,18 @@
(func $big-i64 (; 24 ;) (type $8) (result i64)
(i64.const -9218868437227405313)
)
- (func $i64-store32 (; 25 ;) (type $9) (param $0 i32) (param $1 i64)
+ (func $i64-store32 (; 25 ;) (type $5) (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 ;) (type $0) (result i32)
(return
(i32.const 1)
)
)
- (func $unreachable-block (; 27 ;) (type $5) (result i32)
+ (func $unreachable-block (; 27 ;) (type $0) (result i32)
(block $label$1
(drop
(i32.const 1)
@@ -442,7 +442,7 @@
)
)
)
- (func $unreachable-block-toplevel (; 28 ;) (type $5) (result i32)
+ (func $unreachable-block-toplevel (; 28 ;) (type $0) (result i32)
(drop
(i32.const 1)
)
@@ -450,19 +450,19 @@
(i32.const 2)
)
)
- (func $unreachable-block0 (; 29 ;) (type $5) (result i32)
+ (func $unreachable-block0 (; 29 ;) (type $0) (result i32)
(block $label$1
(return
(i32.const 2)
)
)
)
- (func $unreachable-block0-toplevel (; 30 ;) (type $5) (result i32)
+ (func $unreachable-block0-toplevel (; 30 ;) (type $0) (result i32)
(return
(i32.const 2)
)
)
- (func $unreachable-block-with-br (; 31 ;) (type $5) (result i32)
+ (func $unreachable-block-with-br (; 31 ;) (type $0) (result i32)
(block $label$1
(drop
(i32.const 1)
@@ -471,7 +471,7 @@
)
(i32.const 1)
)
- (func $unreachable-if (; 32 ;) (type $5) (result i32)
+ (func $unreachable-if (; 32 ;) (type $0) (result i32)
(if
(i32.const 3)
(return
@@ -482,7 +482,7 @@
)
)
)
- (func $unreachable-if-toplevel (; 33 ;) (type $5) (result i32)
+ (func $unreachable-if-toplevel (; 33 ;) (type $0) (result i32)
(if
(i32.const 3)
(return
@@ -493,7 +493,7 @@
)
)
)
- (func $unreachable-loop (; 34 ;) (type $5) (result i32)
+ (func $unreachable-loop (; 34 ;) (type $0) (result i32)
(loop $label$1
(nop)
(return
@@ -501,14 +501,14 @@
)
)
)
- (func $unreachable-loop0 (; 35 ;) (type $5) (result i32)
+ (func $unreachable-loop0 (; 35 ;) (type $0) (result i32)
(loop $label$1
(return
(i32.const 1)
)
)
)
- (func $unreachable-loop-toplevel (; 36 ;) (type $5) (result i32)
+ (func $unreachable-loop-toplevel (; 36 ;) (type $0) (result i32)
(loop $label$1
(nop)
(return
@@ -516,7 +516,7 @@
)
)
)
- (func $unreachable-loop0-toplevel (; 37 ;) (type $5) (result i32)
+ (func $unreachable-loop0-toplevel (; 37 ;) (type $0) (result i32)
(loop $label$1
(return
(i32.const 1)
diff --git a/test/unit.wast.fromBinary.noDebugInfo b/test/unit.wast.fromBinary.noDebugInfo
index 0d6109f80..ebbb44386 100644
--- a/test/unit.wast.fromBinary.noDebugInfo
+++ b/test/unit.wast.fromBinary.noDebugInfo
@@ -1,14 +1,14 @@
(module
- (type $0 (func (param f32)))
+ (type $0 (func (result i32)))
(type $1 (func))
- (type $2 (func (param f64) (result i32)))
- (type $3 (func (param f64 f64) (result f64)))
- (type $4 (func (result f64)))
- (type $5 (func (result i32)))
+ (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 f64)))
+ (type $7 (func (param f64) (result i32)))
(type $8 (func (result i64)))
- (type $9 (func (param i32 i64)))
+ (type $9 (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)))
@@ -35,7 +35,7 @@
(f64.const -0.039625)
)
)
- (func $1 (; 4 ;) (type $4) (result f64)
+ (func $1 (; 4 ;) (type $3) (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 $3) (param $0 f64) (param $1 f64) (result f64)
+ (func $2 (; 5 ;) (type $4) (param $0 f64) (param $1 f64) (result f64)
(local $2 i32)
(local $3 f64)
(local $4 f64)
@@ -131,7 +131,7 @@
(local.get $1)
)
)
- (func $3 (; 6 ;) (type $5) (result i32)
+ (func $3 (; 6 ;) (type $0) (result i32)
(local $0 i32)
(i32.eq
(local.get $0)
@@ -273,13 +273,13 @@
(br $label$1)
)
)
- (func $9 (; 12 ;) (type $4) (result f64)
+ (func $9 (; 12 ;) (type $3) (result f64)
(call $fimport$2
(f64.const 5.5)
(f64.const 1.2)
)
)
- (func $10 (; 13 ;) (type $5) (result i32)
+ (func $10 (; 13 ;) (type $0) (result i32)
(local $0 i32)
(local.set $0
(i32.and
@@ -292,7 +292,7 @@
)
(local.get $0)
)
- (func $11 (; 14 ;) (type $0) (param $0 f32)
+ (func $11 (; 14 ;) (type $2) (param $0 f32)
(local $1 f32)
(local $2 f64)
(drop
@@ -316,7 +316,7 @@
(f32.const 0)
)
)
- (func $12 (; 15 ;) (type $4) (result f64)
+ (func $12 (; 15 ;) (type $3) (result f64)
(f64.const -0)
)
(func $13 (; 16 ;) (type $1)
@@ -360,7 +360,7 @@
(local.get $0)
)
)
- (call_indirect (type $0)
+ (call_indirect (type $2)
(local.get $0)
(i32.add
(i32.and
@@ -371,8 +371,8 @@
)
)
)
- (func $15 (; 18 ;) (type $0) (param $0 f32)
- (call_indirect (type $0)
+ (func $15 (; 18 ;) (type $2) (param $0 f32)
+ (call_indirect (type $2)
(local.get $0)
(i32.add
(i32.and
@@ -401,7 +401,7 @@
(func $18 (; 21 ;) (type $1)
(nop)
)
- (func $19 (; 22 ;) (type $5) (result i32)
+ (func $19 (; 22 ;) (type $0) (result i32)
(block $label$1
(drop
(i32.const 1)
@@ -410,7 +410,7 @@
)
(i32.const 0)
)
- (func $20 (; 23 ;) (type $7) (param $0 f64) (result f64)
+ (func $20 (; 23 ;) (type $9) (param $0 f64) (result f64)
(loop $label$1 (result f64)
(drop
(local.get $0)
@@ -421,18 +421,18 @@
(func $21 (; 24 ;) (type $8) (result i64)
(i64.const -9218868437227405313)
)
- (func $22 (; 25 ;) (type $9) (param $0 i32) (param $1 i64)
+ (func $22 (; 25 ;) (type $5) (param $0 i32) (param $1 i64)
(i64.store32
(local.get $0)
(local.get $1)
)
)
- (func $23 (; 26 ;) (type $5) (result i32)
+ (func $23 (; 26 ;) (type $0) (result i32)
(return
(i32.const 1)
)
)
- (func $24 (; 27 ;) (type $5) (result i32)
+ (func $24 (; 27 ;) (type $0) (result i32)
(block $label$1
(drop
(i32.const 1)
@@ -442,7 +442,7 @@
)
)
)
- (func $25 (; 28 ;) (type $5) (result i32)
+ (func $25 (; 28 ;) (type $0) (result i32)
(drop
(i32.const 1)
)
@@ -450,19 +450,19 @@
(i32.const 2)
)
)
- (func $26 (; 29 ;) (type $5) (result i32)
+ (func $26 (; 29 ;) (type $0) (result i32)
(block $label$1
(return
(i32.const 2)
)
)
)
- (func $27 (; 30 ;) (type $5) (result i32)
+ (func $27 (; 30 ;) (type $0) (result i32)
(return
(i32.const 2)
)
)
- (func $28 (; 31 ;) (type $5) (result i32)
+ (func $28 (; 31 ;) (type $0) (result i32)
(block $label$1
(drop
(i32.const 1)
@@ -471,7 +471,7 @@
)
(i32.const 1)
)
- (func $29 (; 32 ;) (type $5) (result i32)
+ (func $29 (; 32 ;) (type $0) (result i32)
(if
(i32.const 3)
(return
@@ -482,7 +482,7 @@
)
)
)
- (func $30 (; 33 ;) (type $5) (result i32)
+ (func $30 (; 33 ;) (type $0) (result i32)
(if
(i32.const 3)
(return
@@ -493,7 +493,7 @@
)
)
)
- (func $31 (; 34 ;) (type $5) (result i32)
+ (func $31 (; 34 ;) (type $0) (result i32)
(loop $label$1
(nop)
(return
@@ -501,14 +501,14 @@
)
)
)
- (func $32 (; 35 ;) (type $5) (result i32)
+ (func $32 (; 35 ;) (type $0) (result i32)
(loop $label$1
(return
(i32.const 1)
)
)
)
- (func $33 (; 36 ;) (type $5) (result i32)
+ (func $33 (; 36 ;) (type $0) (result i32)
(loop $label$1
(nop)
(return
@@ -516,7 +516,7 @@
)
)
)
- (func $34 (; 37 ;) (type $5) (result i32)
+ (func $34 (; 37 ;) (type $0) (result i32)
(loop $label$1
(return
(i32.const 1)