summaryrefslogtreecommitdiff
path: root/src/asm2wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-07-12 19:27:17 -0700
committerGitHub <noreply@github.com>2017-07-12 19:27:17 -0700
commitb2c17a105e9fbe86c059793032ee0be676245a8a (patch)
tree72cf9673e9de93c4c3106612416ebd9e0329a19c /src/asm2wasm.h
parent25cbf641c6133d5156e8591072d2705fde92752b (diff)
parent6159fb42fcd2dae593ee61ebb7e3e163445ae9d0 (diff)
downloadbinaryen-b2c17a105e9fbe86c059793032ee0be676245a8a.tar.gz
binaryen-b2c17a105e9fbe86c059793032ee0be676245a8a.tar.bz2
binaryen-b2c17a105e9fbe86c059793032ee0be676245a8a.zip
Merge pull request #1087 from WebAssembly/fuzz-2
Fuzz fixes
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r--src/asm2wasm.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index 4395054f6..2245bd2b5 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -32,6 +32,7 @@
#include "pass.h"
#include "parsing.h"
#include "ast_utils.h"
+#include "ast/branch-utils.h"
#include "wasm-builder.h"
#include "wasm-emscripten.h"
#include "wasm-module-building.h"
@@ -1983,9 +1984,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
// No wasm support, so use a temp local
ensureI32Temp();
auto set = allocator.alloc<SetLocal>();
- set->setTee(false);
set->index = function->getLocalIndex(I32_TEMP);
set->value = value;
+ set->setTee(false);
set->finalize();
auto get = [&]() {
auto ret = allocator.alloc<GetLocal>();
@@ -2335,9 +2336,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
nameMapper.popLabelName(more);
nameMapper.popLabelName(stop);
// if we never continued, we don't need a loop
- BreakSeeker breakSeeker(more);
- breakSeeker.walk(child);
- if (breakSeeker.found == 0) {
+ BranchUtils::BranchSeeker seeker(more);
+ seeker.walk(child);
+ if (seeker.found == 0) {
auto block = allocator.alloc<Block>();
block->list.push_back(child);
if (isConcreteWasmType(child->type)) {