Return overwrite #2
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: TheCurle/Erythro#2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Consider the following ASM snippet generated by build 10:
See the three highlighted lines.
As it currently stands, the register used to output a variable is deallocated as soon as it is populated, allowing the compiler to use the register immediately upon the next assignment.
This leads to things like
Print(Function() + 10)
behaving likePrint(10 + 10)
.This could be fixed by just not deallocating the register after it's used, but there would need to be other systems in place to garbage check the register.
I'm actually embarrassed about this one. After spending a day or two working on other things, i realised that i was actually trying to deallocate the register used to input the value. Instead i was deallocating the one used to output, hence... stupid bug.
Onto bigger fish!