Commit 8f43d748 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

Review-Url: https://codereview.chromium.org/2403003002
Cr-Commit-Position: refs/heads/master@{#40153}
parent 515873cc
This diff is collapsed.
......@@ -2364,13 +2364,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);
void 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