aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen.zig')
-rw-r--r--src/codegen.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen.zig b/src/codegen.zig
index f186304..dd484b0 100644
--- a/src/codegen.zig
+++ b/src/codegen.zig
@@ -548,7 +548,7 @@ const Context = struct {
instructions: std.ArrayList(Instruction),
// Current stuff that changes often, basically here to avoid prop drilling.
- block: ?*const compile.Block = null,
+ block: ?*const compile.BasicBlock = null,
current_instruction_index: ?usize = null,
fn deinit(self: *Context) void {
@@ -716,7 +716,7 @@ const Context = struct {
}
}
- fn codegenBlock(self: *Context, block: compile.Block) !void {
+ fn codegenBlock(self: *Context, block: compile.BasicBlock) !void {
self.block = █
defer self.block = null;
for (block.instrs, 0..) |instr, i| {
@@ -726,7 +726,7 @@ const Context = struct {
}
};
-pub fn create_elf(allocator: Allocator, block: compile.Block) ![]u8 {
+pub fn create_elf(allocator: Allocator, block: compile.BasicBlock) ![]u8 {
var ctx: Context = .{ .register_allocator = try .init(allocator), .instructions = .init(allocator) };
defer ctx.deinit();