| Index: src/arm/code-stubs-arm.cc
|
| diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
|
| index c65f5bdf84ac33eef217e6d727b4207b2bf123f6..e1474ef801501057e5667328634a8b6b663a3772 100644
|
| --- a/src/arm/code-stubs-arm.cc
|
| +++ b/src/arm/code-stubs-arm.cc
|
| @@ -3674,17 +3674,6 @@ void CEntryStub::GenerateAheadOfTime() {
|
| }
|
|
|
|
|
| -void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) {
|
| - __ Throw(r0);
|
| -}
|
| -
|
| -
|
| -void CEntryStub::GenerateThrowUncatchable(MacroAssembler* masm,
|
| - UncatchableExceptionType type) {
|
| - __ ThrowUncatchable(type, r0);
|
| -}
|
| -
|
| -
|
| void CEntryStub::GenerateCore(MacroAssembler* masm,
|
| Label* throw_normal_exception,
|
| Label* throw_termination_exception,
|
| @@ -3865,13 +3854,27 @@ 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);
|
| + __ mov(r0, Operand(false, RelocInfo::NONE));
|
| + __ mov(r2, Operand(external_caught));
|
| + __ str(r0, MemOperand(r2));
|
| +
|
| + // Set pending exception and r0 to out of memory exception.
|
| + Failure* out_of_memory = Failure::OutOfMemoryException();
|
| + __ mov(r0, Operand(reinterpret_cast<int32_t>(out_of_memory)));
|
| + __ mov(r2, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
|
| + isolate)));
|
| + __ str(r0, MemOperand(r2));
|
| + // Fall through to the next label.
|
|
|
| __ bind(&throw_termination_exception);
|
| - GenerateThrowUncatchable(masm, TERMINATION);
|
| + __ ThrowUncatchable(r0);
|
|
|
| __ bind(&throw_normal_exception);
|
| - GenerateThrowTOS(masm);
|
| + __ Throw(r0);
|
| }
|
|
|
|
|
| @@ -4912,10 +4915,10 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
| Label termination_exception;
|
| __ b(eq, &termination_exception);
|
|
|
| - __ Throw(r0); // Expects thrown value in r0.
|
| + __ Throw(r0);
|
|
|
| __ bind(&termination_exception);
|
| - __ ThrowUncatchable(TERMINATION, r0); // Expects thrown value in r0.
|
| + __ ThrowUncatchable(r0);
|
|
|
| __ bind(&failure);
|
| // For failure and exception return null.
|
|
|