| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index 5c5c8423b4e4d53719a13742e22413f8e4b4bbd1..0d111182c6d4e835fadb17ff9dc051bcd61a3691 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -2448,10 +2448,8 @@ void LCodeGen::DoLoadElements(LLoadElements* instr) {
|
| __ lbu(scratch, FieldMemOperand(scratch, Map::kBitField2Offset));
|
| __ Ext(scratch, scratch, Map::kElementsKindShift,
|
| Map::kElementsKindBitCount);
|
| - __ Branch(&fail, lt, scratch,
|
| - Operand(GetInitialFastElementsKind()));
|
| - __ Branch(&done, le, scratch,
|
| - Operand(TERMINAL_FAST_ELEMENTS_KIND));
|
| + __ Branch(&done, eq, scratch,
|
| + Operand(FAST_ELEMENTS));
|
| __ Branch(&fail, lt, scratch,
|
| Operand(FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND));
|
| __ Branch(&done, le, scratch,
|
| @@ -2548,10 +2546,8 @@ void LCodeGen::DoLoadKeyedFastDoubleElement(
|
| (instr->additional_index() << shift_size)));
|
| }
|
|
|
| - if (instr->hydrogen()->RequiresHoleCheck()) {
|
| - __ lw(scratch, MemOperand(elements, sizeof(kHoleNanLower32)));
|
| - DeoptimizeIf(eq, instr->environment(), scratch, Operand(kHoleNanUpper32));
|
| - }
|
| + __ lw(scratch, MemOperand(elements, sizeof(kHoleNanLower32)));
|
| + DeoptimizeIf(eq, instr->environment(), scratch, Operand(kHoleNanUpper32));
|
|
|
| __ ldc1(result, MemOperand(elements));
|
| }
|
| @@ -2640,10 +2636,7 @@ void LCodeGen::DoLoadKeyedSpecializedArrayElement(
|
| case EXTERNAL_DOUBLE_ELEMENTS:
|
| case FAST_DOUBLE_ELEMENTS:
|
| case FAST_ELEMENTS:
|
| - case FAST_SMI_ELEMENTS:
|
| - case FAST_HOLEY_DOUBLE_ELEMENTS:
|
| - case FAST_HOLEY_ELEMENTS:
|
| - case FAST_HOLEY_SMI_ELEMENTS:
|
| + case FAST_SMI_ONLY_ELEMENTS:
|
| case DICTIONARY_ELEMENTS:
|
| case NON_STRICT_ARGUMENTS_ELEMENTS:
|
| UNREACHABLE();
|
| @@ -3676,10 +3669,7 @@ void LCodeGen::DoStoreKeyedSpecializedArrayElement(
|
| case EXTERNAL_DOUBLE_ELEMENTS:
|
| case FAST_DOUBLE_ELEMENTS:
|
| case FAST_ELEMENTS:
|
| - case FAST_SMI_ELEMENTS:
|
| - case FAST_HOLEY_DOUBLE_ELEMENTS:
|
| - case FAST_HOLEY_ELEMENTS:
|
| - case FAST_HOLEY_SMI_ELEMENTS:
|
| + case FAST_SMI_ONLY_ELEMENTS:
|
| case DICTIONARY_ELEMENTS:
|
| case NON_STRICT_ARGUMENTS_ELEMENTS:
|
| UNREACHABLE();
|
| @@ -3717,21 +3707,20 @@ void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) {
|
| __ Branch(¬_applicable, ne, scratch, Operand(from_map));
|
|
|
| __ li(new_map_reg, Operand(to_map));
|
| - if (IsFastSmiElementsKind(from_kind) && IsFastObjectElementsKind(to_kind)) {
|
| + if (from_kind == FAST_SMI_ONLY_ELEMENTS && to_kind == FAST_ELEMENTS) {
|
| __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset));
|
| // Write barrier.
|
| __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg,
|
| scratch, kRAHasBeenSaved, kDontSaveFPRegs);
|
| - } else if (IsFastSmiElementsKind(from_kind) &&
|
| - IsFastDoubleElementsKind(to_kind)) {
|
| + } else if (from_kind == FAST_SMI_ONLY_ELEMENTS &&
|
| + to_kind == FAST_DOUBLE_ELEMENTS) {
|
| Register fixed_object_reg = ToRegister(instr->temp_reg());
|
| ASSERT(fixed_object_reg.is(a2));
|
| ASSERT(new_map_reg.is(a3));
|
| __ mov(fixed_object_reg, object_reg);
|
| CallCode(isolate()->builtins()->TransitionElementsSmiToDouble(),
|
| RelocInfo::CODE_TARGET, instr);
|
| - } else if (IsFastDoubleElementsKind(from_kind) &&
|
| - IsFastObjectElementsKind(to_kind)) {
|
| + } else if (from_kind == FAST_DOUBLE_ELEMENTS && to_kind == FAST_ELEMENTS) {
|
| Register fixed_object_reg = ToRegister(instr->temp_reg());
|
| ASSERT(fixed_object_reg.is(a2));
|
| ASSERT(new_map_reg.is(a3));
|
| @@ -4486,9 +4475,8 @@ void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) {
|
|
|
| // Deopt if the array literal boilerplate ElementsKind is of a type different
|
| // than the expected one. The check isn't necessary if the boilerplate has
|
| - // already been converted to TERMINAL_FAST_ELEMENTS_KIND.
|
| - if (CanTransitionToMoreGeneralFastElementsKind(
|
| - boilerplate_elements_kind, true)) {
|
| + // already been converted to FAST_ELEMENTS.
|
| + if (boilerplate_elements_kind != FAST_ELEMENTS) {
|
| __ LoadHeapObject(a1, instr->hydrogen()->boilerplate_object());
|
| // Load map into a2.
|
| __ lw(a2, FieldMemOperand(a1, HeapObject::kMapOffset));
|
| @@ -4641,11 +4629,10 @@ void LCodeGen::DoFastLiteral(LFastLiteral* instr) {
|
| ElementsKind boilerplate_elements_kind =
|
| instr->hydrogen()->boilerplate()->GetElementsKind();
|
|
|
| - // Deopt if the array literal boilerplate ElementsKind is of a type different
|
| - // than the expected one. The check isn't necessary if the boilerplate has
|
| - // already been converted to TERMINAL_FAST_ELEMENTS_KIND.
|
| - if (CanTransitionToMoreGeneralFastElementsKind(
|
| - boilerplate_elements_kind, true)) {
|
| + // Deopt if the literal boilerplate ElementsKind is of a type different than
|
| + // the expected one. The check isn't necessary if the boilerplate has already
|
| + // been converted to FAST_ELEMENTS.
|
| + if (boilerplate_elements_kind != FAST_ELEMENTS) {
|
| __ LoadHeapObject(a1, instr->hydrogen()->boilerplate());
|
| // Load map into a2.
|
| __ lw(a2, FieldMemOperand(a1, HeapObject::kMapOffset));
|
|
|