[Webkit-unassigned] [Bug 19750] 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


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


cwzwarich at uwaterloo.ca changed:

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




------- Comment #2 from cwzwarich at uwaterloo.ca  2008-06-24 21:29 PDT -------
(From update of attachment 21908)
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.


-- 
Configure bugmail: https://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