Revision: 7515
Author: [email protected]
Date: Wed Apr 6 05:52:51 2011
Log: X64: Allow the type recording binary op stub to create heapnumber
results.
Review URL: http://codereview.chromium.org/6803010
http://code.google.com/p/v8/source/detail?r=7515
Modified:
/branches/bleeding_edge/src/x64/code-stubs-x64.cc
=======================================
--- /branches/bleeding_edge/src/x64/code-stubs-x64.cc Wed Apr 6 01:41:28
2011
+++ /branches/bleeding_edge/src/x64/code-stubs-x64.cc Wed Apr 6 05:52:51
2011
@@ -1422,12 +1422,23 @@
void TypeRecordingBinaryOpStub::GenerateSmiStub(MacroAssembler* masm) {
- Label not_smi;
-
- GenerateSmiCode(masm, ¬_smi, NO_HEAPNUMBER_RESULTS);
-
- __ bind(¬_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);
+ }
+
+ // Code falls through if the result is not returned as either a smi or
heap
+ // number.
GenerateTypeTransition(masm);
+
+ __ bind(&call_runtime);
+ GenerateCallRuntimeCode(masm);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev