Norris Boyd wrote:
> I think the real bug here is a missing call to convertParameter() for
> the index expression in the Token.SETELEM case. This call will convert
> the parameter to an object type. I've checked in a fix and updated the
> bug. This fix is suboptimal in that if a number is passed in as a
> parameter, then the number will be converted to an object rather than
> using that number value in a call to the special
> OptRuntime.setObjectIndex. But for the non-parameter case
> OptRuntime.setObjectIndex should still be used if the index is a
> number.

Understood.  I didn't realise that that was the purpose of
convertParameter().  (The method name isn't that intuitive, and the
method isn't documented.)  But also I guessed that there should be a way
of telling if a function parameter is always called with a number, but
maybe the data flow analysis doesn't determine that?

-- 
Cameron McCormack ≝ http://mcc.id.au/
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to