feat: code generation for diverts, wip
This commit is contained in:
parent
ee26be6254
commit
20292bcc6a
5 changed files with 699 additions and 149 deletions
|
|
@ -110,8 +110,8 @@ pub fn dumpInst(
|
|||
.store => return d.dumpByteInst(path, offset, op),
|
||||
.load_global => return d.dumpGlobalInst(path, offset, op),
|
||||
.store_global => return d.dumpGlobalInst(path, offset, op),
|
||||
.call => return d.dumpGlobalInst(path, offset, op),
|
||||
.divert => return d.dumpGlobalInst(path, offset, op),
|
||||
.call => return d.dumpByteInst(path, offset, op),
|
||||
.divert => return d.dumpByteInst(path, offset, op),
|
||||
.jmp => return d.dumpJumpInst(path, offset, op, .relative),
|
||||
.jmp_t => return d.dumpJumpInst(path, offset, op, .relative),
|
||||
.jmp_f => return d.dumpJumpInst(path, offset, op, .relative),
|
||||
|
|
@ -143,6 +143,7 @@ pub fn dump(d: Dumper, path: *const Object.ContentPath) !void {
|
|||
var index: usize = 0;
|
||||
while (index < path.bytes.len) {
|
||||
index = try d.dumpInst(path, index, false);
|
||||
try d.writer.flush();
|
||||
}
|
||||
return d.writer.flush();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue