Commit 8df57d74 authored by whesse@chromium.org's avatar whesse@chromium.org

Ensure that the SSE2 TranscendentalCache stub calls GC if it runs out of...

Ensure that the SSE2 TranscendentalCache stub calls GC if it runs out of memory in new space.  Previously, it would just use an alternate algorithm, that did not cache the result.
Review URL: http://codereview.chromium.org/5996001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 57415753
......@@ -2624,6 +2624,13 @@ void TranscendentalCacheStub::Generate(MacroAssembler* masm) {
__ 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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment