summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-s-parser.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-01-07 13:24:58 -0800
committerGitHub <noreply@github.com>2019-01-07 13:24:58 -0800
commit7d94900ded8e2e5ce8ef8ee2687528531d8f2a97 (patch)
treed8bba13d306b0c5ecba384384e602e6cccc83015 /src/wasm/wasm-s-parser.cpp
parent6f91af190effd7b8a5969314dd4fb3d2ec540524 (diff)
downloadbinaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.tar.gz
binaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.tar.bz2
binaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.zip
Massive renaming (#1855)
Automated renaming according to https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329.
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r--src/wasm/wasm-s-parser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index 43fdb0a5a..0dfea962b 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -769,7 +769,7 @@ Expression* SExpressionWasmBuilder::makeGetGlobal(Element& s) {
ret->name = getGlobalName(*s[1]);
auto* global = wasm.getGlobalOrNull(ret->name);
if (!global) {
- throw ParseException("bad get_global name", s.line, s.col);
+ throw ParseException("bad global.get name", s.line, s.col);
}
ret->type = global->type;
return ret;
@@ -778,7 +778,7 @@ Expression* SExpressionWasmBuilder::makeGetGlobal(Element& s) {
Expression* SExpressionWasmBuilder::makeSetGlobal(Element& s) {
auto ret = allocator.alloc<SetGlobal>();
ret->name = getGlobalName(*s[1]);
- if (wasm.getGlobalOrNull(ret->name) && !wasm.getGlobalOrNull(ret->name)->mutable_) throw ParseException("set_global of immutable", s.line, s.col);
+ if (wasm.getGlobalOrNull(ret->name) && !wasm.getGlobalOrNull(ret->name)->mutable_) throw ParseException("global.set of immutable", s.line, s.col);
ret->value = parseExpression(s[2]);
ret->finalize();
return ret;
@@ -1751,7 +1751,7 @@ void SExpressionWasmBuilder::parseTable(Element& s, bool preParseImport) {
}
if (i == s.size()) return;
if (!s[i]->dollared()) {
- if (s[i]->str() == ANYFUNC) {
+ if (s[i]->str() == FUNCREF) {
// (table type (elem ..))
parseInnerElem(*s[i + 1]);
if (wasm.table.segments.size() > 0) {
@@ -1761,8 +1761,8 @@ void SExpressionWasmBuilder::parseTable(Element& s, bool preParseImport) {
}
return;
}
- // first element isn't dollared, and isn't anyfunc. this could be old syntax for (table 0 1) which means function 0 and 1, or it could be (table initial max? type), look for type
- if (s[s.size() - 1]->str() == ANYFUNC) {
+ // first element isn't dollared, and isn't funcref. this could be old syntax for (table 0 1) which means function 0 and 1, or it could be (table initial max? type), look for type
+ if (s[s.size() - 1]->str() == FUNCREF) {
// (table initial max? type)
if (i < s.size() - 1) {
wasm.table.initial = atoi(s[i++]->c_str());