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

Side by Side Diff: pkg/compiler/lib/src/resolution/tree_elements.dart

Issue 1777823002: Create map for dump_info on demand. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.resolution.tree_elements; 5 library dart2js.resolution.tree_elements;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../diagnostics/source_span.dart'; 10 import '../diagnostics/source_span.dart';
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 /// `true` if the [analyzedElement]'s source code contains a [TryStatement]. 105 /// `true` if the [analyzedElement]'s source code contains a [TryStatement].
106 bool get containsTryStatement; 106 bool get containsTryStatement;
107 } 107 }
108 108
109 class TreeElementMapping extends TreeElements { 109 class TreeElementMapping extends TreeElements {
110 final AnalyzableElement analyzedElement; 110 final AnalyzableElement analyzedElement;
111 Map<Spannable, Selector> _selectors; 111 Map<Spannable, Selector> _selectors;
112 Map<Spannable, TypeMask> _typeMasks; 112 Map<Spannable, TypeMask> _typeMasks;
113 Map<Node, DartType> _types; 113 Map<Node, DartType> _types;
114 Map<Node, DartType> typesCache = <Node, DartType>{}; 114
115 Map<Node, DartType> _typesCache;
116 Map<Node, DartType> get typesCache =>
117 _typesCache ?? _typesCache = <Node, DartType>{};
Siggi Cherem (dart-lang) 2016/03/09 19:15:03 replace with `_typesCache ??= <Node, DartType>{}`?
118
115 Setlet<SourceSpan> _superUses; 119 Setlet<SourceSpan> _superUses;
116 Map<Node, ConstantExpression> _constants; 120 Map<Node, ConstantExpression> _constants;
117 Map<VariableElement, List<Node>> _potentiallyMutated; 121 Map<VariableElement, List<Node>> _potentiallyMutated;
118 Map<Node, Map<VariableElement, List<Node>>> _potentiallyMutatedIn; 122 Map<Node, Map<VariableElement, List<Node>>> _potentiallyMutatedIn;
119 Map<VariableElement, List<Node>> _potentiallyMutatedInClosure; 123 Map<VariableElement, List<Node>> _potentiallyMutatedInClosure;
120 Map<Node, Map<VariableElement, List<Node>>> _accessedByClosureIn; 124 Map<Node, Map<VariableElement, List<Node>>> _accessedByClosureIn;
121 Maplet<Send, SendStructure> _sendStructureMap; 125 Maplet<Send, SendStructure> _sendStructureMap;
122 Maplet<NewExpression, NewStructure> _newStructureMap; 126 Maplet<NewExpression, NewStructure> _newStructureMap;
123 bool containsTryStatement = false; 127 bool containsTryStatement = false;
124 128
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } 471 }
468 472
469 void setCurrentTypeMask(ForIn node, TypeMask mask) { 473 void setCurrentTypeMask(ForIn node, TypeMask mask) {
470 _setTypeMask(node.inToken, mask); 474 _setTypeMask(node.inToken, mask);
471 } 475 }
472 476
473 TypeMask getCurrentTypeMask(ForIn node) { 477 TypeMask getCurrentTypeMask(ForIn node) {
474 return _getTypeMask(node.inToken); 478 return _getTypeMask(node.inToken);
475 } 479 }
476 } 480 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698