build options #compiler
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user