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

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

Issue 1160313006: Revert "Refactoring resolution of local access and unqualified access of statics" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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."));
551 if (Elements.isStaticOrTopLevel(element) && element.isField) { 550 if (Elements.isStaticOrTopLevel(element) && element.isField) {
552 universe.registerStaticFieldUse(element); 551 universe.registerStaticFieldUse(element);
553 } 552 }
554 addToWorkList(element); 553 addToWorkList(element);
555 compiler.backend.registerStaticUse(element, this); 554 compiler.backend.registerStaticUse(element, this);
556 } 555 }
557 556
558 void registerGetOfStaticFunction(FunctionElement element) { 557 void registerGetOfStaticFunction(FunctionElement element) {
559 registerStaticUse(element); 558 registerStaticUse(element);
560 compiler.backend.registerGetOfStaticFunction(this); 559 compiler.backend.registerGetOfStaticFunction(this);
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 void processWorkItem(void f(WorkItem work), WorkItem work) { 943 void processWorkItem(void f(WorkItem work), WorkItem work) {
945 f(work); 944 f(work);
946 } 945 }
947 } 946 }
948 947
949 void removeFromSet(Map<String, Set<Element>> map, Element element) { 948 void removeFromSet(Map<String, Set<Element>> map, Element element) {
950 Set<Element> set = map[element.name]; 949 Set<Element> set = map[element.name];
951 if (set == null) return; 950 if (set == null) return;
952 set.remove(element); 951 set.remove(element);
953 } 952 }
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