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

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: merged up 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
« no previous file with comments | « runtime/lib/immutable_map.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 ee2aa368f833adce8d7a4921ef507960b5201239..1cb16c7d69843f0dc0b55bed4570ff69d93070ae 100644
--- a/runtime/lib/regexp.dart
+++ b/runtime/lib/regexp.dart
@@ -13,20 +13,20 @@ class JSRegExpMatch implements Match {
return _end(0);
}
- int _start(int group) {
- return _match[(group * MATCH_PAIR)];
+ int _start(int groupIdx) {
+ return _match[(groupIdx * MATCH_PAIR)];
}
- int _end(int group) {
- return _match[(group * MATCH_PAIR) + 1];
+ int _end(int groupIdx) {
+ return _match[(groupIdx * MATCH_PAIR) + 1];
}
- String group(int group) {
- if (group < 0 || group > regexp._groupCount) {
- throw new IndexOutOfRangeException(group);
+ String group(int groupIdx) {
+ if (groupIdx < 0 || groupIdx > regexp._groupCount) {
+ throw new IndexOutOfRangeException(groupIdx);
}
- int startIndex = _start(group);
- int endIndex = _end(group);
+ int startIndex = _start(groupIdx);
+ int endIndex = _end(groupIdx);
if (startIndex == -1) {
assert(endIndex == -1);
return null;
@@ -34,14 +34,14 @@ class JSRegExpMatch implements Match {
return str.substringUnchecked_(startIndex, endIndex);
}
- String operator [](int group) {
- return this.group(group);
+ String operator [](int groupIdx) {
+ return this.group(groupIdx);
}
- List<String> groups(List<int> groups) {
- var groupsList = new List<String>(groups.length);
- for (int i = 0; i < groups.length; i++) {
- groupsList[i] = group(groups[i]);
+ List<String> groups(List<int> groupsSpec) {
+ var groupsList = new List<String>(groupsSpec.length);
+ for (int i = 0; i < groupsSpec.length; i++) {
+ groupsList[i] = group(groupsSpec[i]);
}
return groupsList;
}
« no previous file with comments | « runtime/lib/immutable_map.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698