initial commit

This commit is contained in:
Lobo 2026-01-19 09:08:23 -03:00
commit 146e7a85d6
25 changed files with 5283 additions and 0 deletions

24
object.h Normal file
View file

@ -0,0 +1,24 @@
#ifndef OBJECT_H
#define OBJECT_H
#include "common.h"
#define NIL ((O)0)
#define BOX(x) ((O)(x))
#define UNBOX(x) ((Hd *)(x))
#define IMM(x) ((O)(x) & (O)1)
#define NUM(x) (((O)((intptr_t)(x) << 1)) | (O)1)
#define ORD(x) ((O)(x) >> 1)
enum {
TYPE_FWD,
};
typedef uintptr_t O;
/** Object header */
typedef struct Hd {
U32 size, type;
} Hd;
#endif