This commit is contained in:
Lobo 2026-01-21 13:48:20 -03:00
parent 6a9a0cd4e4
commit d359c68c32
16 changed files with 2026 additions and 89 deletions

View file

@ -6,8 +6,8 @@
#include "chunk.h"
#include "gc.h"
#include "object.h"
#include "vm.h"
#include "vendor/yar.h"
#include "vm.h"
#define ALIGN(n) (((n) + 7) & ~7)
static inline int infrom(Gc *gc, V *ptr) {
@ -67,7 +67,6 @@ V gc_collect(Vm *vm) {
printstats(gc, "before GC");
#endif
// Forward roots
for (Z i = 0; i < gc->roots.count; i++) {
O *o = gc->roots.items[i];
*o = forward(gc, *o);