| 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 3217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3228 // rax: JSArray. | 3228 // rax: JSArray. |
| 3229 // rcx: FixedArray. | 3229 // rcx: FixedArray. |
| 3230 // rbx: Number of elements in array as int32. | 3230 // rbx: Number of elements in array as int32. |
| 3231 | 3231 |
| 3232 // Set map. | 3232 // Set map. |
| 3233 __ LoadRoot(kScratchRegister, Heap::kFixedArrayMapRootIndex); | 3233 __ LoadRoot(kScratchRegister, Heap::kFixedArrayMapRootIndex); |
| 3234 __ movq(FieldOperand(rcx, HeapObject::kMapOffset), kScratchRegister); | 3234 __ movq(FieldOperand(rcx, HeapObject::kMapOffset), kScratchRegister); |
| 3235 // Set length. | 3235 // Set length. |
| 3236 __ Integer32ToSmi(rdx, rbx); | 3236 __ Integer32ToSmi(rdx, rbx); |
| 3237 __ movq(FieldOperand(rcx, FixedArray::kLengthOffset), rdx); | 3237 __ movq(FieldOperand(rcx, FixedArray::kLengthOffset), rdx); |
| 3238 // Fill contents of fixed-array with the-hole. | 3238 // Fill contents of fixed-array with undefined. |
| 3239 __ LoadRoot(rdx, Heap::kTheHoleValueRootIndex); | 3239 __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex); |
| 3240 __ lea(rcx, FieldOperand(rcx, FixedArray::kHeaderSize)); | 3240 __ lea(rcx, FieldOperand(rcx, FixedArray::kHeaderSize)); |
| 3241 // Fill fixed array elements with hole. | 3241 // Fill fixed array elements with undefined. |
| 3242 // rax: JSArray. | 3242 // rax: JSArray. |
| 3243 // rbx: Number of elements in array that remains to be filled, as int32. | 3243 // rbx: Number of elements in array that remains to be filled, as int32. |
| 3244 // rcx: Start of elements in FixedArray. | 3244 // rcx: Start of elements in FixedArray. |
| 3245 // rdx: the hole. | 3245 // rdx: undefined. |
| 3246 Label loop; | 3246 Label loop; |
| 3247 __ testl(rbx, rbx); | 3247 __ testl(rbx, rbx); |
| 3248 __ bind(&loop); | 3248 __ bind(&loop); |
| 3249 __ j(less_equal, &done); // Jump if rcx is negative or zero. | 3249 __ j(less_equal, &done); // Jump if rcx is negative or zero. |
| 3250 __ subl(rbx, Immediate(1)); | 3250 __ subl(rbx, Immediate(1)); |
| 3251 __ movq(Operand(rcx, rbx, times_pointer_size, 0), rdx); | 3251 __ movq(Operand(rcx, rbx, times_pointer_size, 0), rdx); |
| 3252 __ jmp(&loop); | 3252 __ jmp(&loop); |
| 3253 | 3253 |
| 3254 __ bind(&done); | 3254 __ bind(&done); |
| 3255 __ ret(3 * kPointerSize); | 3255 __ ret(3 * kPointerSize); |
| (...skipping 3226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6482 #endif | 6482 #endif |
| 6483 | 6483 |
| 6484 __ Ret(); | 6484 __ Ret(); |
| 6485 } | 6485 } |
| 6486 | 6486 |
| 6487 #undef __ | 6487 #undef __ |
| 6488 | 6488 |
| 6489 } } // namespace v8::internal | 6489 } } // namespace v8::internal |
| 6490 | 6490 |
| 6491 #endif // V8_TARGET_ARCH_X64 | 6491 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |