summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-05-21 13:24:30 -0700
committerGitHub <noreply@github.com>2019-05-21 13:24:30 -0700
commitd78be9ac6c02910bbf8ac71118e68adff4fdc570 (patch)
tree39fdb44c7371114f57cb6eadbeccf26c751bea89 /src
parent5c33c04d51a64775b8e164a9d38d06c720c6505e (diff)
downloadbinaryen-d78be9ac6c02910bbf8ac71118e68adff4fdc570.tar.gz
binaryen-d78be9ac6c02910bbf8ac71118e68adff4fdc570.tar.bz2
binaryen-d78be9ac6c02910bbf8ac71118e68adff4fdc570.zip
Remove old import/export parsing routines (NFC) (#2127)
These formats don't seem to be used now.
Diffstat (limited to 'src')
-rw-r--r--src/wasm/wasm-s-parser.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index e8ea05f77..6e9986bb1 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -1845,20 +1845,6 @@ void SExpressionWasmBuilder::parseExport(Element& s) {
} else {
throw ParseException("invalid export");
}
- } else if (!s[2]->dollared() && !std::isdigit(s[2]->str()[0])) {
- ex->value = s[3]->str();
- if (s[2]->str() == MEMORY) {
- if (!wasm.memory.exists) {
- throw ParseException("memory exported but no memory");
- }
- ex->kind = ExternalKind::Memory;
- } else if (s[2]->str() == TABLE) {
- ex->kind = ExternalKind::Table;
- } else if (s[2]->str() == GLOBAL) {
- ex->kind = ExternalKind::Global;
- } else {
- throw ParseException("invalid ext export");
- }
} else {
// function
ex->value = s[2]->str();
@@ -1919,18 +1905,7 @@ void SExpressionWasmBuilder::parseImport(Element& s) {
throw ParseException("invalid import");
}
}
- if (!s[i]->quoted()) {
- if (s[i]->str() == MEMORY) {
- kind = ExternalKind::Memory;
- } else if (s[i]->str() == TABLE) {
- kind = ExternalKind::Table;
- } else if (s[i]->str() == GLOBAL) {
- kind = ExternalKind::Global;
- } else {
- throw ParseException("invalid ext import");
- }
- i++;
- } else if (!newStyle) {
+ if (!newStyle) {
kind = ExternalKind::Function;
}
auto module = s[i++]->str();