Index: src/mips/stub-cache-mips.cc |
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc |
index 18a5f5f7e11d4f9efd696484ef9f54c96ad42a86..f8cf9704b1049d4efe812cc8f4036c016d3e366b 100644 |
--- a/src/mips/stub-cache-mips.cc |
+++ b/src/mips/stub-cache-mips.cc |
@@ -1585,16 +1585,29 @@ Handle<Code> CallStubCompiler::CompileArrayPushCall( |
__ jmp(&fast_object); |
// In case of fast smi-only, convert to fast object, otherwise bail out. |
__ bind(¬_fast_object); |
- __ CheckFastSmiOnlyElements(a3, t3, &call_builtin); |
+ __ CheckFastSmiElements(a3, t3, &call_builtin); |
// edx: receiver |
// r3: map |
- __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS, |
+ Label try_holey_map; |
+ __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, |
FAST_ELEMENTS, |
a3, |
t3, |
+ &try_holey_map); |
+ __ mov(a2, receiver); |
+ ElementsTransitionGenerator:: |
+ GenerateMapChangeElementsTransition(masm()); |
+ __ jmp(&fast_object); |
+ |
+ __ bind(&try_holey_map); |
+ __ LoadTransitionedArrayMapConditional(FAST_HOLEY_SMI_ELEMENTS, |
+ FAST_HOLEY_ELEMENTS, |
+ a3, |
+ t3, |
&call_builtin); |
__ mov(a2, receiver); |
- ElementsTransitionGenerator::GenerateSmiOnlyToObject(masm()); |
+ ElementsTransitionGenerator:: |
+ GenerateMapChangeElementsTransition(masm()); |
__ bind(&fast_object); |
} else { |
__ CheckFastObjectElements(a3, a3, &call_builtin); |
@@ -3372,9 +3385,12 @@ static bool IsElementTypeSigned(ElementsKind elements_kind) { |
case EXTERNAL_FLOAT_ELEMENTS: |
case EXTERNAL_DOUBLE_ELEMENTS: |
- case FAST_SMI_ONLY_ELEMENTS: |
+ case FAST_SMI_ELEMENTS: |
case FAST_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: |
+ case FAST_HOLEY_SMI_ELEMENTS: |
+ case FAST_HOLEY_ELEMENTS: |
+ case FAST_HOLEY_DOUBLE_ELEMENTS: |
case DICTIONARY_ELEMENTS: |
case NON_STRICT_ARGUMENTS_ELEMENTS: |
UNREACHABLE(); |
@@ -3508,8 +3524,11 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray( |
} |
break; |
case FAST_ELEMENTS: |
- case FAST_SMI_ONLY_ELEMENTS: |
+ case FAST_SMI_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: |
+ case FAST_HOLEY_ELEMENTS: |
+ case FAST_HOLEY_SMI_ELEMENTS: |
+ case FAST_HOLEY_DOUBLE_ELEMENTS: |
case DICTIONARY_ELEMENTS: |
case NON_STRICT_ARGUMENTS_ELEMENTS: |
UNREACHABLE(); |
@@ -3869,8 +3888,11 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray( |
} |
break; |
case FAST_ELEMENTS: |
- case FAST_SMI_ONLY_ELEMENTS: |
+ case FAST_SMI_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: |
+ case FAST_HOLEY_ELEMENTS: |
+ case FAST_HOLEY_SMI_ELEMENTS: |
+ case FAST_HOLEY_DOUBLE_ELEMENTS: |
case DICTIONARY_ELEMENTS: |
case NON_STRICT_ARGUMENTS_ELEMENTS: |
UNREACHABLE(); |
@@ -3934,8 +3956,11 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray( |
case EXTERNAL_FLOAT_ELEMENTS: |
case EXTERNAL_DOUBLE_ELEMENTS: |
case FAST_ELEMENTS: |
- case FAST_SMI_ONLY_ELEMENTS: |
+ case FAST_SMI_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: |
+ case FAST_HOLEY_ELEMENTS: |
+ case FAST_HOLEY_SMI_ELEMENTS: |
+ case FAST_HOLEY_DOUBLE_ELEMENTS: |
case DICTIONARY_ELEMENTS: |
case NON_STRICT_ARGUMENTS_ELEMENTS: |
UNREACHABLE(); |
@@ -4106,8 +4131,11 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray( |
case EXTERNAL_FLOAT_ELEMENTS: |
case EXTERNAL_DOUBLE_ELEMENTS: |
case FAST_ELEMENTS: |
- case FAST_SMI_ONLY_ELEMENTS: |
+ case FAST_SMI_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: |
+ case FAST_HOLEY_ELEMENTS: |
+ case FAST_HOLEY_SMI_ELEMENTS: |
+ case FAST_HOLEY_DOUBLE_ELEMENTS: |
case DICTIONARY_ELEMENTS: |
case NON_STRICT_ARGUMENTS_ELEMENTS: |
UNREACHABLE(); |
@@ -4286,7 +4314,7 @@ void KeyedStoreStubCompiler::GenerateStoreFastElement( |
// Check that the key is a smi or a heap number convertible to a smi. |
GenerateSmiKeyCheck(masm, key_reg, t0, t1, f2, &miss_force_generic); |
- if (elements_kind == FAST_SMI_ONLY_ELEMENTS) { |
+ if (IsFastSmiElementsKind(elements_kind)) { |
__ JumpIfNotSmi(value_reg, &transition_elements_kind); |
} |
@@ -4314,7 +4342,7 @@ void KeyedStoreStubCompiler::GenerateStoreFastElement( |
__ bind(&finish_store); |
- if (elements_kind == FAST_SMI_ONLY_ELEMENTS) { |
+ if (IsFastSmiElementsKind(elements_kind)) { |
__ Addu(scratch, |
elements_reg, |
Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
@@ -4323,7 +4351,7 @@ void KeyedStoreStubCompiler::GenerateStoreFastElement( |
__ Addu(scratch, scratch, scratch2); |
__ sw(value_reg, MemOperand(scratch)); |
} else { |
- ASSERT(elements_kind == FAST_ELEMENTS); |
+ ASSERT(IsFastObjectElementsKind(elements_kind)); |
__ Addu(scratch, |
elements_reg, |
Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
@@ -4332,7 +4360,6 @@ void KeyedStoreStubCompiler::GenerateStoreFastElement( |
__ Addu(scratch, scratch, scratch2); |
__ sw(value_reg, MemOperand(scratch)); |
__ mov(receiver_reg, value_reg); |
- ASSERT(elements_kind == FAST_ELEMENTS); |
__ RecordWrite(elements_reg, // Object. |
scratch, // Address. |
receiver_reg, // Value. |