I identified the following code segments which may be incorrect/unintended
uses of Util::maskFromIndex:
1. In EInstruction::prepare, the following line:
vdata->prefRegisterMask |= Util::maskFromIndex(var->regMask);
I believe this should be simply:
vdata->prefRegisterMask |= var->regMask;
2. In EVariableHint::translate, the following line:
cc.allocVar(_vdata, _hintValue, VARIABLE_ALLOC_READWRITE);
The _hintValue is passed as a mask, but according to CompilerCore::alloc it
is an index.
3. In FunctionPrototype::_setCallingConvention, there are dozens of explicit
bit shifts that could be replaced by calls to Util::maskFromIndex.
Thank you,
Sam Harwell
sorry for long delay, I'm going to look at these issues.
#1: is definitelly bug
#2: I think that _hintValue should be already mask, but I need to check it
#3: They could be replaced
Thanks for viewing the code!
Best regards
Petr Kobalicek