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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm64/code-stubs-arm64.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 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_ARM 5 #if V8_TARGET_ARCH_ARM
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 4803 matching lines...) Expand 10 before | Expand all | Expand 10 after
4814 __ ldr(r3, FieldMemOperand(r2, AllocationSite::kTransitionInfoOffset)); 4814 __ ldr(r3, FieldMemOperand(r2, AllocationSite::kTransitionInfoOffset));
4815 __ SmiUntag(r3); 4815 __ SmiUntag(r3);
4816 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); 4816 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0);
4817 __ and_(r3, r3, Operand(AllocationSite::ElementsKindBits::kMask)); 4817 __ and_(r3, r3, Operand(AllocationSite::ElementsKindBits::kMask));
4818 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); 4818 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE);
4819 4819
4820 __ bind(&no_info); 4820 __ bind(&no_info);
4821 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); 4821 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES);
4822 4822
4823 __ bind(&subclassing); 4823 __ bind(&subclassing);
4824 __ push(r1);
4825 __ push(r3);
4826
4827 // Adjust argc.
4828 switch (argument_count()) { 4824 switch (argument_count()) {
4829 case ANY: 4825 case ANY:
4830 case MORE_THAN_ONE: 4826 case MORE_THAN_ONE:
4831 __ add(r0, r0, Operand(2)); 4827 __ str(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2));
4828 __ add(r0, r0, Operand(3));
4832 break; 4829 break;
4833 case NONE: 4830 case NONE:
4834 __ mov(r0, Operand(2)); 4831 __ str(r1, MemOperand(sp, 0 * kPointerSize));
4832 __ mov(r0, Operand(3));
4835 break; 4833 break;
4836 case ONE: 4834 case ONE:
4837 __ mov(r0, Operand(3)); 4835 __ str(r1, MemOperand(sp, 1 * kPointerSize));
4836 __ mov(r0, Operand(4));
4838 break; 4837 break;
4839 } 4838 }
4840 4839 __ Push(r3, r2);
4841 __ JumpToExternalReference( 4840 __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate()));
4842 ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate()));
4843 } 4841 }
4844 4842
4845 4843
4846 void InternalArrayConstructorStub::GenerateCase( 4844 void InternalArrayConstructorStub::GenerateCase(
4847 MacroAssembler* masm, ElementsKind kind) { 4845 MacroAssembler* masm, ElementsKind kind) {
4848 __ cmp(r0, Operand(1)); 4846 __ cmp(r0, Operand(1));
4849 4847
4850 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); 4848 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind);
4851 __ TailCallStub(&stub0, lo); 4849 __ TailCallStub(&stub0, lo);
4852 4850
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
5385 MemOperand(fp, 6 * kPointerSize), NULL); 5383 MemOperand(fp, 6 * kPointerSize), NULL);
5386 } 5384 }
5387 5385
5388 5386
5389 #undef __ 5387 #undef __
5390 5388
5391 } // namespace internal 5389 } // namespace internal
5392 } // namespace v8 5390 } // namespace v8
5393 5391
5394 #endif // V8_TARGET_ARCH_ARM 5392 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698