[webkit-reviews] review denied: [Bug 14112] Cross-port KDE KJS UnaryPlus and UnaryMinus optimizations : [Attachment 15864] Proposed patch

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


Darin Adler <darin at apple.com> has denied Cameron Zwarich (cpst)
<cwzwarich at uwaterloo.ca>'s request for review:
Bug 14112: Cross-port KDE KJS UnaryPlus and UnaryMinus optimizations
http://bugs.webkit.org/show_bug.cgi?id=14112

Attachment 15864: Proposed patch
http://bugs.webkit.org/attachment.cgi?id=15864&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
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.



More information about the webkit-reviews mailing list