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/mips64/lithium-codegen-mips64.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/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.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/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 3979 matching lines...) Expand 10 before | Expand all | Expand 10 after
3990 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); 3990 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT);
3991 } 3991 }
3992 3992
3993 3993
3994 void LCodeGen::DoCallFunction(LCallFunction* instr) { 3994 void LCodeGen::DoCallFunction(LCallFunction* instr) {
3995 DCHECK(ToRegister(instr->context()).is(cp)); 3995 DCHECK(ToRegister(instr->context()).is(cp));
3996 DCHECK(ToRegister(instr->function()).is(a1)); 3996 DCHECK(ToRegister(instr->function()).is(a1));
3997 DCHECK(ToRegister(instr->result()).is(v0)); 3997 DCHECK(ToRegister(instr->result()).is(v0));
3998 3998
3999 int arity = instr->arity(); 3999 int arity = instr->arity();
4000 CallFunctionFlags flags = instr->hydrogen()->function_flags();
4001 if (instr->hydrogen()->HasVectorAndSlot()) { 4000 if (instr->hydrogen()->HasVectorAndSlot()) {
4002 Register slot_register = ToRegister(instr->temp_slot()); 4001 Register slot_register = ToRegister(instr->temp_slot());
4003 Register vector_register = ToRegister(instr->temp_vector()); 4002 Register vector_register = ToRegister(instr->temp_vector());
4004 DCHECK(slot_register.is(a3)); 4003 DCHECK(slot_register.is(a3));
4005 DCHECK(vector_register.is(a2)); 4004 DCHECK(vector_register.is(a2));
4006 4005
4007 AllowDeferredHandleDereference vector_structure_check; 4006 AllowDeferredHandleDereference vector_structure_check;
4008 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 4007 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
4009 int index = vector->GetIndex(instr->hydrogen()->slot()); 4008 int index = vector->GetIndex(instr->hydrogen()->slot());
4010 4009
4011 __ li(vector_register, vector); 4010 __ li(vector_register, vector);
4012 __ li(slot_register, Operand(Smi::FromInt(index))); 4011 __ li(slot_register, Operand(Smi::FromInt(index)));
4013 4012
4014 CallICState::CallType call_type =
4015 (flags & CALL_AS_METHOD) ? CallICState::METHOD : CallICState::FUNCTION;
4016
4017 Handle<Code> ic = 4013 Handle<Code> ic =
4018 CodeFactory::CallICInOptimizedCode(isolate(), arity, call_type).code(); 4014 CodeFactory::CallICInOptimizedCode(isolate(), arity).code();
4019 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4015 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4020 } else { 4016 } else {
4021 CallFunctionStub stub(isolate(), arity, flags); 4017 __ li(a0, Operand(arity));
4022 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 4018 CallCode(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET, instr);
4023 } 4019 }
4024 } 4020 }
4025 4021
4026 4022
4027 void LCodeGen::DoCallNew(LCallNew* instr) { 4023 void LCodeGen::DoCallNew(LCallNew* instr) {
4028 DCHECK(ToRegister(instr->context()).is(cp)); 4024 DCHECK(ToRegister(instr->context()).is(cp));
4029 DCHECK(ToRegister(instr->constructor()).is(a1)); 4025 DCHECK(ToRegister(instr->constructor()).is(a1));
4030 DCHECK(ToRegister(instr->result()).is(v0)); 4026 DCHECK(ToRegister(instr->result()).is(v0));
4031 4027
4032 __ li(a0, Operand(instr->arity())); 4028 __ li(a0, Operand(instr->arity()));
(...skipping 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after
6033 __ Push(at, ToRegister(instr->function())); 6029 __ Push(at, ToRegister(instr->function()));
6034 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6030 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6035 RecordSafepoint(Safepoint::kNoLazyDeopt); 6031 RecordSafepoint(Safepoint::kNoLazyDeopt);
6036 } 6032 }
6037 6033
6038 6034
6039 #undef __ 6035 #undef __
6040 6036
6041 } // namespace internal 6037 } // namespace internal
6042 } // namespace v8 6038 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698