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

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

Issue 1407373007: Remove CallFunctionStub, always call through the Call builtin (also from CallIC) (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/code-stubs.cc ('k') | src/crankshaft/arm64/lithium-codegen-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 #include "src/crankshaft/arm/lithium-codegen-arm.h" 5 #include "src/crankshaft/arm/lithium-codegen-arm.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/arm/lithium-gap-resolver-arm.h" 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h"
(...skipping 3816 matching lines...) Expand 10 before | Expand all | Expand 10 after
3827 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); 3827 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT);
3828 } 3828 }
3829 3829
3830 3830
3831 void LCodeGen::DoCallFunction(LCallFunction* instr) { 3831 void LCodeGen::DoCallFunction(LCallFunction* instr) {
3832 DCHECK(ToRegister(instr->context()).is(cp)); 3832 DCHECK(ToRegister(instr->context()).is(cp));
3833 DCHECK(ToRegister(instr->function()).is(r1)); 3833 DCHECK(ToRegister(instr->function()).is(r1));
3834 DCHECK(ToRegister(instr->result()).is(r0)); 3834 DCHECK(ToRegister(instr->result()).is(r0));
3835 3835
3836 int arity = instr->arity(); 3836 int arity = instr->arity();
3837 CallFunctionFlags flags = instr->hydrogen()->function_flags();
3838 if (instr->hydrogen()->HasVectorAndSlot()) { 3837 if (instr->hydrogen()->HasVectorAndSlot()) {
3839 Register slot_register = ToRegister(instr->temp_slot()); 3838 Register slot_register = ToRegister(instr->temp_slot());
3840 Register vector_register = ToRegister(instr->temp_vector()); 3839 Register vector_register = ToRegister(instr->temp_vector());
3841 DCHECK(slot_register.is(r3)); 3840 DCHECK(slot_register.is(r3));
3842 DCHECK(vector_register.is(r2)); 3841 DCHECK(vector_register.is(r2));
3843 3842
3844 AllowDeferredHandleDereference vector_structure_check; 3843 AllowDeferredHandleDereference vector_structure_check;
3845 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 3844 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
3846 int index = vector->GetIndex(instr->hydrogen()->slot()); 3845 int index = vector->GetIndex(instr->hydrogen()->slot());
3847 3846
3848 __ Move(vector_register, vector); 3847 __ Move(vector_register, vector);
3849 __ mov(slot_register, Operand(Smi::FromInt(index))); 3848 __ mov(slot_register, Operand(Smi::FromInt(index)));
3850 3849
3851 CallICState::CallType call_type =
3852 (flags & CALL_AS_METHOD) ? CallICState::METHOD : CallICState::FUNCTION;
3853
3854 Handle<Code> ic = 3850 Handle<Code> ic =
3855 CodeFactory::CallICInOptimizedCode(isolate(), arity, call_type).code(); 3851 CodeFactory::CallICInOptimizedCode(isolate(), arity).code();
3856 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3852 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3857 } else { 3853 } else {
3858 CallFunctionStub stub(isolate(), arity, flags); 3854 __ mov(r0, Operand(arity));
3859 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3855 CallCode(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET, instr);
3860 } 3856 }
3861 } 3857 }
3862 3858
3863 3859
3864 void LCodeGen::DoCallNew(LCallNew* instr) { 3860 void LCodeGen::DoCallNew(LCallNew* instr) {
3865 DCHECK(ToRegister(instr->context()).is(cp)); 3861 DCHECK(ToRegister(instr->context()).is(cp));
3866 DCHECK(ToRegister(instr->constructor()).is(r1)); 3862 DCHECK(ToRegister(instr->constructor()).is(r1));
3867 DCHECK(ToRegister(instr->result()).is(r0)); 3863 DCHECK(ToRegister(instr->result()).is(r0));
3868 3864
3869 __ mov(r0, Operand(instr->arity())); 3865 __ mov(r0, Operand(instr->arity()));
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
5792 __ push(ToRegister(instr->function())); 5788 __ push(ToRegister(instr->function()));
5793 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5789 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5794 RecordSafepoint(Safepoint::kNoLazyDeopt); 5790 RecordSafepoint(Safepoint::kNoLazyDeopt);
5795 } 5791 }
5796 5792
5797 5793
5798 #undef __ 5794 #undef __
5799 5795
5800 } // namespace internal 5796 } // namespace internal
5801 } // namespace v8 5797 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698