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

Unified Diff: lib/src/codegen/reify_coercions.dart

Issue 1038583004: Rationalize coercions (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 9 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 | « lib/src/checker/rules.dart ('k') | lib/src/info.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/reify_coercions.dart
diff --git a/lib/src/codegen/reify_coercions.dart b/lib/src/codegen/reify_coercions.dart
index 180e26fd544c5730ed427368057ed73e7561f920..fbedd451b83c84aeddc04820fb19284ee34ce818 100644
--- a/lib/src/codegen/reify_coercions.dart
+++ b/lib/src/codegen/reify_coercions.dart
@@ -76,10 +76,13 @@ class UnitCoercionReifier extends analyzer.GeneralizingAstVisitor<Object>
static String _conversionKind(Conversion node) {
if (node is ClosureWrapLiteral) return "WrapLiteral";
if (node is ClosureWrap) return "Wrap";
- if (node is DownCastDynamic) return "CastDynamic";
- if (node is DownCastLiteral) return "CastLiteral";
- if (node is DownCastExact) return "CastExact";
- if (node is DownCast) return "CastGeneral";
+ if (node is DynamicCast) return "DynamicCast";
+ if (node is AssignmentCast) return "AssignmentCast";
+ if (node is InferableLiteral) return "InferableLiteral";
+ if (node is InferableClosure) return "InferableClosure";
+ if (node is InferableAllocation) return "InferableAllocation";
+ if (node is DownCastComposite) return "CompositeCast";
+ if (node is DownCastImplicit) return "ImplicitCast";
assert(false);
return "";
}
@@ -98,7 +101,7 @@ class UnitCoercionReifier extends analyzer.GeneralizingAstVisitor<Object>
}
@override
- Object visitDownCastBase(DownCastBase node) {
+ Object visitDownCast(DownCast node) {
if (_skipCoercions) {
_log.severe("Skipping runtime downcast in constant context");
return null;
« no previous file with comments | « lib/src/checker/rules.dart ('k') | lib/src/info.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698