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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/enqueue.dart

Issue 626433004: Forget closure classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r40894 Created 6 years, 2 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 | Annotate | Revision Log
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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 nativeEnqueuer.logSummary(log); 644 nativeEnqueuer.logSummary(log);
645 } 645 }
646 646
647 /// Log summary specific to the concrete enqueuer. 647 /// Log summary specific to the concrete enqueuer.
648 void _logSpecificSummary(log(message)); 648 void _logSpecificSummary(log(message));
649 649
650 String toString() => 'Enqueuer($name)'; 650 String toString() => 'Enqueuer($name)';
651 651
652 void forgetElement(Element element) { 652 void forgetElement(Element element) {
653 universe.forgetElement(element, compiler); 653 universe.forgetElement(element, compiler);
654 seenClasses.remove(element);
654 } 655 }
655 } 656 }
656 657
657 /// [Enqueuer] which is specific to resolution. 658 /// [Enqueuer] which is specific to resolution.
658 class ResolutionEnqueuer extends Enqueuer { 659 class ResolutionEnqueuer extends Enqueuer {
659 /** 660 /**
660 * Map from declaration elements to the [TreeElements] object holding the 661 * Map from declaration elements to the [TreeElements] object holding the
661 * resolution mapping for the element implementation. 662 * resolution mapping for the element implementation.
662 * 663 *
663 * Invariant: Key elements are declaration elements. 664 * Invariant: Key elements are declaration elements.
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 void processWorkItem(void f(WorkItem work), WorkItem work) { 918 void processWorkItem(void f(WorkItem work), WorkItem work) {
918 f(work); 919 f(work);
919 } 920 }
920 } 921 }
921 922
922 void removeFromSet(Map<String, Set<Element>> map, Element element) { 923 void removeFromSet(Map<String, Set<Element>> map, Element element) {
923 Set<Element> set = map[element.name]; 924 Set<Element> set = map[element.name];
924 if (set == null) return; 925 if (set == null) return;
925 set.remove(element); 926 set.remove(element);
926 } 927 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/closure.dart ('k') | dart/tests/try/poi/forget_element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698