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

Issue 1968383002: Remove Expression::bounds_, in order to conserve memory during parsing. (Closed)

Created:
4 years, 7 months ago by vogelheim
Modified:
4 years, 7 months ago
CC:
v8-reviews_googlegroups.com, Michael Achenbach
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Remove Expression::bounds_, in order to conserve memory during parsing. Expression::bounds_ is used only by a subset of compile passes, but the data structure occupies space for every Expression node ever parsed. This unneccessarily increases memory consumption. Particularly, peak memory consumption during startup, which may cause out-of-memory errors. This CL - removes Expression::bounds_; - introduces an AstTypeBounds container, which mappes Expression* to Bounds; - modifies the code that actually requires bounds information, namely Crankshaft compile and AsmWasmBuilder, to instantiate such an AstTypeBounds container before typing and to pass it to the code that consumes this information; and - modifies all accesses to Expression::bounds_ to instead access the bounds via the container instead. Additionally, this rewrites test-ast-expression-visitor. The reason is that this code attempted to test AstExpressionVisitor but did so exclusively through its subclass ExpressionTypeCollector, meaning that the test dealt almost exclusively with type bounds despite the class-under-test having no knowledge or functionality related to it. Worse, the test was written in a way to assume that type bounds were available outside & after compilation, which is something this change changes. BUG=v8:4947 Committed: https://crrev.com/bb04e1243e1741cffa0559f2cf7b493bf5c9c55e Cr-Commit-Position: refs/heads/master@{#36222}

Patch Set 1 : Test CL w/ the old code still in, plus additional checks. #

Patch Set 2 : Remove Expression::bounds_ #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -446 lines) Patch
M BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M src/ast/ast.h View 1 3 chunks +0 lines, -6 lines 0 comments Download
A src/ast/ast-type-bounds.h View 1 1 chunk +40 lines, -0 lines 0 comments Download
M src/crankshaft/hydrogen.h View 3 chunks +5 lines, -0 lines 0 comments Download
M src/crankshaft/hydrogen.cc View 8 chunks +17 lines, -14 lines 0 comments Download
M src/crankshaft/typing.h View 3 chunks +6 lines, -4 lines 0 comments Download
M src/crankshaft/typing.cc View 9 chunks +18 lines, -17 lines 0 comments Download
M src/typing-asm.h View 3 chunks +4 lines, -0 lines 0 comments Download
M src/typing-asm.cc View 11 chunks +22 lines, -20 lines 0 comments Download
M src/v8.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M src/wasm/asm-wasm-builder.cc View 13 chunks +19 lines, -17 lines 0 comments Download
M test/cctest/expression-type-collector.h View 1 3 chunks +4 lines, -0 lines 0 comments Download
M test/cctest/expression-type-collector.cc View 3 chunks +4 lines, -5 lines 0 comments Download
M test/cctest/test-asm-validator.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-ast-expression-visitor.cc View 3 chunks +39 lines, -362 lines 1 comment Download

Messages

Total messages: 17 (9 generated)
vogelheim
4 years, 7 months ago (2016-05-12 10:00:48 UTC) #5
bradnelson
lgtm https://codereview.chromium.org/1968383002/diff/60001/test/cctest/test-ast-expression-visitor.cc File test/cctest/test-ast-expression-visitor.cc (right): https://codereview.chromium.org/1968383002/diff/60001/test/cctest/test-ast-expression-visitor.cc#newcode95 test/cctest/test-ast-expression-visitor.cc:95: // and for overall # of types found. ...
4 years, 7 months ago (2016-05-12 15:43:45 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1968383002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1968383002/60001
4 years, 7 months ago (2016-05-12 15:48:39 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/15163)
4 years, 7 months ago (2016-05-12 15:52:51 UTC) #10
Benedikt Meurer
Very nice! Thanks a lot for this cleanup. LGTM.
4 years, 7 months ago (2016-05-12 17:57:33 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1968383002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1968383002/60001
4 years, 7 months ago (2016-05-12 22:22:25 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:60001)
4 years, 7 months ago (2016-05-12 22:24:13 UTC) #15
commit-bot: I haz the power
4 years, 7 months ago (2016-05-12 22:24:41 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/bb04e1243e1741cffa0559f2cf7b493bf5c9c55e
Cr-Commit-Position: refs/heads/master@{#36222}

Powered by Google App Engine
This is Rietveld 408576698