| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 5037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5048 __ SmiUntag(a3); | 5048 __ SmiUntag(a3); |
| 5049 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); | 5049 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); |
| 5050 __ And(a3, a3, Operand(AllocationSite::ElementsKindBits::kMask)); | 5050 __ And(a3, a3, Operand(AllocationSite::ElementsKindBits::kMask)); |
| 5051 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); | 5051 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); |
| 5052 | 5052 |
| 5053 __ bind(&no_info); | 5053 __ bind(&no_info); |
| 5054 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); | 5054 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); |
| 5055 | 5055 |
| 5056 // Subclassing. | 5056 // Subclassing. |
| 5057 __ bind(&subclassing); | 5057 __ bind(&subclassing); |
| 5058 __ Push(a1); | |
| 5059 __ Push(a3); | |
| 5060 | |
| 5061 // Adjust argc. | |
| 5062 switch (argument_count()) { | 5058 switch (argument_count()) { |
| 5063 case ANY: | 5059 case ANY: |
| 5064 case MORE_THAN_ONE: | 5060 case MORE_THAN_ONE: |
| 5065 __ li(at, Operand(2)); | 5061 __ dsll(at, a0, kPointerSizeLog2); |
| 5066 __ addu(a0, a0, at); | 5062 __ Daddu(at, sp, at); |
| 5063 __ sd(a1, MemOperand(at)); |
| 5064 __ li(at, Operand(3)); |
| 5065 __ Daddu(a0, a0, at); |
| 5067 break; | 5066 break; |
| 5068 case NONE: | 5067 case NONE: |
| 5069 __ li(a0, Operand(2)); | 5068 __ sd(a1, MemOperand(sp, 0 * kPointerSize)); |
| 5069 __ li(a0, Operand(3)); |
| 5070 break; | 5070 break; |
| 5071 case ONE: | 5071 case ONE: |
| 5072 __ li(a0, Operand(3)); | 5072 __ sd(a1, MemOperand(sp, 1 * kPointerSize)); |
| 5073 __ li(a0, Operand(4)); |
| 5073 break; | 5074 break; |
| 5074 } | 5075 } |
| 5075 | 5076 __ Push(a3, a2); |
| 5076 __ JumpToExternalReference( | 5077 __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate())); |
| 5077 ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); | |
| 5078 } | 5078 } |
| 5079 | 5079 |
| 5080 | 5080 |
| 5081 void InternalArrayConstructorStub::GenerateCase( | 5081 void InternalArrayConstructorStub::GenerateCase( |
| 5082 MacroAssembler* masm, ElementsKind kind) { | 5082 MacroAssembler* masm, ElementsKind kind) { |
| 5083 | 5083 |
| 5084 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); | 5084 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); |
| 5085 __ TailCallStub(&stub0, lo, a0, Operand(1)); | 5085 __ TailCallStub(&stub0, lo, a0, Operand(1)); |
| 5086 | 5086 |
| 5087 InternalArrayNArgumentsConstructorStub stubN(isolate(), kind); | 5087 InternalArrayNArgumentsConstructorStub stubN(isolate(), kind); |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5605 MemOperand(fp, 6 * kPointerSize), NULL); | 5605 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5606 } | 5606 } |
| 5607 | 5607 |
| 5608 | 5608 |
| 5609 #undef __ | 5609 #undef __ |
| 5610 | 5610 |
| 5611 } // namespace internal | 5611 } // namespace internal |
| 5612 } // namespace v8 | 5612 } // namespace v8 |
| 5613 | 5613 |
| 5614 #endif // V8_TARGET_ARCH_MIPS64 | 5614 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |