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

Unified Diff: src/regexp.js

Issue 4371002: Minor regexp test cleanup. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp.js
===================================================================
--- src/regexp.js (revision 5758)
+++ src/regexp.js (working copy)
@@ -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;
}
@@ -271,13 +270,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.
var matchIndices = %_RegExpExec(this, s, i, lastMatchInfo);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698