| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 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 5197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5208 UntagSmiFieldMemOperand(allocation_site, | 5208 UntagSmiFieldMemOperand(allocation_site, |
| 5209 AllocationSite::kTransitionInfoOffset)); | 5209 AllocationSite::kTransitionInfoOffset)); |
| 5210 __ And(kind, kind, AllocationSite::ElementsKindBits::kMask); | 5210 __ And(kind, kind, AllocationSite::ElementsKindBits::kMask); |
| 5211 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); | 5211 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); |
| 5212 | 5212 |
| 5213 __ Bind(&no_info); | 5213 __ Bind(&no_info); |
| 5214 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); | 5214 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); |
| 5215 | 5215 |
| 5216 // Subclassing support. | 5216 // Subclassing support. |
| 5217 __ Bind(&subclassing); | 5217 __ Bind(&subclassing); |
| 5218 __ Push(constructor, new_target); | |
| 5219 // Adjust argc. | |
| 5220 switch (argument_count()) { | 5218 switch (argument_count()) { |
| 5221 case ANY: | 5219 case ANY: |
| 5222 case MORE_THAN_ONE: | 5220 case MORE_THAN_ONE: |
| 5223 __ add(x0, x0, Operand(2)); | 5221 __ Poke(constructor, Operand(x0, LSL, kPointerSizeLog2)); |
| 5222 __ Add(x0, x0, Operand(3)); |
| 5224 break; | 5223 break; |
| 5225 case NONE: | 5224 case NONE: |
| 5226 __ Mov(x0, Operand(2)); | 5225 __ Poke(constructor, 0 * kPointerSize); |
| 5226 __ Mov(x0, Operand(3)); |
| 5227 break; | 5227 break; |
| 5228 case ONE: | 5228 case ONE: |
| 5229 __ Mov(x0, Operand(3)); | 5229 __ Poke(constructor, 1 * kPointerSize); |
| 5230 __ Mov(x0, Operand(4)); |
| 5230 break; | 5231 break; |
| 5231 } | 5232 } |
| 5232 __ JumpToExternalReference( | 5233 __ Push(new_target, allocation_site); |
| 5233 ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); | 5234 __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate())); |
| 5234 } | 5235 } |
| 5235 | 5236 |
| 5236 | 5237 |
| 5237 void InternalArrayConstructorStub::GenerateCase( | 5238 void InternalArrayConstructorStub::GenerateCase( |
| 5238 MacroAssembler* masm, ElementsKind kind) { | 5239 MacroAssembler* masm, ElementsKind kind) { |
| 5239 Label zero_case, n_case; | 5240 Label zero_case, n_case; |
| 5240 Register argc = x0; | 5241 Register argc = x0; |
| 5241 | 5242 |
| 5242 __ Cbz(argc, &zero_case); | 5243 __ Cbz(argc, &zero_case); |
| 5243 __ CompareAndBranch(argc, 1, ne, &n_case); | 5244 __ CompareAndBranch(argc, 1, ne, &n_case); |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5814 MemOperand(fp, 6 * kPointerSize), NULL); | 5815 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5815 } | 5816 } |
| 5816 | 5817 |
| 5817 | 5818 |
| 5818 #undef __ | 5819 #undef __ |
| 5819 | 5820 |
| 5820 } // namespace internal | 5821 } // namespace internal |
| 5821 } // namespace v8 | 5822 } // namespace v8 |
| 5822 | 5823 |
| 5823 #endif // V8_TARGET_ARCH_ARM64 | 5824 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |