diff options
author | Sam Clegg <sbc@chromium.org> | 2020-11-08 12:24:27 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 12:24:27 -0800 |
commit | 47607d445b62c98017ce4b9c6cc69b61fae85aa5 (patch) | |
tree | e9c3350b96e21183c95f61cbf4fcfba8cf7257ab /src/wasm | |
parent | c8249b553f89ede0b4dedd6c00fe7f9f7e745de2 (diff) | |
download | binaryen-47607d445b62c98017ce4b9c6cc69b61fae85aa5.tar.gz binaryen-47607d445b62c98017ce4b9c6cc69b61fae85aa5.tar.bz2 binaryen-47607d445b62c98017ce4b9c6cc69b61fae85aa5.zip |
Remove dead code and unused includes. NFC. (#3328)
Specifically try to cleanup use of asm_v_wasm.h and asmjs constants.
Diffstat (limited to 'src/wasm')
-rw-r--r-- | src/wasm/wasm-emscripten.cpp | 16 | ||||
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 2 | ||||
-rw-r--r-- | src/wasm/wasm-stack.cpp | 2 | ||||
-rw-r--r-- | src/wasm/wasm.cpp | 1 |
4 files changed, 3 insertions, 18 deletions
diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp index 9f63d32dd..19498300f 100644 --- a/src/wasm/wasm-emscripten.cpp +++ b/src/wasm/wasm-emscripten.cpp @@ -227,7 +227,6 @@ private: void createAsmConst(uint32_t id, std::string code, Signature sig, Name name); Signature asmConstSig(Signature baseSig); Name nameForImportWithSig(Signature sig, Proxying proxy); - void queueImport(Name importName, Signature baseSig); void addImports(); Proxying proxyType(Name name); @@ -342,21 +341,6 @@ Signature AsmConstWalker::asmConstSig(Signature baseSig) { baseSig.results); } -Name AsmConstWalker::nameForImportWithSig(Signature sig, Proxying proxy) { - std::string fixedTarget = EM_ASM_PREFIX.str + std::string("_") + - proxyingSuffix(proxy) + - getSig(sig.results, sig.params); - return Name(fixedTarget.c_str()); -} - -void AsmConstWalker::queueImport(Name importName, Signature baseSig) { - auto import = new Function; - import->name = import->base = importName; - import->module = ENV; - import->sig = baseSig; - queuedImports.push_back(std::unique_ptr<Function>(import)); -} - void AsmConstWalker::addImports() { for (auto& import : queuedImports) { wasm.addFunction(import.release()); diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index f28ea9f18..6c552781b 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -20,8 +20,6 @@ #include <cmath> #include <limits> -#include "asm_v_wasm.h" -#include "asmjs/shared-constants.h" #include "ir/branch-utils.h" #include "shared-constants.h" #include "wasm-binary.h" diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index 7139eb502..c8a4f7a90 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -20,6 +20,8 @@ namespace wasm { +static Name IMPOSSIBLE_CONTINUE("impossible-continue"); + void BinaryInstWriter::emitResultType(Type type) { if (type == Type::unreachable) { o << binaryType(Type::none); diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 215928793..bb578819b 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -59,6 +59,7 @@ Name SET_TEMP_RET0("setTempRet0"); Name NEW_SIZE("newSize"); Name MODULE("module"); Name START("start"); +Name GLOBAL("global"); Name FUNC("func"); Name PARAM("param"); Name RESULT("result"); |