You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 3, 2025. It is now read-only.
This is posted as an issue because it needs further thinking.
If we have a function like:
funadd(a: int, b: int): int {
returna+b;
}
The compiler will output the following instructions:
istore 0
istore 4
iload 4
iload 0
iadd
iret
ret
More efficient way would be:
iadd
iret
ret
Should such edge cases be addressed? For some operators (-, /) this optimization would just work when the arguments have the correct order (for others we need swapping)