Prepare before typing the untyped

This commit is contained in:
Krzosa Karol
2022-06-22 10:07:23 +02:00
parent a229891485
commit de159fc7d9
3 changed files with 19 additions and 9 deletions

View File

@@ -143,7 +143,6 @@ union Register{
};
enum{
REG_NULL,
REG_STACK_POINTER,
REG_INSTRUCTION_POINTER,
REG_SPECIAL_COUNT,
@@ -186,7 +185,7 @@ struct Bc{
//
function Register_Index
allocate_register(Bc *b){
Register_Index result = 0;
Register_Index result = -1;
if(b->free_registers.len == 0)
result = b->registers.addi({});
else
@@ -208,6 +207,7 @@ release_register(Bc *b, Register_Index reg){
}
assert_msg(found, "Trying to release register that is not used");
b->free_registers.add(reg);
}
function Bc