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 5578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5589 __ lea(ecx, Operand(result, elements_offset)); | 5589 __ lea(ecx, Operand(result, elements_offset)); |
5590 } else { | 5590 } else { |
5591 __ mov(ecx, FieldOperand(source, i)); | 5591 __ mov(ecx, FieldOperand(source, i)); |
5592 } | 5592 } |
5593 __ mov(FieldOperand(result, object_offset + i), ecx); | 5593 __ mov(FieldOperand(result, object_offset + i), ecx); |
5594 } | 5594 } |
5595 | 5595 |
5596 // Copy in-object properties. | 5596 // Copy in-object properties. |
5597 for (int i = 0; i < inobject_properties; i++) { | 5597 for (int i = 0; i < inobject_properties; i++) { |
5598 int total_offset = object_offset + object->GetInObjectPropertyOffset(i); | 5598 int total_offset = object_offset + object->GetInObjectPropertyOffset(i); |
5599 Handle<Object> value = Handle<Object>(object->InObjectPropertyAt(i)); | 5599 Handle<Object> value = Handle<Object>(object->InObjectPropertyAt(i), |
| 5600 isolate()); |
5600 if (value->IsJSObject()) { | 5601 if (value->IsJSObject()) { |
5601 Handle<JSObject> value_object = Handle<JSObject>::cast(value); | 5602 Handle<JSObject> value_object = Handle<JSObject>::cast(value); |
5602 __ lea(ecx, Operand(result, *offset)); | 5603 __ lea(ecx, Operand(result, *offset)); |
5603 __ mov(FieldOperand(result, total_offset), ecx); | 5604 __ mov(FieldOperand(result, total_offset), ecx); |
5604 __ LoadHeapObject(source, value_object); | 5605 __ LoadHeapObject(source, value_object); |
5605 EmitDeepCopy(value_object, result, source, offset, | 5606 EmitDeepCopy(value_object, result, source, offset, |
5606 DONT_TRACK_ALLOCATION_SITE); | 5607 DONT_TRACK_ALLOCATION_SITE); |
5607 } else if (value->IsHeapObject()) { | 5608 } else if (value->IsHeapObject()) { |
5608 __ LoadHeapObject(ecx, Handle<HeapObject>::cast(value)); | 5609 __ LoadHeapObject(ecx, Handle<HeapObject>::cast(value)); |
5609 __ mov(FieldOperand(result, total_offset), ecx); | 5610 __ mov(FieldOperand(result, total_offset), ecx); |
(...skipping 29 matching lines...) Expand all Loading... |
5639 int32_t value_high = static_cast<int32_t>(value >> 32); | 5640 int32_t value_high = static_cast<int32_t>(value >> 32); |
5640 int total_offset = | 5641 int total_offset = |
5641 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); | 5642 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); |
5642 __ mov(FieldOperand(result, total_offset), Immediate(value_low)); | 5643 __ mov(FieldOperand(result, total_offset), Immediate(value_low)); |
5643 __ mov(FieldOperand(result, total_offset + 4), Immediate(value_high)); | 5644 __ mov(FieldOperand(result, total_offset + 4), Immediate(value_high)); |
5644 } | 5645 } |
5645 } else if (elements->IsFixedArray()) { | 5646 } else if (elements->IsFixedArray()) { |
5646 Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements); | 5647 Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements); |
5647 for (int i = 0; i < elements_length; i++) { | 5648 for (int i = 0; i < elements_length; i++) { |
5648 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); | 5649 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); |
5649 Handle<Object> value(fast_elements->get(i)); | 5650 Handle<Object> value(fast_elements->get(i), isolate()); |
5650 if (value->IsJSObject()) { | 5651 if (value->IsJSObject()) { |
5651 Handle<JSObject> value_object = Handle<JSObject>::cast(value); | 5652 Handle<JSObject> value_object = Handle<JSObject>::cast(value); |
5652 __ lea(ecx, Operand(result, *offset)); | 5653 __ lea(ecx, Operand(result, *offset)); |
5653 __ mov(FieldOperand(result, total_offset), ecx); | 5654 __ mov(FieldOperand(result, total_offset), ecx); |
5654 __ LoadHeapObject(source, value_object); | 5655 __ LoadHeapObject(source, value_object); |
5655 EmitDeepCopy(value_object, result, source, offset, | 5656 EmitDeepCopy(value_object, result, source, offset, |
5656 DONT_TRACK_ALLOCATION_SITE); | 5657 DONT_TRACK_ALLOCATION_SITE); |
5657 } else if (value->IsHeapObject()) { | 5658 } else if (value->IsHeapObject()) { |
5658 __ LoadHeapObject(ecx, Handle<HeapObject>::cast(value)); | 5659 __ LoadHeapObject(ecx, Handle<HeapObject>::cast(value)); |
5659 __ mov(FieldOperand(result, total_offset), ecx); | 5660 __ mov(FieldOperand(result, total_offset), ecx); |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6171 FixedArray::kHeaderSize - kPointerSize)); | 6172 FixedArray::kHeaderSize - kPointerSize)); |
6172 __ bind(&done); | 6173 __ bind(&done); |
6173 } | 6174 } |
6174 | 6175 |
6175 | 6176 |
6176 #undef __ | 6177 #undef __ |
6177 | 6178 |
6178 } } // namespace v8::internal | 6179 } } // namespace v8::internal |
6179 | 6180 |
6180 #endif // V8_TARGET_ARCH_IA32 | 6181 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |