Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index b3a0b9538e9730892746a9bae7a7437430c9944d..a3eb389a2e496f36d7faadf3b6590870dee517b4 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -3922,7 +3922,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { |
__ Throw(eax); |
__ bind(&throw_termination_exception); |
- __ ThrowUncatchable(TERMINATION, eax); |
+ __ ThrowUncatchable(eax); |
__ bind(&failure); |
// For failure to match, return null. |
@@ -4780,11 +4780,6 @@ void CEntryStub::GenerateAheadOfTime() { |
} |
-void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { |
- __ Throw(eax); |
-} |
- |
- |
void CEntryStub::GenerateCore(MacroAssembler* masm, |
Label* throw_normal_exception, |
Label* throw_termination_exception, |
@@ -4903,12 +4898,6 @@ void CEntryStub::GenerateCore(MacroAssembler* masm, |
} |
-void CEntryStub::GenerateThrowUncatchable(MacroAssembler* masm, |
- UncatchableExceptionType type) { |
- __ ThrowUncatchable(type, eax); |
-} |
- |
- |
void CEntryStub::Generate(MacroAssembler* masm) { |
// eax: number of arguments including receiver |
// ebx: pointer to C function (C callee-saved) |
@@ -4962,13 +4951,24 @@ 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(Operand::StaticVariable(external_caught), Immediate(false)); |
+ |
+ // Set pending exception and eax to out of memory exception. |
+ ExternalReference pending_exception(Isolate::kPendingExceptionAddress, |
+ isolate); |
+ __ mov(eax, reinterpret_cast<int32_t>(Failure::OutOfMemoryException())); |
+ __ mov(Operand::StaticVariable(pending_exception), eax); |
+ // Fall through to the next label. |
__ bind(&throw_termination_exception); |
- GenerateThrowUncatchable(masm, TERMINATION); |
+ __ ThrowUncatchable(eax); |
__ bind(&throw_normal_exception); |
- GenerateThrowTOS(masm); |
+ __ Throw(eax); |
} |