diff options
author | JesseCodeBones <56120624+JesseCodeBones@users.noreply.github.com> | 2023-02-25 01:09:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 09:09:14 -0800 |
commit | 538506919a3d87708f749563b65c32864302f9ca (patch) | |
tree | 027f5ff3385486f352f8be9896652df71d3eba1d /src/wasm-stack.h | |
parent | c657aa9fd4c5afb8b55c484ccf34362d2b504200 (diff) | |
download | binaryen-538506919a3d87708f749563b65c32864302f9ca.tar.gz binaryen-538506919a3d87708f749563b65c32864302f9ca.tar.bz2 binaryen-538506919a3d87708f749563b65c32864302f9ca.zip |
Fix sourcemap nesting in reading and writing (#5504)
The stack logic was incorrect, and led to source locations being emitted
on parents instead of children.
Diffstat (limited to 'src/wasm-stack.h')
-rw-r--r-- | src/wasm-stack.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm-stack.h b/src/wasm-stack.h index 8f72c1384..62fe053f4 100644 --- a/src/wasm-stack.h +++ b/src/wasm-stack.h @@ -232,7 +232,6 @@ void BinaryenIRWriter<SubType>::visitPossibleBlockContents(Expression* curr) { template<typename SubType> void BinaryenIRWriter<SubType>::visit(Expression* curr) { - emitDebugLocation(curr); // We emit unreachable instructions that create unreachability, but not // unreachable instructions that just inherit unreachability from their // children, since the latter won't be reached. This (together with logic in @@ -257,6 +256,7 @@ void BinaryenIRWriter<SubType>::visit(Expression* curr) { if (Properties::isControlFlowStructure(curr)) { Visitor<BinaryenIRWriter>::visit(curr); } else { + emitDebugLocation(curr); emit(curr); } } |