build options #compiler

This commit is contained in:
agra
2026-03-03 09:35:50 +02:00
parent aa1235c621
commit 03074472e5
16 changed files with 191 additions and 64 deletions

View File

@@ -362,6 +362,12 @@ pub const Builder = struct {
return self.emit(.{ .call_builtin = .{ .builtin = builtin, .args = owned } }, ret_ty);
}
pub fn compilerCall(self: *Builder, name: []const u8, args: []const Ref, ret_ty: TypeId) Ref {
const name_id = self.module.types.strings.intern(self.module.alloc, name);
const owned = self.module.alloc.dupe(Ref, args) catch unreachable;
return self.emit(.{ .compiler_call = .{ .name = @intFromEnum(name_id), .args = owned } }, ret_ty);
}
// ── Protocol ────────────────────────────────────────────────────
pub fn protocolCallDynamic(self: *Builder, receiver: Ref, method_index: u32, args: []const Ref, ret_ty: TypeId) Ref {