OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 Label* gc_required) { | 183 Label* gc_required) { |
184 Label not_empty, allocated; | 184 Label not_empty, allocated; |
185 | 185 |
186 // Load the initial map from the array function. | 186 // Load the initial map from the array function. |
187 __ ldr(elements_array_storage, | 187 __ ldr(elements_array_storage, |
188 FieldMemOperand(array_function, | 188 FieldMemOperand(array_function, |
189 JSFunction::kPrototypeOrInitialMapOffset)); | 189 JSFunction::kPrototypeOrInitialMapOffset)); |
190 | 190 |
191 // Check whether an empty sized array is requested. | 191 // Check whether an empty sized array is requested. |
192 __ tst(array_size, array_size); | 192 __ tst(array_size, array_size); |
193 __ b(nz, ¬_empty); | 193 __ b(ne, ¬_empty); |
194 | 194 |
195 // If an empty array is requested allocate a small elements array anyway. This | 195 // If an empty array is requested allocate a small elements array anyway. This |
196 // keeps the code below free of special casing for the empty array. | 196 // keeps the code below free of special casing for the empty array. |
197 int size = JSArray::kSize + | 197 int size = JSArray::kSize + |
198 FixedArray::SizeFor(JSArray::kPreallocatedArrayElements); | 198 FixedArray::SizeFor(JSArray::kPreallocatedArrayElements); |
199 __ AllocateInNewSpace(size, | 199 __ AllocateInNewSpace(size, |
200 result, | 200 result, |
201 elements_array_end, | 201 elements_array_end, |
202 scratch1, | 202 scratch1, |
203 gc_required, | 203 gc_required, |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 // preconditions is not met, the code bails out to the runtime call. | 659 // preconditions is not met, the code bails out to the runtime call. |
660 Label rt_call, allocated; | 660 Label rt_call, allocated; |
661 if (FLAG_inline_new) { | 661 if (FLAG_inline_new) { |
662 Label undo_allocation; | 662 Label undo_allocation; |
663 #ifdef ENABLE_DEBUGGER_SUPPORT | 663 #ifdef ENABLE_DEBUGGER_SUPPORT |
664 ExternalReference debug_step_in_fp = | 664 ExternalReference debug_step_in_fp = |
665 ExternalReference::debug_step_in_fp_address(); | 665 ExternalReference::debug_step_in_fp_address(); |
666 __ mov(r2, Operand(debug_step_in_fp)); | 666 __ mov(r2, Operand(debug_step_in_fp)); |
667 __ ldr(r2, MemOperand(r2)); | 667 __ ldr(r2, MemOperand(r2)); |
668 __ tst(r2, r2); | 668 __ tst(r2, r2); |
669 __ b(nz, &rt_call); | 669 __ b(ne, &rt_call); |
670 #endif | 670 #endif |
671 | 671 |
672 // Load the initial map and verify that it is in fact a map. | 672 // Load the initial map and verify that it is in fact a map. |
673 // r1: constructor function | 673 // r1: constructor function |
674 __ ldr(r2, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); | 674 __ ldr(r2, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); |
675 __ tst(r2, Operand(kSmiTagMask)); | 675 __ tst(r2, Operand(kSmiTagMask)); |
676 __ b(eq, &rt_call); | 676 __ b(eq, &rt_call); |
677 __ CompareObjectType(r2, r3, r4, MAP_TYPE); | 677 __ CompareObjectType(r2, r3, r4, MAP_TYPE); |
678 __ b(ne, &rt_call); | 678 __ b(ne, &rt_call); |
679 | 679 |
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 __ bind(&dont_adapt_arguments); | 1565 __ bind(&dont_adapt_arguments); |
1566 __ Jump(r3); | 1566 __ Jump(r3); |
1567 } | 1567 } |
1568 | 1568 |
1569 | 1569 |
1570 #undef __ | 1570 #undef __ |
1571 | 1571 |
1572 } } // namespace v8::internal | 1572 } } // namespace v8::internal |
1573 | 1573 |
1574 #endif // V8_TARGET_ARCH_ARM | 1574 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |