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

Unified Diff: runtime/lib/regexp.dart

Issue 9692068: Fixed some static type warnings in vm core libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed byte_array.dart changes - test failed Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« runtime/lib/integers.dart ('K') | « runtime/lib/integers.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/regexp.dart
diff --git a/runtime/lib/regexp.dart b/runtime/lib/regexp.dart
index e2f777e9ad5319301e855eb3cd85c489fba206be..fb49db99bf74be6572868fc3f7bf44addec4c4ea 100644
--- a/runtime/lib/regexp.dart
+++ b/runtime/lib/regexp.dart
@@ -13,26 +13,26 @@ class JSRegExpMatch implements Match {
return _end(0);
}
- int _start(int group) {
- return _match[(group * _kMatchPair)];
+ int _start(int groupIdx) {
Ivan Posva 2012/03/14 05:34:05 What is the warning here?
zundel 2012/03/14 12:56:21 parameter 'group' shadows the method 'group' in th
+ return _match[(groupIdx * _kMatchPair)];
}
- int _end(int group) {
- return _match[(group * _kMatchPair) + 1];
+ int _end(int groupIdx) {
+ return _match[(groupIdx * _kMatchPair) + 1];
}
- String group(int group) {
- return str.substringUnchecked_(_start(group), _end(group));
+ String group(int groupIdx) {
+ return str.substringUnchecked_(_start(groupIdx), _end(groupIdx));
}
- String operator [](int group) {
- return str.substringUnchecked_(_start(group), _end(group));
+ String operator [](int groupIdx) {
+ return str.substringUnchecked_(_start(groupIdx), _end(groupIdx));
}
- List<String> groups(List<int> groups) {
- var groupsList = new List<String>(groups.length);
- for (int i = 0; i < groups.length; i++) {
- int grp_idx = groups[i];
+ List<String> groups(List<int> groupsSpec) {
+ var groupsList = new List<String>(groupsSpec.length);
+ for (int i = 0; i < groupsSpec.length; i++) {
+ int grp_idx = groupsSpec[i];
groupsList[i] = str.substringUnchecked_(_start(grp_idx), _end(grp_idx));
}
return groupsList;
« runtime/lib/integers.dart ('K') | « runtime/lib/integers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698