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 4537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4548 int32_t value_low = value & 0xFFFFFFFF; | 4548 int32_t value_low = value & 0xFFFFFFFF; |
4549 int32_t value_high = value >> 32; | 4549 int32_t value_high = value >> 32; |
4550 int total_offset = | 4550 int total_offset = |
4551 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); | 4551 elements_offset + FixedDoubleArray::OffsetOfElementAt(i); |
4552 __ li(a2, Operand(value_low)); | 4552 __ li(a2, Operand(value_low)); |
4553 __ sw(a2, FieldMemOperand(result, total_offset)); | 4553 __ sw(a2, FieldMemOperand(result, total_offset)); |
4554 __ li(a2, Operand(value_high)); | 4554 __ li(a2, Operand(value_high)); |
4555 __ sw(a2, FieldMemOperand(result, total_offset + 4)); | 4555 __ sw(a2, FieldMemOperand(result, total_offset + 4)); |
4556 } | 4556 } |
4557 } else if (elements->IsFixedArray()) { | 4557 } else if (elements->IsFixedArray()) { |
| 4558 Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements); |
4558 for (int i = 0; i < elements_length; i++) { | 4559 for (int i = 0; i < elements_length; i++) { |
4559 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); | 4560 int total_offset = elements_offset + FixedArray::OffsetOfElementAt(i); |
4560 Handle<Object> value = JSObject::GetElement(object, i); | 4561 Handle<Object> value(fast_elements->get(i)); |
4561 if (value->IsJSObject()) { | 4562 if (value->IsJSObject()) { |
4562 Handle<JSObject> value_object = Handle<JSObject>::cast(value); | 4563 Handle<JSObject> value_object = Handle<JSObject>::cast(value); |
4563 __ Addu(a2, result, Operand(*offset)); | 4564 __ Addu(a2, result, Operand(*offset)); |
4564 __ sw(a2, FieldMemOperand(result, total_offset)); | 4565 __ sw(a2, FieldMemOperand(result, total_offset)); |
4565 __ LoadHeapObject(source, value_object); | 4566 __ LoadHeapObject(source, value_object); |
4566 EmitDeepCopy(value_object, result, source, offset); | 4567 EmitDeepCopy(value_object, result, source, offset); |
4567 } else if (value->IsHeapObject()) { | 4568 } else if (value->IsHeapObject()) { |
4568 __ LoadHeapObject(a2, Handle<HeapObject>::cast(value)); | 4569 __ LoadHeapObject(a2, Handle<HeapObject>::cast(value)); |
4569 __ sw(a2, FieldMemOperand(result, total_offset)); | 4570 __ sw(a2, FieldMemOperand(result, total_offset)); |
4570 } else { | 4571 } else { |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5088 __ Subu(scratch, result, scratch); | 5089 __ Subu(scratch, result, scratch); |
5089 __ lw(result, FieldMemOperand(scratch, | 5090 __ lw(result, FieldMemOperand(scratch, |
5090 FixedArray::kHeaderSize - kPointerSize)); | 5091 FixedArray::kHeaderSize - kPointerSize)); |
5091 __ bind(&done); | 5092 __ bind(&done); |
5092 } | 5093 } |
5093 | 5094 |
5094 | 5095 |
5095 #undef __ | 5096 #undef __ |
5096 | 5097 |
5097 } } // namespace v8::internal | 5098 } } // namespace v8::internal |
OLD | NEW |