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 4200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4211 ElementsKind from_kind = from_map->elements_kind(); | 4211 ElementsKind from_kind = from_map->elements_kind(); |
4212 ElementsKind to_kind = to_map->elements_kind(); | 4212 ElementsKind to_kind = to_map->elements_kind(); |
4213 | 4213 |
4214 __ mov(ToRegister(instr->result()), object_reg); | 4214 __ mov(ToRegister(instr->result()), object_reg); |
4215 | 4215 |
4216 Label not_applicable; | 4216 Label not_applicable; |
4217 __ lw(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 4217 __ lw(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
4218 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); | 4218 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); |
4219 | 4219 |
4220 __ li(new_map_reg, Operand(to_map)); | 4220 __ li(new_map_reg, Operand(to_map)); |
4221 if (IsFastSmiElementsKind(from_kind) && IsFastObjectElementsKind(to_kind)) { | 4221 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { |
4222 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 4222 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
4223 // Write barrier. | 4223 // Write barrier. |
4224 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, | 4224 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, |
4225 scratch, kRAHasBeenSaved, kDontSaveFPRegs); | 4225 scratch, kRAHasBeenSaved, kDontSaveFPRegs); |
4226 } else if (IsFastSmiElementsKind(from_kind) && | 4226 } else if (IsFastSmiElementsKind(from_kind) && |
4227 IsFastDoubleElementsKind(to_kind)) { | 4227 IsFastDoubleElementsKind(to_kind)) { |
4228 Register fixed_object_reg = ToRegister(instr->temp()); | 4228 Register fixed_object_reg = ToRegister(instr->temp()); |
4229 ASSERT(fixed_object_reg.is(a2)); | 4229 ASSERT(fixed_object_reg.is(a2)); |
4230 ASSERT(new_map_reg.is(a3)); | 4230 ASSERT(new_map_reg.is(a3)); |
4231 __ mov(fixed_object_reg, object_reg); | 4231 __ mov(fixed_object_reg, object_reg); |
(...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5807 __ Subu(scratch, result, scratch); | 5807 __ Subu(scratch, result, scratch); |
5808 __ lw(result, FieldMemOperand(scratch, | 5808 __ lw(result, FieldMemOperand(scratch, |
5809 FixedArray::kHeaderSize - kPointerSize)); | 5809 FixedArray::kHeaderSize - kPointerSize)); |
5810 __ bind(&done); | 5810 __ bind(&done); |
5811 } | 5811 } |
5812 | 5812 |
5813 | 5813 |
5814 #undef __ | 5814 #undef __ |
5815 | 5815 |
5816 } } // namespace v8::internal | 5816 } } // namespace v8::internal |
OLD | NEW |