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