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 4262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4273 Handle<FixedDoubleArray> double_array = | 4273 Handle<FixedDoubleArray> double_array = |
4274 Handle<FixedDoubleArray>::cast(elements); | 4274 Handle<FixedDoubleArray>::cast(elements); |
4275 for (int i = 0; i < elements_length; i++) { | 4275 for (int i = 0; i < elements_length; i++) { |
4276 int64_t value = double_array->get_representation(i); | 4276 int64_t value = double_array->get_representation(i); |
4277 int total_offset = | 4277 int total_offset = |
4278 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); | 4278 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); |
4279 __ movq(rcx, value, RelocInfo::NONE); | 4279 __ movq(rcx, value, RelocInfo::NONE); |
4280 __ movq(FieldOperand(result, total_offset), rcx); | 4280 __ movq(FieldOperand(result, total_offset), rcx); |
4281 } | 4281 } |
4282 } else if (elements->IsFixedArray()) { | 4282 } else if (elements->IsFixedArray()) { |
| 4283 Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements); |
4283 for (int i = 0; i < elements_length; i++) { | 4284 for (int i = 0; i < elements_length; i++) { |
4284 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); | 4285 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); |
4285 Handle<Object> value = JSObject::GetElement(object, i); | 4286 Handle<Object> value(fast_elements->get(i)); |
4286 if (value->IsJSObject()) { | 4287 if (value->IsJSObject()) { |
4287 Handle<JSObject> value_object = Handle<JSObject>::cast(value); | 4288 Handle<JSObject> value_object = Handle<JSObject>::cast(value); |
4288 __ lea(rcx, Operand(result, *offset)); | 4289 __ lea(rcx, Operand(result, *offset)); |
4289 __ movq(FieldOperand(result, total_offset), rcx); | 4290 __ movq(FieldOperand(result, total_offset), rcx); |
4290 __ LoadHeapObject(source, value_object); | 4291 __ LoadHeapObject(source, value_object); |
4291 EmitDeepCopy(value_object, result, source, offset); | 4292 EmitDeepCopy(value_object, result, source, offset); |
4292 } else if (value->IsHeapObject()) { | 4293 } else if (value->IsHeapObject()) { |
4293 __ LoadHeapObject(rcx, Handle<HeapObject>::cast(value)); | 4294 __ LoadHeapObject(rcx, Handle<HeapObject>::cast(value)); |
4294 __ movq(FieldOperand(result, total_offset), rcx); | 4295 __ movq(FieldOperand(result, total_offset), rcx); |
4295 } else { | 4296 } else { |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4784 FixedArray::kHeaderSize - kPointerSize)); | 4785 FixedArray::kHeaderSize - kPointerSize)); |
4785 __ bind(&done); | 4786 __ bind(&done); |
4786 } | 4787 } |
4787 | 4788 |
4788 | 4789 |
4789 #undef __ | 4790 #undef __ |
4790 | 4791 |
4791 } } // namespace v8::internal | 4792 } } // namespace v8::internal |
4792 | 4793 |
4793 #endif // V8_TARGET_ARCH_X64 | 4794 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |