add generic arrays

This commit is contained in:
r4
2021-12-30 17:59:28 +01:00
parent 6f91a71306
commit f6b74f8f97
7 changed files with 162 additions and 5 deletions

7
ir.h
View File

@@ -51,6 +51,7 @@ enum IRInstr {
IRJnz,
IRCallInternal,
IRAddrOf,
IRArrMake,
IRInstrEnumSize,
};
typedef enum IRInstr IRInstr;
@@ -106,6 +107,12 @@ typedef struct IRTok {
size_t n_args;
IRParam *args;
} CallI;
struct {
size_t arr_addr;
size_t len, cap;
IRParam *vals;
} ArrMake;
};
} IRTok;