| Index: pkg/compiler/lib/src/resolution/tree_elements.dart
|
| diff --git a/pkg/compiler/lib/src/resolution/tree_elements.dart b/pkg/compiler/lib/src/resolution/tree_elements.dart
|
| index 120401758a6766c0ddbb052955bc30fdd30dcff6..ce8346ef74e7299c10d0c3066edfd891729feeb2 100644
|
| --- a/pkg/compiler/lib/src/resolution/tree_elements.dart
|
| +++ b/pkg/compiler/lib/src/resolution/tree_elements.dart
|
| @@ -72,6 +72,7 @@ abstract class TreeElements {
|
| void setCurrentTypeMask(ForIn node, TypeMask mask);
|
| void setConstant(Node node, ConstantExpression constant);
|
| ConstantExpression getConstant(Node node);
|
| + bool isAssert(Send send);
|
|
|
| /// Returns the [FunctionElement] defined by [node].
|
| FunctionElement getFunctionDefinition(FunctionExpression node);
|
| @@ -140,6 +141,7 @@ class TreeElementMapping extends TreeElements {
|
| Map<VariableElement, List<Node>> _potentiallyMutatedInClosure;
|
| Map<Node, Map<VariableElement, List<Node>>> _accessedByClosureIn;
|
| Setlet<Element> _elements;
|
| + Setlet<Send> _asserts;
|
| Maplet<Send, SendStructure> _sendStructureMap;
|
| Setlet<DartType> _requiredTypes;
|
| bool containsTryStatement = false;
|
| @@ -411,6 +413,17 @@ class TreeElementMapping extends TreeElements {
|
| }
|
| }
|
|
|
| + void setAssert(Send node) {
|
| + if (_asserts == null) {
|
| + _asserts = new Setlet<Send>();
|
| + }
|
| + _asserts.add(node);
|
| + }
|
| +
|
| + bool isAssert(Send node) {
|
| + return _asserts != null && _asserts.contains(node);
|
| + }
|
| +
|
| FunctionElement getFunctionDefinition(FunctionExpression node) {
|
| return this[node];
|
| }
|
|
|