summaryrefslogtreecommitdiff
path: root/src/wasm.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-09-07 10:55:02 -0700
committerGitHub <noreply@github.com>2016-09-07 10:55:02 -0700
commit135a20cd110d356d5d098a08a7b447205adaed7a (patch)
treef5200a6b35f19d1bf95dea1fa7e339f40391413b /src/wasm.cpp
parentfbe77b167002e8a49225b607ca8c37dc7e4b41fe (diff)
parentdd197d3212ac28e778d372df9d03e58b21386648 (diff)
downloadbinaryen-135a20cd110d356d5d098a08a7b447205adaed7a.tar.gz
binaryen-135a20cd110d356d5d098a08a7b447205adaed7a.tar.bz2
binaryen-135a20cd110d356d5d098a08a7b447205adaed7a.zip
Merge pull request #678 from WebAssembly/stack
Stack machine + 0xc update
Diffstat (limited to 'src/wasm.cpp')
-rw-r--r--src/wasm.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/wasm.cpp b/src/wasm.cpp
index 8cfdee759..f6486eb50 100644
--- a/src/wasm.cpp
+++ b/src/wasm.cpp
@@ -120,7 +120,7 @@ struct TypeSeeker : public PostWalker<TypeSeeker, Visitor<TypeSeeker>> {
void visitLoop(Loop* curr) {
if (curr == target) {
types.push_back(curr->body->type);
- } else if (curr->in == targetName || curr->out == targetName) {
+ } else if (curr->name == targetName) {
types.clear(); // ignore all breaks til now, they were captured by someone with the same name
}
}
@@ -162,13 +162,7 @@ void Block::finalize() {
}
void Loop::finalize() {
- if (!out.is()) {
- type = body->type;
- return;
- }
-
- TypeSeeker seeker(this, this->out);
- type = mergeTypes(seeker.types);
+ type = body->type;
}
} // namespace wasm