Bug 121141

Summary: Int32ToDouble should be predicted SpecInt48 and predictions should have nothing to do with constant folding
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, buildbot, ggaren, graouts, mark.lam, mhahnenberg, msaboff, oliver, rniwa, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 121064    
Attachments:
Description Flags
the patch
ggaren: review+
even better patch
oliver: review+, buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 none

Description Filip Pizlo 2013-09-10 22:43:35 PDT
Just changing Int32ToDouble to be predicted SpecInt48 breaks constant folding on that node because of soooper old code that prevented constant folding on mismatched predictions.  Kill that code.
Comment 1 Filip Pizlo 2013-09-10 22:48:34 PDT
Created attachment 211282 [details]
the patch
Comment 2 Geoffrey Garen 2013-09-11 08:59:04 PDT
Comment on attachment 211282 [details]
the patch

r=me
Comment 3 Filip Pizlo 2013-09-11 13:25:24 PDT
Created attachment 211345 [details]
even better patch

Introduce setConstant(node, value) method that does both of these things:

forNode(node).set(m_graph, value)
m_state.setFoundConstants(true)
Comment 4 Build Bot 2013-09-11 13:55:17 PDT
Comment on attachment 211345 [details]
even better patch

Attachment 211345 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/1738828

New failing tests:
js/dfg-constant-fold-misprediction.html
Comment 5 Build Bot 2013-09-11 13:55:19 PDT
Created attachment 211347 [details]
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-10  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.4
Comment 6 Filip Pizlo 2013-09-11 14:24:25 PDT
(In reply to comment #4)
> (From update of attachment 211345 [details])
> Attachment 211345 [details] did not pass mac-wk2-ews (mac-wk2):
> Output: http://webkit-queues.appspot.com/results/1738828
> 
> New failing tests:
> js/dfg-constant-fold-misprediction.html

Because I forgot to upload the test change with this patch like I did with the last one.
Comment 7 Filip Pizlo 2013-09-11 15:05:49 PDT
Landed in http://trac.webkit.org/changeset/155567
Comment 8 Antoine Quint 2013-11-02 06:47:23 PDT
I think this introduced a regression, see https://bugs.webkit.org/show_bug.cgi?id=123664.