This commit is contained in:
agra
2026-05-24 13:42:35 +03:00
parent 49b39ba07a
commit 0ba41b2980
5 changed files with 2 additions and 107 deletions

View File

@@ -336,19 +336,6 @@ fn printInst(instruction: *const Inst, ref_idx: u32, tt: *const TypeTable, write
try writer.writeAll(") : ");
},
// ── Protocol ────────────────────────────────────────────
.protocol_call_dynamic => |c| {
try writer.print("protocol_call_dynamic %{d}.{d}(", .{ c.receiver.index(), c.method_index });
try writeArgs(c.args, writer);
try writer.writeAll(") : ");
},
.protocol_erase => |pe| {
try writer.print("protocol_erase %{d} -> ", .{pe.concrete.index()});
try writeType(pe.protocol_type, tt, writer);
try writer.writeByte('\n');
return;
},
// ── Closure ─────────────────────────────────────────────
.closure_create => |cc| {
try writer.print("closure_create @{d}", .{cc.func.index()});
@@ -358,26 +345,6 @@ fn printInst(instruction: *const Inst, ref_idx: u32, tt: *const TypeTable, write
try writer.writeAll(" : ");
},
// ── Context ─────────────────────────────────────────────
.context_load => |co| {
try writer.writeAll("context_load .");
try writer.writeAll(tt.getString(co.field));
try writer.writeAll(" : ");
},
.context_store => |co| {
try writer.writeAll("context_store .");
try writer.writeAll(tt.getString(co.field));
try writer.print(", %{d}\n", .{co.value.index()});
return;
},
.context_save => {
try writer.writeAll("context_save : ");
},
.context_restore => |u| {
try writer.print("context_restore %{d}\n", .{u.operand.index()});
return;
},
// ── Globals ─────────────────────────────────────────────
.global_get => |gid| try writer.print("global_get @{d} : ", .{gid.index()}),
.global_addr => |gid| try writer.print("global_addr @{d} : ", .{gid.index()}),
@@ -554,7 +521,7 @@ fn writeConstant(val: ConstantValue, writer: Writer) !void {
fn isVoidOp(op: Op) bool {
return switch (op) {
.store, .heap_free, .context_store, .context_restore, .global_set, .br, .cond_br, .switch_br, .ret, .ret_void, .@"unreachable" => true,
.store, .heap_free, .global_set, .br, .cond_br, .switch_br, .ret, .ret_void, .@"unreachable" => true,
else => false,
};
}