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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.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
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 3888 matching lines...) Expand 10 before | Expand all | Expand 10 after
3899 3899
3900 3900
3901 void LCodeGen::DoCallFunction(LCallFunction* instr) { 3901 void LCodeGen::DoCallFunction(LCallFunction* instr) {
3902 HCallFunction* hinstr = instr->hydrogen(); 3902 HCallFunction* hinstr = instr->hydrogen();
3903 DCHECK(ToRegister(instr->context()).is(cp)); 3903 DCHECK(ToRegister(instr->context()).is(cp));
3904 DCHECK(ToRegister(instr->function()).is(r4)); 3904 DCHECK(ToRegister(instr->function()).is(r4));
3905 DCHECK(ToRegister(instr->result()).is(r3)); 3905 DCHECK(ToRegister(instr->result()).is(r3));
3906 3906
3907 int arity = instr->arity(); 3907 int arity = instr->arity();
3908 ConvertReceiverMode mode = hinstr->convert_mode(); 3908 ConvertReceiverMode mode = hinstr->convert_mode();
3909 TailCallMode tail_call_mode = hinstr->tail_call_mode();
3910 if (hinstr->HasVectorAndSlot()) { 3909 if (hinstr->HasVectorAndSlot()) {
3911 Register slot_register = ToRegister(instr->temp_slot()); 3910 Register slot_register = ToRegister(instr->temp_slot());
3912 Register vector_register = ToRegister(instr->temp_vector()); 3911 Register vector_register = ToRegister(instr->temp_vector());
3913 DCHECK(slot_register.is(r6)); 3912 DCHECK(slot_register.is(r6));
3914 DCHECK(vector_register.is(r5)); 3913 DCHECK(vector_register.is(r5));
3915 3914
3916 AllowDeferredHandleDereference vector_structure_check; 3915 AllowDeferredHandleDereference vector_structure_check;
3917 Handle<TypeFeedbackVector> vector = hinstr->feedback_vector(); 3916 Handle<TypeFeedbackVector> vector = hinstr->feedback_vector();
3918 int index = vector->GetIndex(hinstr->slot()); 3917 int index = vector->GetIndex(hinstr->slot());
3919 3918
3920 __ Move(vector_register, vector); 3919 __ Move(vector_register, vector);
3921 __ LoadSmiLiteral(slot_register, Smi::FromInt(index)); 3920 __ LoadSmiLiteral(slot_register, Smi::FromInt(index));
3922 3921
3923 Handle<Code> ic = CodeFactory::CallICInOptimizedCode(isolate(), arity, mode, 3922 Handle<Code> ic =
3924 tail_call_mode) 3923 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code();
3925 .code();
3926 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3924 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3927 } else { 3925 } else {
3928 __ mov(r3, Operand(arity)); 3926 __ mov(r3, Operand(arity));
3929 CallCode(isolate()->builtins()->Call(mode, tail_call_mode), 3927 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr);
3930 RelocInfo::CODE_TARGET, instr);
3931 } 3928 }
3932 } 3929 }
3933 3930
3934 3931
3935 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 3932 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
3936 DCHECK(ToRegister(instr->context()).is(cp)); 3933 DCHECK(ToRegister(instr->context()).is(cp));
3937 DCHECK(ToRegister(instr->constructor()).is(r4)); 3934 DCHECK(ToRegister(instr->constructor()).is(r4));
3938 DCHECK(ToRegister(instr->result()).is(r3)); 3935 DCHECK(ToRegister(instr->result()).is(r3));
3939 3936
3940 __ mov(r3, Operand(instr->arity())); 3937 __ mov(r3, Operand(instr->arity()));
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after
5802 __ Push(scope_info); 5799 __ Push(scope_info);
5803 __ push(ToRegister(instr->function())); 5800 __ push(ToRegister(instr->function()));
5804 CallRuntime(Runtime::kPushBlockContext, instr); 5801 CallRuntime(Runtime::kPushBlockContext, instr);
5805 RecordSafepoint(Safepoint::kNoLazyDeopt); 5802 RecordSafepoint(Safepoint::kNoLazyDeopt);
5806 } 5803 }
5807 5804
5808 5805
5809 #undef __ 5806 #undef __
5810 } // namespace internal 5807 } // namespace internal
5811 } // namespace v8 5808 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698