DescriptionRemove 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
Messages
Total messages: 17 (9 generated)
|