| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3748 ElementsKind from_kind = from_map->elements_kind(); | 3748 ElementsKind from_kind = from_map->elements_kind(); |
| 3749 ElementsKind to_kind = to_map->elements_kind(); | 3749 ElementsKind to_kind = to_map->elements_kind(); |
| 3750 | 3750 |
| 3751 __ mov(ToRegister(instr->result()), object_reg); | 3751 __ mov(ToRegister(instr->result()), object_reg); |
| 3752 | 3752 |
| 3753 Label not_applicable; | 3753 Label not_applicable; |
| 3754 __ lw(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 3754 __ lw(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
| 3755 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); | 3755 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); |
| 3756 | 3756 |
| 3757 __ li(new_map_reg, Operand(to_map)); | 3757 __ li(new_map_reg, Operand(to_map)); |
| 3758 if (IsFastSmiElementsKind(from_kind) && IsFastObjectElementsKind(to_kind)) { | 3758 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { |
| 3759 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 3759 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
| 3760 // Write barrier. | 3760 // Write barrier. |
| 3761 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, | 3761 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, |
| 3762 scratch, kRAHasBeenSaved, kDontSaveFPRegs); | 3762 scratch, kRAHasBeenSaved, kDontSaveFPRegs); |
| 3763 } else if (IsFastSmiElementsKind(from_kind) && | 3763 } else if (IsFastSmiElementsKind(from_kind) && |
| 3764 IsFastDoubleElementsKind(to_kind)) { | 3764 IsFastDoubleElementsKind(to_kind)) { |
| 3765 Register fixed_object_reg = ToRegister(instr->temp_reg()); | 3765 Register fixed_object_reg = ToRegister(instr->temp_reg()); |
| 3766 ASSERT(fixed_object_reg.is(a2)); | 3766 ASSERT(fixed_object_reg.is(a2)); |
| 3767 ASSERT(new_map_reg.is(a3)); | 3767 ASSERT(new_map_reg.is(a3)); |
| 3768 __ mov(fixed_object_reg, object_reg); | 3768 __ mov(fixed_object_reg, object_reg); |
| (...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5202 __ Subu(scratch, result, scratch); | 5202 __ Subu(scratch, result, scratch); |
| 5203 __ lw(result, FieldMemOperand(scratch, | 5203 __ lw(result, FieldMemOperand(scratch, |
| 5204 FixedArray::kHeaderSize - kPointerSize)); | 5204 FixedArray::kHeaderSize - kPointerSize)); |
| 5205 __ bind(&done); | 5205 __ bind(&done); |
| 5206 } | 5206 } |
| 5207 | 5207 |
| 5208 | 5208 |
| 5209 #undef __ | 5209 #undef __ |
| 5210 | 5210 |
| 5211 } } // namespace v8::internal | 5211 } } // namespace v8::internal |
| OLD | NEW |