Bug 68294

Summary: method_check should repatch itself if it finds that the new structure(s) are the result of transitions from the old structure(s)
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, fpizlo, ggaren, oliver, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch
none
the patch barraclough: review+

Description Filip Pizlo 2011-09-16 17:11:43 PDT
The method_check optimization in the old JIT is now relied upon as a kind of profiling by the DFG JIT.  But this fails if the method_check takes the slow path simply because the structures it was caching on were transitioned.  This results in missed dead code elimination and inlining opportunities in the DFG.

The old JIT should simply repatch the fast path of method_check if it finds that the slow path was taken only because of structure transitions, but that the specific function optimization for that property is otherwise intact.
Comment 1 Filip Pizlo 2011-09-16 17:15:46 PDT
Created attachment 107749 [details]
the patch
Comment 2 WebKit Review Bot 2011-09-16 17:18:40 PDT
Attachment 107749 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1

Source/JavaScriptCore/jit/JITStubs.cpp:1634:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
Source/JavaScriptCore/jit/JITStubs.cpp:1644:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
Source/JavaScriptCore/jit/JITStubs.cpp:1645:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
Source/JavaScriptCore/jit/JITStubs.cpp:1646:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
Total errors found: 4 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Filip Pizlo 2011-09-16 17:34:33 PDT
Created attachment 107751 [details]
the patch
Comment 4 Filip Pizlo 2011-09-17 16:32:41 PDT
Landed in r95388.