[Webkit-unassigned] [Bug 14112] Cross-port KDE KJS UnaryPlus and UnaryMinus optimizations

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 11 15:38:44 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=14112


darin at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #15864|review?                     |review-
               Flag|                            |




------- Comment #7 from darin at apple.com  2007-08-11 15:38 PDT -------
(From update of attachment 15864)
This doesn't seem like an important optimization. How often does this happen in
practice? Also, it seems like it breaks serialization of functions.

+    if (n->isNumber())
+        return n;
+    else
+        return new UnaryPlusNode(n);

We normally don't do else after return.

The whitespace in the code above doesn't match our usual idiom. For example it
should be this.

        NumberNode* number = static_cast<NumberNode*>(n);

Also:

+    double value() const KJS_FAST_CALL { return val; }
+    void setValue(double v) KJS_FAST_CALL { val = v; }

Do inline functions like these need KJS_FAST_CALL?

review- because of the "breaks serialization" issue. It's fine to optimize
execution but somehow we have to record the original code so we can produce it
on demand.


-- 
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