Chromium Code Reviews| Index: runtime/lib/integers_patch.dart |
| diff --git a/runtime/lib/integers_patch.dart b/runtime/lib/integers_patch.dart |
| index 05d47cf9706ab72195f810be87dd9fd8012f550a..b6ea6e134852b845d71eee72ea7f25d8a09efef2 100644 |
| --- a/runtime/lib/integers_patch.dart |
| +++ b/runtime/lib/integers_patch.dart |
| @@ -7,26 +7,20 @@ |
| patch class int { |
| - static bool _isWhitespace(int codePoint) { |
| - return |
| - (codePoint == 32) || // Space. |
| - ((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc. |
| - } |
| - |
| static int _tryParseSmi(String str) { |
| if (str.isEmpty) return null; |
| var ix = 0; |
| var endIx = str.length - 1; |
| // Find first and last non-whitespace. |
| while (ix <= endIx) { |
| - if (!_isWhitespace(str.codeUnitAt(ix))) break; |
| + if (!str._isWhitespace(str.codeUnitAt(ix))) break; |
|
srdjan
2013/05/17 23:40:28
Synchronize with Siva's upcoming change that makes
floitsch
2013/05/20 13:15:29
Ok. I changed it back to method call, so that it w
srdjan
2013/05/20 17:08:59
I think we should expect str to be OneByteString,
floitsch
2013/05/21 14:39:31
Ok. In any case I reverted the changes.
|
| ix++; |
| } |
| if (endIx < ix) { |
| return null; // Empty. |
| } |
| while (endIx > ix) { |
| - if (!_isWhitespace(str.codeUnitAt(endIx))) break; |
| + if (!str._isWhitespace(str.codeUnitAt(endIx))) break; |
| endIx--; |
| } |