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

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

Issue 1126163002: Improve resolution/codegen separation invariant. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment Created 5 years, 7 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
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | tests/compiler/dart2js/compiler_helper.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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 846
847 if (compiler.hasIncrementalSupport && !isProcessed(element)) { 847 if (compiler.hasIncrementalSupport && !isProcessed(element)) {
848 newlyEnqueuedElements.add(element); 848 newlyEnqueuedElements.add(element);
849 } 849 }
850 850
851 if (queueIsClosed) { 851 if (queueIsClosed) {
852 throw new SpannableAssertionFailure(element, 852 throw new SpannableAssertionFailure(element,
853 "Codegen work list is closed. Trying to add $element"); 853 "Codegen work list is closed. Trying to add $element");
854 } 854 }
855 CodegenWorkItem workItem = new CodegenWorkItem( 855 CodegenWorkItem workItem = new CodegenWorkItem(
856 element, itemCompilationContextCreator()); 856 compiler, element, itemCompilationContextCreator());
857 queue.add(workItem); 857 queue.add(workItem);
858 return true; 858 return true;
859 } 859 }
860 860
861 void registerNoSuchMethod(Element element) { 861 void registerNoSuchMethod(Element element) {
862 if (!enabledNoSuchMethod && compiler.backend.enabledNoSuchMethod) { 862 if (!enabledNoSuchMethod && compiler.backend.enabledNoSuchMethod) {
863 compiler.backend.enableNoSuchMethod(this); 863 compiler.backend.enableNoSuchMethod(this);
864 enabledNoSuchMethod = true; 864 enabledNoSuchMethod = true;
865 } 865 }
866 } 866 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 void processWorkItem(void f(WorkItem work), WorkItem work) { 909 void processWorkItem(void f(WorkItem work), WorkItem work) {
910 f(work); 910 f(work);
911 } 911 }
912 } 912 }
913 913
914 void removeFromSet(Map<String, Set<Element>> map, Element element) { 914 void removeFromSet(Map<String, Set<Element>> map, Element element) {
915 Set<Element> set = map[element.name]; 915 Set<Element> set = map[element.name];
916 if (set == null) return; 916 if (set == null) return;
917 set.remove(element); 917 set.remove(element);
918 } 918 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698