| Index: src/x64/code-stubs-x64.cc
|
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
|
| index 63aaee116b6cbd1efd580a9593ad0f10f2a2386d..615388b1d6cb35666a63cc16b5f33ddef9863b4a 100644
|
| --- a/src/x64/code-stubs-x64.cc
|
| +++ b/src/x64/code-stubs-x64.cc
|
| @@ -5963,7 +5963,7 @@ void FastElementsConversionStub::GenerateSmiOnlyToObject(MacroAssembler* masm) {
|
|
|
|
|
| void FastElementsConversionStub::GenerateSmiOnlyToDouble(
|
| - MacroAssembler* masm, StrictModeFlag strict_mode) {
|
| + MacroAssembler* masm, Type type, StrictModeFlag strict_mode) {
|
| // ----------- S t a t e -------------
|
| // -- rax : value
|
| // -- rbx : target map
|
| @@ -6013,11 +6013,16 @@ void FastElementsConversionStub::GenerateSmiOnlyToDouble(
|
| __ bind(&entry);
|
| __ testq(r9, r9);
|
| __ j(not_zero, &loop);
|
| +
|
| + if (type == TRANSITION_ONLY) {
|
| + __ movq(rax, rdx);
|
| + __ Ret();
|
| + }
|
| }
|
|
|
|
|
| void FastElementsConversionStub::GenerateDoubleToObject(
|
| - MacroAssembler* masm, StrictModeFlag strict_mode) {
|
| + MacroAssembler* masm, Type type, StrictModeFlag strict_mode) {
|
| // ----------- S t a t e -------------
|
| // -- rax : value
|
| // -- rbx : target map
|
| @@ -6051,7 +6056,15 @@ void FastElementsConversionStub::GenerateDoubleToObject(
|
| __ bind(&gc_required);
|
| __ pop(rax);
|
| __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
|
| - KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode);
|
| + if (type == TRANSITION_ONLY) {
|
| + __ pop(rbx);
|
| + __ push(rdx);
|
| + __ push(rbx); // return address
|
| + __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1);
|
| + } else {
|
| + ASSERT(type == TRANSITION_AND_STORE);
|
| + KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode);
|
| + }
|
|
|
| // Box doubles into heap numbers.
|
| __ bind(&loop);
|
| @@ -6115,6 +6128,11 @@ void FastElementsConversionStub::GenerateDoubleToObject(
|
| OMIT_SMI_CHECK);
|
| __ pop(rax);
|
| __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
|
| +
|
| + if (type == TRANSITION_ONLY) {
|
| + __ movq(rax, rdx);
|
| + __ Ret();
|
| + }
|
| }
|
|
|
| #undef __
|
|
|