mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-31 12:24:10 -08:00
Wasm: don't emit DW_LNE_end_sequence when there were no previous command emitted
This commit is contained in:
parent
f7768efd51
commit
7f38697d50
|
@ -47,6 +47,7 @@ class DwarfLinesGenerator {
|
||||||
private int address;
|
private int address;
|
||||||
private int file = 1;
|
private int file = 1;
|
||||||
private int line = 1;
|
private int line = 1;
|
||||||
|
private boolean sequenceStarted;
|
||||||
|
|
||||||
DwarfLinesGenerator(DwarfStrings strings) {
|
DwarfLinesGenerator(DwarfStrings strings) {
|
||||||
this.strings = strings;
|
this.strings = strings;
|
||||||
|
@ -178,9 +179,13 @@ class DwarfLinesGenerator {
|
||||||
if (changed) {
|
if (changed) {
|
||||||
instructionsBlob.writeByte(DW_LNS_COPY);
|
instructionsBlob.writeByte(DW_LNS_COPY);
|
||||||
}
|
}
|
||||||
|
sequenceStarted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void endLineNumberSequence(int address) {
|
void endLineNumberSequence(int address) {
|
||||||
|
if (!sequenceStarted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
advanceTo(address, line);
|
advanceTo(address, line);
|
||||||
instructionsBlob.writeByte(0);
|
instructionsBlob.writeByte(0);
|
||||||
instructionsBlob.writeByte(1);
|
instructionsBlob.writeByte(1);
|
||||||
|
@ -188,6 +193,7 @@ class DwarfLinesGenerator {
|
||||||
this.line = 1;
|
this.line = 1;
|
||||||
this.file = 0;
|
this.file = 0;
|
||||||
this.address = 0;
|
this.address = 0;
|
||||||
|
sequenceStarted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean advanceTo(int address, int line) {
|
private boolean advanceTo(int address, int line) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user