RESOLVED INVALID 15959
JSObject needs getToNumber to avoid costly string/number conversions
https://bugs.webkit.org/show_bug.cgi?id=15959
Summary JSObject needs getToNumber to avoid costly string/number conversions
Eric Seidel (no email)
Reported 2007-11-12 13:32:32 PST
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.
Attachments
Eric Seidel (no email)
Comment 1 2007-11-12 13:34:22 PST
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...".
Geoffrey Garen
Comment 2 2007-11-12 13:35:47 PST
How does this fit in with "toNumber" and "getNumber"? What does getAsNumber return if the value is not a number?
Eric Seidel (no email)
Comment 3 2007-11-12 14:49:05 PST
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...
Gavin Barraclough
Comment 4 2012-09-06 17:33:05 PDT
We do now have separate paths for string/numeric property access; I don't think this bug is still tracking a viable change.
Note You need to log in before you can comment on or make changes to this bug.