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

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: Updated cf. comments. 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
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/resolved_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d8368c306bf72fef2e569381d28e78affa01432d 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<T> arguments =
+ new ArgumentsTypes<T>(<T>[expression.accept(this)], null);
+ 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)) {
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/resolved_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698