| 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 5214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5225 // r0: JSArray, tagged. | 5225 // r0: JSArray, tagged. |
| 5226 // r3: FixedArray, tagged. | 5226 // r3: FixedArray, tagged. |
| 5227 // r5: Number of elements in array, untagged. | 5227 // r5: Number of elements in array, untagged. |
| 5228 | 5228 |
| 5229 // Set map. | 5229 // Set map. |
| 5230 __ mov(r2, Operand(factory->fixed_array_map())); | 5230 __ mov(r2, Operand(factory->fixed_array_map())); |
| 5231 __ str(r2, FieldMemOperand(r3, HeapObject::kMapOffset)); | 5231 __ str(r2, FieldMemOperand(r3, HeapObject::kMapOffset)); |
| 5232 // Set FixedArray length. | 5232 // Set FixedArray length. |
| 5233 __ mov(r6, Operand(r5, LSL, kSmiTagSize)); | 5233 __ mov(r6, Operand(r5, LSL, kSmiTagSize)); |
| 5234 __ str(r6, FieldMemOperand(r3, FixedArray::kLengthOffset)); | 5234 __ str(r6, FieldMemOperand(r3, FixedArray::kLengthOffset)); |
| 5235 // Fill contents of fixed-array with the-hole. | 5235 // Fill contents of fixed-array with undefined. |
| 5236 __ mov(r2, Operand(factory->the_hole_value())); | 5236 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); |
| 5237 __ add(r3, r3, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 5237 __ add(r3, r3, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
| 5238 // Fill fixed array elements with hole. | 5238 // Fill fixed array elements with undefined. |
| 5239 // r0: JSArray, tagged. | 5239 // r0: JSArray, tagged. |
| 5240 // r2: the hole. | 5240 // r2: undefined. |
| 5241 // r3: Start of elements in FixedArray. | 5241 // r3: Start of elements in FixedArray. |
| 5242 // r5: Number of elements to fill. | 5242 // r5: Number of elements to fill. |
| 5243 Label loop; | 5243 Label loop; |
| 5244 __ cmp(r5, Operand(0)); | 5244 __ cmp(r5, Operand(0)); |
| 5245 __ bind(&loop); | 5245 __ bind(&loop); |
| 5246 __ b(le, &done); // Jump if r5 is negative or zero. | 5246 __ b(le, &done); // Jump if r5 is negative or zero. |
| 5247 __ sub(r5, r5, Operand(1), SetCC); | 5247 __ sub(r5, r5, Operand(1), SetCC); |
| 5248 __ str(r2, MemOperand(r3, r5, LSL, kPointerSizeLog2)); | 5248 __ str(r2, MemOperand(r3, r5, LSL, kPointerSizeLog2)); |
| 5249 __ jmp(&loop); | 5249 __ jmp(&loop); |
| 5250 | 5250 |
| (...skipping 2362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7613 | 7613 |
| 7614 __ Pop(lr, r5, r1); | 7614 __ Pop(lr, r5, r1); |
| 7615 __ Ret(); | 7615 __ Ret(); |
| 7616 } | 7616 } |
| 7617 | 7617 |
| 7618 #undef __ | 7618 #undef __ |
| 7619 | 7619 |
| 7620 } } // namespace v8::internal | 7620 } } // namespace v8::internal |
| 7621 | 7621 |
| 7622 #endif // V8_TARGET_ARCH_ARM | 7622 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |