Bug 110659 - DFG::SpeculativeJIT::speculateNumber() should just use SpeculateDoubleOperand instead of doing its own thing
Summary: DFG::SpeculativeJIT::speculateNumber() should just use SpeculateDoubleOperand...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-22 16:42 PST by Filip Pizlo
Modified: 2013-02-22 17:12 PST (History)
7 users (show)

See Also:


Attachments
the patch (2.71 KB, patch)
2013-02-22 16:43 PST, Filip Pizlo
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2013-02-22 16:42:11 PST
This simplifies the code, and also has the effect that if speculateNumber() is called prior to someone actually using the number in a double context, then the number will already be up-converted to double and ready to go.

Previously if this ever came up, the subsequent use would have to again branch to see if the value is tagged as int or tagged as double.

On the other hand, if you ever did speculateNumber() and then used the value as a JSValue, this will be a slow down now.

I suspect that the former (speculateNumber() and then use as number) is more likely than the latter (speculateNumber() and then use as JSValue).
Comment 1 Filip Pizlo 2013-02-22 16:43:39 PST
Created attachment 189862 [details]
the patch
Comment 2 Filip Pizlo 2013-02-22 17:12:51 PST
Landed in http://trac.webkit.org/changeset/143818