Bug 68932

Summary: DFG JIT should speculate more aggressively on reads of array.length
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch
oliver: review+
the patch oliver: review-

Filip Pizlo
Reported 2011-09-27 14:11:26 PDT
DFG JIT currently optimizes accesses to array.length the same way as the old JIT: it generates a stub on the fly when an array length access is detected after the code is already compiled. But the DFG has all the information it needs to inline a fast speculative array length access.
Attachments
the patch (5.07 KB, patch)
2011-09-27 14:14 PDT, Filip Pizlo
oliver: review+
the patch (12.99 KB, patch)
2011-09-27 14:48 PDT, Filip Pizlo
oliver: review-
Filip Pizlo
Comment 1 2011-09-27 14:14:22 PDT
Created attachment 108895 [details] the patch
Oliver Hunt
Comment 2 2011-09-27 14:17:35 PDT
Comment on attachment 108895 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=108895&action=review > Source/JavaScriptCore/dfg/DFGPropagator.cpp:695 > +#if ENABLE(DFG_DEBUG_PROPAGATION_VERBOSE) > + printf(" @%u -> GetArrayLength", nodeIndex); > +#endif please add debug message macros
Filip Pizlo
Comment 3 2011-09-27 14:48:37 PDT
Created attachment 108903 [details] the patch Added debug message macro.
Oliver Hunt
Comment 4 2011-09-27 15:03:03 PDT
Comment on attachment 108903 [details] the patch I'd rather #define DFG_DEBUG_PROPAGATION(msg...) printf(msg); But my suggestion was meant for a following patch
Filip Pizlo
Comment 5 2011-09-27 15:04:28 PDT
(In reply to comment #4) > (From update of attachment 108903 [details]) > I'd rather #define DFG_DEBUG_PROPAGATION(msg...) printf(msg); > > But my suggestion was meant for a following patch So you want me to commit the previous patch, and then do the refactoring separately?
Filip Pizlo
Comment 6 2011-09-27 20:39:26 PDT
Landed in r96184.
Note You need to log in before you can comment on or make changes to this bug.