| 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 #library('js_helper'); | 5 #library('js_helper'); |
| 6 | 6 |
| 7 #import('coreimpl.dart'); | 7 #import('coreimpl.dart'); |
| 8 | 8 |
| 9 #source('constant_map.dart'); | 9 #source('constant_map.dart'); |
| 10 #source('date_helper.dart'); | 10 #source('date_helper.dart'); |
| (...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 String result = JS('String', @'$0.toFixed($1)', receiver, fractionDigits); | 961 String result = JS('String', @'$0.toFixed($1)', receiver, fractionDigits); |
| 962 if (receiver == 0 && receiver.isNegative()) return "-$result"; | 962 if (receiver == 0 && receiver.isNegative()) return "-$result"; |
| 963 return result; | 963 return result; |
| 964 } | 964 } |
| 965 | 965 |
| 966 builtin$toStringAsExponential$1(receiver, fractionDigits) { | 966 builtin$toStringAsExponential$1(receiver, fractionDigits) { |
| 967 checkNull(receiver); | 967 checkNull(receiver); |
| 968 if (receiver is !num) { | 968 if (receiver is !num) { |
| 969 return UNINTERCEPTED(receiver.toStringAsExponential(fractionDigits)); | 969 return UNINTERCEPTED(receiver.toStringAsExponential(fractionDigits)); |
| 970 } | 970 } |
| 971 checkNum(fractionDigits); | 971 if (fractionDigits !== null) checkNum(fractionDigits); |
| 972 | 972 |
| 973 String result = JS('String', @'$0.toExponential($1)', | 973 String result = JS('String', @'$0.toExponential($1)', |
| 974 receiver, fractionDigits); | 974 receiver, fractionDigits); |
| 975 if (receiver == 0 && receiver.isNegative()) return "-$result"; | 975 if (receiver == 0 && receiver.isNegative()) return "-$result"; |
| 976 return result; | 976 return result; |
| 977 } | 977 } |
| 978 | 978 |
| 979 builtin$toStringAsPrecision$1(receiver, fractionDigits) { | 979 builtin$toStringAsPrecision$1(receiver, fractionDigits) { |
| 980 checkNull(receiver); | 980 checkNull(receiver); |
| 981 if (receiver is !num) { | 981 if (receiver is !num) { |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1398 // Called at the end of unaborted switch cases to get the (unique) | 1398 // Called at the end of unaborted switch cases to get the (unique) |
| 1399 // FallThroughError exception that will be thrown. | 1399 // FallThroughError exception that will be thrown. |
| 1400 FallThroughError fallThroughErrorInstance = null; | 1400 FallThroughError fallThroughErrorInstance = null; |
| 1401 getFallThroughError() { | 1401 getFallThroughError() { |
| 1402 // TODO(lrn): Redo when we support "const FallThroughError()". | 1402 // TODO(lrn): Redo when we support "const FallThroughError()". |
| 1403 if (fallThroughErrorInstance === null) { | 1403 if (fallThroughErrorInstance === null) { |
| 1404 fallThroughErrorInstance = new FallThroughError(); | 1404 fallThroughErrorInstance = new FallThroughError(); |
| 1405 } | 1405 } |
| 1406 return fallThroughErrorInstance; | 1406 return fallThroughErrorInstance; |
| 1407 } | 1407 } |
| OLD | NEW |