| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |