move type enum out of struct

This commit is contained in:
r4
2021-12-28 13:55:01 +01:00
parent 0d5313a063
commit befce544e7
6 changed files with 61 additions and 69 deletions

4
vm.c
View File

@@ -67,9 +67,9 @@ void run(const IRToks *ir, const BuiltinFunc *builtin_funcs) {
}
Value *v = &s.mem[instr->Unary.val.Addr];
s.mem[instr->Unary.addr] = (Value){
.type.kind = TypePtr,
.type = TypePtr,
.Ptr = {
.type.kind = v->type.kind,
.type = v->type,
.val = v,
},
};