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

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

Issue 10824347: Make top-level patch injections be compilation unit under library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Offline discussed changes. 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 | « lib/compiler/implementation/diagnostic_listener.dart ('k') | lib/compiler/implementation/patch_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/elements/elements.dart
diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
index 12bde397404d3f540ec577175e2f5761b5bcd2f2..337d3f730560d268280727f1750c7271b13be473 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -399,21 +399,21 @@ class CompilationUnitOverrideElement extends Element {
}
class LibraryElement extends ScopeContainerElement {
+ final Uri uri;
CompilationUnitElement entryCompilationUnit;
Link<CompilationUnitElement> compilationUnits =
const EmptyLink<CompilationUnitElement>();
-
Link<ScriptTag> tags = const EmptyLink<ScriptTag>();
ScriptTag libraryTag;
bool canUseNative = false;
LibraryElement patch = null;
- LibraryElement(Script script)
- : super(new SourceString(script.name), ElementKind.LIBRARY, null) {
+ LibraryElement(Script script, [Uri uri])
+ : this.uri = ((uri === null) ? script.uri : uri),
+ super(new SourceString(script.name), ElementKind.LIBRARY, null) {
entryCompilationUnit = new CompilationUnitElement(script, this);
}
- Uri get uri() => entryCompilationUnit.script.uri;
bool get isPatched() => patch !== null;
@@ -1027,6 +1027,9 @@ class ClassElement extends ScopeContainerElement
Link<Type> allSupertypes;
+ // Lazily applied patch of class members.
+ ClassElement patch = null;
+
ClassElement(SourceString name, Element enclosing, this.id)
: super(name, ElementKind.CLASS, enclosing);
@@ -1040,6 +1043,8 @@ class ClassElement extends ScopeContainerElement
return type;
}
+ bool get isPatched() => patch != null;
+
Link<Type> get typeVariables() => type.arguments;
ClassElement ensureResolved(Compiler compiler) {
« no previous file with comments | « lib/compiler/implementation/diagnostic_listener.dart ('k') | lib/compiler/implementation/patch_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698