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

Unified Diff: pkg/compiler/lib/src/resolution/tree_elements.dart

Issue 1325843003: Add optional message to assert in Dart2js. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Reintroduce assertHelper for asserts without messages. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
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 3fed5c391a443d4f9ca6872cb519cae5c4153786..94d7889cffff500a0e6ca7a036a02bd31569c696 100644
--- a/pkg/compiler/lib/src/resolution/tree_elements.dart
+++ b/pkg/compiler/lib/src/resolution/tree_elements.dart
@@ -71,7 +71,6 @@ 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,7 +139,6 @@ 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;
@@ -412,17 +410,6 @@ 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];
}

Powered by Google App Engine
This is Rietveld 408576698