X64: Allow the type recording binary op stub to create heapnumber results.
Review URL: http://codereview.chromium.org/6803010 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
90df684330
commit
058d82a3df
@ -1422,12 +1422,23 @@ void TypeRecordingBinaryOpStub::GenerateCallRuntimeCode(MacroAssembler* masm) {
|
||||
|
||||
|
||||
void TypeRecordingBinaryOpStub::GenerateSmiStub(MacroAssembler* masm) {
|
||||
Label not_smi;
|
||||
Label call_runtime;
|
||||
if (result_type_ == TRBinaryOpIC::UNINITIALIZED ||
|
||||
result_type_ == TRBinaryOpIC::SMI) {
|
||||
// Only allow smi results.
|
||||
GenerateSmiCode(masm, NULL, NO_HEAPNUMBER_RESULTS);
|
||||
} else {
|
||||
// Allow heap number result and don't make a transition if a heap number
|
||||
// cannot be allocated.
|
||||
GenerateSmiCode(masm, &call_runtime, ALLOW_HEAPNUMBER_RESULTS);
|
||||
}
|
||||
|
||||
GenerateSmiCode(masm, ¬_smi, NO_HEAPNUMBER_RESULTS);
|
||||
|
||||
__ bind(¬_smi);
|
||||
// Code falls through if the result is not returned as either a smi or heap
|
||||
// number.
|
||||
GenerateTypeTransition(masm);
|
||||
|
||||
__ bind(&call_runtime);
|
||||
GenerateCallRuntimeCode(masm);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user