[Webkit-unassigned] [Bug 15879] Add evaluateToNumber fast path for numeric operations

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 7 10:48:28 PST 2007


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





------- Comment #7 from eric at webkit.org  2007-11-07 10:48 PDT -------
(In reply to comment #6)
> (In reply to comment #5)
> > (From update of attachment 17106 [edit] [edit])
> > Seems clear that ImmediateNumberNode should store both forms, not just the
> > JSValue.
> 
done, also made ImmediateNumberNode a subclass of NumberNode (much cleaner!)
> 
> > And yes, it's entirely practical to use an inline for cases like
> > BracketAccessorNode::evaluateToNumber, since it's really identical to the
> > normal evaluate followed by toNumber, and for MultNode::evaluate, which is
> > identical to evaluateToNumber followed by jsNumber. ALWAYS_INLINE will work for
> > such cases.
> 
done.
> 
> > +    if (bothTypes == ((NumberType << 3) | NumberType))
> > +        return v1->toNumber(exec) + v2->toNumber(exec);
> > +    else if (bothTypes == ((StringType << 3) | StringType)) {
> > 
> > Please don't use else after return.
> 
done
> 
> > +    i2 = right->evaluate(exec)->toInt32(exec);
> > 
> > Obviously this should be using evaluateToNumber, unless you're planning on
> > adding evaluateToInt32.
> 
A static cast is not sufficient, saving such for a later patch.

Updating patch now... and then boarding... perf testing later.


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