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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
390 __ j(equal, &only_change_map); | 390 __ j(equal, &only_change_map); |
391 | 391 |
392 __ push(eax); | 392 __ push(eax); |
393 __ push(ebx); | 393 __ push(ebx); |
394 | 394 |
395 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); | 395 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); |
396 | 396 |
397 // Allocate new FixedDoubleArray. | 397 // Allocate new FixedDoubleArray. |
398 // edx: receiver | 398 // edx: receiver |
399 // edi: length of source FixedArray (smi-tagged) | 399 // edi: length of source FixedArray (smi-tagged) |
400 __ lea(esi, Operand(edi, times_4, FixedDoubleArray::kHeaderSize)); | 400 __ lea(esi, Operand(edi, times_4, FixedDoubleArray::kHeaderSize + kPointerSize )); |
Erik Corry
2012/04/16 14:35:19
Lint?
Vyacheslav Egorov (Chromium)
2012/04/30 14:39:11
Done.
| |
401 __ AllocateInNewSpace(esi, eax, ebx, no_reg, &gc_required, TAG_OBJECT); | 401 __ AllocateInNewSpace(esi, eax, ebx, no_reg, &gc_required, TAG_OBJECT); |
402 | 402 |
403 Label aligned, aligned_done; | |
404 __ test(eax, Immediate(0x6)); | |
Erik Corry
2012/04/16 14:35:19
It seems strange to test the 2 bit here when we kn
| |
405 __ j(zero, &aligned, Label::kNear); | |
406 __ mov(FieldOperand(eax, 0), | |
407 Immediate(masm->isolate()->factory()->one_pointer_filler_map())); | |
408 __ add(eax, Immediate(kPointerSize)); | |
409 __ j(zero, &aligned_done, Label::kNear); | |
Erik Corry
2012/04/16 14:35:19
Why is this branch conditional?
Vyacheslav Egorov (Chromium)
2012/04/30 14:39:11
Done.
| |
410 | |
411 __ bind(&aligned); | |
412 __ mov(Operand(eax, esi, times_1, -kPointerSize-1), | |
413 Immediate(masm->isolate()->factory()->one_pointer_filler_map())); | |
414 | |
415 __ bind(&aligned_done); | |
416 | |
403 // eax: destination FixedDoubleArray | 417 // eax: destination FixedDoubleArray |
404 // edi: number of elements | 418 // edi: number of elements |
405 // edx: receiver | 419 // edx: receiver |
406 __ mov(FieldOperand(eax, HeapObject::kMapOffset), | 420 __ mov(FieldOperand(eax, HeapObject::kMapOffset), |
407 Immediate(masm->isolate()->factory()->fixed_double_array_map())); | 421 Immediate(masm->isolate()->factory()->fixed_double_array_map())); |
408 __ mov(FieldOperand(eax, FixedDoubleArray::kLengthOffset), edi); | 422 __ mov(FieldOperand(eax, FixedDoubleArray::kLengthOffset), edi); |
409 __ mov(esi, FieldOperand(edx, JSObject::kElementsOffset)); | 423 __ mov(esi, FieldOperand(edx, JSObject::kElementsOffset)); |
410 // Replace receiver's backing store with newly created FixedDoubleArray. | 424 // Replace receiver's backing store with newly created FixedDoubleArray. |
411 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax); | 425 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax); |
412 __ mov(ebx, eax); | 426 __ mov(ebx, eax); |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
737 times_1, | 751 times_1, |
738 SeqAsciiString::kHeaderSize)); | 752 SeqAsciiString::kHeaderSize)); |
739 __ bind(&done); | 753 __ bind(&done); |
740 } | 754 } |
741 | 755 |
742 #undef __ | 756 #undef __ |
743 | 757 |
744 } } // namespace v8::internal | 758 } } // namespace v8::internal |
745 | 759 |
746 #endif // V8_TARGET_ARCH_IA32 | 760 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |