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

Issue 2638333002: Parsing:Create the same scopes for non-simple params in PreParser & Parser. (Closed)

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

Description

Parsing: Create the same scopes for non-simple params in PreParser & Parser. Rationale: - To do scope analysis based on PreParser, and use the result again when parsing later, PreParser and Parser need to produce the same Scopes and variable declarations in them. - This is not the case for non-simple parameters: Parser creates an additional inner Scope where the declarations were, whereas PreParser does DeclareVariableName directly in the function Scope. - So this CL fixes that by moving the Scope creation for non-simple parameters into ParserBase. - As a side product (and a partial proof that this change makes sense), PreParser::ParseEagerFunctionBody is now gone. BUG=v8:5516 Review-Url: https://codereview.chromium.org/2638333002 Cr-Commit-Position: refs/heads/master@{#42537} Committed: https://chromium.googlesource.com/v8/v8/+/3534091756ac394e402d4e3dbca63498b7230ea0

Patch Set 1 #

Patch Set 2 : rest of the impl #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -202 lines) Patch
M src/parsing/parser.h View 1 3 chunks +10 lines, -9 lines 0 comments Download
M src/parsing/parser.cc View 1 5 chunks +68 lines, -159 lines 0 comments Download
M src/parsing/parser-base.h View 1 5 chunks +117 lines, -3 lines 0 comments Download
M src/parsing/preparser.h View 1 7 chunks +31 lines, -31 lines 0 comments Download

Messages

Total messages: 19 (11 generated)
marja
ptal
3 years, 11 months ago (2017-01-19 10:31:08 UTC) #5
marja
switching reviewers (verwaest@ doesn't have time atm), adamk, ptal
3 years, 11 months ago (2017-01-19 16:05:26 UTC) #10
adamk
This patch is tricky to review with stuff moving from one file to another, but ...
3 years, 11 months ago (2017-01-19 21:57:10 UTC) #11
marja
On 2017/01/19 21:57:10, adamk wrote: > This patch is tricky to review with stuff moving ...
3 years, 11 months ago (2017-01-20 08:35:56 UTC) #12
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/2638333002/20001
3 years, 11 months ago (2017-01-20 08:36:17 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/v8/v8/+/3534091756ac394e402d4e3dbca63498b7230ea0
3 years, 11 months ago (2017-01-20 08:59:01 UTC) #17
marja
Ahm, I looked into adding the test that parsing and preparsing produce the same(-ish) scopes ...
3 years, 11 months ago (2017-01-20 09:57:34 UTC) #18
adamk
3 years, 11 months ago (2017-01-20 17:51:20 UTC) #19
Message was sent while issue was closed.
Thanks for digging into the testing here, plan sounds good to me.

Powered by Google App Engine
This is Rietveld 408576698