| 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 dart._internal; | 5 library dart._internal; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'dart:core' hide Symbol; | 9 import 'dart:core' hide Symbol; |
| 10 import 'dart:core' as core; | 10 import 'dart:core' as core; |
| 11 import 'dart:math' show Random; | 11 import 'dart:math' show Random; |
| 12 | 12 |
| 13 part 'iterable.dart'; | 13 part 'iterable.dart'; |
| 14 part 'list.dart'; | 14 part 'list.dart'; |
| 15 part 'print.dart'; | 15 part 'print.dart'; |
| 16 part 'sort.dart'; | 16 part 'sort.dart'; |
| 17 part 'symbol.dart'; | 17 part 'symbol.dart'; |
| 18 part 'linked_list.dart'; |
| 18 | 19 |
| 19 // Powers of 10 up to 10^22 are representable as doubles. | 20 // Powers of 10 up to 10^22 are representable as doubles. |
| 20 // Powers of 10 above that are only approximate due to lack of precission. | 21 // Powers of 10 above that are only approximate due to lack of precission. |
| 21 // Used by double-parsing. | 22 // Used by double-parsing. |
| 22 const POWERS_OF_TEN = const [ | 23 const POWERS_OF_TEN = const [ |
| 23 1.0, // 0 | 24 1.0, // 0 |
| 24 10.0, | 25 10.0, |
| 25 100.0, | 26 100.0, |
| 26 1000.0, | 27 1000.0, |
| 27 10000.0, | 28 10000.0, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 89 |
| 89 /// Parses two hex digits in a string. | 90 /// Parses two hex digits in a string. |
| 90 /// | 91 /// |
| 91 /// Returns a negative value if either digit isn't valid. | 92 /// Returns a negative value if either digit isn't valid. |
| 92 int parseHexByte(String source, int index) { | 93 int parseHexByte(String source, int index) { |
| 93 assert(index + 2 <= source.length); | 94 assert(index + 2 <= source.length); |
| 94 int digit1 = hexDigitValue(source.codeUnitAt(index)); | 95 int digit1 = hexDigitValue(source.codeUnitAt(index)); |
| 95 int digit2 = hexDigitValue(source.codeUnitAt(index + 1)); | 96 int digit2 = hexDigitValue(source.codeUnitAt(index + 1)); |
| 96 return digit1 * 16 + digit2 - (digit2 & 256); | 97 return digit1 * 16 + digit2 - (digit2 & 256); |
| 97 } | 98 } |
| OLD | NEW |