[Webkit-unassigned] [Bug 55343] Global Math object should be configurable but isn't

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 3 04:31:45 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=55343


Mark S. Miller <erights at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |erights at gmail.com




--- Comment #4 from Mark S. Miller <erights at gmail.com>  2012-01-03 04:31:45 PST ---
(In reply to comment #2)
> Created an attachment (id=120897)
 --> (https://bugs.webkit.org/attachment.cgi?id=120897&action=review) [details]
> Fix for JSON object
> 
> [...] Math [...] slightly faster access.  [..]  Fast access to the Math object is more important since it is used for very small, fast intrinsic functions that will be inlined by the JIT, e.g. abs.  We should fix this bug for the Math object too, but there we will need to pay more concern to avoiding any performance penalty [...]


I just tested on WebKit Nightly r103874, and as I expected the properties on the Math object are correctly writable and configurable. Thus, you have to worry about cache invalidation for of calls to these Math functions anyway. Given that, is it still more expensive to have assignment to Math also invalidate these same caches?


> Math.abs = function(x){return x;}
> Math.abs(-7)
-7

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list