Bug 148895 - baseline JIT should emit better code for UnresolvedProperty in resolve_scope/get_from_scope/put_to_scope
Summary: baseline JIT should emit better code for UnresolvedProperty in resolve_scope/...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-05 00:54 PDT by Saam Barati
Modified: 2015-09-08 12:11 PDT (History)
11 users (show)

See Also:


Attachments
patch (25.79 KB, patch)
2015-09-05 02:34 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (48.87 KB, patch)
2015-09-05 14:46 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (48.89 KB, patch)
2015-09-05 15:03 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2015-09-05 00:54:54 PDT
Specifically:
We should emit code that checks the current resolve type of the instruction stream.
The first execution of a UnresolvedProperty will call into the slow path,
then, the slow path will do its best to update the ResolveType from UnresolvedProperty
to GlobalProperty/GlobalLexicalVar.
The current baseline implementation will always go to the slow path, where it will transition
the ResolveType to something more useful, but then, the executing code will still always
take the slow path because it never checks for the updated ResolveType. The updated ResolveType
will only ever get noticed when DFG compiling. 
Instead, the baseline code we emit should check for updated ResolveTypes, and if it finds 
that the ResolveType was updated, it can prevent going down the slow path and execute the
code it normally would. This is greatly beneficial because the slow path will update the
ResolveType with high probability.
Comment 1 Saam Barati 2015-09-05 02:34:33 PDT
Created attachment 260682 [details]
patch

Almost done, just needs 32-bit.
Comment 2 Saam Barati 2015-09-05 14:46:24 PDT
Created attachment 260700 [details]
patch
Comment 3 WebKit Commit Bot 2015-09-05 14:47:09 PDT
Attachment 260700 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/jit/JITPropertyAccess.cpp:693:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITPropertyAccess.cpp:819:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITPropertyAccess.cpp:964:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp:723:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp:852:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp:998:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 6 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Saam Barati 2015-09-05 15:03:47 PDT
Created attachment 260701 [details]
patch
Comment 5 WebKit Commit Bot 2015-09-05 15:06:19 PDT
Attachment 260701 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/jit/JITPropertyAccess.cpp:693:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITPropertyAccess.cpp:819:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITPropertyAccess.cpp:964:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp:723:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp:852:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp:998:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 6 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Geoffrey Garen 2015-09-08 11:10:53 PDT
Comment on attachment 260701 [details]
patch

r=me
Comment 7 WebKit Commit Bot 2015-09-08 12:11:14 PDT
Comment on attachment 260701 [details]
patch

Clearing flags on attachment: 260701

Committed r189501: <http://trac.webkit.org/changeset/189501>
Comment 8 WebKit Commit Bot 2015-09-08 12:11:19 PDT
All reviewed patches have been landed.  Closing bug.