| 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 final bool REPORT_EXCESS_RESOLUTION = false; | 10 final bool REPORT_EXCESS_RESOLUTION = false; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 lib.forEachExport((Element e) { | 49 lib.forEachExport((Element e) { |
| 50 if (e.isFunction()) world.addToWorkList(e); | 50 if (e.isFunction()) world.addToWorkList(e); |
| 51 }); | 51 }); |
| 52 } | 52 } |
| 53 | 53 |
| 54 abstract void enqueueHelpers(Enqueuer world); | 54 abstract void enqueueHelpers(Enqueuer world); |
| 55 abstract void codegen(WorkItem work); | 55 abstract void codegen(WorkItem work); |
| 56 abstract void processNativeClasses(Enqueuer world, | 56 abstract void processNativeClasses(Enqueuer world, |
| 57 Collection<LibraryElement> libraries); | 57 Collection<LibraryElement> libraries); |
| 58 abstract void assembleProgram(); | 58 abstract void assembleProgram(); |
| 59 abstract List<CompilerTask> get tasks(); | 59 abstract List<CompilerTask> get tasks; |
| 60 | 60 |
| 61 ItemCompilationContext createItemCompilationContext() { | 61 ItemCompilationContext createItemCompilationContext() { |
| 62 return new ItemCompilationContext(); | 62 return new ItemCompilationContext(); |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 | 65 |
| 66 class Compiler implements DiagnosticListener { | 66 class Compiler implements DiagnosticListener { |
| 67 final Map<String, LibraryElement> libraries; | 67 final Map<String, LibraryElement> libraries; |
| 68 int nextFreeClassId = 0; | 68 int nextFreeClassId = 0; |
| 69 World world; | 69 World world; |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 final endOffset = end.charOffset + end.slowCharCount; | 895 final endOffset = end.charOffset + end.slowCharCount; |
| 896 | 896 |
| 897 // [begin] and [end] might be the same for the same empty token. This | 897 // [begin] and [end] might be the same for the same empty token. This |
| 898 // happens for instance when scanning '$$'. | 898 // happens for instance when scanning '$$'. |
| 899 assert(endOffset >= beginOffset); | 899 assert(endOffset >= beginOffset); |
| 900 return f(beginOffset, endOffset); | 900 return f(beginOffset, endOffset); |
| 901 } | 901 } |
| 902 | 902 |
| 903 String toString() => 'SourceSpan($uri, $begin, $end)'; | 903 String toString() => 'SourceSpan($uri, $begin, $end)'; |
| 904 } | 904 } |
| OLD | NEW |