Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Issue 2369933005: Speedup global_proxy.* attributes/accessors (specialize GlobalProxy access). (Closed)

Created:
4 years, 2 months ago by Alfonso
Modified:
4 years, 1 month ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

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. BUG=chromium:634276

Patch Set 1 #

Total comments: 16

Patch Set 2 : Cleanup + better naming #

Total comments: 2

Patch Set 3 : Fix format goof #

Patch Set 4 : Fix context check #

Patch Set 5 : Add map checks to support 'this' behavior inside fuctions #

Total comments: 2

Patch Set 6 : Nits #

Patch Set 7 : Merge cached accessors + global proxy specialization #

Unified diffs Side-by-side diffs Delta from patch set Stats (+431 lines, -132 lines) Patch
M include/v8.h View 1 2 3 4 5 6 2 chunks +10 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 4 chunks +24 lines, -2 lines 0 comments Download
M src/crankshaft/hydrogen.h View 1 2 3 4 1 chunk +9 lines, -7 lines 0 comments Download
M src/crankshaft/hydrogen.cc View 1 2 3 4 5 6 8 chunks +191 lines, -115 lines 0 comments Download
M src/ic/ic.cc View 1 2 3 4 5 6 2 chunks +10 lines, -1 line 0 comments Download
M src/objects.h View 1 2 3 4 5 6 3 chunks +8 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 2 chunks +37 lines, -4 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects-printer.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-api-accessors.cc View 1 2 3 4 5 6 2 chunks +138 lines, -2 lines 0 comments Download

Messages

Total messages: 25 (16 generated)
Alfonso
This an early working draft. PTAL.
4 years, 2 months ago (2016-09-27 12:52:36 UTC) #3
vogelheim
Looks good, generally. I am concerned about he return NULL thing; someone w/ better understanding ...
4 years, 2 months ago (2016-09-27 13:36:54 UTC) #4
Alfonso
Toon, PTAL. Is this going on the right direction?
4 years, 2 months ago (2016-09-27 13:39:30 UTC) #6
Toon Verwaest
https://codereview.chromium.org/2369933005/diff/1/src/crankshaft/hydrogen.cc File src/crankshaft/hydrogen.cc (right): https://codereview.chromium.org/2369933005/diff/1/src/crankshaft/hydrogen.cc#newcode5457 src/crankshaft/hydrogen.cc:5457: bool HOptimizedGraphBuilder::LookupGlobalPropertyCell( This should probably be called "CanInlineGlobalPropertyAccess" https://codereview.chromium.org/2369933005/diff/1/src/crankshaft/hydrogen.cc#newcode5494 ...
4 years, 2 months ago (2016-09-27 14:57:12 UTC) #7
Alfonso
PTAL. https://codereview.chromium.org/2369933005/diff/1/src/crankshaft/hydrogen.cc File src/crankshaft/hydrogen.cc (right): https://codereview.chromium.org/2369933005/diff/1/src/crankshaft/hydrogen.cc#newcode5457 src/crankshaft/hydrogen.cc:5457: bool HOptimizedGraphBuilder::LookupGlobalPropertyCell( On 2016/09/27 14:57:12, Toon Verwaest wrote: ...
4 years, 2 months ago (2016-09-29 09:36:40 UTC) #8
Toon Verwaest
Much better! lgtm. vogelheim please review as well :)
4 years, 2 months ago (2016-09-29 13:19:47 UTC) #10
vogelheim
lgtm https://codereview.chromium.org/2369933005/diff/20001/src/crankshaft/hydrogen.cc File src/crankshaft/hydrogen.cc (right): https://codereview.chromium.org/2369933005/diff/20001/src/crankshaft/hydrogen.cc#newcode7705 src/crankshaft/hydrogen.cc:7705: && maps->first()->IsJSGlobalProxyMap() && style nitpick: " && xxxxx ...
4 years, 2 months ago (2016-09-29 15:21:13 UTC) #11
jochen (gone - plz use gerrit)
lgtm with nit https://codereview.chromium.org/2369933005/diff/80001/src/crankshaft/hydrogen.cc File src/crankshaft/hydrogen.cc (right): https://codereview.chromium.org/2369933005/diff/80001/src/crankshaft/hydrogen.cc#newcode7728 src/crankshaft/hydrogen.cc:7728: return NULL; nit. nullptr https://codereview.chromium.org/2369933005/diff/80001/src/crankshaft/hydrogen.cc#newcode7750 src/crankshaft/hydrogen.cc:7750: ...
4 years, 2 months ago (2016-09-30 10:49:25 UTC) #24
vogelheim
4 years, 1 month ago (2016-11-08 09:30:46 UTC) #25
This work landed (w/ minor changes) as crrev.com/2403003002. Closing this CL.

Powered by Google App Engine
This is Rietveld 408576698