| 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 const bool REPORT_EXCESS_RESOLUTION = false; |
| 11 | 11 |
| 12 /** | 12 /** |
| 13 * If true, trace information on pass2 optimizations. | 13 * If true, trace information on pass2 optimizations. |
| 14 */ | 14 */ |
| 15 final bool REPORT_PASS2_OPTIMIZATIONS = false; | 15 const bool REPORT_PASS2_OPTIMIZATIONS = false; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Contains backend-specific data that is used throughout the compilation of | 18 * Contains backend-specific data that is used throughout the compilation of |
| 19 * one work item. | 19 * one work item. |
| 20 */ | 20 */ |
| 21 class ItemCompilationContext { | 21 class ItemCompilationContext { |
| 22 } | 22 } |
| 23 | 23 |
| 24 class WorkItem { | 24 class WorkItem { |
| 25 final ItemCompilationContext compilationContext; | 25 final ItemCompilationContext compilationContext; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 PatchParserTask patchParser; | 135 PatchParserTask patchParser; |
| 136 TreeValidatorTask validator; | 136 TreeValidatorTask validator; |
| 137 ResolverTask resolver; | 137 ResolverTask resolver; |
| 138 closureMapping.ClosureTask closureToClassMapper; | 138 closureMapping.ClosureTask closureToClassMapper; |
| 139 TypeCheckerTask checker; | 139 TypeCheckerTask checker; |
| 140 ti.TypesTask typesTask; | 140 ti.TypesTask typesTask; |
| 141 Backend backend; | 141 Backend backend; |
| 142 ConstantHandler constantHandler; | 142 ConstantHandler constantHandler; |
| 143 EnqueueTask enqueuer; | 143 EnqueueTask enqueuer; |
| 144 | 144 |
| 145 static final SourceString MAIN = const SourceString('main'); | 145 static const SourceString MAIN = const SourceString('main'); |
| 146 static final SourceString CALL_OPERATOR_NAME = const SourceString('call'); | 146 static const SourceString CALL_OPERATOR_NAME = const SourceString('call'); |
| 147 static final SourceString NO_SUCH_METHOD = const SourceString('noSuchMethod'); | 147 static const SourceString NO_SUCH_METHOD = const SourceString('noSuchMethod'); |
| 148 static final SourceString NO_SUCH_METHOD_EXCEPTION = | 148 static const SourceString NO_SUCH_METHOD_EXCEPTION = |
| 149 const SourceString('NoSuchMethodException'); | 149 const SourceString('NoSuchMethodException'); |
| 150 static final SourceString START_ROOT_ISOLATE = | 150 static const SourceString START_ROOT_ISOLATE = |
| 151 const SourceString('startRootIsolate'); | 151 const SourceString('startRootIsolate'); |
| 152 bool enabledNoSuchMethod = false; | 152 bool enabledNoSuchMethod = false; |
| 153 | 153 |
| 154 Stopwatch progress; | 154 Stopwatch progress; |
| 155 | 155 |
| 156 static final int PHASE_SCANNING = 0; | 156 static const int PHASE_SCANNING = 0; |
| 157 static final int PHASE_RESOLVING = 1; | 157 static const int PHASE_RESOLVING = 1; |
| 158 static final int PHASE_COMPILING = 2; | 158 static const int PHASE_COMPILING = 2; |
| 159 static final int PHASE_RECOMPILING = 3; | 159 static const int PHASE_RECOMPILING = 3; |
| 160 int phase; | 160 int phase; |
| 161 | 161 |
| 162 bool compilationFailed = false; | 162 bool compilationFailed = false; |
| 163 | 163 |
| 164 bool hasCrashed = false; | 164 bool hasCrashed = false; |
| 165 | 165 |
| 166 Compiler([this.tracer = const Tracer(), | 166 Compiler([this.tracer = const Tracer(), |
| 167 this.enableTypeAssertions = false, | 167 this.enableTypeAssertions = false, |
| 168 this.enableUserAssertions = false, | 168 this.enableUserAssertions = false, |
| 169 bool emitJavascript = true, | 169 bool emitJavascript = true, |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 final endOffset = end.charOffset + end.slowCharCount; | 893 final endOffset = end.charOffset + end.slowCharCount; |
| 894 | 894 |
| 895 // [begin] and [end] might be the same for the same empty token. This | 895 // [begin] and [end] might be the same for the same empty token. This |
| 896 // happens for instance when scanning '$$'. | 896 // happens for instance when scanning '$$'. |
| 897 assert(endOffset >= beginOffset); | 897 assert(endOffset >= beginOffset); |
| 898 return f(beginOffset, endOffset); | 898 return f(beginOffset, endOffset); |
| 899 } | 899 } |
| 900 | 900 |
| 901 String toString() => 'SourceSpan($uri, $begin, $end)'; | 901 String toString() => 'SourceSpan($uri, $begin, $end)'; |
| 902 } | 902 } |
| OLD | NEW |