| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 enqueuer.resolution.addToWorkList( | 293 enqueuer.resolution.addToWorkList( |
| 294 element.find(const SourceString('_currentIsolate'))); | 294 element.find(const SourceString('_currentIsolate'))); |
| 295 enqueuer.resolution.addToWorkList( | 295 enqueuer.resolution.addToWorkList( |
| 296 element.find(const SourceString('_callInIsolate'))); | 296 element.find(const SourceString('_callInIsolate'))); |
| 297 enqueuer.codegen.addToWorkList(element.find(START_ROOT_ISOLATE)); | 297 enqueuer.codegen.addToWorkList(element.find(START_ROOT_ISOLATE)); |
| 298 } | 298 } |
| 299 | 299 |
| 300 bool hasIsolateSupport() => isolateLibrary !== null; | 300 bool hasIsolateSupport() => isolateLibrary !== null; |
| 301 | 301 |
| 302 void onLibraryLoaded(LibraryElement library, Uri uri) { | 302 void onLibraryLoaded(LibraryElement library, Uri uri) { |
| 303 if (uri.toString() == 'dart:isolate') { | |
| 304 enableIsolateSupport(library); | |
| 305 } | |
| 306 if (dynamicClass !== null) { | 303 if (dynamicClass !== null) { |
| 307 // When loading the built-in libraries, dynamicClass is null. We | 304 // When loading the built-in libraries, dynamicClass is null. We |
| 308 // take advantage of this as core and coreimpl import js_helper | 305 // take advantage of this as core and coreimpl import js_helper |
| 309 // and see Dynamic this way. | 306 // and see Dynamic this way. |
| 310 withCurrentElement(dynamicClass, () { | 307 withCurrentElement(dynamicClass, () { |
| 311 library.addToScope(dynamicClass, this); | 308 library.addToScope(dynamicClass, this); |
| 312 }); | 309 }); |
| 313 } | 310 } |
| 314 } | 311 } |
| 315 | 312 |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 final endOffset = end.charOffset + end.slowCharCount; | 932 final endOffset = end.charOffset + end.slowCharCount; |
| 936 | 933 |
| 937 // [begin] and [end] might be the same for the same empty token. This | 934 // [begin] and [end] might be the same for the same empty token. This |
| 938 // happens for instance when scanning '$$'. | 935 // happens for instance when scanning '$$'. |
| 939 assert(endOffset >= beginOffset); | 936 assert(endOffset >= beginOffset); |
| 940 return f(beginOffset, endOffset); | 937 return f(beginOffset, endOffset); |
| 941 } | 938 } |
| 942 | 939 |
| 943 String toString() => 'SourceSpan($uri, $begin, $end)'; | 940 String toString() => 'SourceSpan($uri, $begin, $end)'; |
| 944 } | 941 } |
| OLD | NEW |