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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.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/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 3720 matching lines...) Expand 10 before | Expand all | Expand 10 after
3731 3731
3732 void LCodeGen::DoCallFunction(LCallFunction* instr) { 3732 void LCodeGen::DoCallFunction(LCallFunction* instr) {
3733 HCallFunction* hinstr = instr->hydrogen(); 3733 HCallFunction* hinstr = instr->hydrogen();
3734 DCHECK(ToRegister(instr->context()).is(rsi)); 3734 DCHECK(ToRegister(instr->context()).is(rsi));
3735 DCHECK(ToRegister(instr->function()).is(rdi)); 3735 DCHECK(ToRegister(instr->function()).is(rdi));
3736 DCHECK(ToRegister(instr->result()).is(rax)); 3736 DCHECK(ToRegister(instr->result()).is(rax));
3737 3737
3738 int arity = instr->arity(); 3738 int arity = instr->arity();
3739 3739
3740 ConvertReceiverMode mode = hinstr->convert_mode(); 3740 ConvertReceiverMode mode = hinstr->convert_mode();
3741 TailCallMode tail_call_mode = hinstr->tail_call_mode();
3742 if (hinstr->HasVectorAndSlot()) { 3741 if (hinstr->HasVectorAndSlot()) {
3743 Register slot_register = ToRegister(instr->temp_slot()); 3742 Register slot_register = ToRegister(instr->temp_slot());
3744 Register vector_register = ToRegister(instr->temp_vector()); 3743 Register vector_register = ToRegister(instr->temp_vector());
3745 DCHECK(slot_register.is(rdx)); 3744 DCHECK(slot_register.is(rdx));
3746 DCHECK(vector_register.is(rbx)); 3745 DCHECK(vector_register.is(rbx));
3747 3746
3748 AllowDeferredHandleDereference vector_structure_check; 3747 AllowDeferredHandleDereference vector_structure_check;
3749 Handle<TypeFeedbackVector> vector = hinstr->feedback_vector(); 3748 Handle<TypeFeedbackVector> vector = hinstr->feedback_vector();
3750 int index = vector->GetIndex(hinstr->slot()); 3749 int index = vector->GetIndex(hinstr->slot());
3751 3750
3752 __ Move(vector_register, vector); 3751 __ Move(vector_register, vector);
3753 __ Move(slot_register, Smi::FromInt(index)); 3752 __ Move(slot_register, Smi::FromInt(index));
3754 3753
3755 Handle<Code> ic = CodeFactory::CallICInOptimizedCode(isolate(), arity, mode, 3754 Handle<Code> ic =
3756 tail_call_mode) 3755 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code();
3757 .code();
3758 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3756 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3759 } else { 3757 } else {
3760 __ Set(rax, arity); 3758 __ Set(rax, arity);
3761 CallCode(isolate()->builtins()->Call(mode, tail_call_mode), 3759 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr);
3762 RelocInfo::CODE_TARGET, instr);
3763 } 3760 }
3764 } 3761 }
3765 3762
3766 3763
3767 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 3764 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
3768 DCHECK(ToRegister(instr->context()).is(rsi)); 3765 DCHECK(ToRegister(instr->context()).is(rsi));
3769 DCHECK(ToRegister(instr->constructor()).is(rdi)); 3766 DCHECK(ToRegister(instr->constructor()).is(rdi));
3770 DCHECK(ToRegister(instr->result()).is(rax)); 3767 DCHECK(ToRegister(instr->result()).is(rax));
3771 3768
3772 __ Set(rax, instr->arity()); 3769 __ Set(rax, instr->arity());
(...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after
5646 RecordSafepoint(Safepoint::kNoLazyDeopt); 5643 RecordSafepoint(Safepoint::kNoLazyDeopt);
5647 } 5644 }
5648 5645
5649 5646
5650 #undef __ 5647 #undef __
5651 5648
5652 } // namespace internal 5649 } // namespace internal
5653 } // namespace v8 5650 } // namespace v8
5654 5651
5655 #endif // V8_TARGET_ARCH_X64 5652 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698