Adding Lasse's improvement to r4364

http://codereview.chromium.org/1556019
http://code.google.com/p/v8/source/detail?r=4364

Review URL: http://codereview.chromium.org/1638001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
sandholm@chromium.org 2010-04-09 09:21:46 +00:00
parent 82ddab5fd5
commit 67116752d9

View File

@ -166,8 +166,6 @@ function RegExpExec(string) {
} else {
saveAnswer = true;
}
} else {
cache.answerSaved = false;
}
if (%_ArgumentsLength() == 0) {
@ -236,10 +234,8 @@ function RegExpExec(string) {
cache.regExp = this;
cache.subject = s;
cache.lastIndex = lastIndex;
if (saveAnswer) {
cache.answer = CloneRegexpAnswer(result);
cache.answerSaved = true;
}
if (saveAnswer) cache.answer = CloneRegexpAnswer(result);
cache.answerSaved = saveAnswer;
cache.type = 'exec';
}
return result;