summaryrefslogtreecommitdiff
path: root/deps/v8/src/regexp.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/regexp.js')
-rw-r--r--deps/v8/src/regexp.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/deps/v8/src/regexp.js b/deps/v8/src/regexp.js
index 58e620d9ab..fa702b2a82 100644
--- a/deps/v8/src/regexp.js
+++ b/deps/v8/src/regexp.js
@@ -126,7 +126,7 @@ function RegExpCache() {
this.regExp = 0;
this.subject = 0;
this.replaceString = 0;
- this.lastIndex = 0;
+ this.lastIndex = 0; // Also used for splitLimit when type is "split"
this.answer = 0;
// answerSaved marks whether the contents of answer is valid for a cache
// hit in RegExpExec, StringMatch and StringSplit.
@@ -194,7 +194,7 @@ function RegExpExec(string) {
if (%_ObjectEquals(cache.type, 'exec') &&
%_ObjectEquals(cache.lastIndex, this.lastIndex) &&
- %_ObjectEquals(cache.regExp, this) &&
+ %_IsRegExpEquivalent(cache.regExp, this) &&
%_ObjectEquals(cache.subject, string)) {
if (cache.answerSaved) {
return CloneRegExpResult(cache.answer);
@@ -290,7 +290,7 @@ function RegExpTest(string) {
var lastIndex = this.lastIndex;
var cache = regExpCache;
if (%_ObjectEquals(cache.type, 'test') &&
- %_ObjectEquals(cache.regExp, this) &&
+ %_IsRegExpEquivalent(cache.regExp, this) &&
%_ObjectEquals(cache.subject, string) &&
%_ObjectEquals(cache.lastIndex, lastIndex)) {
return cache.answer;