-
Feature Request
-
Resolution: Done
-
Major
-
1.2.1
-
None
Currently, it is not possible to use the assignment operator in Byteman rules. This is an unnecessary restriction. It is quite reasonable to allow rebinding of BIND variables and $ variables in the rule body so tat subsequent references use the rebound value.
BIND variables are straightforward. $ variables pose a more interesting question. Should the modifications be propagated back into the trigger method?
If it is possible to do so then I believe the answer should be yes. So, non-final parameters (clearly that excludes $0 or $this which is implictly final) and local variables ought to be updated when the trigger call returns. Similarly, assigning $! in an AT EXIT rule should cause the return value on the stack at the trigger point to be updated before the return is executed. Achieving this is tricky but should be possible.