summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/passes/Print.cpp4
-rw-r--r--src/shared-constants.h1
-rw-r--r--src/wasm/wasm-s-parser.cpp22
-rw-r--r--src/wasm/wasm.cpp1
4 files changed, 2 insertions, 26 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 750bfbb38..c6bf13f42 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -2685,7 +2685,7 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> {
emitImportHeader(curr);
o << "(tag ";
printName(curr->name, o);
- o << maybeSpace << "(attr " << curr->attribute << ')' << maybeSpace;
+ o << maybeSpace;
printParamType(o, curr->sig.params, currModule);
o << "))";
o << maybeNewLine;
@@ -2695,7 +2695,7 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> {
o << '(';
printMedium(o, "tag ");
printName(curr->name, o);
- o << maybeSpace << "(attr " << curr->attribute << ')' << maybeSpace;
+ o << maybeSpace;
printParamType(o, curr->sig.params, currModule);
o << ")" << maybeNewLine;
}
diff --git a/src/shared-constants.h b/src/shared-constants.h
index a0de4b9bb..6ad3ab9ac 100644
--- a/src/shared-constants.h
+++ b/src/shared-constants.h
@@ -66,7 +66,6 @@ extern Name PRINT;
extern Name EXIT;
extern Name SHARED;
extern Name TAG;
-extern Name ATTR;
} // namespace wasm
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index c688630c3..8bedeab9f 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -3109,14 +3109,6 @@ void SExpressionWasmBuilder::parseImport(Element& s) {
}
} else if (kind == ExternalKind::Tag) {
auto tag = make_unique<Tag>();
- if (j >= inner.size()) {
- throw ParseException("tag does not have an attribute", s.line, s.col);
- }
- auto& attrElem = *inner[j++];
- if (!elementStartsWith(attrElem, ATTR) || attrElem.size() != 2) {
- throw ParseException("invalid attribute", attrElem.line, attrElem.col);
- }
- tag->attribute = atoi(attrElem[1]->c_str());
j = parseTypeUse(inner, j, tag->sig);
tag->setName(name, hasExplicitName);
tag->module = module;
@@ -3498,20 +3490,6 @@ void SExpressionWasmBuilder::parseTag(Element& s, bool preParseImport) {
ex->kind = ExternalKind::Tag;
}
- // Parse attribute
- if (i >= s.size()) {
- throw ParseException("tag does not have an attribute", s.line, s.col);
- }
- auto& attrElem = *s[i++];
- if (!elementStartsWith(attrElem, ATTR) || attrElem.size() != 2) {
- throw ParseException("invalid attribute", attrElem.line, attrElem.col);
- }
- if (!attrElem[1]->isStr()) {
- throw ParseException(
- "invalid attribute", attrElem[1]->line, attrElem[1]->col);
- }
- tag->attribute = atoi(attrElem[1]->c_str());
-
// Parse typeuse
i = parseTypeUse(s, i, tag->sig);
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index ea82bac39..54c82159f 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -97,7 +97,6 @@ Name PRINT("print");
Name EXIT("exit");
Name SHARED("shared");
Name TAG("tag");
-Name ATTR("attr");
// Expressions