Prepare before typing the untyped
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user