[Webkit-unassigned] [Bug 14112] Cross-port KDE KJS UnaryPlus and UnaryMinus optimizations
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 14 01:26:27 PDT 2007
http://bugs.webkit.org/show_bug.cgi?id=14112
------- Comment #16 from jruderman at gmail.com 2007-08-14 01:26 PDT -------
Decompiling "a = - - 5" as "a = 5" is fine, since both statements do exactly
the same thing. SpiderMonkey developers refer to this and related
optimizations as "constant folding".
Constant folding usually doesn't cause jsfunfuzz to complain, since jsfunfuzz
only cares whether the decompiled function is canonical, not whether it roughly
matches the original. (An example where it might confuse jsfunfuzz is if
"2*(3+4)" were to become "2*7" and then become "14" instead of just becoming
"14" on the first trip.)
Note that turning "- - x" or "+ x" into "x" is not correct, because it loses a
coercion-to-number.
If you add this optimization, be sure to test that you get zero vs.
negative-zero right: "-0" should not just become "0".
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list