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
This commit is contained in:
parent
5741575327
commit
8df57d740d
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user