support all operators for both actionD and varaction2 or give a nice error message
All expressions should get 2 new functions: supported_by_varaction2 and supported_by_actionD. That way the varaction2 code can delegate as much as possible to the actionD code (but never subexpressions that are not supported). For those cases that are not supported by either (lets say that the ternary operator would only be supported by actionD code but one of the expressions in it contains a variable) we should display a nice error message describing the actual problem.
Change: Spit out some more specific error messages upon encountering an expression that is not valid in action2/actionD (closes #1032).
#1 Updated by Hirundo over 9 years ago
Overview of currently unsupported operators:
ActionD: ^ doable as (a|b) - (a&b) min doable as (a<b)?a:b max doable as (a>b)?a:b STO_TMP inherently unusable STO_PERM inherently unusable << Do as op 05. >> I suggest using op 06 for this. We can additionally implement unsigned bit shifts using the >>> operator. action2: 2^x can be computed using (1 ror (32-x)) (with a special check for x>=32) << a * (2^x) >> a / (2^x) HASBIT (a & (1 << x)) != 0