Commit 36f3f909 authored by vogelheim's avatar vogelheim Committed by Commit bot

Speedup access to global_proxy.* attributes/accessors.

Using a global proxy (e.g. 'window.f', 'w.f' or 'this.f') is considerably slower than evaluating just 'f'. This CL aims to perform the necessary checks at compile time and inline the accesses.

This is a follow-on CL to crrev.com/2369933005:
- The initial upload is crrev.com/2369933005 + a rebase.
- The remaining issues are the fixes requested by the reviewers on that CL.

BUG=chromium:634276, chromium:654716, chromium:656959

Committed: https://crrev.com/8f43d748272536117008aa6a1b53ea52126261c1
Committed: https://crrev.com/041314524952a3c1bc71bd3beafbbb37319f1d22
Review-Url: https://codereview.chromium.org/2403003002
Cr-Original-Original-Commit-Position: refs/heads/master@{#40153}
Cr-Original-Commit-Position: refs/heads/master@{#40365}
Cr-Commit-Position: refs/heads/master@{#40671}
parent 26547761
This diff is collapsed.
......@@ -2333,13 +2333,15 @@ class HOptimizedGraphBuilder : public HGraphBuilder,
#undef DECLARE_VISIT
private:
// Helpers for flow graph construction.
enum GlobalPropertyAccess {
kUseCell,
kUseGeneric
};
GlobalPropertyAccess LookupGlobalProperty(Variable* var, LookupIterator* it,
PropertyAccessType access_type);
bool CanInlineGlobalPropertyAccess(Variable* var, LookupIterator* it,
PropertyAccessType access_type);
bool CanInlineGlobalPropertyAccess(LookupIterator* it,
PropertyAccessType access_type);
void InlineGlobalPropertyLoad(LookupIterator* it, BailoutId ast_id);
HInstruction* InlineGlobalPropertyStore(LookupIterator* it, HValue* value,
BailoutId ast_id);
void EnsureArgumentsArePushedForAccess();
bool TryArgumentsAccess(Property* expr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment