| 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 | 5 |
| 6 /** | 6 /** |
| 7 * If true, print a warning for each method that was resolved, but not | 7 * If true, print a warning for each method that was resolved, but not |
| 8 * compiled. | 8 * compiled. |
| 9 */ | 9 */ |
| 10 const bool REPORT_EXCESS_RESOLUTION = false; | 10 const bool REPORT_EXCESS_RESOLUTION = false; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 Backend(this.compiler, | 63 Backend(this.compiler, |
| 64 [ConstantSystem constantSystem = DART_CONSTANT_SYSTEM]) | 64 [ConstantSystem constantSystem = DART_CONSTANT_SYSTEM]) |
| 65 : this.constantSystem = constantSystem; | 65 : this.constantSystem = constantSystem; |
| 66 | 66 |
| 67 void enqueueAllTopLevelFunctions(LibraryElement lib, Enqueuer world) { | 67 void enqueueAllTopLevelFunctions(LibraryElement lib, Enqueuer world) { |
| 68 lib.forEachExport((Element e) { | 68 lib.forEachExport((Element e) { |
| 69 if (e.isFunction()) world.addToWorkList(e); | 69 if (e.isFunction()) world.addToWorkList(e); |
| 70 }); | 70 }); |
| 71 } | 71 } |
| 72 | 72 |
| 73 abstract void onUseSelector(Selector selector, Enqueuer world); |
| 73 abstract void enqueueHelpers(Enqueuer world); | 74 abstract void enqueueHelpers(Enqueuer world); |
| 74 abstract void codegen(WorkItem work); | 75 abstract void codegen(WorkItem work); |
| 75 abstract void processNativeClasses(Enqueuer world, | 76 abstract void processNativeClasses(Enqueuer world, |
| 76 Collection<LibraryElement> libraries); | 77 Collection<LibraryElement> libraries); |
| 77 abstract void assembleProgram(); | 78 abstract void assembleProgram(); |
| 78 abstract List<CompilerTask> get tasks; | 79 abstract List<CompilerTask> get tasks; |
| 79 | 80 |
| 80 ItemCompilationContext createItemCompilationContext() { | 81 ItemCompilationContext createItemCompilationContext() { |
| 81 return new ItemCompilationContext(); | 82 return new ItemCompilationContext(); |
| 82 } | 83 } |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 final endOffset = end.charOffset + end.slowCharCount; | 945 final endOffset = end.charOffset + end.slowCharCount; |
| 945 | 946 |
| 946 // [begin] and [end] might be the same for the same empty token. This | 947 // [begin] and [end] might be the same for the same empty token. This |
| 947 // happens for instance when scanning '$$'. | 948 // happens for instance when scanning '$$'. |
| 948 assert(endOffset >= beginOffset); | 949 assert(endOffset >= beginOffset); |
| 949 return f(beginOffset, endOffset); | 950 return f(beginOffset, endOffset); |
| 950 } | 951 } |
| 951 | 952 |
| 952 String toString() => 'SourceSpan($uri, $begin, $end)'; | 953 String toString() => 'SourceSpan($uri, $begin, $end)'; |
| 953 } | 954 } |
| OLD | NEW |