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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.cc

Issue 2057253002: PPC: [stubs] Remove N-argument Hydrogen-based Array constructor stub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months 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/ppc/code-stubs-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 3902 matching lines...) Expand 10 before | Expand all | Expand 10 after
3913 } 3913 }
3914 } 3914 }
3915 3915
3916 3916
3917 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 3917 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
3918 DCHECK(ToRegister(instr->context()).is(cp)); 3918 DCHECK(ToRegister(instr->context()).is(cp));
3919 DCHECK(ToRegister(instr->constructor()).is(r4)); 3919 DCHECK(ToRegister(instr->constructor()).is(r4));
3920 DCHECK(ToRegister(instr->result()).is(r3)); 3920 DCHECK(ToRegister(instr->result()).is(r3));
3921 3921
3922 __ mov(r3, Operand(instr->arity())); 3922 __ mov(r3, Operand(instr->arity()));
3923 if (instr->arity() == 1) { 3923 __ Move(r5, instr->hydrogen()->site());
3924 // We only need the allocation site for the case we have a length argument. 3924
3925 // The case may bail out to the runtime, which will determine the correct
3926 // elements kind with the site.
3927 __ Move(r5, instr->hydrogen()->site());
3928 } else {
3929 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex);
3930 }
3931 ElementsKind kind = instr->hydrogen()->elements_kind(); 3925 ElementsKind kind = instr->hydrogen()->elements_kind();
3932 AllocationSiteOverrideMode override_mode = 3926 AllocationSiteOverrideMode override_mode =
3933 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) 3927 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE)
3934 ? DISABLE_ALLOCATION_SITES 3928 ? DISABLE_ALLOCATION_SITES
3935 : DONT_OVERRIDE; 3929 : DONT_OVERRIDE;
3936 3930
3937 if (instr->arity() == 0) { 3931 if (instr->arity() == 0) {
3938 ArrayNoArgumentConstructorStub stub(isolate(), kind, override_mode); 3932 ArrayNoArgumentConstructorStub stub(isolate(), kind, override_mode);
3939 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3933 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3940 } else if (instr->arity() == 1) { 3934 } else if (instr->arity() == 1) {
(...skipping 11 matching lines...) Expand all
3952 override_mode); 3946 override_mode);
3953 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3947 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3954 __ b(&done); 3948 __ b(&done);
3955 __ bind(&packed_case); 3949 __ bind(&packed_case);
3956 } 3950 }
3957 3951
3958 ArraySingleArgumentConstructorStub stub(isolate(), kind, override_mode); 3952 ArraySingleArgumentConstructorStub stub(isolate(), kind, override_mode);
3959 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3953 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3960 __ bind(&done); 3954 __ bind(&done);
3961 } else { 3955 } else {
3962 ArrayNArgumentsConstructorStub stub(isolate(), kind, override_mode); 3956 ArrayNArgumentsConstructorStub stub(isolate());
3963 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3957 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3964 } 3958 }
3965 } 3959 }
3966 3960
3967 3961
3968 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 3962 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
3969 CallRuntime(instr->function(), instr->arity(), instr); 3963 CallRuntime(instr->function(), instr->arity(), instr);
3970 } 3964 }
3971 3965
3972 3966
(...skipping 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after
5817 __ LoadP(result, 5811 __ LoadP(result,
5818 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5812 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5819 __ bind(deferred->exit()); 5813 __ bind(deferred->exit());
5820 __ bind(&done); 5814 __ bind(&done);
5821 } 5815 }
5822 5816
5823 #undef __ 5817 #undef __
5824 5818
5825 } // namespace internal 5819 } // namespace internal
5826 } // namespace v8 5820 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698