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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/elements.dart

Issue 11817013: Do not apply optimizations based on an element if that element cannot be resolved. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/elements/elements.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/elements/elements.dart (revision 16853)
+++ sdk/lib/_internal/compiler/implementation/elements/elements.dart (working copy)
@@ -121,6 +121,8 @@
const ElementKind('error', ElementCategory.NONE);
static const ElementKind MALFORMED_TYPE =
const ElementKind('malformed', ElementCategory.NONE);
Johnni Winther 2013/01/10 07:09:55 I don't think this kind is used anymore.
ngeoffray 2013/01/10 09:41:48 As discussed, I'll leave it to you or another CL.
+ static const ElementKind UNRESOLVED =
ahe 2013/01/09 15:46:27 Could you use ErroneousElement instead?
Johnni Winther 2013/01/10 07:09:55 ErroneousElement has a different semantics in the
ahe 2013/01/10 07:32:07 I don't see why. The element is only used by the m
Johnni Winther 2013/01/10 08:19:47 You are right. I thought it was used by production
ngeoffray 2013/01/10 09:41:48 Yes, Done.
+ const ElementKind('unresolved', ElementCategory.NONE);
toString() => id;
}
@@ -429,7 +431,16 @@
}
/**
- * An ambiguous element represent multiple elements accessible by the same name.
+ * An unresolved element represents a selector we did not try to
+ * resolve.
+ */
+class UnresolvedElement extends Element {
+ UnresolvedElement(SourceString name, Element enclosing)
+ : super(name, ElementKind.UNRESOLVED, enclosing);
+}
+
+/**
+ * An ambiguous element represents multiple elements accessible by the same name.
Johnni Winther 2013/01/10 07:09:55 Long line.
ngeoffray 2013/01/10 09:41:48 Done.
*
* Ambiguous elements are created during handling of import/export scopes. If an
* ambiguous element is encountered during resolution a warning/error should be

Powered by Google App Engine
This is Rietveld 408576698