added anti aliasing. new fps game
This commit is contained in:
parent
798434a55d
commit
7b73c86113
40 changed files with 2386 additions and 564 deletions
|
|
@ -112,6 +112,16 @@ static Obj *forward(Obj *obj) {
|
|||
return new_obj;
|
||||
}
|
||||
|
||||
static inline void scan_object_fields(Obj *obj) {
|
||||
const TypeInfo *t = obj->header.type;
|
||||
|
||||
for (uint16_t i = 0; i < t->field_count; i++) {
|
||||
if (t->pointer_bitmap[i]) {
|
||||
obj->fields[i] = forward((Obj*)obj->fields[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void gc_minor_collect(void) {
|
||||
gc.to_ptr = gc.to_space;
|
||||
|
||||
|
|
@ -189,16 +199,6 @@ void *gc_alloc(const TypeInfo *type, size_t payload_size) {
|
|||
return obj;
|
||||
}
|
||||
|
||||
static inline void scan_object_fields(Obj *obj) {
|
||||
const TypeInfo *t = obj->header.type;
|
||||
|
||||
for (uint16_t i = 0; i < t->field_count; i++) {
|
||||
if (t->pointer_bitmap[i]) {
|
||||
obj->fields[i] = forward((Obj*)obj->fields[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void gc_init(void) {
|
||||
gc.young_size = YOUNG_SIZE;
|
||||
gc.old_size = OLD_SIZE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue