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

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

Issue 633423002: Teach TurboFan to call vector-based ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed nits. Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/ic/ic.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 2831 matching lines...) Expand 10 before | Expand all | Expand 10 after
2842 DCHECK(ToRegister(instr->context()).is(esi)); 2842 DCHECK(ToRegister(instr->context()).is(esi));
2843 DCHECK(ToRegister(instr->global_object()) 2843 DCHECK(ToRegister(instr->global_object())
2844 .is(LoadDescriptor::ReceiverRegister())); 2844 .is(LoadDescriptor::ReceiverRegister()));
2845 DCHECK(ToRegister(instr->result()).is(eax)); 2845 DCHECK(ToRegister(instr->result()).is(eax));
2846 2846
2847 __ mov(LoadDescriptor::NameRegister(), instr->name()); 2847 __ mov(LoadDescriptor::NameRegister(), instr->name());
2848 if (FLAG_vector_ics) { 2848 if (FLAG_vector_ics) {
2849 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2849 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2850 } 2850 }
2851 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2851 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2852 Handle<Code> ic = CodeFactory::LoadIC(isolate(), mode).code(); 2852 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode).code();
2853 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2853 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2854 } 2854 }
2855 2855
2856 2856
2857 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { 2857 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
2858 Register value = ToRegister(instr->value()); 2858 Register value = ToRegister(instr->value());
2859 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle(); 2859 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle();
2860 2860
2861 // If the cell we are storing to contains the hole it could have 2861 // If the cell we are storing to contains the hole it could have
2862 // been deleted from the property dictionary. In that case, we need 2862 // been deleted from the property dictionary. In that case, we need
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
2978 2978
2979 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2979 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2980 DCHECK(ToRegister(instr->context()).is(esi)); 2980 DCHECK(ToRegister(instr->context()).is(esi));
2981 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 2981 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2982 DCHECK(ToRegister(instr->result()).is(eax)); 2982 DCHECK(ToRegister(instr->result()).is(eax));
2983 2983
2984 __ mov(LoadDescriptor::NameRegister(), instr->name()); 2984 __ mov(LoadDescriptor::NameRegister(), instr->name());
2985 if (FLAG_vector_ics) { 2985 if (FLAG_vector_ics) {
2986 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 2986 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2987 } 2987 }
2988 Handle<Code> ic = CodeFactory::LoadIC(isolate(), NOT_CONTEXTUAL).code(); 2988 Handle<Code> ic =
2989 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_CONTEXTUAL).code();
2989 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2990 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2990 } 2991 }
2991 2992
2992 2993
2993 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2994 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2994 Register function = ToRegister(instr->function()); 2995 Register function = ToRegister(instr->function());
2995 Register temp = ToRegister(instr->temp()); 2996 Register temp = ToRegister(instr->temp());
2996 Register result = ToRegister(instr->result()); 2997 Register result = ToRegister(instr->result());
2997 2998
2998 // Get the prototype or initial map from the function. 2999 // Get the prototype or initial map from the function.
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
3204 3205
3205 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3206 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3206 DCHECK(ToRegister(instr->context()).is(esi)); 3207 DCHECK(ToRegister(instr->context()).is(esi));
3207 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3208 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3208 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3209 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3209 3210
3210 if (FLAG_vector_ics) { 3211 if (FLAG_vector_ics) {
3211 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3212 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3212 } 3213 }
3213 3214
3214 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code(); 3215 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code();
3215 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3216 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3216 } 3217 }
3217 3218
3218 3219
3219 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3220 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3220 Register result = ToRegister(instr->result()); 3221 Register result = ToRegister(instr->result());
3221 3222
3222 if (instr->hydrogen()->from_inlined()) { 3223 if (instr->hydrogen()->from_inlined()) {
3223 __ lea(result, Operand(esp, -2 * kPointerSize)); 3224 __ lea(result, Operand(esp, -2 * kPointerSize));
3224 } else { 3225 } else {
(...skipping 2472 matching lines...) Expand 10 before | Expand all | Expand 10 after
5697 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5698 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5698 RecordSafepoint(Safepoint::kNoLazyDeopt); 5699 RecordSafepoint(Safepoint::kNoLazyDeopt);
5699 } 5700 }
5700 5701
5701 5702
5702 #undef __ 5703 #undef __
5703 5704
5704 } } // namespace v8::internal 5705 } } // namespace v8::internal
5705 5706
5706 #endif // V8_TARGET_ARCH_IA32 5707 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698