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

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

Issue 1346093003: Revert "Add optional message to assert in Dart2js - continued" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/js_backend/backend.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 661573ebf1365d1e2c94420bf998d708b534197d..7d3f665ef16a4281e2364fb73e506876acf8f133 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -1574,6 +1574,20 @@ class SimpleTypeInferrerVisitor<T>
}
@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),
+ null,
+ element,
+ arguments);
+ }
+
+ @override
T handleTypeLiteralInvoke(ast.NodeList arguments) {
// This is reached when users forget to put a `new` in front of a type
// literal. The emitter will generate an actual call (even though it is
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698