| 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 3895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3906 ElementsKind from_kind = from_map->elements_kind(); | 3906 ElementsKind from_kind = from_map->elements_kind(); |
| 3907 ElementsKind to_kind = to_map->elements_kind(); | 3907 ElementsKind to_kind = to_map->elements_kind(); |
| 3908 | 3908 |
| 3909 __ mov(ToRegister(instr->result()), object_reg); | 3909 __ mov(ToRegister(instr->result()), object_reg); |
| 3910 | 3910 |
| 3911 Label not_applicable; | 3911 Label not_applicable; |
| 3912 __ lw(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 3912 __ lw(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
| 3913 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); | 3913 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); |
| 3914 | 3914 |
| 3915 __ li(new_map_reg, Operand(to_map)); | 3915 __ li(new_map_reg, Operand(to_map)); |
| 3916 if (IsFastSmiElementsKind(from_kind) && IsFastObjectElementsKind(to_kind)) { | 3916 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { |
| 3917 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 3917 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
| 3918 // Write barrier. | 3918 // Write barrier. |
| 3919 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, | 3919 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, |
| 3920 scratch, kRAHasBeenSaved, kDontSaveFPRegs); | 3920 scratch, kRAHasBeenSaved, kDontSaveFPRegs); |
| 3921 } else if (IsFastSmiElementsKind(from_kind) && | 3921 } else if (IsFastSmiElementsKind(from_kind) && |
| 3922 IsFastDoubleElementsKind(to_kind)) { | 3922 IsFastDoubleElementsKind(to_kind)) { |
| 3923 Register fixed_object_reg = ToRegister(instr->temp_reg()); | 3923 Register fixed_object_reg = ToRegister(instr->temp_reg()); |
| 3924 ASSERT(fixed_object_reg.is(a2)); | 3924 ASSERT(fixed_object_reg.is(a2)); |
| 3925 ASSERT(new_map_reg.is(a3)); | 3925 ASSERT(new_map_reg.is(a3)); |
| 3926 __ mov(fixed_object_reg, object_reg); | 3926 __ mov(fixed_object_reg, object_reg); |
| (...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5417 __ Subu(scratch, result, scratch); | 5417 __ Subu(scratch, result, scratch); |
| 5418 __ lw(result, FieldMemOperand(scratch, | 5418 __ lw(result, FieldMemOperand(scratch, |
| 5419 FixedArray::kHeaderSize - kPointerSize)); | 5419 FixedArray::kHeaderSize - kPointerSize)); |
| 5420 __ bind(&done); | 5420 __ bind(&done); |
| 5421 } | 5421 } |
| 5422 | 5422 |
| 5423 | 5423 |
| 5424 #undef __ | 5424 #undef __ |
| 5425 | 5425 |
| 5426 } } // namespace v8::internal | 5426 } } // namespace v8::internal |
| OLD | NEW |