Create map for dump_info on demand.

Saves about 1% of heap for non --dump-info compile.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1777823002 .
This commit is contained in:
Stephen Adams 2016-03-09 13:15:05 -08:00
parent ae009e0870
commit 42070892a4

View file

@ -111,7 +111,10 @@ class TreeElementMapping extends TreeElements {
Map<Spannable, Selector> _selectors;
Map<Spannable, TypeMask> _typeMasks;
Map<Node, DartType> _types;
Map<Node, DartType> typesCache = <Node, DartType>{};
Map<Node, DartType> _typesCache;
Map<Node, DartType> get typesCache => _typesCache ??= <Node, DartType>{};
Setlet<SourceSpan> _superUses;
Map<Node, ConstantExpression> _constants;
Map<VariableElement, List<Node>> _potentiallyMutated;