summaryrefslogtreecommitdiff
path: root/src/wasm-s-parser.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-06-03 16:31:49 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-06-03 16:31:49 -0700
commitb6668d8ca5b08bdf69f057ecdc6ad8a588429761 (patch)
tree95f138f1c4e1681ee9d747ac57189b2cd438c51f /src/wasm-s-parser.h
parentc8ec0cd6c053f9e68daf4ba4fdf8137957c1b236 (diff)
downloadbinaryen-b6668d8ca5b08bdf69f057ecdc6ad8a588429761.tar.gz
binaryen-b6668d8ca5b08bdf69f057ecdc6ad8a588429761.tar.bz2
binaryen-b6668d8ca5b08bdf69f057ecdc6ad8a588429761.zip
make call_indirect type a name, so that it is not a dependency on the module, which would break consistency and make some parallel passes tricky (#568)
Diffstat (limited to 'src/wasm-s-parser.h')
-rw-r--r--src/wasm-s-parser.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index 2f1a1bc1b..633d8329e 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -1094,10 +1094,10 @@ private:
Expression* makeCallIndirect(Element& s) {
auto ret = allocator.alloc<CallIndirect>();
IString type = s[1]->str();
- ret->fullType = wasm.checkFunctionType(type);
- if (!ret->fullType) throw ParseException("invalid call_indirect type", s.line, s.col);
- assert(ret->fullType);
- ret->type = ret->fullType->result;
+ auto* fullType = wasm.checkFunctionType(type);
+ if (!fullType) throw ParseException("invalid call_indirect type", s.line, s.col);
+ ret->fullType = fullType->name;
+ ret->type = fullType->result;
ret->target = parseExpression(s[2]);
parseCallOperands(s, 3, ret);
return ret;