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 4496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4507 for (int i = 0; i < elements_length; i++) { | 4507 for (int i = 0; i < elements_length; i++) { |
4508 int64_t value = double_array->get_representation(i); | 4508 int64_t value = double_array->get_representation(i); |
4509 int32_t value_low = value & 0xFFFFFFFF; | 4509 int32_t value_low = value & 0xFFFFFFFF; |
4510 int32_t value_high = value >> 32; | 4510 int32_t value_high = value >> 32; |
4511 int total_offset = | 4511 int total_offset = |
4512 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); | 4512 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); |
4513 __ mov(FieldOperand(result, total_offset), Immediate(value_low)); | 4513 __ mov(FieldOperand(result, total_offset), Immediate(value_low)); |
4514 __ mov(FieldOperand(result, total_offset + 4), Immediate(value_high)); | 4514 __ mov(FieldOperand(result, total_offset + 4), Immediate(value_high)); |
4515 } | 4515 } |
4516 } else if (elements->IsFixedArray()) { | 4516 } else if (elements->IsFixedArray()) { |
| 4517 Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements); |
4517 for (int i = 0; i < elements_length; i++) { | 4518 for (int i = 0; i < elements_length; i++) { |
4518 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); | 4519 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); |
4519 Handle<Object> value = JSObject::GetElement(object, i); | 4520 Handle<Object> value(fast_elements->get(i)); |
4520 if (value->IsJSObject()) { | 4521 if (value->IsJSObject()) { |
4521 Handle<JSObject> value_object = Handle<JSObject>::cast(value); | 4522 Handle<JSObject> value_object = Handle<JSObject>::cast(value); |
4522 __ lea(ecx, Operand(result, *offset)); | 4523 __ lea(ecx, Operand(result, *offset)); |
4523 __ mov(FieldOperand(result, total_offset), ecx); | 4524 __ mov(FieldOperand(result, total_offset), ecx); |
4524 __ LoadHeapObject(source, value_object); | 4525 __ LoadHeapObject(source, value_object); |
4525 EmitDeepCopy(value_object, result, source, offset); | 4526 EmitDeepCopy(value_object, result, source, offset); |
4526 } else if (value->IsHeapObject()) { | 4527 } else if (value->IsHeapObject()) { |
4527 __ LoadHeapObject(ecx, Handle<HeapObject>::cast(value)); | 4528 __ LoadHeapObject(ecx, Handle<HeapObject>::cast(value)); |
4528 __ mov(FieldOperand(result, total_offset), ecx); | 4529 __ mov(FieldOperand(result, total_offset), ecx); |
4529 } else { | 4530 } else { |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5007 FixedArray::kHeaderSize - kPointerSize)); | 5008 FixedArray::kHeaderSize - kPointerSize)); |
5008 __ bind(&done); | 5009 __ bind(&done); |
5009 } | 5010 } |
5010 | 5011 |
5011 | 5012 |
5012 #undef __ | 5013 #undef __ |
5013 | 5014 |
5014 } } // namespace v8::internal | 5015 } } // namespace v8::internal |
5015 | 5016 |
5016 #endif // V8_TARGET_ARCH_IA32 | 5017 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |