Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: src/arm64/code-stubs-arm64.cc

Issue 1456423003: [runtime] Introduce a proper %NewArray runtime entry. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698