diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-02-08 13:33:34 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-02-08 13:33:34 -0800 |
commit | 2262204746437423211930d83d8ea336be3efac2 (patch) | |
tree | 7d85bb4d6ab8531abc074d3a5043fb00963fdb9e /src/wasm-interpreter.h | |
parent | 271504de91e3f396251041f94c0f29094af92207 (diff) | |
parent | 28ac77ff3f5668d543a6c7a99f3e1b1dceff6201 (diff) | |
download | binaryen-2262204746437423211930d83d8ea336be3efac2.tar.gz binaryen-2262204746437423211930d83d8ea336be3efac2.tar.bz2 binaryen-2262204746437423211930d83d8ea336be3efac2.zip |
Merge pull request #189 from WebAssembly/br_if-changes
br_if updates
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r-- | src/wasm-interpreter.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 3f9427ed7..73a536903 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -233,17 +233,17 @@ private: Flow visitBreak(Break *curr) { NOTE_ENTER("Break"); bool condition = true; - if (curr->condition) { - Flow flow = visit(curr->condition); - if (flow.breaking()) return flow; - condition = flow.value.getInteger(); - } Flow flow(curr->name); if (curr->value) { flow = visit(curr->value); if (flow.breaking()) return flow; flow.breakTo = curr->name; } + if (curr->condition) { + Flow conditionFlow = visit(curr->condition); + if (conditionFlow.breaking()) return conditionFlow; + condition = conditionFlow.value.getInteger(); + } return condition ? flow : Flow(); } Flow visitSwitch(Switch *curr) { |