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

Unified Diff: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart

Issue 1083063002: Deprecate visitAssertSend and visitTypePrefixSend (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index d47b6324aab7fc4970316755b1e7d67532e2cbc2..b894bcdffed985ce1de13db1b456ac1ef48e64db 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -1021,12 +1021,19 @@ class SimpleTypeInferrerVisitor<T>
return inferrer.registerAwait(node, futureType);
}
+ @override
+ T handleAssert(ast.Send node, ast.Node expression) {
+ js.JavaScriptBackend backend = compiler.backend;
+ Element element = backend.assertMethod;
+ ArgumentsTypes arguments =
+ new ArgumentsTypes([expression.accept(this)], null);
karlklose 2015/04/15 07:18:02 Add type argument to list literal.
Johnni Winther 2015/04/15 10:37:10 Done.
+ return handleStaticSend(
+ node, new Selector.fromElement(element), element, arguments);
+ }
+
T visitStaticSend(ast.Send node) {
Element element = elements[node];
- if (elements.isAssert(node)) {
- js.JavaScriptBackend backend = compiler.backend;
- element = backend.assertMethod;
- }
+ assert(!elements.isAssert(node));
ArgumentsTypes arguments = analyzeArguments(node.arguments);
if (visitingInitializers) {
if (ast.Initializers.isConstructorRedirect(node)) {

Powered by Google App Engine
This is Rietveld 408576698