JSObject needs getAsNumber to avoid costly string/number conversions This would be very useful for the bracket access operator on String when used in a numeric context, no create a substring to hold a single UChar.
Funny, we were discussing this on Friday... re-editing what you wrote and having it come out in sentence fragments. I meant "a numeric context. There would then be no need to create a substring...".
How does this fit in with "toNumber" and "getNumber"? What does getAsNumber return if the value is not a number?
Hum... what I should have said was "getToNumber", since the idea behind all of the "evaluateToFoo" calls is that they're equivalent to to calling evaluate(exec)->toFoo(exec). I would want the same to hold true for any get variants. so this should be the awkward name, "getToNumber". I feel like I'm herding values or something...
We do now have separate paths for string/numeric property access; I don't think this bug is still tracking a viable change.