mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Wasm: fix debug info generation
This commit is contained in:
parent
57e0227a02
commit
548ded7c75
|
@ -943,15 +943,22 @@ class WasmBinaryRenderingVisitor implements WasmExpressionVisitor {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void emitLocation(TextLocation location) {
|
private void emitLocation(TextLocation location) {
|
||||||
if (deferTextLocationToEmit && location != null) {
|
if (deferTextLocationToEmit) {
|
||||||
|
if (location != null) {
|
||||||
textLocationToEmit = location;
|
textLocationToEmit = location;
|
||||||
|
deferTextLocationToEmit = false;
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
flushLocation();
|
flushLocation();
|
||||||
textLocationToEmit = location;
|
textLocationToEmit = location;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void emitDeferredLocation() {
|
private void emitDeferredLocation() {
|
||||||
|
if (textLocationToEmit != null) {
|
||||||
flushLocation();
|
flushLocation();
|
||||||
|
}
|
||||||
textLocationToEmit = null;
|
textLocationToEmit = null;
|
||||||
deferTextLocationToEmit = true;
|
deferTextLocationToEmit = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user