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

Side by Side Diff: pkg/compiler/lib/src/enqueue.dart

Issue 1149403009: Refactoring resolution of local access and unqualified access of statics (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix after rebase Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/helpers/trace.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js; 5 part of dart2js;
6 6
7 typedef ItemCompilationContext ItemCompilationContextCreator(); 7 typedef ItemCompilationContext ItemCompilationContextCreator();
8 8
9 class EnqueueTask extends CompilerTask { 9 class EnqueueTask extends CompilerTask {
10 final ResolutionEnqueuer resolution; 10 final ResolutionEnqueuer resolution;
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 } 539 }
540 } 540 }
541 541
542 /** 542 /**
543 * Documentation wanted -- johnniwinther 543 * Documentation wanted -- johnniwinther
544 * 544 *
545 * Invariant: [element] must be a declaration element. 545 * Invariant: [element] must be a declaration element.
546 */ 546 */
547 void registerStaticUse(Element element) { 547 void registerStaticUse(Element element) {
548 if (element == null) return; 548 if (element == null) return;
549 assert(invariant(element, element.isDeclaration)); 549 assert(invariant(element, element.isDeclaration,
550 message: "Element ${element} is not the declaration."));
550 if (Elements.isStaticOrTopLevel(element) && element.isField) { 551 if (Elements.isStaticOrTopLevel(element) && element.isField) {
551 universe.registerStaticFieldUse(element); 552 universe.registerStaticFieldUse(element);
552 } 553 }
553 addToWorkList(element); 554 addToWorkList(element);
554 compiler.backend.registerStaticUse(element, this); 555 compiler.backend.registerStaticUse(element, this);
555 } 556 }
556 557
557 void registerGetOfStaticFunction(FunctionElement element) { 558 void registerGetOfStaticFunction(FunctionElement element) {
558 registerStaticUse(element); 559 registerStaticUse(element);
559 compiler.backend.registerGetOfStaticFunction(this); 560 compiler.backend.registerGetOfStaticFunction(this);
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 void processWorkItem(void f(WorkItem work), WorkItem work) { 944 void processWorkItem(void f(WorkItem work), WorkItem work) {
944 f(work); 945 f(work);
945 } 946 }
946 } 947 }
947 948
948 void removeFromSet(Map<String, Set<Element>> map, Element element) { 949 void removeFromSet(Map<String, Set<Element>> map, Element element) {
949 Set<Element> set = map[element.name]; 950 Set<Element> set = map[element.name];
950 if (set == null) return; 951 if (set == null) return;
951 set.remove(element); 952 set.remove(element);
952 } 953 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/helpers/trace.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698