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

Issue 968263002: [strong] Fix scoping related errors for methods. (Closed)

Created:
5 years, 9 months ago by marja
Modified:
5 years, 9 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[strong] Fix scoping related errors for methods. Methods can refer to the class name. BUG=v8:3927 LOG=N Committed: https://crrev.com/4a709dd65837edd10c60c68e47ae8dc9727ecc33 Cr-Commit-Position: refs/heads/master@{#27075}

Patch Set 1 #

Patch Set 2 : fix #

Patch Set 3 : such a hack #

Patch Set 4 : hack removal part 1 #

Patch Set 5 : hack removal part 2 #

Patch Set 6 : refactoring, better checks, enabling test #

Patch Set 7 : . #

Total comments: 6

Patch Set 8 : code review (arv@) #

Total comments: 7

Patch Set 9 : code review (rossberg@) #

Patch Set 10 : new approach #

Patch Set 11 : . #

Total comments: 5

Patch Set 12 : fixing unnamed classes + added tests #

Total comments: 10

Patch Set 13 : code review (dslomov@, arv@) #

Total comments: 6

Patch Set 14 : code review (arv, rossberg) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+210 lines, -54 lines) Patch
M src/objects.h View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M src/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -2 lines 0 comments Download
M src/preparser.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -4 lines 0 comments Download
M src/scopeinfo.cc View 1 2 3 4 5 6 7 8 9 2 chunks +13 lines, -1 line 0 comments Download
M src/scopes.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +25 lines, -5 lines 0 comments Download
M src/scopes.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +63 lines, -30 lines 0 comments Download
M test/mjsunit/strong/declaration-after-use.js View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +92 lines, -12 lines 0 comments Download

Messages

Total messages: 22 (3 generated)
marja
ptal. I have no idea whether adding CLASS_SCOPE makes sense to begin with or whether ...
5 years, 9 months ago (2015-03-03 15:12:37 UTC) #2
arv (Not doing code reviews)
https://codereview.chromium.org/968263002/diff/120001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/968263002/diff/120001/src/parser.cc#newcode4166 src/parser.cc:4166: // Unnamed classes should not have scopes (the class ...
5 years, 9 months ago (2015-03-03 15:36:29 UTC) #3
marja
Routing offline discussion here: https://codereview.chromium.org/968263002/diff/120001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/968263002/diff/120001/src/parser.cc#newcode4166 src/parser.cc:4166: // Unnamed classes should not ...
5 years, 9 months ago (2015-03-03 15:52:14 UTC) #4
rossberg
I think class_scope makes sense. Might be useful for other purposes as well (e.g. devtools). ...
5 years, 9 months ago (2015-03-04 10:39:27 UTC) #5
marja
Thanks for having a look. dslomov@, class_scope, yay or nay? https://codereview.chromium.org/968263002/diff/140001/src/scopes.cc File src/scopes.cc (right): https://codereview.chromium.org/968263002/diff/140001/src/scopes.cc#newcode802 ...
5 years, 9 months ago (2015-03-04 11:14:39 UTC) #6
rossberg
lgtm https://codereview.chromium.org/968263002/diff/140001/src/scopes.cc File src/scopes.cc (right): https://codereview.chromium.org/968263002/diff/140001/src/scopes.cc#newcode802 src/scopes.cc:802: return "class"; On 2015/03/04 11:14:38, marja wrote: > ...
5 years, 9 months ago (2015-03-04 12:39:33 UTC) #7
Dmitry Lomov (no reviews)
Putting not lgtm marker just to prevent accidental landing. The CLASS_SCOPE addition looks fine to ...
5 years, 9 months ago (2015-03-04 13:08:15 UTC) #8
Dmitry Lomov (no reviews)
This approach looks good to me, and seems like CLASS_SCOPE is unnecessary complication indeed. As ...
5 years, 9 months ago (2015-03-06 14:48:01 UTC) #9
marja
Disclaimer, after patch set 10 this is a rewritten version: 1) No CLASS_SCOPE, we don't ...
5 years, 9 months ago (2015-03-06 15:50:17 UTC) #10
marja
No, I was confused. I was just failing w/ unnamed classes but I fixed that. ...
5 years, 9 months ago (2015-03-06 16:14:23 UTC) #11
arv (Not doing code reviews)
I like this better. https://codereview.chromium.org/968263002/diff/220001/src/scopes.cc File src/scopes.cc (right): https://codereview.chromium.org/968263002/diff/220001/src/scopes.cc#newcode1455 src/scopes.cc:1455: if (!IsConciseMethod(function_kind_) && !IsConstructor(function_kind_)) { ...
5 years, 9 months ago (2015-03-06 16:37:24 UTC) #12
Dmitry Lomov (no reviews)
lgtm from my side % arv@'s and mine comments https://codereview.chromium.org/968263002/diff/200001/test/mjsunit/strong/declaration-after-use.js File test/mjsunit/strong/declaration-after-use.js (right): https://codereview.chromium.org/968263002/diff/200001/test/mjsunit/strong/declaration-after-use.js#newcode218 test/mjsunit/strong/declaration-after-use.js:218: ...
5 years, 9 months ago (2015-03-07 18:17:11 UTC) #13
marja
Thanks for comments! arv@, lgty? https://codereview.chromium.org/968263002/diff/220001/src/scopes.cc File src/scopes.cc (right): https://codereview.chromium.org/968263002/diff/220001/src/scopes.cc#newcode1455 src/scopes.cc:1455: if (!IsConciseMethod(function_kind_) && !IsConstructor(function_kind_)) ...
5 years, 9 months ago (2015-03-09 10:01:38 UTC) #14
rossberg
lgtm https://codereview.chromium.org/968263002/diff/240001/src/scopes.cc File src/scopes.cc (right): https://codereview.chromium.org/968263002/diff/240001/src/scopes.cc#newcode1453 src/scopes.cc:1453: Variable* Scope::ClassVariableForMethod() const { Nit: move this next ...
5 years, 9 months ago (2015-03-09 10:41:47 UTC) #15
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/968263002/diff/240001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/968263002/diff/240001/src/parser.cc#newcode4177 src/parser.cc:4177: DCHECK(block_scope->num_var_or_const() == 0); Prefer DCHECK_EQ etc in general
5 years, 9 months ago (2015-03-09 13:39:05 UTC) #16
marja
thanks for review! https://codereview.chromium.org/968263002/diff/240001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/968263002/diff/240001/src/parser.cc#newcode4177 src/parser.cc:4177: DCHECK(block_scope->num_var_or_const() == 0); On 2015/03/09 13:39:05, ...
5 years, 9 months ago (2015-03-09 13:44:07 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/968263002/260001
5 years, 9 months ago (2015-03-09 13:45:38 UTC) #20
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years, 9 months ago (2015-03-09 14:30:35 UTC) #21
commit-bot: I haz the power
5 years, 9 months ago (2015-03-09 14:30:56 UTC) #22
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/4a709dd65837edd10c60c68e47ae8dc9727ecc33
Cr-Commit-Position: refs/heads/master@{#27075}

Powered by Google App Engine
This is Rietveld 408576698