| 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 5169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5180 __ lea(rcx, Operand(result, elements_offset)); | 5180 __ lea(rcx, Operand(result, elements_offset)); |
| 5181 } else { | 5181 } else { |
| 5182 __ movq(rcx, FieldOperand(source, i)); | 5182 __ movq(rcx, FieldOperand(source, i)); |
| 5183 } | 5183 } |
| 5184 __ movq(FieldOperand(result, object_offset + i), rcx); | 5184 __ movq(FieldOperand(result, object_offset + i), rcx); |
| 5185 } | 5185 } |
| 5186 | 5186 |
| 5187 // Copy in-object properties. | 5187 // Copy in-object properties. |
| 5188 for (int i = 0; i < inobject_properties; i++) { | 5188 for (int i = 0; i < inobject_properties; i++) { |
| 5189 int total_offset = object_offset + object->GetInObjectPropertyOffset(i); | 5189 int total_offset = object_offset + object->GetInObjectPropertyOffset(i); |
| 5190 Handle<Object> value = Handle<Object>(object->InObjectPropertyAt(i)); | 5190 Handle<Object> value = Handle<Object>(object->InObjectPropertyAt(i), |
| 5191 isolate()); |
| 5191 if (value->IsJSObject()) { | 5192 if (value->IsJSObject()) { |
| 5192 Handle<JSObject> value_object = Handle<JSObject>::cast(value); | 5193 Handle<JSObject> value_object = Handle<JSObject>::cast(value); |
| 5193 __ lea(rcx, Operand(result, *offset)); | 5194 __ lea(rcx, Operand(result, *offset)); |
| 5194 __ movq(FieldOperand(result, total_offset), rcx); | 5195 __ movq(FieldOperand(result, total_offset), rcx); |
| 5195 __ LoadHeapObject(source, value_object); | 5196 __ LoadHeapObject(source, value_object); |
| 5196 EmitDeepCopy(value_object, result, source, offset, | 5197 EmitDeepCopy(value_object, result, source, offset, |
| 5197 DONT_TRACK_ALLOCATION_SITE); | 5198 DONT_TRACK_ALLOCATION_SITE); |
| 5198 } else if (value->IsHeapObject()) { | 5199 } else if (value->IsHeapObject()) { |
| 5199 __ LoadHeapObject(rcx, Handle<HeapObject>::cast(value)); | 5200 __ LoadHeapObject(rcx, Handle<HeapObject>::cast(value)); |
| 5200 __ movq(FieldOperand(result, total_offset), rcx); | 5201 __ movq(FieldOperand(result, total_offset), rcx); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 5228 int64_t value = double_array->get_representation(i); | 5229 int64_t value = double_array->get_representation(i); |
| 5229 int total_offset = | 5230 int total_offset = |
| 5230 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); | 5231 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); |
| 5231 __ movq(rcx, value, RelocInfo::NONE64); | 5232 __ movq(rcx, value, RelocInfo::NONE64); |
| 5232 __ movq(FieldOperand(result, total_offset), rcx); | 5233 __ movq(FieldOperand(result, total_offset), rcx); |
| 5233 } | 5234 } |
| 5234 } else if (elements->IsFixedArray()) { | 5235 } else if (elements->IsFixedArray()) { |
| 5235 Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements); | 5236 Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements); |
| 5236 for (int i = 0; i < elements_length; i++) { | 5237 for (int i = 0; i < elements_length; i++) { |
| 5237 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); | 5238 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); |
| 5238 Handle<Object> value(fast_elements->get(i)); | 5239 Handle<Object> value(fast_elements->get(i), isolate()); |
| 5239 if (value->IsJSObject()) { | 5240 if (value->IsJSObject()) { |
| 5240 Handle<JSObject> value_object = Handle<JSObject>::cast(value); | 5241 Handle<JSObject> value_object = Handle<JSObject>::cast(value); |
| 5241 __ lea(rcx, Operand(result, *offset)); | 5242 __ lea(rcx, Operand(result, *offset)); |
| 5242 __ movq(FieldOperand(result, total_offset), rcx); | 5243 __ movq(FieldOperand(result, total_offset), rcx); |
| 5243 __ LoadHeapObject(source, value_object); | 5244 __ LoadHeapObject(source, value_object); |
| 5244 EmitDeepCopy(value_object, result, source, offset, | 5245 EmitDeepCopy(value_object, result, source, offset, |
| 5245 DONT_TRACK_ALLOCATION_SITE); | 5246 DONT_TRACK_ALLOCATION_SITE); |
| 5246 } else if (value->IsHeapObject()) { | 5247 } else if (value->IsHeapObject()) { |
| 5247 __ LoadHeapObject(rcx, Handle<HeapObject>::cast(value)); | 5248 __ LoadHeapObject(rcx, Handle<HeapObject>::cast(value)); |
| 5248 __ movq(FieldOperand(result, total_offset), rcx); | 5249 __ movq(FieldOperand(result, total_offset), rcx); |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5769 FixedArray::kHeaderSize - kPointerSize)); | 5770 FixedArray::kHeaderSize - kPointerSize)); |
| 5770 __ bind(&done); | 5771 __ bind(&done); |
| 5771 } | 5772 } |
| 5772 | 5773 |
| 5773 | 5774 |
| 5774 #undef __ | 5775 #undef __ |
| 5775 | 5776 |
| 5776 } } // namespace v8::internal | 5777 } } // namespace v8::internal |
| 5777 | 5778 |
| 5778 #endif // V8_TARGET_ARCH_X64 | 5779 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |