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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 coreImplLibrary = scanBuiltinLibrary('coreimpl'); | 366 coreImplLibrary = scanBuiltinLibrary('coreimpl'); |
367 jsHelperLibrary = scanBuiltinLibrary('_js_helper'); | 367 jsHelperLibrary = scanBuiltinLibrary('_js_helper'); |
368 interceptorsLibrary = scanBuiltinLibrary('_interceptors'); | 368 interceptorsLibrary = scanBuiltinLibrary('_interceptors'); |
369 | 369 |
370 addForeignFunctions(jsHelperLibrary); | 370 addForeignFunctions(jsHelperLibrary); |
371 addForeignFunctions(interceptorsLibrary); | 371 addForeignFunctions(interceptorsLibrary); |
372 | 372 |
373 libraries['dart:core'] = coreLibrary; | 373 libraries['dart:core'] = coreLibrary; |
374 libraries['dart:coreimpl'] = coreImplLibrary; | 374 libraries['dart:coreimpl'] = coreImplLibrary; |
375 | 375 |
376 assertMethod = coreLibrary.find(const SourceString('assert')); | 376 assertMethod = jsHelperLibrary.find(const SourceString('assert')); |
377 | 377 |
378 initializeSpecialClasses(); | 378 initializeSpecialClasses(); |
379 | 379 |
380 //patchDartLibrary(coreLibrary, 'core'); | 380 //patchDartLibrary(coreLibrary, 'core'); |
381 //patchDartLibrary(coreImplLibrary, 'coreimpl'); | 381 //patchDartLibrary(coreImplLibrary, 'coreimpl'); |
382 } | 382 } |
383 | 383 |
384 void importCoreLibrary(LibraryElement library) { | 384 void importCoreLibrary(LibraryElement library) { |
385 Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core'); | 385 Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core'); |
386 if (coreLibrary === null) { | 386 if (coreLibrary === null) { |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 final endOffset = end.charOffset + end.slowCharCount; | 928 final endOffset = end.charOffset + end.slowCharCount; |
929 | 929 |
930 // [begin] and [end] might be the same for the same empty token. This | 930 // [begin] and [end] might be the same for the same empty token. This |
931 // happens for instance when scanning '$$'. | 931 // happens for instance when scanning '$$'. |
932 assert(endOffset >= beginOffset); | 932 assert(endOffset >= beginOffset); |
933 return f(beginOffset, endOffset); | 933 return f(beginOffset, endOffset); |
934 } | 934 } |
935 | 935 |
936 String toString() => 'SourceSpan($uri, $begin, $end)'; | 936 String toString() => 'SourceSpan($uri, $begin, $end)'; |
937 } | 937 } |
OLD | NEW |