Index: src/ia32/code-stubs-ia32.cc |
=================================================================== |
--- src/ia32/code-stubs-ia32.cc (revision 6087) |
+++ src/ia32/code-stubs-ia32.cc (working copy) |
@@ -2624,6 +2624,13 @@ |
__ fstp_d(Operand(esp, 0)); |
__ movdbl(xmm1, Operand(esp, 0)); |
__ add(Operand(esp), Immediate(kDoubleSize)); |
+ // We return the value in xmm1 without adding it to the cache, but |
+ // we cause a scavenging GC so that future allocations will succeed. |
+ __ EnterInternalFrame(); |
+ // Allocate an unused object bigger than a HeapNumber. |
+ __ push(Immediate(Smi::FromInt(2 * kDoubleSize))); |
+ __ CallRuntimeSaveDoubles(Runtime::kAllocateInNewSpace); |
+ __ LeaveInternalFrame(); |
__ Ret(); |
} |