Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: runtime/lib/string_patch.dart

Issue 2705593002: Fix various nits in VM patch files. (Closed)
Patch Set: Address comments and issues found during testing. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/lib/string_buffer_patch.dart ('k') | runtime/lib/typed_data_patch.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 const int _maxAscii = 0x7f; 5 const int _maxAscii = 0x7f;
6 const int _maxLatin1 = 0xff; 6 const int _maxLatin1 = 0xff;
7 const int _maxUtf16 = 0xffff; 7 const int _maxUtf16 = 0xffff;
8 const int _maxUnicode = 0x10ffff; 8 const int _maxUnicode = 0x10ffff;
9 9
10 @patch class String { 10 @patch class String {
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 1280
1281 int codeUnitAt(int index) native "String_codeUnitAt"; 1281 int codeUnitAt(int index) native "String_codeUnitAt";
1282 1282
1283 bool operator ==(Object other) { 1283 bool operator ==(Object other) {
1284 return super == other; 1284 return super == other;
1285 } 1285 }
1286 } 1286 }
1287 1287
1288 1288
1289 class _StringMatch implements Match { 1289 class _StringMatch implements Match {
1290 const _StringMatch(int this.start, 1290 const _StringMatch(this.start, this.input, this.pattern);
1291 String this.input,
1292 String this.pattern);
1293 1291
1294 int get end => start + pattern.length; 1292 int get end => start + pattern.length;
1295 String operator[](int g) => group(g); 1293 String operator[](int g) => group(g);
1296 int get groupCount => 0; 1294 int get groupCount => 0;
1297 1295
1298 String group(int group) { 1296 String group(int group) {
1299 if (group != 0) { 1297 if (group != 0) {
1300 throw new RangeError.value(group); 1298 throw new RangeError.value(group);
1301 } 1299 }
1302 return pattern; 1300 return pattern;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 int end = index + _pattern.length; 1355 int end = index + _pattern.length;
1358 _current = new _StringMatch(index, _input, _pattern); 1356 _current = new _StringMatch(index, _input, _pattern);
1359 // Empty match, don't start at same location again. 1357 // Empty match, don't start at same location again.
1360 if (end == _index) end++; 1358 if (end == _index) end++;
1361 _index = end; 1359 _index = end;
1362 return true; 1360 return true;
1363 } 1361 }
1364 1362
1365 Match get current => _current; 1363 Match get current => _current;
1366 } 1364 }
OLDNEW
« no previous file with comments | « runtime/lib/string_buffer_patch.dart ('k') | runtime/lib/typed_data_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698