This commit is contained in:
agra
2026-03-04 09:18:24 +02:00
parent 0336f361c7
commit 67e02a20a5
6 changed files with 153 additions and 23 deletions

View File

@@ -1124,6 +1124,14 @@ pub const Interpreter = struct {
}
return .{ .aggregate = fields };
},
.vtable => |func_ids| {
// Vtable is a struct of function refs — represent as aggregate of func_ref values
const fields = self.alloc.alloc(Value, func_ids.len) catch return .undef;
for (func_ids, 0..) |fid, i| {
fields[i] = .{ .func_ref = fid };
}
return .{ .aggregate = fields };
},
};
}