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

Issue 422923004: Track usage of "this" and "arguments" in Scope (Closed)

Created:
6 years, 4 months ago by aperez
Modified:
6 years, 2 months ago
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Track usage of "this" and "arguments" in Scope This adds flags in Scope to track wheter a Scope uses "this" and, "arguments". The information is exposed via Scope::uses_this(), and Scope::uses_arguments(), respectively. Flags for tracking usage on any inner scope uses are available as well via Scope::inner_uses_this(), and Scope::inner_uses_arguments(). Knowing whether scopes use "this" and "arguments" will be handy to generate the code needed to capture their values when generating the code for arrow functions. BUG=v8:2700 LOG=

Patch Set 1 #

Patch Set 2 : Rebased #

Total comments: 1

Patch Set 3 : Compare pointer directly with AstValueFactory::arguments_string() #

Patch Set 4 : Rebase and fix parser instantiation after r23600 #

Total comments: 8

Patch Set 5 : Do not propagate inner_uses_$foo out of normal functions, more tests #

Total comments: 6

Patch Set 6 : Fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -25 lines) Patch
M src/ast-value-factory.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M src/globals.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M src/objects.h View 1 2 3 4 5 1 chunk +7 lines, -7 lines 0 comments Download
M src/preparser.h View 1 2 3 4 7 chunks +19 lines, -6 lines 0 comments Download
M src/runtime/runtime-debug.cc View 1 2 3 4 3 chunks +5 lines, -2 lines 0 comments Download
M src/scopeinfo.cc View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download
M src/scopes.h View 1 2 3 4 5 chunks +25 lines, -1 line 0 comments Download
M src/scopes.cc View 1 2 3 4 5 4 chunks +22 lines, -0 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 4 2 chunks +118 lines, -3 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
aperez
6 years, 4 months ago (2014-08-02 09:42:19 UTC) #1
arv (Not doing code reviews)
FYI, we will need to do the same for super soon...
6 years, 4 months ago (2014-08-04 18:33:11 UTC) #2
marja
https://codereview.chromium.org/422923004/diff/20001/src/ast-value-factory.h File src/ast-value-factory.h (right): https://codereview.chromium.org/422923004/diff/20001/src/ast-value-factory.h#newcode91 src/ast-value-factory.h:91: bool IsArguments() const { return IsOneByteEqualTo("arguments"); } This doesn't ...
6 years, 4 months ago (2014-08-11 08:51:39 UTC) #3
aperez
On 2014/08/11 08:51:39, marja wrote: > https://codereview.chromium.org/422923004/diff/20001/src/ast-value-factory.h > File src/ast-value-factory.h (right): > > https://codereview.chromium.org/422923004/diff/20001/src/ast-value-factory.h#newcode91 > ...
6 years, 3 months ago (2014-09-02 21:12:27 UTC) #4
marja
On 2014/09/02 21:12:27, aperez wrote: > On 2014/08/11 08:51:39, marja wrote: > > https://codereview.chromium.org/422923004/diff/20001/src/ast-value-factory.h > ...
6 years, 3 months ago (2014-09-04 07:36:36 UTC) #5
aperez
On 2014/09/04 07:36:36, marja wrote: > On 2014/09/02 21:12:27, aperez wrote: > > On 2014/08/11 ...
6 years, 3 months ago (2014-09-04 12:18:49 UTC) #6
marja
Idk. Somebody should do an actual review (I was only looking at the AstValueFactory handling ...
6 years, 3 months ago (2014-09-04 12:28:02 UTC) #7
arv (Not doing code reviews)
https://codereview.chromium.org/422923004/diff/60001/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/422923004/diff/60001/test/cctest/test-parsing.cc#newcode950 test/cctest/test-parsing.cc:950: { "var x = function () { this.foo = ...
6 years, 3 months ago (2014-09-04 16:41:21 UTC) #8
rossberg
https://codereview.chromium.org/422923004/diff/60001/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/422923004/diff/60001/src/preparser.h#newcode613 src/preparser.h:613: bool IsArguments(const AstValueFactory*) const { Why is this change ...
6 years, 3 months ago (2014-09-10 06:33:56 UTC) #9
aperez
On 2014/09/10 06:33:56, rossberg wrote: > https://codereview.chromium.org/422923004/diff/60001/src/preparser.h#newcode613 > src/preparser.h:613: bool IsArguments(const AstValueFactory*) const { > ...
6 years, 2 months ago (2014-10-13 17:59:38 UTC) #10
rossberg
LGTM, with monor nits https://codereview.chromium.org/422923004/diff/60001/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/422923004/diff/60001/test/cctest/test-parsing.cc#newcode927 test/cctest/test-parsing.cc:927: { "f = () => ...
6 years, 2 months ago (2014-10-15 12:56:32 UTC) #11
rossberg
On 2014/10/13 17:59:38, aperez wrote: > On 2014/09/10 06:33:56, rossberg wrote: > > Unfortunately, we ...
6 years, 2 months ago (2014-10-15 12:58:03 UTC) #12
aperez
On 2014/10/15 12:58:03, rossberg wrote: > On 2014/10/13 17:59:38, aperez wrote: > > On 2014/09/10 ...
6 years, 2 months ago (2014-10-15 17:08:40 UTC) #13
aperez
The nits should be fixed now. https://codereview.chromium.org/422923004/diff/60001/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/422923004/diff/60001/test/cctest/test-parsing.cc#newcode927 test/cctest/test-parsing.cc:927: { "f = ...
6 years, 2 months ago (2014-10-15 17:09:52 UTC) #14
wingo (chromium)
6 years, 2 months ago (2014-10-16 13:22:19 UTC) #15
Message was sent while issue was closed.
Committed patchset #6 manually as 24663 (presubmit failed due to an unformatted
patch, but overridden as the changes made by git cl format were to code that was
already present, and the changes that git cl format made were terrible).

Powered by Google App Engine
This is Rietveld 408576698