| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 4532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4543 __ str(r1, FieldMemOperand(r4, JSArray::kPropertiesOffset)); | 4543 __ str(r1, FieldMemOperand(r4, JSArray::kPropertiesOffset)); |
| 4544 __ str(r3, FieldMemOperand(r4, JSArray::kElementsOffset)); | 4544 __ str(r3, FieldMemOperand(r4, JSArray::kElementsOffset)); |
| 4545 __ str(r0, FieldMemOperand(r4, JSArray::kLengthOffset)); | 4545 __ str(r0, FieldMemOperand(r4, JSArray::kLengthOffset)); |
| 4546 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); | 4546 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); |
| 4547 __ mov(r0, r4); | 4547 __ mov(r0, r4); |
| 4548 __ Ret(); | 4548 __ Ret(); |
| 4549 | 4549 |
| 4550 // Fall back to %AllocateInNewSpace (if not too big). | 4550 // Fall back to %AllocateInNewSpace (if not too big). |
| 4551 Label too_big_for_new_space; | 4551 Label too_big_for_new_space; |
| 4552 __ bind(&allocate); | 4552 __ bind(&allocate); |
| 4553 __ cmp(r1, Operand(Page::kMaxRegularHeapObjectSize)); | 4553 __ cmp(r6, Operand(Page::kMaxRegularHeapObjectSize)); |
| 4554 __ b(gt, &too_big_for_new_space); | 4554 __ b(gt, &too_big_for_new_space); |
| 4555 { | 4555 { |
| 4556 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 4556 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 4557 __ SmiTag(r1); | 4557 __ SmiTag(r6); |
| 4558 __ Push(r0, r2, r1); | 4558 __ Push(r0, r2, r6); |
| 4559 __ CallRuntime(Runtime::kAllocateInNewSpace); | 4559 __ CallRuntime(Runtime::kAllocateInNewSpace); |
| 4560 __ mov(r3, r0); | 4560 __ mov(r3, r0); |
| 4561 __ Pop(r0, r2); | 4561 __ Pop(r0, r2); |
| 4562 } | 4562 } |
| 4563 __ jmp(&done_allocate); | 4563 __ jmp(&done_allocate); |
| 4564 | 4564 |
| 4565 // Fall back to %NewRestParameter. | 4565 // Fall back to %NewRestParameter. |
| 4566 __ bind(&too_big_for_new_space); | 4566 __ bind(&too_big_for_new_space); |
| 4567 __ push(r1); | 4567 __ push(r1); |
| 4568 __ TailCallRuntime(Runtime::kNewRestParameter); | 4568 __ TailCallRuntime(Runtime::kNewRestParameter); |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5366 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5366 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
| 5367 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5367 kStackUnwindSpace, NULL, return_value_operand, NULL); |
| 5368 } | 5368 } |
| 5369 | 5369 |
| 5370 #undef __ | 5370 #undef __ |
| 5371 | 5371 |
| 5372 } // namespace internal | 5372 } // namespace internal |
| 5373 } // namespace v8 | 5373 } // namespace v8 |
| 5374 | 5374 |
| 5375 #endif // V8_TARGET_ARCH_ARM | 5375 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |