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

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed)

Created:
4 years, 4 months ago by Toon Verwaest
Modified:
4 years, 4 months ago
CC:
v8-reviews_googlegroups.com, oth, rmcilroy, adamk
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Separate Scope into DeclarationScope and Scope This reduces peak zone memory usage by ~10% on codeload and ~5% on mandreel. BUG=v8:5209 Committed: https://crrev.com/2648162dcfff622f8587cea2faa8c3af56456968 Committed: https://crrev.com/ff1c3cdb18be28031bd531ade9beb4f97c159816 Cr-Original-Commit-Position: refs/heads/master@{#38367} Cr-Commit-Position: refs/heads/master@{#38390}

Patch Set 1 #

Patch Set 2 : Serialized outer for eval isn't a declaration scope #

Patch Set 3 : Regular scopes also have declarations #

Patch Set 4 : more fixes #

Patch Set 5 : fixes #

Patch Set 6 : fixes #

Patch Set 7 : Cleanup diff #

Total comments: 4

Patch Set 8 : Addressed comments #

Total comments: 14

Patch Set 9 : Addressed adamks comments #

Total comments: 1

Patch Set 10 : Rebase #

Patch Set 11 : Fix rebase issue #

Patch Set 12 : Add ports #

Patch Set 13 : blah #

Patch Set 14 : Move has_simple_parameters_ to DeclarationScope #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+843 lines, -690 lines) Patch
M src/asmjs/asm-typer.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/asmjs/asm-wasm-builder.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/ast/ast.h View 1 2 3 4 5 6 7 8 9 5 chunks +8 lines, -8 lines 0 comments Download
M src/ast/ast-numbering.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/ast/ast-traversal-visitor.h View 1 chunk +1 line, -1 line 0 comments Download
M src/ast/modules.h View 1 chunk +3 lines, -4 lines 0 comments Download
M src/ast/modules.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M src/ast/prettyprinter.h View 1 chunk +1 line, -1 line 0 comments Download
M src/ast/prettyprinter.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M src/ast/scopeinfo.cc View 7 chunks +26 lines, -12 lines 0 comments Download
M src/ast/scopes.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 17 chunks +295 lines, -270 lines 1 comment Download
M src/ast/scopes.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 36 chunks +222 lines, -152 lines 1 comment Download
M src/compiler.h View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/ast-graph-builder.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 3 4 5 6 7 8 9 6 chunks +7 lines, -8 lines 0 comments Download
M src/compiler/ast-loop-assignment-analyzer.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/compiler/ast-loop-assignment-analyzer.cc View 1 chunk +3 lines, -5 lines 0 comments Download
M src/crankshaft/arm/lithium-codegen-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -3 lines 0 comments Download
M src/crankshaft/arm64/lithium-codegen-arm64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -3 lines 0 comments Download
M src/crankshaft/hydrogen.h View 1 chunk +1 line, -1 line 0 comments Download
M src/crankshaft/hydrogen.cc View 1 2 3 4 5 6 7 8 9 4 chunks +4 lines, -5 lines 0 comments Download
M src/crankshaft/ia32/lithium-codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -3 lines 0 comments Download
M src/crankshaft/mips/lithium-codegen-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -3 lines 0 comments Download
M src/crankshaft/mips64/lithium-codegen-mips64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -3 lines 0 comments Download
M src/crankshaft/ppc/lithium-codegen-ppc.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -3 lines 0 comments Download
M src/crankshaft/s390/lithium-codegen-s390.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -3 lines 0 comments Download
M src/crankshaft/typing.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/crankshaft/typing.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/crankshaft/x64/lithium-codegen-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -3 lines 0 comments Download
M src/crankshaft/x87/lithium-codegen-x87.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -3 lines 0 comments Download
M src/full-codegen/arm/full-codegen-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +7 lines, -6 lines 0 comments Download
M src/full-codegen/arm64/full-codegen-arm64.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +7 lines, -6 lines 0 comments Download
M src/full-codegen/full-codegen.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/full-codegen/ia32/full-codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +8 lines, -7 lines 0 comments Download
M src/full-codegen/mips/full-codegen-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +7 lines, -6 lines 0 comments Download
M src/full-codegen/mips64/full-codegen-mips64.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +7 lines, -6 lines 0 comments Download
M src/full-codegen/ppc/full-codegen-ppc.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +7 lines, -6 lines 0 comments Download
M src/full-codegen/s390/full-codegen-s390.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +7 lines, -6 lines 0 comments Download
M src/full-codegen/x64/full-codegen-x64.cc View 1 2 3 4 5 6 7 8 9 8 chunks +10 lines, -7 lines 0 comments Download
M src/full-codegen/x87/full-codegen-x87.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +7 lines, -6 lines 0 comments Download
M src/globals.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/interpreter/bytecode-generator.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -2 lines 0 comments Download
M src/parsing/parameter-initializer-rewriter.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/parsing/parser.h View 1 2 3 4 5 6 7 8 9 10 chunks +15 lines, -13 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 31 chunks +62 lines, -54 lines 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 5 6 7 8 9 10 chunks +35 lines, -17 lines 0 comments Download
M src/parsing/pattern-rewriter.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/parsing/preparser.h View 3 chunks +4 lines, -5 lines 0 comments Download
M src/parsing/preparser.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/parsing/rewriter.h View 2 chunks +3 lines, -2 lines 0 comments Download
M src/parsing/rewriter.cc View 7 chunks +11 lines, -11 lines 0 comments Download
M test/cctest/asmjs/test-asm-typer.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/compiler/test-loop-assignment-analysis.cc View 1 chunk +1 line, -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 5 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 45 (18 generated)
Toon Verwaest
marja: ptal mstarzinger: ptal interpreter and compiler ahaas: ptal asmjs
4 years, 4 months ago (2016-08-03 12:56:08 UTC) #2
Toon Verwaest
cc adamk
4 years, 4 months ago (2016-08-03 13:00:36 UTC) #4
Michael Starzinger
https://codereview.chromium.org/2209573002/diff/120001/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/2209573002/diff/120001/src/compiler/ast-graph-builder.cc#newcode718 src/compiler/ast-graph-builder.cc:718: Scope* scope, nit: Can we change the signature to ...
4 years, 4 months ago (2016-08-03 13:02:19 UTC) #5
ahaas
On 2016/08/03 at 13:02:19, mstarzinger wrote: > https://codereview.chromium.org/2209573002/diff/120001/src/compiler/ast-graph-builder.cc > File src/compiler/ast-graph-builder.cc (right): > > https://codereview.chromium.org/2209573002/diff/120001/src/compiler/ast-graph-builder.cc#newcode718 ...
4 years, 4 months ago (2016-08-03 13:06:40 UTC) #6
Toon Verwaest
Addressed compiler / interpreter comments
4 years, 4 months ago (2016-08-03 13:24:32 UTC) #7
Michael Starzinger
LGTM on "compiler" and "interpreter". Didn't look at the rest.
4 years, 4 months ago (2016-08-03 13:29:02 UTC) #8
adamk
A few high-level comments/questions. https://codereview.chromium.org/2209573002/diff/140001/src/ast/scopeinfo.cc File src/ast/scopeinfo.cc (right): https://codereview.chromium.org/2209573002/diff/140001/src/ast/scopeinfo.cc#newcode35 src/ast/scopeinfo.cc:35: if (scope->is_declaration_scope() && Code like ...
4 years, 4 months ago (2016-08-04 00:18:51 UTC) #10
marja
https://codereview.chromium.org/2209573002/diff/140001/src/ast/scopes.h File src/ast/scopes.h (right): https://codereview.chromium.org/2209573002/diff/140001/src/ast/scopes.h#newcode164 src/ast/scopes.h:164: ZoneList<Declaration*>* declarations() { return &decls_; } Why is this ...
4 years, 4 months ago (2016-08-04 07:58:08 UTC) #11
Toon Verwaest
You would never guess, but is_declaration_scope is quite unrelated to whether it has any declarations ...
4 years, 4 months ago (2016-08-04 08:28:15 UTC) #12
Toon Verwaest
https://codereview.chromium.org/2209573002/diff/140001/src/ast/scopeinfo.cc File src/ast/scopeinfo.cc (right): https://codereview.chromium.org/2209573002/diff/140001/src/ast/scopeinfo.cc#newcode35 src/ast/scopeinfo.cc:35: if (scope->is_declaration_scope() && On 2016/08/04 00:18:50, adamk wrote: > ...
4 years, 4 months ago (2016-08-04 12:01:17 UTC) #13
marja
(Since adamk@ is already reviewing, relaying this CL to him. I had a quick look ...
4 years, 4 months ago (2016-08-04 12:18:17 UTC) #14
adamk
I wonder what better name there could be than "DeclarationScope"..."VarDeclarationScope"? It's really unclear out of ...
4 years, 4 months ago (2016-08-04 16:31:28 UTC) #15
marja
src/ast/* and src/parsering/* lgtm https://codereview.chromium.org/2209573002/diff/160001/src/ast/scopes.cc File src/ast/scopes.cc (right): https://codereview.chromium.org/2209573002/diff/160001/src/ast/scopes.cc#newcode1079 src/ast/scopes.cc:1079: : kNormalFunction; It's slightly weird ...
4 years, 4 months ago (2016-08-05 07:00:38 UTC) #16
Toon Verwaest
Ok, it sounds like we are in agreement on the direction. I'll rebase and land. ...
4 years, 4 months ago (2016-08-05 08:41:09 UTC) #17
marja
Re: naming, I see adamk@'s point wrt DeclarationScope / VarDeclarationScope. I don't have a preference ...
4 years, 4 months ago (2016-08-05 09:10:55 UTC) #18
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/2209573002/200001
4 years, 4 months ago (2016-08-05 09:19:17 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_gcc_compile_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/builds/20681) v8_linux_nodcheck_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
4 years, 4 months ago (2016-08-05 09:22:27 UTC) #23
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/2209573002/220001
4 years, 4 months ago (2016-08-05 09:41:55 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_gyp_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_gyp_rel_ng/builds/1783)
4 years, 4 months ago (2016-08-05 09:45:22 UTC) #28
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/2209573002/240001
4 years, 4 months ago (2016-08-05 09:47:21 UTC) #31
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 4 months ago (2016-08-05 10:15:05 UTC) #33
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/2648162dcfff622f8587cea2faa8c3af56456968 Cr-Commit-Position: refs/heads/master@{#38367}
4 years, 4 months ago (2016-08-05 10:18:01 UTC) #35
Michael Achenbach
A revert of this CL (patchset #13 id:240001) has been created in https://codereview.chromium.org/2212383003/ by machenbach@chromium.org. ...
4 years, 4 months ago (2016-08-05 12:05:39 UTC) #36
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/2209573002/260001
4 years, 4 months ago (2016-08-05 13:40:54 UTC) #40
Toon Verwaest
Relanding since moving has_simple_parameters to DeclarationScope makes the warning go away locally. Lets see if ...
4 years, 4 months ago (2016-08-05 13:42:13 UTC) #41
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 4 months ago (2016-08-05 14:31:02 UTC) #43
commit-bot: I haz the power
4 years, 4 months ago (2016-08-05 14:34:18 UTC) #45
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/ff1c3cdb18be28031bd531ade9beb4f97c159816
Cr-Commit-Position: refs/heads/master@{#38390}

Powered by Google App Engine
This is Rietveld 408576698