| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 // The core and coreimpl libraries were loaded and patched before | 383 // The core and coreimpl libraries were loaded and patched before |
| 384 // jsHelperLibrary was initialized, so it wasn't imported into those | 384 // jsHelperLibrary was initialized, so it wasn't imported into those |
| 385 // two libraries during patching. | 385 // two libraries during patching. |
| 386 importHelperLibrary(coreLibrary); | 386 importHelperLibrary(coreLibrary); |
| 387 importHelperLibrary(coreImplLibrary); | 387 importHelperLibrary(coreImplLibrary); |
| 388 importHelperLibrary(interceptorsLibrary); | 388 importHelperLibrary(interceptorsLibrary); |
| 389 | 389 |
| 390 addForeignFunctions(jsHelperLibrary); | 390 addForeignFunctions(jsHelperLibrary); |
| 391 addForeignFunctions(interceptorsLibrary); | 391 addForeignFunctions(interceptorsLibrary); |
| 392 | 392 |
| 393 assertMethod = jsHelperLibrary.find(const SourceString('assert')); | 393 assertMethod = jsHelperLibrary.find(const SourceString('assertHelper')); |
| 394 identicalFunction = coreLibrary.find(const SourceString('identical')); | 394 identicalFunction = coreLibrary.find(const SourceString('identical')); |
| 395 | 395 |
| 396 initializeSpecialClasses(); | 396 initializeSpecialClasses(); |
| 397 | 397 |
| 398 functionClass.ensureResolved(this); | 398 functionClass.ensureResolved(this); |
| 399 functionApplyMethod = | 399 functionApplyMethod = |
| 400 functionClass.lookupLocalMember(const SourceString('apply')); | 400 functionClass.lookupLocalMember(const SourceString('apply')); |
| 401 } | 401 } |
| 402 | 402 |
| 403 void loadCoreImplLibrary() { | 403 void loadCoreImplLibrary() { |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 // TODO(johnniwinther): Use [spannable] and [message] to provide better | 848 // TODO(johnniwinther): Use [spannable] and [message] to provide better |
| 849 // information on assertion errors. | 849 // information on assertion errors. |
| 850 if (condition is Function){ | 850 if (condition is Function){ |
| 851 condition = condition(); | 851 condition = condition(); |
| 852 } | 852 } |
| 853 if (!condition && message != null) { | 853 if (!condition && message != null) { |
| 854 print('assertion failed: $message'); | 854 print('assertion failed: $message'); |
| 855 } | 855 } |
| 856 return spannable != null && condition; | 856 return spannable != null && condition; |
| 857 } | 857 } |
| OLD | NEW |