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

Issue 953983002: Fix up ParseProgram and ParseModule to do something sane with module scopes (Closed)

Created:
5 years, 10 months ago by adamk
Modified:
5 years, 10 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

Fix up ParseProgram and ParseModule to do something sane with module scopes The FunctionLiteral returned from the parser for modules now has a MODULE_SCOPE, instead of associating the module scope with a Block inside it. This makes it easy to get at the ModuleDescriptor from the caller of Parse(), so I've added a basic test that pokes at the scope and the descriptor. Expect more tests in this vein. BUG=v8:1569 LOG=n Committed: https://crrev.com/1a8dc98cbf9d661785444fa70ec7fbc2fd7e0d6c Cr-Commit-Position: refs/heads/master@{#26836}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Remove setting of classes flag #

Patch Set 3 : Stop using CHECK_EQ for AstRawStrings, clang does not like it #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -36 lines) Patch
M src/parser.h View 1 chunk +1 line, -1 line 2 comments Download
M src/parser.cc View 5 chunks +15 lines, -25 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 chunks +38 lines, -10 lines 0 comments Download

Messages

Total messages: 11 (2 generated)
adamk
5 years, 10 months ago (2015-02-24 22:05:49 UTC) #2
arv (Not doing code reviews)
https://codereview.chromium.org/953983002/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/953983002/diff/1/src/parser.cc#newcode1256 src/parser.cc:1256: void* Parser::ParseModule(ZoneList<Statement*>* body, bool* ok) { Why return void* ...
5 years, 10 months ago (2015-02-24 22:13:34 UTC) #3
adamk
https://codereview.chromium.org/953983002/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/953983002/diff/1/src/parser.cc#newcode1256 src/parser.cc:1256: void* Parser::ParseModule(ZoneList<Statement*>* body, bool* ok) { On 2015/02/24 22:13:34, ...
5 years, 10 months ago (2015-02-24 22:17:54 UTC) #4
arv (Not doing code reviews)
LGTM
5 years, 10 months ago (2015-02-24 22:25:36 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/953983002/40001
5 years, 10 months ago (2015-02-24 22:38:03 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 10 months ago (2015-02-24 22:39:33 UTC) #8
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/1a8dc98cbf9d661785444fa70ec7fbc2fd7e0d6c Cr-Commit-Position: refs/heads/master@{#26836}
5 years, 10 months ago (2015-02-24 22:39:45 UTC) #9
rossberg
https://codereview.chromium.org/953983002/diff/40001/src/parser.h File src/parser.h (right): https://codereview.chromium.org/953983002/diff/40001/src/parser.h#newcode706 src/parser.h:706: void* ParseModule(ZoneList<Statement*>* body, bool* ok); Nit: Can we rename ...
5 years, 10 months ago (2015-02-25 13:35:42 UTC) #10
adamk
5 years, 10 months ago (2015-02-25 18:55:21 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/953983002/diff/40001/src/parser.h
File src/parser.h (right):

https://codereview.chromium.org/953983002/diff/40001/src/parser.h#newcode706
src/parser.h:706: void* ParseModule(ZoneList<Statement*>* body, bool* ok);
On 2015/02/25 13:35:42, rossberg wrote:
> Nit: Can we rename this to ParseModuleItemList, for more consistency with the
> above? ParseModule sounds like it should either return a single AST node
> corresponding to a Module, or be an entry point for parsing module scripts.

Sounds good, will rename in a one of these followups.

Powered by Google App Engine
This is Rietveld 408576698