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

Issue 2223843002: [ast][parsing] Variable declaration cleanups. (Closed)

Created:
4 years, 4 months ago by neis
Modified:
4 years, 4 months ago
Reviewers:
adamk
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[ast][parsing] Variable declaration cleanups. - Remove Declaration::initialization(), move logic into parser. The backends should only care about the actual initialization flag on the variable. - Introduce DeclareVariable convenience function that covers most cases of variable declarations. R=adamk@chromium.org BUG= Committed: https://crrev.com/54ff89b2e6bd6fc4421fd52c63c5e427103f7611 Cr-Commit-Position: refs/heads/master@{#38477}

Patch Set 1 #

Patch Set 2 : Remove weird comment. #

Patch Set 3 : Use DefaultInitializationFlag in more places. #

Total comments: 5

Patch Set 4 : Rebase and make DefaultInitializationFlag static. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -92 lines) Patch
M src/ast/ast.h View 1 2 3 4 chunks +3 lines, -20 lines 0 comments Download
M src/ast/ast.cc View 1 chunk +0 lines, -13 lines 0 comments Download
M src/parsing/parser.h View 1 2 3 1 chunk +7 lines, -4 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 15 chunks +53 lines, -53 lines 0 comments Download
M src/parsing/pattern-rewriter.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (9 generated)
neis
4 years, 4 months ago (2016-08-08 12:01:53 UTC) #1
neis
PTAL. I'm happy to wait with this until you landed your CL that removes the ...
4 years, 4 months ago (2016-08-08 12:54:01 UTC) #6
adamk
lgtm once you've dealt with the DefaultInitializationFlag helper (feel free to leave it in Parser ...
4 years, 4 months ago (2016-08-08 17:32:28 UTC) #9
neis
https://codereview.chromium.org/2223843002/diff/40001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2223843002/diff/40001/src/parsing/parser.cc#newcode1974 src/parsing/parser.cc:1974: InitializationFlag Parser::DefaultInitializationFlag(VariableMode mode) { On 2016/08/08 17:32:28, adamk wrote: ...
4 years, 4 months ago (2016-08-09 08:17:52 UTC) #10
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/2223843002/60001
4 years, 4 months ago (2016-08-09 08:18:07 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-09 08:48:39 UTC) #14
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/54ff89b2e6bd6fc4421fd52c63c5e427103f7611 Cr-Commit-Position: refs/heads/master@{#38477}
4 years, 4 months ago (2016-08-09 08:49:07 UTC) #16
adamk
4 years, 4 months ago (2016-08-09 16:27:09 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/2223843002/diff/40001/src/parsing/parser.cc
File src/parsing/parser.cc (right):

https://codereview.chromium.org/2223843002/diff/40001/src/parsing/parser.cc#n...
src/parsing/parser.cc:1974: InitializationFlag
Parser::DefaultInitializationFlag(VariableMode mode) {
On 2016/08/09 08:17:52, neis wrote:
> On 2016/08/08 17:32:28, adamk wrote:
> > What about just putting this with the InitializationFlag enum definition in
> > globals.h? Its placement as an instance method of Parser makes it look like
it
> > might depend on something _about_ parser, but it doesn't.
> 
> Oops, this was of course supposed to be a static method.  I'm leaving it in
the
> parser for now, but I want to discuss this again.

Ah, forgot PatternRewriter is an inner class, this looks fine now.

Powered by Google App Engine
This is Rietveld 408576698