mirror of
https://github.com/janet-lang/janet
synced 2025-11-15 23:07:14 +00:00
Add proto field to tables to allow prototypal inheritance.
This commit is contained in:
@@ -109,10 +109,15 @@ static void dst_mark_array(DstArray *array) {
|
||||
}
|
||||
|
||||
static void dst_mark_table(DstTable *table) {
|
||||
recur: /* Manual tail recursion */
|
||||
if (dst_gc_reachable(table))
|
||||
return;
|
||||
dst_gc_mark(table);
|
||||
dst_mark_kvs(table->data, table->capacity);
|
||||
if (table->proto) {
|
||||
table = table->proto;
|
||||
goto recur;
|
||||
}
|
||||
}
|
||||
|
||||
static void dst_mark_struct(const DstKV *st) {
|
||||
|
||||
Reference in New Issue
Block a user