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

Issue 918203002: Get rid of PreParserIdentifier. (Closed)

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

Description

Get rid of PreParserIdentifier. To do scoping properly (declare variables into scopes, check for error such as redeclaration and strong mode use before declaration), PreParser needs to keep track of identifiers for real. For this, PreParserIdentifier is not sufficient, but PreParser needs to start using AstRawString*s instead. This is the first of a series of changes - this just replaces PreParserIdentifier with AstRawString*. The follow up changes will then declare these identifiers in scopes (for that, PreParserExpression needs to somehow - TBD how exactly - store multiple identifiers in case it's an arrow function parameter list). BUG=

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -351 lines) Patch
M src/ast-value-factory.h View 1 2 2 chunks +0 lines, -5 lines 0 comments Download
M src/parser.h View 6 chunks +0 lines, -28 lines 0 comments Download
M src/parser.cc View 1 7 chunks +15 lines, -48 lines 0 comments Download
M src/preparser.h View 1 2 42 chunks +129 lines, -226 lines 0 comments Download
M src/preparser.cc View 1 11 chunks +21 lines, -44 lines 0 comments Download
M src/scanner.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/scanner.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
marja
rossberg, ptal. I'm going to run some perf tests before landing, w/ parser shell and ...
5 years, 10 months ago (2015-02-12 16:10:34 UTC) #2
marja
Meh, parse time regresses by 20% w/ this change for my "big script with lazy ...
5 years, 10 months ago (2015-02-12 16:31:34 UTC) #3
marja
... alright, benchmarks such as jsbench and octane seem unaffected though. Dunno.
5 years, 10 months ago (2015-02-12 16:41:11 UTC) #4
rossberg
LGTM It might be worth introducing a typedef const AstRawString Identifier; somewhere appropriate. Do you ...
5 years, 10 months ago (2015-02-16 12:23:45 UTC) #5
marja
I think the regression is because PreParser also now needs to maintain this table of ...
5 years, 10 months ago (2015-02-16 13:05:31 UTC) #6
marja
... some moar perf numbers. I made my test js file extremely lazy by wrapping ...
5 years, 10 months ago (2015-02-16 13:21:44 UTC) #7
marja
5 years, 10 months ago (2015-02-16 14:36:07 UTC) #8
Numbers:

Actually, looks like there are some consistent regressions:

Emscripten/NBodyJava 3%
JetStream/code-first-load 5%
JetStream/code-multi-load 5%

(Weird, code load shows no regression, and code-first-load and code-multi-load
should be the same, no?)

Also, JSBench/JSBenchFacebook *does* regress by 3%, I must have mis-checked that
previously.

Powered by Google App Engine
This is Rietveld 408576698