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

Issue 2280033002: Move Parser::Declare to Scope. (Closed)

Created:
4 years, 3 months ago by marja
Modified:
4 years, 3 months ago
Reviewers:
Toon Verwaest, adamk
CC:
v8-reviews_googlegroups.com, adamk
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Move Parser::Declare to Scope. Parser::Declare has a lot of Scope-related logic inside; especially it does Lookup in Scope. Scope should be the class which knows how to declare variables in different kinds of Scopes, not Parser. BUG= Committed: https://crrev.com/ee7dc92f9ec397671ea9a61d7fdac5315abef214 Cr-Commit-Position: refs/heads/master@{#38979}

Patch Set 1 #

Patch Set 2 : first complete version #

Patch Set 3 : rebased #

Patch Set 4 : beautification #

Total comments: 2

Patch Set 5 : less invasive #

Patch Set 6 : . #

Total comments: 2

Patch Set 7 : code review (verwaest@) #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -113 lines) Patch
M src/ast/scopes.h View 1 2 3 4 2 chunks +6 lines, -5 lines 0 comments Download
M src/ast/scopes.cc View 1 2 3 4 5 6 2 chunks +104 lines, -6 lines 5 comments Download
M src/parsing/parser.cc View 1 2 3 4 2 chunks +19 lines, -102 lines 2 comments Download

Messages

Total messages: 30 (21 generated)
marja
ptal https://codereview.chromium.org/2280033002/diff/60001/src/ast/scopes.cc File src/ast/scopes.cc (right): https://codereview.chromium.org/2280033002/diff/60001/src/ast/scopes.cc#newcode784 src/ast/scopes.cc:784: declaration->position(), declaration->proxy()->end_position(), Here the positions are different than ...
4 years, 3 months ago (2016-08-29 08:31:44 UTC) #10
Toon Verwaest
lgtm https://codereview.chromium.org/2280033002/diff/100001/src/ast/scopes.cc File src/ast/scopes.cc (right): https://codereview.chromium.org/2280033002/diff/100001/src/ast/scopes.cc#newcode721 src/ast/scopes.cc:721: Variable* var = NULL; nullptr
4 years, 3 months ago (2016-08-29 12:01:24 UTC) #18
marja
thanks https://codereview.chromium.org/2280033002/diff/100001/src/ast/scopes.cc File src/ast/scopes.cc (right): https://codereview.chromium.org/2280033002/diff/100001/src/ast/scopes.cc#newcode721 src/ast/scopes.cc:721: Variable* var = NULL; On 2016/08/29 12:01:24, Toon ...
4 years, 3 months ago (2016-08-29 12:04:26 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2280033002/120001
4 years, 3 months ago (2016-08-29 12:04:40 UTC) #22
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 3 months ago (2016-08-29 12:36:35 UTC) #24
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/ee7dc92f9ec397671ea9a61d7fdac5315abef214 Cr-Commit-Position: refs/heads/master@{#38979}
4 years, 3 months ago (2016-08-29 12:37:05 UTC) #26
adamk
lgtm, I like the overall plan here, just a few comments (mostly on comments, I ...
4 years, 3 months ago (2016-08-30 18:58:32 UTC) #28
marja
Thanks for comments; follow-up CL here: https://codereview.chromium.org/2292223004 https://codereview.chromium.org/2280033002/diff/120001/src/ast/scopes.cc File src/ast/scopes.cc (right): https://codereview.chromium.org/2280033002/diff/120001/src/ast/scopes.cc#newcode764 src/ast/scopes.cc:764: // The ...
4 years, 3 months ago (2016-08-31 07:44:53 UTC) #29
adamk
4 years, 3 months ago (2016-08-31 18:10:34 UTC) #30
Message was sent while issue was closed.
https://codereview.chromium.org/2280033002/diff/120001/src/ast/scopes.cc
File src/ast/scopes.cc (right):

https://codereview.chromium.org/2280033002/diff/120001/src/ast/scopes.cc#newc...
src/ast/scopes.cc:778: // In harmony we treat re-declarations as early errors.
See
On 2016/08/31 07:44:53, marja wrote:
> On 2016/08/30 18:58:32, adamk wrote:
> > This comment is now out of place (it belongs in the caller).
> 
> Hmm, but the decision to set *ok = false is done here!

Ah, I hadn't thought about it that way. I was thinking of this referring to the
old if/else logic (I was confusing it with the old runtime error for
redeclaration). This is fine.

Powered by Google App Engine
This is Rietveld 408576698