summaryrefslogtreecommitdiff
path: root/src/wasm-stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-stack.h')
-rw-r--r--src/wasm-stack.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wasm-stack.h b/src/wasm-stack.h
index fffc0ce45..91ea3f3be 100644
--- a/src/wasm-stack.h
+++ b/src/wasm-stack.h
@@ -257,6 +257,9 @@ public:
template<StackWriterMode Mode, typename Parent>
void StackWriter<Mode, Parent>::mapLocalsAndEmitHeader() {
+ if (func->prologLocation.size()) {
+ parent.writeDebugLocation(*func->prologLocation.begin());
+ }
// Map them
for (Index i = 0; i < func->getNumParams(); i++) {
size_t curr = mappedLocals.size();
@@ -1166,6 +1169,9 @@ bool StackWriter<Mode, Parent>::justAddToStack(Expression* curr) {
template<StackWriterMode Mode, typename Parent>
void StackWriter<Mode, Parent>::finishFunctionBody() {
+ if (func->epilogLocation.size()) {
+ parent.writeDebugLocation(*func->epilogLocation.begin());
+ }
o << int8_t(BinaryConsts::End);
}