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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 5012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5023 __ SmiUntag(a3); | 5023 __ SmiUntag(a3); |
5024 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); | 5024 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); |
5025 __ And(a3, a3, Operand(AllocationSite::ElementsKindBits::kMask)); | 5025 __ And(a3, a3, Operand(AllocationSite::ElementsKindBits::kMask)); |
5026 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); | 5026 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); |
5027 | 5027 |
5028 __ bind(&no_info); | 5028 __ bind(&no_info); |
5029 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); | 5029 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); |
5030 | 5030 |
5031 // Subclassing. | 5031 // Subclassing. |
5032 __ bind(&subclassing); | 5032 __ bind(&subclassing); |
5033 __ Push(a1); | |
5034 __ Push(a3); | |
5035 | |
5036 // Adjust argc. | |
5037 switch (argument_count()) { | 5033 switch (argument_count()) { |
5038 case ANY: | 5034 case ANY: |
5039 case MORE_THAN_ONE: | 5035 case MORE_THAN_ONE: |
5040 __ li(at, Operand(2)); | 5036 __ sll(at, a0, kPointerSizeLog2); |
| 5037 __ addu(at, sp, at); |
| 5038 __ sw(a1, MemOperand(at)); |
| 5039 __ li(at, Operand(3)); |
5041 __ addu(a0, a0, at); | 5040 __ addu(a0, a0, at); |
5042 break; | 5041 break; |
5043 case NONE: | 5042 case NONE: |
5044 __ li(a0, Operand(2)); | 5043 __ sw(a1, MemOperand(sp, 0 * kPointerSize)); |
| 5044 __ li(a0, Operand(3)); |
5045 break; | 5045 break; |
5046 case ONE: | 5046 case ONE: |
5047 __ li(a0, Operand(3)); | 5047 __ sw(a1, MemOperand(sp, 1 * kPointerSize)); |
| 5048 __ li(a0, Operand(4)); |
5048 break; | 5049 break; |
5049 } | 5050 } |
5050 | 5051 __ Push(a3, a2); |
5051 __ JumpToExternalReference( | 5052 __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate())); |
5052 ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); | |
5053 } | 5053 } |
5054 | 5054 |
5055 | 5055 |
5056 void InternalArrayConstructorStub::GenerateCase( | 5056 void InternalArrayConstructorStub::GenerateCase( |
5057 MacroAssembler* masm, ElementsKind kind) { | 5057 MacroAssembler* masm, ElementsKind kind) { |
5058 | 5058 |
5059 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); | 5059 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); |
5060 __ TailCallStub(&stub0, lo, a0, Operand(1)); | 5060 __ TailCallStub(&stub0, lo, a0, Operand(1)); |
5061 | 5061 |
5062 InternalArrayNArgumentsConstructorStub stubN(isolate(), kind); | 5062 InternalArrayNArgumentsConstructorStub stubN(isolate(), kind); |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5575 MemOperand(fp, 6 * kPointerSize), NULL); | 5575 MemOperand(fp, 6 * kPointerSize), NULL); |
5576 } | 5576 } |
5577 | 5577 |
5578 | 5578 |
5579 #undef __ | 5579 #undef __ |
5580 | 5580 |
5581 } // namespace internal | 5581 } // namespace internal |
5582 } // namespace v8 | 5582 } // namespace v8 |
5583 | 5583 |
5584 #endif // V8_TARGET_ARCH_MIPS | 5584 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |