diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-03-16 16:52:20 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-03-16 16:52:20 -0700 |
commit | 9c374b6a2368ef5cb0c102e3e2f164410289f454 (patch) | |
tree | 70e54293a9e2ad2f2c43a3884d77e4b600e26faf /src | |
parent | 41e662bc564c99b54f64360f97c97db57d755754 (diff) | |
download | binaryen-9c374b6a2368ef5cb0c102e3e2f164410289f454.tar.gz binaryen-9c374b6a2368ef5cb0c102e3e2f164410289f454.tar.bz2 binaryen-9c374b6a2368ef5cb0c102e3e2f164410289f454.zip |
use leb128 in breaks
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-binary.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 7a801920e..5dd363b9d 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -781,7 +781,7 @@ public: } if (curr->condition) recurse(curr->condition); o << int8_t(curr->condition ? BinaryConsts::BrIf : BinaryConsts::Br) - << int32_t(getBreakIndex(curr->name)); + << LEB128(getBreakIndex(curr->name)); } void visitSwitch(Switch *curr) { if (debug) std::cerr << "zz node: Switch" << std::endl; @@ -1599,7 +1599,7 @@ public: void visitBreak(Break *curr, uint8_t code) { if (debug) std::cerr << "zz node: Break" << std::endl; - curr->name = getBreakName(getInt32()); + curr->name = getBreakName(getLEB128()); if (code == BinaryConsts::BrIf) curr->condition = popExpression(); curr->value = popExpression(); } |