summaryrefslogtreecommitdiff
path: root/src/nb_obj.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-10-17 15:22:09 +0800
committerchai <chaifix@163.com>2020-10-17 15:22:09 +0800
commit08ab881a480a73d6be005c4b4e1cf35814b53e3c (patch)
tree00297c01905cff519509598c5340a82c0fc2e941 /src/nb_obj.h
Diffstat (limited to 'src/nb_obj.h')
-rw-r--r--src/nb_obj.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/nb_obj.h b/src/nb_obj.h
new file mode 100644
index 0000000..5793045
--- /dev/null
+++ b/src/nb_obj.h
@@ -0,0 +1,40 @@
+#ifndef NB_OBJ_H
+#define NB_OBJ_H
+
+#define _GCHeader GCObject* next; int tt; int marked
+
+typedef struct {
+ _GCHeader;
+} GCObject;
+
+typedef struct {
+ int n;
+} Instruction;
+
+
+typedef struct {
+ int p;
+
+} Proto; // º¯ÊýÔ­ÐÍ
+
+
+typedef struct {
+ Proto* proto;
+
+} Closure; // ±Õ°ü
+
+
+typedef struct {
+ _GCHeader;
+
+} Map;
+
+typedef struct {
+ _GCHeader;
+} Hashset;
+
+typedef struct {
+ _GCHeader;
+} List;
+
+#endif \ No newline at end of file