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

Issue 2368313002: Don't use different function scopes when parsing with temp zones (Closed)

Created:
4 years, 2 months ago by Toon Verwaest
Modified:
4 years, 2 months ago
Reviewers:
adamk, marja
CC:
v8-reviews_googlegroups.com, jochen (gone - plz use gerrit)
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Don't use different function scopes when parsing with temp zones Previously we'd have a scope in the main zone, and another in the temp zone. Then we carefully copied back data to the main zone. This CL changes it so that the scope is just fixed up to only contain data from the main zone. That avoids additional copies and additional allocations; while not increasing the care that needs to be taken. This will also make it easier to abort preparsing while parsing using a temp zone. BUG= Committed: https://crrev.com/f41e7ebd62b32e861b6aa14ad8bfce3018d03c3c Committed: https://crrev.com/669719d5fb22ffcd533c7cae82115079010578f8 Cr-Original-Commit-Position: refs/heads/master@{#39800} Cr-Commit-Position: refs/heads/master@{#39828}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Only allow adding unresolved variables from a wrong scope if the scope knows it'll need migration l… #

Patch Set 3 : Add ifdef debug #

Patch Set 4 : Reset on abort #

Patch Set 5 : Initialize needs_migration_ to false #

Patch Set 6 : Rebase #

Patch Set 7 : Make sure we allocate block scopes in the right zone #

Patch Set 8 : Set is_lazily_parsed in ResetAfterPreparsing #

Patch Set 9 : Reset all custom allocated variables #

Patch Set 10 : Just drop variable allocation of preparsed scopes altogether #

Total comments: 4

Patch Set 11 : Address comments #

Patch Set 12 : Rebase #

Patch Set 13 : Fix #

Patch Set 14 : Make sure arguments_ is properly analyzed as well, since it's used as a signal for optimization #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -87 lines) Patch
M src/ast/scopes.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +8 lines, -6 lines 0 comments Download
M src/ast/scopes.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +38 lines, -33 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +17 lines, -36 lines 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +12 lines, -11 lines 0 comments Download
M src/parsing/preparser.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 33 (16 generated)
Toon Verwaest
ptal https://codereview.chromium.org/2368313002/diff/1/src/ast/scopes.cc File src/ast/scopes.cc (right): https://codereview.chromium.org/2368313002/diff/1/src/ast/scopes.cc#newcode956 src/ast/scopes.cc:956: // DCHECK_EQ(factory->zone(), zone()); We should probably just drop ...
4 years, 2 months ago (2016-09-26 14:24:30 UTC) #2
marja
I'd like adamk@ to review too, since the DCHECKS / Zone-Zone-pointer design originated from discussions ...
4 years, 2 months ago (2016-09-27 07:14:03 UTC) #4
marja
https://codereview.chromium.org/2368313002/diff/1/src/ast/scopes.cc File src/ast/scopes.cc (right): https://codereview.chromium.org/2368313002/diff/1/src/ast/scopes.cc#newcode956 src/ast/scopes.cc:956: // DCHECK_EQ(factory->zone(), zone()); Suggestion: flag scopes w/ needs_migration, here ...
4 years, 2 months ago (2016-09-27 11:17:34 UTC) #5
Toon Verwaest
Addressed comment. I'll need to merge in the abort-preparsing CL that's in the CQ before ...
4 years, 2 months ago (2016-09-27 13:01:44 UTC) #7
marja
this version lgtm (adamk@, I think we came up with an elegant solution to the ...
4 years, 2 months ago (2016-09-27 13:08:08 UTC) #8
Toon Verwaest
Bugs required significant enough changes to require a re-lgtm. Please ptal again. Bugs: - block ...
4 years, 2 months ago (2016-09-27 14:10:40 UTC) #11
marja
lgtm modulo comment cc jochen@ because this touches the "scope infos for preparsed funcs" logic ...
4 years, 2 months ago (2016-09-27 18:54:41 UTC) #14
adamk
lgtm, but one question and one nit. https://codereview.chromium.org/2368313002/diff/180001/src/ast/scopes.cc File src/ast/scopes.cc (left): https://codereview.chromium.org/2368313002/diff/180001/src/ast/scopes.cc#oldcode1217 src/ast/scopes.cc:1217: has_rest_ = ...
4 years, 2 months ago (2016-09-27 20:33:17 UTC) #15
Toon Verwaest
https://codereview.chromium.org/2368313002/diff/180001/src/ast/scopes.cc File src/ast/scopes.cc (left): https://codereview.chromium.org/2368313002/diff/180001/src/ast/scopes.cc#oldcode1217 src/ast/scopes.cc:1217: has_rest_ = false; On 2016/09/27 20:33:17, adamk wrote: > ...
4 years, 2 months ago (2016-09-27 20:41:44 UTC) #16
Toon Verwaest
Addressed comments
4 years, 2 months ago (2016-09-28 02:15:13 UTC) #17
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/2368313002/200001
4 years, 2 months ago (2016-09-28 02:15:29 UTC) #20
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 2 months ago (2016-09-28 02:42:24 UTC) #22
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/f41e7ebd62b32e861b6aa14ad8bfce3018d03c3c Cr-Commit-Position: refs/heads/master@{#39800}
4 years, 2 months ago (2016-09-28 02:42:40 UTC) #24
Toon Verwaest
A revert of this CL (patchset #11 id:200001) has been created in https://codereview.chromium.org/2379533003/ by verwaest@chromium.org. ...
4 years, 2 months ago (2016-09-28 09:21:16 UTC) #25
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/2368313002/260001
4 years, 2 months ago (2016-09-28 13:10:08 UTC) #29
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 2 months ago (2016-09-28 13:36:37 UTC) #31
commit-bot: I haz the power
4 years, 2 months ago (2016-09-28 13:36:59 UTC) #33
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/669719d5fb22ffcd533c7cae82115079010578f8
Cr-Commit-Position: refs/heads/master@{#39828}

Powered by Google App Engine
This is Rietveld 408576698