| Index: src/ia32/code-stubs-ia32.cc
|
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
|
| index fe1641c374bc769d2bbb1bde13d2b6a5e2ec1e56..d67fd0946742a9c02798534497de6c6caa207e2d 100644
|
| --- a/src/ia32/code-stubs-ia32.cc
|
| +++ b/src/ia32/code-stubs-ia32.cc
|
| @@ -7044,7 +7044,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 -------------
|
| // -- eax : value
|
| // -- ebx : target map
|
| @@ -7102,7 +7102,15 @@ void FastElementsConversionStub::GenerateSmiOnlyToDouble(
|
| __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| __ pop(ebx);
|
| __ pop(eax);
|
| - KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode);
|
| + if (type == TRANSITION_ONLY) {
|
| + __ pop(ebx);
|
| + __ push(edx);
|
| + __ push(ebx); // return address
|
| + __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1);
|
| + } else {
|
| + ASSERT(type == TRANSITION_AND_STORE);
|
| + KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode);
|
| + }
|
|
|
| // Convert and copy elements
|
| // esi: source FixedArray
|
| @@ -7159,11 +7167,16 @@ void FastElementsConversionStub::GenerateSmiOnlyToDouble(
|
| OMIT_SMI_CHECK);
|
| // Restore esi.
|
| __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| +
|
| + if (type == TRANSITION_ONLY) {
|
| + __ mov(eax, edx);
|
| + __ Ret();
|
| + }
|
| }
|
|
|
|
|
| void FastElementsConversionStub::GenerateDoubleToObject(
|
| - MacroAssembler* masm, StrictModeFlag strict_mode) {
|
| + MacroAssembler* masm, Type type, StrictModeFlag strict_mode) {
|
| // ----------- S t a t e -------------
|
| // -- eax : value
|
| // -- ebx : target map
|
| @@ -7199,8 +7212,15 @@ void FastElementsConversionStub::GenerateDoubleToObject(
|
| __ pop(ebx);
|
| __ pop(edx);
|
| __ pop(eax);
|
| - KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode);
|
| -
|
| + if (type == TRANSITION_ONLY) {
|
| + __ pop(ebx);
|
| + __ push(edx);
|
| + __ push(ebx); // return address
|
| + __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1);
|
| + } else {
|
| + ASSERT(type == TRANSITION_AND_STORE);
|
| + KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode);
|
| + }
|
| // Box doubles into heap numbers.
|
| // edi: source FixedDoubleArray
|
| // eax: destination FixedArray
|
| @@ -7270,6 +7290,11 @@ void FastElementsConversionStub::GenerateDoubleToObject(
|
| // Restore registers.
|
| __ pop(eax);
|
| __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| +
|
| + if (type == TRANSITION_ONLY) {
|
| + __ mov(eax, edx);
|
| + __ Ret();
|
| + }
|
| }
|
|
|
| #undef __
|
|
|