| Index: src/x64/code-stubs-x64.cc
|
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
|
| index 9feef086e8e1acb7b59375bb0956a39ff423077d..ff36264193ff96bd5be472d7788c60096c4c89ad 100644
|
| --- a/src/x64/code-stubs-x64.cc
|
| +++ b/src/x64/code-stubs-x64.cc
|
| @@ -3054,7 +3054,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
| __ Throw(rax);
|
|
|
| __ bind(&termination_exception);
|
| - __ ThrowUncatchable(TERMINATION, rax);
|
| + __ ThrowUncatchable(rax);
|
|
|
| // External string. Short external strings have already been ruled out.
|
| // rdi: subject string (expected to be external)
|
| @@ -3775,12 +3775,6 @@ void CEntryStub::GenerateAheadOfTime() {
|
| }
|
|
|
|
|
| -void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) {
|
| - // Throw exception in eax.
|
| - __ Throw(rax);
|
| -}
|
| -
|
| -
|
| void CEntryStub::GenerateCore(MacroAssembler* masm,
|
| Label* throw_normal_exception,
|
| Label* throw_termination_exception,
|
| @@ -3921,12 +3915,6 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
|
| }
|
|
|
|
|
| -void CEntryStub::GenerateThrowUncatchable(MacroAssembler* masm,
|
| - UncatchableExceptionType type) {
|
| - __ ThrowUncatchable(type, rax);
|
| -}
|
| -
|
| -
|
| void CEntryStub::Generate(MacroAssembler* masm) {
|
| // rax: number of arguments including receiver
|
| // rbx: pointer to C function (C callee-saved)
|
| @@ -3990,13 +3978,25 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
| true);
|
|
|
| __ bind(&throw_out_of_memory_exception);
|
| - GenerateThrowUncatchable(masm, OUT_OF_MEMORY);
|
| + // Set external caught exception to false.
|
| + Isolate* isolate = masm->isolate();
|
| + ExternalReference external_caught(Isolate::kExternalCaughtExceptionAddress,
|
| + isolate);
|
| + __ Set(rax, static_cast<int64_t>(false));
|
| + __ Store(external_caught, rax);
|
| +
|
| + // Set pending exception and rax to out of memory exception.
|
| + ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
|
| + isolate);
|
| + __ movq(rax, Failure::OutOfMemoryException(), RelocInfo::NONE);
|
| + __ Store(pending_exception, rax);
|
| + // Fall through to the next label.
|
|
|
| __ bind(&throw_termination_exception);
|
| - GenerateThrowUncatchable(masm, TERMINATION);
|
| + __ ThrowUncatchable(rax);
|
|
|
| __ bind(&throw_normal_exception);
|
| - GenerateThrowTOS(masm);
|
| + __ Throw(rax);
|
| }
|
|
|
|
|
|
|