Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: src/ia32/code-stubs-ia32.cc

Issue 5996001: Ensure that the SSE2 TranscendentalCache stub calls GC if it runs out of memo... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698