move to meson for build system
This commit is contained in:
parent
fdd1ee61b5
commit
9616fb616e
28 changed files with 123 additions and 24 deletions
33
src/object.h
Normal file
33
src/object.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#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 {
|
||||
OBJ_FWD = 2,
|
||||
OBJ_QUOT,
|
||||
};
|
||||
|
||||
enum {
|
||||
TYPE_NIL = 0,
|
||||
TYPE_NUM = 1,
|
||||
TYPE_FWD = OBJ_FWD,
|
||||
};
|
||||
|
||||
typedef uintptr_t O;
|
||||
|
||||
/** Object header */
|
||||
typedef struct Hd {
|
||||
U32 size, type;
|
||||
} Hd;
|
||||
|
||||
I type(O);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue