[webkit-reviews] review denied: [Bug 19750] Merge inc/dec halves of PrefixResolveNode and PostfixResolveNode : [Attachment 21908] Patch to merge inc/dec halves of PrefixResolveNode and PostfixResolveNode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 24 21:29:36 PDT 2008


Cameron Zwarich (cpst) <cwzwarich at uwaterloo.ca> has denied Gavin Barraclough
<barraclough at apple.com>'s request for review:
Bug 19750: Merge inc/dec halves of PrefixResolveNode and PostfixResolveNode
https://bugs.webkit.org/show_bug.cgi?id=19750

Attachment 21908: Patch to merge inc/dec halves of PrefixResolveNode and
PostfixResolveNode
https://bugs.webkit.org/attachment.cgi?id=21908&action=edit

------- Additional Comments from Cameron Zwarich (cpst)
<cwzwarich at uwaterloo.ca>
I think this is unnecessary:

+    RegisterID* (CodeGenerator::*emitPostIncOrDec)(RegisterID* dst,
RegisterID* srcDst) = (m_operator == OpPlusPlus) ? &CodeGenerator::emitPostInc
: &CodeGenerator::emitPostDec;

+    RegisterID* (CodeGenerator::*emitPreIncOrDec)(RegisterID* srcDst) =
(m_operator == OpPlusPlus) ? &CodeGenerator::emitPreInc :
&CodeGenerator::emitPreDec;

Use CodeGenerator::emitUnaryOp() and CodeGenerator::emitUnaryNoDstOp() with an
inline conditional expression, or make a helper function.

You don't need parentheses around the entire conditional expression here:

+	     RefPtr<RegisterID> r0 =
generator.emitLoad(generator.finalDestination(dst), ((m_operator == OpPlusPlus)
? 1.0 : -1.0));

Also, rewrite the FIXME comment in PostfixResolveNode::emitCode() so it is
still correct.


More information about the webkit-reviews mailing list