Wasm: fix debug info generation

This commit is contained in:
Alexey Andreev 2022-12-02 07:49:07 +01:00
parent 57e0227a02
commit 548ded7c75

View File

@ -943,15 +943,22 @@ class WasmBinaryRenderingVisitor implements WasmExpressionVisitor {
}
private void emitLocation(TextLocation location) {
if (deferTextLocationToEmit && location != null) {
textLocationToEmit = location;
if (deferTextLocationToEmit) {
if (location != null) {
textLocationToEmit = location;
deferTextLocationToEmit = false;
} else {
return;
}
}
flushLocation();
textLocationToEmit = location;
}
private void emitDeferredLocation() {
flushLocation();
if (textLocationToEmit != null) {
flushLocation();
}
textLocationToEmit = null;
deferTextLocationToEmit = true;
}