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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 4621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4632 __ ldr(r3, FieldMemOperand(r2, AllocationSite::kTransitionInfoOffset)); | 4632 __ ldr(r3, FieldMemOperand(r2, AllocationSite::kTransitionInfoOffset)); |
4633 __ SmiUntag(r3); | 4633 __ SmiUntag(r3); |
4634 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); | 4634 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); |
4635 __ and_(r3, r3, Operand(AllocationSite::ElementsKindBits::kMask)); | 4635 __ and_(r3, r3, Operand(AllocationSite::ElementsKindBits::kMask)); |
4636 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); | 4636 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); |
4637 | 4637 |
4638 __ bind(&no_info); | 4638 __ bind(&no_info); |
4639 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); | 4639 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); |
4640 | 4640 |
4641 __ bind(&subclassing); | 4641 __ bind(&subclassing); |
4642 __ TailCallRuntime(Runtime::kThrowArrayNotSubclassableError, 0, 1); | 4642 __ push(r1); |
| 4643 __ push(r3); |
| 4644 |
| 4645 // Adjust argc. |
| 4646 switch (argument_count()) { |
| 4647 case ANY: |
| 4648 case MORE_THAN_ONE: |
| 4649 __ add(r0, r0, Operand(2)); |
| 4650 break; |
| 4651 case NONE: |
| 4652 __ mov(r0, Operand(2)); |
| 4653 break; |
| 4654 case ONE: |
| 4655 __ mov(r0, Operand(3)); |
| 4656 break; |
| 4657 } |
| 4658 |
| 4659 __ JumpToExternalReference( |
| 4660 ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); |
4643 } | 4661 } |
4644 | 4662 |
4645 | 4663 |
4646 void InternalArrayConstructorStub::GenerateCase( | 4664 void InternalArrayConstructorStub::GenerateCase( |
4647 MacroAssembler* masm, ElementsKind kind) { | 4665 MacroAssembler* masm, ElementsKind kind) { |
4648 __ cmp(r0, Operand(1)); | 4666 __ cmp(r0, Operand(1)); |
4649 | 4667 |
4650 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); | 4668 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); |
4651 __ TailCallStub(&stub0, lo); | 4669 __ TailCallStub(&stub0, lo); |
4652 | 4670 |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5036 kStackUnwindSpace, NULL, | 5054 kStackUnwindSpace, NULL, |
5037 MemOperand(fp, 6 * kPointerSize), NULL); | 5055 MemOperand(fp, 6 * kPointerSize), NULL); |
5038 } | 5056 } |
5039 | 5057 |
5040 | 5058 |
5041 #undef __ | 5059 #undef __ |
5042 | 5060 |
5043 } } // namespace v8::internal | 5061 } } // namespace v8::internal |
5044 | 5062 |
5045 #endif // V8_TARGET_ARCH_ARM | 5063 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |