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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 885593002: Continue learning for calls in crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't remove inlining text size limit yet, just alter it. Created 5 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/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
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 3946 matching lines...) Expand 10 before | Expand all | Expand 10 after
3957 } 3957 }
3958 } 3958 }
3959 3959
3960 3960
3961 void LCodeGen::DoCallFunction(LCallFunction* instr) { 3961 void LCodeGen::DoCallFunction(LCallFunction* instr) {
3962 DCHECK(ToRegister(instr->context()).is(esi)); 3962 DCHECK(ToRegister(instr->context()).is(esi));
3963 DCHECK(ToRegister(instr->function()).is(edi)); 3963 DCHECK(ToRegister(instr->function()).is(edi));
3964 DCHECK(ToRegister(instr->result()).is(eax)); 3964 DCHECK(ToRegister(instr->result()).is(eax));
3965 3965
3966 int arity = instr->arity(); 3966 int arity = instr->arity();
3967 CallFunctionStub stub(isolate(), arity, instr->hydrogen()->function_flags()); 3967 CallFunctionFlags flags = instr->hydrogen()->function_flags();
3968 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3968 if (instr->hydrogen()->HasVectorAndSlot()) {
3969 Register slot_register = ToRegister(instr->temp_slot());
3970 Register vector_register = ToRegister(instr->temp_vector());
3971 DCHECK(slot_register.is(edx));
3972 DCHECK(vector_register.is(ebx));
3973
3974 AllowDeferredHandleDereference vector_structure_check;
3975 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
3976 int index = vector->GetIndex(instr->hydrogen()->slot());
3977
3978 __ mov(vector_register, vector);
3979 __ mov(slot_register, Immediate(Smi::FromInt(index)));
3980
3981 CallICState::CallType call_type =
3982 (flags & CALL_AS_METHOD) ? CallICState::METHOD : CallICState::FUNCTION;
3983
3984 Handle<Code> ic =
3985 CodeFactory::CallICInOptimizedCode(isolate(), arity, call_type).code();
3986 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3987 } else {
3988 CallFunctionStub stub(isolate(), arity, flags);
3989 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3990 }
3969 } 3991 }
3970 3992
3971 3993
3972 void LCodeGen::DoCallNew(LCallNew* instr) { 3994 void LCodeGen::DoCallNew(LCallNew* instr) {
3973 DCHECK(ToRegister(instr->context()).is(esi)); 3995 DCHECK(ToRegister(instr->context()).is(esi));
3974 DCHECK(ToRegister(instr->constructor()).is(edi)); 3996 DCHECK(ToRegister(instr->constructor()).is(edi));
3975 DCHECK(ToRegister(instr->result()).is(eax)); 3997 DCHECK(ToRegister(instr->result()).is(eax));
3976 3998
3977 // No cell in ebx for construct type feedback in optimized code 3999 // No cell in ebx for construct type feedback in optimized code
3978 __ mov(ebx, isolate()->factory()->undefined_value()); 4000 __ mov(ebx, isolate()->factory()->undefined_value());
(...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after
5750 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5772 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5751 RecordSafepoint(Safepoint::kNoLazyDeopt); 5773 RecordSafepoint(Safepoint::kNoLazyDeopt);
5752 } 5774 }
5753 5775
5754 5776
5755 #undef __ 5777 #undef __
5756 5778
5757 } } // namespace v8::internal 5779 } } // namespace v8::internal
5758 5780
5759 #endif // V8_TARGET_ARCH_IA32 5781 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698