diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 10:55:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-07 10:55:02 -0700 |
commit | 135a20cd110d356d5d098a08a7b447205adaed7a (patch) | |
tree | f5200a6b35f19d1bf95dea1fa7e339f40391413b /src/wasm.cpp | |
parent | fbe77b167002e8a49225b607ca8c37dc7e4b41fe (diff) | |
parent | dd197d3212ac28e778d372df9d03e58b21386648 (diff) | |
download | binaryen-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.cpp | 10 |
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 |