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

Issue 490173002: Take ast node id counting away from Isolate. (Closed)

Created:
6 years, 4 months ago by marja
Modified:
6 years, 4 months ago
Reviewers:
rossberg
CC:
v8-dev, wingo
Project:
v8
Visibility:
Public.

Description

Take ast node id counting away from Isolate. When we're going to parse multiple scripts in parallel, we cannot have the Isolate count the ast node ids. Now the counter is stored in CompilationInfo instead. This is because we need to add ast nodes after parsing too. R=rossberg@chromium.org BUG= Committed: https://code.google.com/p/v8/source/detail?r=23301

Patch Set 1 #

Patch Set 2 : remove unnecessary Expression::zone_ #

Patch Set 3 : . #

Total comments: 2

Patch Set 4 : IdGen class #

Total comments: 2

Patch Set 5 : Copy AstNode::IdGen over another? #

Total comments: 7

Patch Set 6 : code review (rossberg) #

Total comments: 4

Patch Set 7 : code review moar #

Patch Set 8 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -346 lines) Patch
M src/ast.h View 1 2 3 4 5 6 7 58 chunks +215 lines, -249 lines 0 comments Download
M src/ast.cc View 1 2 3 4 chunks +17 lines, -26 lines 0 comments Download
M src/compiler.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M src/compiler.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -6 lines 0 comments Download
M src/isolate.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M src/parser.h View 1 2 3 4 5 1 chunk +8 lines, -8 lines 0 comments Download
M src/parser.cc View 1 2 3 4 5 6 6 chunks +11 lines, -13 lines 0 comments Download
M src/preparser.h View 1 2 3 4 5 6 7 15 chunks +34 lines, -32 lines 0 comments Download
M src/rewriter.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M src/scopes.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M src/zone.h View 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/test-ast.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
marja
rossberg, ptal wingo, fyi, this is somewhat related to the "extra pass for bailout IDs" ...
6 years, 4 months ago (2014-08-21 11:22:30 UTC) #1
rossberg
https://codereview.chromium.org/490173002/diff/40001/src/ast.h File src/ast.h (right): https://codereview.chromium.org/490173002/diff/40001/src/ast.h#newcode220 src/ast.h:220: static int GetNextId(int* id) { return ReserveIdRange(id, 1); } ...
6 years, 4 months ago (2014-08-21 11:32:02 UTC) #2
marja
I put the IdGen class inside AstNode, since the name AstNode::IdGen makes sense.. it's the ...
6 years, 4 months ago (2014-08-21 11:58:52 UTC) #3
rossberg
https://codereview.chromium.org/490173002/diff/60001/src/ast.h File src/ast.h (right): https://codereview.chromium.org/490173002/diff/60001/src/ast.h#newcode197 src/ast.h:197: void set_id(int id) { id_ = id; } Hm, ...
6 years, 4 months ago (2014-08-21 12:21:04 UTC) #4
marja
... now you can decide which patch set you like better... :) https://codereview.chromium.org/490173002/diff/60001/src/ast.h File src/ast.h ...
6 years, 4 months ago (2014-08-21 12:44:37 UTC) #5
rossberg
I like it slightly better, but admittedly it's ugly either way. I leave it up ...
6 years, 4 months ago (2014-08-21 13:43:35 UTC) #6
marja
Let's go with the copying version. wingo@'s stuff might change this slightly anyway... https://codereview.chromium.org/490173002/diff/80001/src/ast.h File ...
6 years, 4 months ago (2014-08-22 07:59:07 UTC) #7
rossberg
lgtm https://codereview.chromium.org/490173002/diff/80001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/490173002/diff/80001/src/parser.cc#newcode751 src/parser.cc:751: *(info->ast_node_id_gen()) = AstNode::IdGen(0); On 2014/08/22 07:59:07, marja wrote: ...
6 years, 4 months ago (2014-08-22 08:47:58 UTC) #8
marja
thx for review https://codereview.chromium.org/490173002/diff/100001/src/ast.h File src/ast.h (right): https://codereview.chromium.org/490173002/diff/100001/src/ast.h#newcode188 src/ast.h:188: explicit IdGen(int id) : id_(id) {} ...
6 years, 4 months ago (2014-08-22 08:57:13 UTC) #9
marja
6 years, 4 months ago (2014-08-22 11:12:43 UTC) #10
Message was sent while issue was closed.
Committed patchset #8 manually as 23301 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698