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

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

Issue 10960033: A library element should know its compilation units. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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 | dart/lib/compiler/implementation/patch_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/elements/elements.dart
diff --git a/dart/lib/compiler/implementation/elements/elements.dart b/dart/lib/compiler/implementation/elements/elements.dart
index 4bed08dbcd52e3cd2dae94dc80666b8befea235a..e54a8ec02632d7d2e895cedbfd2f97ad8110c5b6 100644
--- a/dart/lib/compiler/implementation/elements/elements.dart
+++ b/dart/lib/compiler/implementation/elements/elements.dart
@@ -505,11 +505,13 @@ class ScopeContainerElement extends ContainerElement {
class CompilationUnitElement extends ContainerElement {
final Script script;
- CompilationUnitElement(Script script, Element enclosing)
+ CompilationUnitElement(Script script, LibraryElement library)
: this.script = script,
super(new SourceString(script.name),
ElementKind.COMPILATION_UNIT,
- enclosing);
+ library) {
+ library.addCompilationUnit(this);
+ }
void addMember(Element element, DiagnosticListener listener) {
// Keep a list of top level members.
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/patch_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698