start working on oop runtime

This commit is contained in:
2025-06-22 19:00:03 +01:00
parent fcffdc9000
commit 74c71c3a1b
15 changed files with 122 additions and 53 deletions

View File

@@ -6,6 +6,9 @@
#include <string.h>
#include <stdio.h>
// runtime
#include "runtime/objects/type/type.h"
void *checked_malloc(size_t size) {
void *ptr = malloc(size);
if (!ptr) {
@@ -30,6 +33,7 @@ void gmp_gc_free(void *ptr, size_t size) {
void ar_memory_init() {
GC_INIT();
mp_set_memory_functions(GC_malloc, gmp_gc_realloc, gmp_gc_free);
init_type_obj();
}