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

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

Issue 1683793004: [crankshaft] Disable Crankshaft when it sees a tail call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-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 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 3859 matching lines...) Expand 10 before | Expand all | Expand 10 after
3870 3870
3871 3871
3872 void LCodeGen::DoCallFunction(LCallFunction* instr) { 3872 void LCodeGen::DoCallFunction(LCallFunction* instr) {
3873 HCallFunction* hinstr = instr->hydrogen(); 3873 HCallFunction* hinstr = instr->hydrogen();
3874 DCHECK(ToRegister(instr->context()).is(cp)); 3874 DCHECK(ToRegister(instr->context()).is(cp));
3875 DCHECK(ToRegister(instr->function()).is(a1)); 3875 DCHECK(ToRegister(instr->function()).is(a1));
3876 DCHECK(ToRegister(instr->result()).is(v0)); 3876 DCHECK(ToRegister(instr->result()).is(v0));
3877 3877
3878 int arity = instr->arity(); 3878 int arity = instr->arity();
3879 ConvertReceiverMode mode = hinstr->convert_mode(); 3879 ConvertReceiverMode mode = hinstr->convert_mode();
3880 TailCallMode tail_call_mode = hinstr->tail_call_mode();
3881 if (hinstr->HasVectorAndSlot()) { 3880 if (hinstr->HasVectorAndSlot()) {
3882 Register slot_register = ToRegister(instr->temp_slot()); 3881 Register slot_register = ToRegister(instr->temp_slot());
3883 Register vector_register = ToRegister(instr->temp_vector()); 3882 Register vector_register = ToRegister(instr->temp_vector());
3884 DCHECK(slot_register.is(a3)); 3883 DCHECK(slot_register.is(a3));
3885 DCHECK(vector_register.is(a2)); 3884 DCHECK(vector_register.is(a2));
3886 3885
3887 AllowDeferredHandleDereference vector_structure_check; 3886 AllowDeferredHandleDereference vector_structure_check;
3888 Handle<TypeFeedbackVector> vector = hinstr->feedback_vector(); 3887 Handle<TypeFeedbackVector> vector = hinstr->feedback_vector();
3889 int index = vector->GetIndex(hinstr->slot()); 3888 int index = vector->GetIndex(hinstr->slot());
3890 3889
3891 __ li(vector_register, vector); 3890 __ li(vector_register, vector);
3892 __ li(slot_register, Operand(Smi::FromInt(index))); 3891 __ li(slot_register, Operand(Smi::FromInt(index)));
3893 3892
3894 Handle<Code> ic = CodeFactory::CallICInOptimizedCode(isolate(), arity, mode, 3893 Handle<Code> ic =
3895 tail_call_mode) 3894 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code();
3896 .code();
3897 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3895 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3898 } else { 3896 } else {
3899 __ li(a0, Operand(arity)); 3897 __ li(a0, Operand(arity));
3900 CallCode(isolate()->builtins()->Call(mode, tail_call_mode), 3898 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr);
3901 RelocInfo::CODE_TARGET, instr);
3902 } 3899 }
3903 } 3900 }
3904 3901
3905 3902
3906 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 3903 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
3907 DCHECK(ToRegister(instr->context()).is(cp)); 3904 DCHECK(ToRegister(instr->context()).is(cp));
3908 DCHECK(ToRegister(instr->constructor()).is(a1)); 3905 DCHECK(ToRegister(instr->constructor()).is(a1));
3909 DCHECK(ToRegister(instr->result()).is(v0)); 3906 DCHECK(ToRegister(instr->result()).is(v0));
3910 3907
3911 __ li(a0, Operand(instr->arity())); 3908 __ li(a0, Operand(instr->arity()));
(...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after
5805 __ Push(at, ToRegister(instr->function())); 5802 __ Push(at, ToRegister(instr->function()));
5806 CallRuntime(Runtime::kPushBlockContext, instr); 5803 CallRuntime(Runtime::kPushBlockContext, instr);
5807 RecordSafepoint(Safepoint::kNoLazyDeopt); 5804 RecordSafepoint(Safepoint::kNoLazyDeopt);
5808 } 5805 }
5809 5806
5810 5807
5811 #undef __ 5808 #undef __
5812 5809
5813 } // namespace internal 5810 } // namespace internal
5814 } // namespace v8 5811 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698