OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 5612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5623 __ Str(new_map, FieldMemOperand(object, HeapObject::kMapOffset)); | 5623 __ Str(new_map, FieldMemOperand(object, HeapObject::kMapOffset)); |
5624 // Write barrier. | 5624 // Write barrier. |
5625 __ RecordWriteField(object, HeapObject::kMapOffset, new_map, temp1, | 5625 __ RecordWriteField(object, HeapObject::kMapOffset, new_map, temp1, |
5626 GetLinkRegisterState(), kDontSaveFPRegs); | 5626 GetLinkRegisterState(), kDontSaveFPRegs); |
5627 } else { | 5627 } else { |
5628 ASSERT(ToRegister(instr->context()).is(cp)); | 5628 ASSERT(ToRegister(instr->context()).is(cp)); |
5629 PushSafepointRegistersScope scope( | 5629 PushSafepointRegistersScope scope( |
5630 this, Safepoint::kWithRegistersAndDoubles); | 5630 this, Safepoint::kWithRegistersAndDoubles); |
5631 __ Mov(x0, object); | 5631 __ Mov(x0, object); |
5632 __ Mov(x1, Operand(to_map)); | 5632 __ Mov(x1, Operand(to_map)); |
5633 TransitionElementsKindStub stub(from_kind, to_kind); | 5633 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; |
| 5634 TransitionElementsKindStub stub(from_kind, to_kind, is_js_array); |
5634 __ CallStub(&stub); | 5635 __ CallStub(&stub); |
5635 RecordSafepointWithRegistersAndDoubles( | 5636 RecordSafepointWithRegistersAndDoubles( |
5636 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 5637 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
5637 } | 5638 } |
5638 __ Bind(¬_applicable); | 5639 __ Bind(¬_applicable); |
5639 } | 5640 } |
5640 | 5641 |
5641 | 5642 |
5642 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { | 5643 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { |
5643 Register object = ToRegister(instr->object()); | 5644 Register object = ToRegister(instr->object()); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5839 __ Bind(&out_of_object); | 5840 __ Bind(&out_of_object); |
5840 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5841 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
5841 // Index is equal to negated out of object property index plus 1. | 5842 // Index is equal to negated out of object property index plus 1. |
5842 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5843 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5843 __ Ldr(result, FieldMemOperand(result, | 5844 __ Ldr(result, FieldMemOperand(result, |
5844 FixedArray::kHeaderSize - kPointerSize)); | 5845 FixedArray::kHeaderSize - kPointerSize)); |
5845 __ Bind(&done); | 5846 __ Bind(&done); |
5846 } | 5847 } |
5847 | 5848 |
5848 } } // namespace v8::internal | 5849 } } // namespace v8::internal |
OLD | NEW |