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

Unified Diff: lib/compiler/implementation/dart_backend/placeholder_collector.dart

Issue 10876011: dart2dart Make sure we never create placeholder for Dynamic type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/dart_backend/placeholder_collector.dart
diff --git a/lib/compiler/implementation/dart_backend/placeholder_collector.dart b/lib/compiler/implementation/dart_backend/placeholder_collector.dart
index be9bfebb98307afbe698f2fbd4b12eb7ca5265eb..91ec3c2293aadff3c99d0c75905af947c7d9a64d 100644
--- a/lib/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/lib/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -215,6 +215,11 @@ class PlaceholderCollector extends AbstractVisitor {
assert(element !== null);
if (element === entryFunction) return;
if (element.getLibrary() === coreLibrary) return;
+ if (element == compiler.types.dynamicType.element) {
+ internalError(
+ 'Should never make element placeholder for dynamic type element',
+ node);
+ }
elementNodes.putIfAbsent(element, () => new Set<Node>()).add(node);
}
@@ -323,7 +328,7 @@ class PlaceholderCollector extends AbstractVisitor {
}
}
// TODO(antonm): is there a better way to detect unresolved types?
- if (type !== compiler.types.dynamicType) {
+ if (type.element !== compiler.types.dynamicType.element) {
makeTypePlaceholder(target, type);
} else {
if (!isDynamicType(node)) makeUnresolvedPlaceholder(target);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698