Commit 058d82a3 authored by lrn@chromium.org's avatar lrn@chromium.org

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
parent 90df6843
......@@ -1422,12 +1422,23 @@ void TypeRecordingBinaryOpStub::GenerateCallRuntimeCode(MacroAssembler* masm) {
void TypeRecordingBinaryOpStub::GenerateSmiStub(MacroAssembler* masm) {
Label not_smi;
GenerateSmiCode(masm, &not_smi, NO_HEAPNUMBER_RESULTS);
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);
}
__ bind(&not_smi);
// Code falls through if the result is not returned as either a smi or heap
// number.
GenerateTypeTransition(masm);
__ bind(&call_runtime);
GenerateCallRuntimeCode(masm);
}
......
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