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
Which causes the outer function's a parameter to be set to 2, resulting in an incorrect result.
We should probably handle inner function calls first, but that's more complex than it might sound, because it also needs to take into account calls in other expressions:
add(1,2 + add(3,4))
The text was updated successfully, but these errors were encountered:
No matter which order we call the inner functions in, one of the arguments to the outer function will be incorrect. We need to store some intermediate variable
For now we could just use a naive approach, where any nested calls to the same function would be stored in a temp variable, and then optimise it later. There probably are not many cases we can optimise anyway
This code:
Generates:
Which causes the outer function's
a
parameter to be set to2
, resulting in an incorrect result.We should probably handle inner function calls first, but that's more complex than it might sound, because it also needs to take into account calls in other expressions:
The text was updated successfully, but these errors were encountered: