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 5710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5721 __ add(r2, result, Operand(elements_offset)); | 5721 __ add(r2, result, Operand(elements_offset)); |
5722 } else { | 5722 } else { |
5723 __ ldr(r2, FieldMemOperand(source, i)); | 5723 __ ldr(r2, FieldMemOperand(source, i)); |
5724 } | 5724 } |
5725 __ str(r2, FieldMemOperand(result, object_offset + i)); | 5725 __ str(r2, FieldMemOperand(result, object_offset + i)); |
5726 } | 5726 } |
5727 | 5727 |
5728 // Copy in-object properties. | 5728 // Copy in-object properties. |
5729 for (int i = 0; i < inobject_properties; i++) { | 5729 for (int i = 0; i < inobject_properties; i++) { |
5730 int total_offset = object_offset + object->GetInObjectPropertyOffset(i); | 5730 int total_offset = object_offset + object->GetInObjectPropertyOffset(i); |
5731 Handle<Object> value = Handle<Object>(object->InObjectPropertyAt(i)); | 5731 Handle<Object> value = Handle<Object>(object->InObjectPropertyAt(i), |
| 5732 isolate()); |
5732 if (value->IsJSObject()) { | 5733 if (value->IsJSObject()) { |
5733 Handle<JSObject> value_object = Handle<JSObject>::cast(value); | 5734 Handle<JSObject> value_object = Handle<JSObject>::cast(value); |
5734 __ add(r2, result, Operand(*offset)); | 5735 __ add(r2, result, Operand(*offset)); |
5735 __ str(r2, FieldMemOperand(result, total_offset)); | 5736 __ str(r2, FieldMemOperand(result, total_offset)); |
5736 __ LoadHeapObject(source, value_object); | 5737 __ LoadHeapObject(source, value_object); |
5737 EmitDeepCopy(value_object, result, source, offset, | 5738 EmitDeepCopy(value_object, result, source, offset, |
5738 DONT_TRACK_ALLOCATION_SITE); | 5739 DONT_TRACK_ALLOCATION_SITE); |
5739 } else if (value->IsHeapObject()) { | 5740 } else if (value->IsHeapObject()) { |
5740 __ LoadHeapObject(r2, Handle<HeapObject>::cast(value)); | 5741 __ LoadHeapObject(r2, Handle<HeapObject>::cast(value)); |
5741 __ str(r2, FieldMemOperand(result, total_offset)); | 5742 __ str(r2, FieldMemOperand(result, total_offset)); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5775 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); | 5776 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); |
5776 __ mov(r2, Operand(value_low)); | 5777 __ mov(r2, Operand(value_low)); |
5777 __ str(r2, FieldMemOperand(result, total_offset)); | 5778 __ str(r2, FieldMemOperand(result, total_offset)); |
5778 __ mov(r2, Operand(value_high)); | 5779 __ mov(r2, Operand(value_high)); |
5779 __ str(r2, FieldMemOperand(result, total_offset + 4)); | 5780 __ str(r2, FieldMemOperand(result, total_offset + 4)); |
5780 } | 5781 } |
5781 } else if (elements->IsFixedArray()) { | 5782 } else if (elements->IsFixedArray()) { |
5782 Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements); | 5783 Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements); |
5783 for (int i = 0; i < elements_length; i++) { | 5784 for (int i = 0; i < elements_length; i++) { |
5784 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); | 5785 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); |
5785 Handle<Object> value(fast_elements->get(i)); | 5786 Handle<Object> value(fast_elements->get(i), isolate()); |
5786 if (value->IsJSObject()) { | 5787 if (value->IsJSObject()) { |
5787 Handle<JSObject> value_object = Handle<JSObject>::cast(value); | 5788 Handle<JSObject> value_object = Handle<JSObject>::cast(value); |
5788 __ add(r2, result, Operand(*offset)); | 5789 __ add(r2, result, Operand(*offset)); |
5789 __ str(r2, FieldMemOperand(result, total_offset)); | 5790 __ str(r2, FieldMemOperand(result, total_offset)); |
5790 __ LoadHeapObject(source, value_object); | 5791 __ LoadHeapObject(source, value_object); |
5791 EmitDeepCopy(value_object, result, source, offset, | 5792 EmitDeepCopy(value_object, result, source, offset, |
5792 DONT_TRACK_ALLOCATION_SITE); | 5793 DONT_TRACK_ALLOCATION_SITE); |
5793 } else if (value->IsHeapObject()) { | 5794 } else if (value->IsHeapObject()) { |
5794 __ LoadHeapObject(r2, Handle<HeapObject>::cast(value)); | 5795 __ LoadHeapObject(r2, Handle<HeapObject>::cast(value)); |
5795 __ str(r2, FieldMemOperand(result, total_offset)); | 5796 __ str(r2, FieldMemOperand(result, total_offset)); |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6313 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 6314 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
6314 __ ldr(result, FieldMemOperand(scratch, | 6315 __ ldr(result, FieldMemOperand(scratch, |
6315 FixedArray::kHeaderSize - kPointerSize)); | 6316 FixedArray::kHeaderSize - kPointerSize)); |
6316 __ bind(&done); | 6317 __ bind(&done); |
6317 } | 6318 } |
6318 | 6319 |
6319 | 6320 |
6320 #undef __ | 6321 #undef __ |
6321 | 6322 |
6322 } } // namespace v8::internal | 6323 } } // namespace v8::internal |
OLD | NEW |