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

Issue 2407163003: PreParser: track variable declarations and parameters (Closed)

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

Description

PreParser: track variable declarations and parameters This makes the context allocation less pessimistic in the following cases: function outer() { var a; // Won't be context allocated function inner1() { var a; a; } function inner2(a) { a; } function inner3([a]) { a; } function inner4({ a: b}) { a; } } BUG=v8:5501 Committed: https://crrev.com/1b5ccb055a6e93f7b45d653cf0bbbb9b047ee31d Cr-Commit-Position: refs/heads/master@{#41521}

Patch Set 1 #

Patch Set 2 : rebased #

Patch Set 3 : rebased #

Patch Set 4 : also declare variables #

Patch Set 5 : rebased #

Patch Set 6 : moar #

Patch Set 7 : rebased #

Patch Set 8 : fixes #

Patch Set 9 : fixes #

Patch Set 10 : fixes - mjsunit now passes #

Patch Set 11 : rebased #

Patch Set 12 : cleanup #

Patch Set 13 : flag off #

Patch Set 14 : streamlining #

Patch Set 15 : adding a test #

Patch Set 16 : moar tests #

Patch Set 17 : more tests + updated a comment #

Patch Set 18 : fixing bad rebase #

Total comments: 24

Patch Set 19 : more tests #

Total comments: 2

Patch Set 20 : rebased #

Patch Set 21 : code review (verwaest@) #

Patch Set 22 : fixing typos in the test #

Patch Set 23 : test fixes + more tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+305 lines, -40 lines) Patch
M src/ast/ast-traversal-visitor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M src/ast/scopes.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 6 chunks +21 lines, -3 lines 0 comments Download
M src/ast/scopes.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 18 chunks +81 lines, -27 lines 0 comments Download
M src/parsing/preparser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +34 lines, -6 lines 0 comments Download
M src/parsing/preparser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +11 lines, -1 line 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +140 lines, -0 lines 0 comments Download
M test/mjsunit/lazy-inner-functions.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +17 lines, -2 lines 0 comments Download

Messages

Total messages: 29 (21 generated)
marja
ptal
4 years ago (2016-11-29 10:27:23 UTC) #5
Toon Verwaest
https://codereview.chromium.org/2407163003/diff/340001/src/ast/scopes.cc File src/ast/scopes.cc (right): https://codereview.chromium.org/2407163003/diff/340001/src/ast/scopes.cc#newcode56 src/ast/scopes.cc:56: void VariableMap::DeclareName(Zone* zone, const AstRawString* name) { We should ...
4 years ago (2016-12-01 10:50:56 UTC) #15
Toon Verwaest
https://codereview.chromium.org/2407163003/diff/360001/src/parsing/preparser.h File src/parsing/preparser.h (right): https://codereview.chromium.org/2407163003/diff/360001/src/parsing/preparser.h#newcode614 src/parsing/preparser.h:614: return PreParserExpression::Assignment(left.identifiers_); Mmh, actually this isn't correct is it? ...
4 years ago (2016-12-01 13:33:28 UTC) #16
marja
ptal https://codereview.chromium.org/2407163003/diff/340001/src/ast/scopes.cc File src/ast/scopes.cc (right): https://codereview.chromium.org/2407163003/diff/340001/src/ast/scopes.cc#newcode56 src/ast/scopes.cc:56: void VariableMap::DeclareName(Zone* zone, const AstRawString* name) { On ...
4 years ago (2016-12-05 16:05:20 UTC) #17
Toon Verwaest
lgtm
4 years ago (2016-12-05 16:29:04 UTC) #20
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/2407163003/440001
4 years ago (2016-12-06 13:21:20 UTC) #24
commit-bot: I haz the power
Committed patchset #23 (id:440001)
4 years ago (2016-12-06 13:23:36 UTC) #27
commit-bot: I haz the power
4 years ago (2016-12-06 13:24:15 UTC) #29
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/1b5ccb055a6e93f7b45d653cf0bbbb9b047ee31d
Cr-Commit-Position: refs/heads/master@{#41521}

Powered by Google App Engine
This is Rietveld 408576698