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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart

Issue 304153014: Remove element from DynamicType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix infinite loop. Created 6 years, 7 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: sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart b/sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart
index 807b896a002dc336106c20c55eb369fb5d63a43c..60f16082e22e504e0c9aa4324fa6c0bfb6834ee1 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart
@@ -73,16 +73,16 @@ class CustomElementsAnalysis {
joinFor(enqueuer).instantiatedClasses.add(classElement);
}
- void registerTypeLiteral(Element element, Enqueuer enqueuer) {
+ void registerTypeLiteral(DartType type, Enqueuer enqueuer) {
// In codegen we see the TypeConstants instead.
if (!enqueuer.isResolutionQueue) return;
- if (element.isClass) {
+ if (type.isInterfaceType) {
// TODO(sra): If we had a flow query from the type literal expression to
// the Type argument of the metadata lookup, we could tell if this type
// literal is really a demand for the metadata.
- resolutionJoin.selectedClasses.add(element);
- } else {
+ resolutionJoin.selectedClasses.add(type.element);
+ } else if (type.isTypeVariable) {
// This is a type parameter of a parameterized class.
// TODO(sra): Is there a way to determine which types are bound to the
// parameter?

Powered by Google App Engine
This is Rietveld 408576698