mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
Add line number record for start of ASM line
This commit is contained in:
@@ -27,7 +27,7 @@ public class ObjectSection
|
|||||||
ByteCodeWriter writer = new();
|
ByteCodeWriter writer = new();
|
||||||
_labelOffsetMap = new();
|
_labelOffsetMap = new();
|
||||||
|
|
||||||
foreach (var bodyItem in _program.Body)
|
foreach (var bodyItem in _program.Code)
|
||||||
{
|
{
|
||||||
var offset = writer.DataSize;
|
var offset = writer.DataSize;
|
||||||
|
|
||||||
@@ -36,11 +36,13 @@ public class ObjectSection
|
|||||||
_labelOffsetMap[label.Name] = offset;
|
_labelOffsetMap[label.Name] = offset;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bodyItem is not Instruction instruction)
|
if (bodyItem is not Instruction instruction)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Add entry to line number table
|
// Add entry to line number table
|
||||||
_loadResult.LineNumberTable.AddRecord(offset, instruction.Line, instruction.Column);
|
_loadResult.LineNumberTable.AddRecord(offset, instruction.Line, instruction.Column);
|
||||||
|
_loadResult.LineNumberTable.AddRecord(offset, instruction.Line, 0);
|
||||||
|
|
||||||
var opCode = instruction.OpCode;
|
var opCode = instruction.OpCode;
|
||||||
writer.WriteByte(opCode);
|
writer.WriteByte(opCode);
|
||||||
|
|||||||
Reference in New Issue
Block a user