...
This commit is contained in:
@@ -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 };
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user