Add compound assignment operators to Indigo
Clarification and motivation
With !254 (merged) it was introduced varActionUpdate
which allows updating a variable in-place, given a binary instruction and a value on top of the stack.
We can use this to add compound assignment operators (e.g. a += b
) that would be faster than their current counterpart (e.g. setVar a (a +. b)
), because they would only only need to copy a value and apply an update (instead of copying 2 value, apply the function and replace one value).
Acceptance criteria
Compound assignment operators, using the "updating method", for as many of the existing operators are implemented.