Revision: 5759
Author: [email protected]
Date: Wed Nov 3 03:30:15 2010
Log: Minor regexp test cleanup.
Review URL: http://codereview.chromium.org/4371002
http://code.google.com/p/v8/source/detail?r=5759
Modified:
/branches/bleeding_edge/src/regexp.js
=======================================
--- /branches/bleeding_edge/src/regexp.js Tue Nov 2 06:37:59 2010
+++ /branches/bleeding_edge/src/regexp.js Wed Nov 3 03:30:15 2010
@@ -237,7 +237,6 @@
} else {
s = ToString(string);
}
- var length = s.length;
var lastIndex = this.lastIndex;
@@ -247,7 +246,7 @@
var global = this.global;
if (global) {
- if (i < 0 || i > length) {
+ if (i < 0 || i > s.length) {
this.lastIndex = 0;
return false;
}
@@ -270,13 +269,6 @@
}
if (!regexp_val.test(s)) return false;
}
-
- var length = s.length;
-
- if (i < 0 || i > length) {
- this.lastIndex = 0;
- return false;
- }
%_Log('regexp', 'regexp-exec,%0r,%1S,%2i', [this, s, lastIndex]);
// matchIndices is either null or the lastMatchInfo array.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev