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

Unified Diff: src/x64/code-stubs-x64.cc

Issue 363313002: Remove unnecessary check in RegExpExecStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | « src/ia32/code-stubs-ia32.cc ('k') | test/mjsunit/regexp-stack-overflow.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index c08e38b50992bbc1a2fbae027654f08cda603c2c..62ce31cc744d3f29904d261698061758a88630dc 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -1574,19 +1574,14 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ ret(REG_EXP_EXEC_ARGUMENT_COUNT * kPointerSize);
__ bind(&exception);
- // Result must now be exception. If there is no pending exception already a
- // stack overflow (on the backtrack stack) was detected in RegExp code but
- // haven't created the exception yet. Handle that in the runtime system.
- // TODO(592): Rerunning the RegExp to get the stack overflow exception.
+ // Result must now be exception.
ExternalReference pending_exception_address(
Isolate::kPendingExceptionAddress, isolate());
Operand pending_exception_operand =
masm->ExternalOperand(pending_exception_address, rbx);
- __ movp(rax, pending_exception_operand);
__ LoadRoot(rdx, Heap::kTheHoleValueRootIndex);
- __ cmpp(rax, rdx);
- __ j(equal, &runtime);
- __ movp(pending_exception_operand, rdx);
+ __ movp(rax, pending_exception_operand);
+ __ movp(pending_exception_operand, rdx); // Clear pending exception.
__ CompareRoot(rax, Heap::kTerminationExceptionRootIndex);
Label termination_exception;
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | test/mjsunit/regexp-stack-overflow.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698