Fix bug in codegen.
This commit is contained in:
parent
a7e24c059b
commit
86ee6557cf
|
@ -134,7 +134,8 @@ module Chalk
|
||||||
cond_jump.offset = @instructions.size - old_size + 1
|
cond_jump.offset = @instructions.size - old_size + 1
|
||||||
after_jump.offset = before_cond - instructions.size + 1
|
after_jump.offset = before_cond - instructions.size + 1
|
||||||
when Trees::TreeReturn
|
when Trees::TreeReturn
|
||||||
generate! tree.rvalue, table, RETURN_REG, free
|
generate! tree.rvalue, table, free, free + 1
|
||||||
|
loadr RETURN_REG, free
|
||||||
ret
|
ret
|
||||||
end
|
end
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user