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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.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/x64/lithium-codegen-x64.cc ('k') | no next file » | 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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 3989 matching lines...) Expand 10 before | Expand all | Expand 10 after
4000 4000
4001 4001
4002 void LCodeGen::DoCallFunction(LCallFunction* instr) { 4002 void LCodeGen::DoCallFunction(LCallFunction* instr) {
4003 HCallFunction* hinstr = instr->hydrogen(); 4003 HCallFunction* hinstr = instr->hydrogen();
4004 DCHECK(ToRegister(instr->context()).is(esi)); 4004 DCHECK(ToRegister(instr->context()).is(esi));
4005 DCHECK(ToRegister(instr->function()).is(edi)); 4005 DCHECK(ToRegister(instr->function()).is(edi));
4006 DCHECK(ToRegister(instr->result()).is(eax)); 4006 DCHECK(ToRegister(instr->result()).is(eax));
4007 4007
4008 int arity = instr->arity(); 4008 int arity = instr->arity();
4009 ConvertReceiverMode mode = hinstr->convert_mode(); 4009 ConvertReceiverMode mode = hinstr->convert_mode();
4010 TailCallMode tail_call_mode = hinstr->tail_call_mode();
4011 if (hinstr->HasVectorAndSlot()) { 4010 if (hinstr->HasVectorAndSlot()) {
4012 Register slot_register = ToRegister(instr->temp_slot()); 4011 Register slot_register = ToRegister(instr->temp_slot());
4013 Register vector_register = ToRegister(instr->temp_vector()); 4012 Register vector_register = ToRegister(instr->temp_vector());
4014 DCHECK(slot_register.is(edx)); 4013 DCHECK(slot_register.is(edx));
4015 DCHECK(vector_register.is(ebx)); 4014 DCHECK(vector_register.is(ebx));
4016 4015
4017 AllowDeferredHandleDereference vector_structure_check; 4016 AllowDeferredHandleDereference vector_structure_check;
4018 Handle<TypeFeedbackVector> vector = hinstr->feedback_vector(); 4017 Handle<TypeFeedbackVector> vector = hinstr->feedback_vector();
4019 int index = vector->GetIndex(hinstr->slot()); 4018 int index = vector->GetIndex(hinstr->slot());
4020 4019
4021 __ mov(vector_register, vector); 4020 __ mov(vector_register, vector);
4022 __ mov(slot_register, Immediate(Smi::FromInt(index))); 4021 __ mov(slot_register, Immediate(Smi::FromInt(index)));
4023 4022
4024 Handle<Code> ic = CodeFactory::CallICInOptimizedCode(isolate(), arity, mode, 4023 Handle<Code> ic =
4025 tail_call_mode) 4024 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code();
4026 .code();
4027 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4025 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4028 } else { 4026 } else {
4029 __ Set(eax, arity); 4027 __ Set(eax, arity);
4030 CallCode(isolate()->builtins()->Call(mode, tail_call_mode), 4028 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr);
4031 RelocInfo::CODE_TARGET, instr);
4032 } 4029 }
4033 } 4030 }
4034 4031
4035 4032
4036 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 4033 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
4037 DCHECK(ToRegister(instr->context()).is(esi)); 4034 DCHECK(ToRegister(instr->context()).is(esi));
4038 DCHECK(ToRegister(instr->constructor()).is(edi)); 4035 DCHECK(ToRegister(instr->constructor()).is(edi));
4039 DCHECK(ToRegister(instr->result()).is(eax)); 4036 DCHECK(ToRegister(instr->result()).is(eax));
4040 4037
4041 __ Move(eax, Immediate(instr->arity())); 4038 __ Move(eax, Immediate(instr->arity()));
(...skipping 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after
6016 RecordSafepoint(Safepoint::kNoLazyDeopt); 6013 RecordSafepoint(Safepoint::kNoLazyDeopt);
6017 } 6014 }
6018 6015
6019 6016
6020 #undef __ 6017 #undef __
6021 6018
6022 } // namespace internal 6019 } // namespace internal
6023 } // namespace v8 6020 } // namespace v8
6024 6021
6025 #endif // V8_TARGET_ARCH_X87 6022 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698