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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 __ Assert(positive, "Property allocation count failed."); | 250 __ Assert(positive, "Property allocation count failed."); |
251 | 251 |
252 // Scale the number of elements by pointer size and add the header for | 252 // Scale the number of elements by pointer size and add the header for |
253 // FixedArrays to the start of the next object calculation from above. | 253 // FixedArrays to the start of the next object calculation from above. |
254 // ebx: JSObject | 254 // ebx: JSObject |
255 // edi: start of next object (will be start of FixedArray) | 255 // edi: start of next object (will be start of FixedArray) |
256 // edx: number of elements in properties array | 256 // edx: number of elements in properties array |
257 __ AllocateInNewSpace(FixedArray::kHeaderSize, | 257 __ AllocateInNewSpace(FixedArray::kHeaderSize, |
258 times_pointer_size, | 258 times_pointer_size, |
259 edx, | 259 edx, |
| 260 REGISTER_VALUE_IS_INT32, |
260 edi, | 261 edi, |
261 ecx, | 262 ecx, |
262 no_reg, | 263 no_reg, |
263 &undo_allocation, | 264 &undo_allocation, |
264 RESULT_CONTAINS_TOP); | 265 RESULT_CONTAINS_TOP); |
265 | 266 |
266 // Initialize the FixedArray. | 267 // Initialize the FixedArray. |
267 // ebx: JSObject | 268 // ebx: JSObject |
268 // edi: FixedArray | 269 // edi: FixedArray |
269 // edx: number of elements | 270 // edx: number of elements |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 ASSERT(!fill_with_hole || array_size.is(ecx)); // rep stos count | 1096 ASSERT(!fill_with_hole || array_size.is(ecx)); // rep stos count |
1096 ASSERT(!fill_with_hole || !result.is(eax)); // result is never eax | 1097 ASSERT(!fill_with_hole || !result.is(eax)); // result is never eax |
1097 | 1098 |
1098 __ LoadInitialArrayMap(array_function, scratch, | 1099 __ LoadInitialArrayMap(array_function, scratch, |
1099 elements_array, fill_with_hole); | 1100 elements_array, fill_with_hole); |
1100 | 1101 |
1101 // Allocate the JSArray object together with space for a FixedArray with the | 1102 // Allocate the JSArray object together with space for a FixedArray with the |
1102 // requested elements. | 1103 // requested elements. |
1103 STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); | 1104 STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); |
1104 __ AllocateInNewSpace(JSArray::kSize + FixedArray::kHeaderSize, | 1105 __ AllocateInNewSpace(JSArray::kSize + FixedArray::kHeaderSize, |
1105 times_half_pointer_size, // array_size is a smi. | 1106 times_pointer_size, |
1106 array_size, | 1107 array_size, |
| 1108 REGISTER_VALUE_IS_SMI, |
1107 result, | 1109 result, |
1108 elements_array_end, | 1110 elements_array_end, |
1109 scratch, | 1111 scratch, |
1110 gc_required, | 1112 gc_required, |
1111 TAG_OBJECT); | 1113 TAG_OBJECT); |
1112 | 1114 |
1113 // Allocated the JSArray. Now initialize the fields except for the elements | 1115 // Allocated the JSArray. Now initialize the fields except for the elements |
1114 // array. | 1116 // array. |
1115 // result: JSObject | 1117 // result: JSObject |
1116 // elements_array: initial map | 1118 // elements_array: initial map |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1822 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1824 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); |
1823 generator.Generate(); | 1825 generator.Generate(); |
1824 } | 1826 } |
1825 | 1827 |
1826 | 1828 |
1827 #undef __ | 1829 #undef __ |
1828 } | 1830 } |
1829 } // namespace v8::internal | 1831 } // namespace v8::internal |
1830 | 1832 |
1831 #endif // V8_TARGET_ARCH_IA32 | 1833 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |