| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
| 9 * compiled. | 9 * compiled. |
| 10 */ | 10 */ |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 || libraryName == 'dart:math' | 517 || libraryName == 'dart:math' |
| 518 || libraryName == 'dart:html' | 518 || libraryName == 'dart:html' |
| 519 || libraryName == 'dart:html_common' | 519 || libraryName == 'dart:html_common' |
| 520 || libraryName == 'dart:indexed_db' | 520 || libraryName == 'dart:indexed_db' |
| 521 || libraryName == 'dart:svg' | 521 || libraryName == 'dart:svg' |
| 522 || libraryName == 'dart:web_audio') { | 522 || libraryName == 'dart:web_audio') { |
| 523 if (nativeTest | 523 if (nativeTest |
| 524 || libraryName == 'dart:html' | 524 || libraryName == 'dart:html' |
| 525 || libraryName == 'dart:html_common' | 525 || libraryName == 'dart:html_common' |
| 526 || libraryName == 'dart:indexed_db' | 526 || libraryName == 'dart:indexed_db' |
| 527 || libraryName == 'dart:svg' | 527 || libraryName == 'dart:svg') { |
| 528 || libraryName == 'dart:mirrors') { | |
| 529 // dart:html and dart:svg need access to convertDartClosureToJS and | 528 // dart:html and dart:svg need access to convertDartClosureToJS and |
| 530 // annotation classes. | 529 // annotation classes. |
| 531 // dart:mirrors needs access to the Primitives class. | 530 // dart:mirrors needs access to the Primitives class. |
| 532 importHelperLibrary(library); | 531 importHelperLibrary(library); |
| 533 } | 532 } |
| 534 library.addToScope( | 533 library.addToScope( |
| 535 foreignLibrary.findLocal(const SourceString('JS')), this); | 534 foreignLibrary.findLocal(const SourceString('JS')), this); |
| 536 Element jsIndexingBehaviorInterface = | 535 Element jsIndexingBehaviorInterface = |
| 537 findHelper(const SourceString('JavaScriptIndexingBehavior')); | 536 findHelper(const SourceString('JavaScriptIndexingBehavior')); |
| 538 if (jsIndexingBehaviorInterface != null) { | 537 if (jsIndexingBehaviorInterface != null) { |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 // TODO(johnniwinther): Use [spannable] and [message] to provide better | 954 // TODO(johnniwinther): Use [spannable] and [message] to provide better |
| 956 // information on assertion errors. | 955 // information on assertion errors. |
| 957 if (condition is Function){ | 956 if (condition is Function){ |
| 958 condition = condition(); | 957 condition = condition(); |
| 959 } | 958 } |
| 960 if (spannable == null || !condition) { | 959 if (spannable == null || !condition) { |
| 961 throw new SpannableAssertionFailure(spannable, message); | 960 throw new SpannableAssertionFailure(spannable, message); |
| 962 } | 961 } |
| 963 return true; | 962 return true; |
| 964 } | 963 } |
| OLD | NEW |