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 4596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4607 __ ldr(r3, FieldMemOperand(r2, AllocationSite::kTransitionInfoOffset)); | 4607 __ ldr(r3, FieldMemOperand(r2, AllocationSite::kTransitionInfoOffset)); |
4608 __ SmiUntag(r3); | 4608 __ SmiUntag(r3); |
4609 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); | 4609 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); |
4610 __ and_(r3, r3, Operand(AllocationSite::ElementsKindBits::kMask)); | 4610 __ and_(r3, r3, Operand(AllocationSite::ElementsKindBits::kMask)); |
4611 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); | 4611 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); |
4612 | 4612 |
4613 __ bind(&no_info); | 4613 __ bind(&no_info); |
4614 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); | 4614 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); |
4615 | 4615 |
4616 __ bind(&subclassing); | 4616 __ bind(&subclassing); |
4617 __ TailCallRuntime(Runtime::kThrowArrayNotSubclassableError, 0, 1); | 4617 __ push(r1); |
| 4618 __ push(r3); |
| 4619 |
| 4620 // Adjust argc. |
| 4621 switch (argument_count()) { |
| 4622 case ANY: |
| 4623 case MORE_THAN_ONE: |
| 4624 __ add(r0, r0, Operand(2)); |
| 4625 break; |
| 4626 case NONE: |
| 4627 __ mov(r0, Operand(2)); |
| 4628 break; |
| 4629 case ONE: |
| 4630 __ mov(r0, Operand(3)); |
| 4631 break; |
| 4632 } |
| 4633 |
| 4634 __ JumpToExternalReference( |
| 4635 ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); |
4618 } | 4636 } |
4619 | 4637 |
4620 | 4638 |
4621 void InternalArrayConstructorStub::GenerateCase( | 4639 void InternalArrayConstructorStub::GenerateCase( |
4622 MacroAssembler* masm, ElementsKind kind) { | 4640 MacroAssembler* masm, ElementsKind kind) { |
4623 __ cmp(r0, Operand(1)); | 4641 __ cmp(r0, Operand(1)); |
4624 | 4642 |
4625 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); | 4643 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); |
4626 __ TailCallStub(&stub0, lo); | 4644 __ TailCallStub(&stub0, lo); |
4627 | 4645 |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5011 kStackUnwindSpace, NULL, | 5029 kStackUnwindSpace, NULL, |
5012 MemOperand(fp, 6 * kPointerSize), NULL); | 5030 MemOperand(fp, 6 * kPointerSize), NULL); |
5013 } | 5031 } |
5014 | 5032 |
5015 | 5033 |
5016 #undef __ | 5034 #undef __ |
5017 | 5035 |
5018 } } // namespace v8::internal | 5036 } } // namespace v8::internal |
5019 | 5037 |
5020 #endif // V8_TARGET_ARCH_ARM | 5038 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |