Index: src/ia32/code-stubs-ia32.cc |
=================================================================== |
--- src/ia32/code-stubs-ia32.cc (revision 6062) |
+++ src/ia32/code-stubs-ia32.cc (working copy) |
@@ -2779,6 +2779,7 @@ |
__ Ret(); |
__ bind(&skip_cache); |
+ // Do not allocate an answer to put it in the cache |
__ sub(Operand(esp), Immediate(kDoubleSize)); |
__ movdbl(Operand(esp, 0), xmm1); |
__ fld_d(Operand(esp, 0)); |
@@ -2786,6 +2787,12 @@ |
__ 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(); |
+ __ push(Immediate(Smi::FromInt(kDoubleSize))); // Unused aligned object. |
+ __ CallRuntimeSaveDoubles(Runtime::kAllocateInNewSpace); |
Kevin Millikin (Chromium)
2010/12/17 13:47:57
There is a Runtime::PerformGC function. It would
|
+ __ LeaveInternalFrame(); |
__ Ret(); |
__ bind(&call_runtime); |