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

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

Issue 2350423002: [crankshaft] Remove HStoreKeyedGeneric and use HCallWithDescriptor instead to call KeyedStoreIC. (Closed)
Patch Set: Created 4 years, 3 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/ia32/lithium-codegen-ia32.h ('k') | src/crankshaft/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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 AllowDeferredHandleDereference vector_structure_check; 2385 AllowDeferredHandleDereference vector_structure_check;
2386 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2386 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2387 __ mov(vector_register, vector); 2387 __ mov(vector_register, vector);
2388 // No need to allocate this register. 2388 // No need to allocate this register.
2389 FeedbackVectorSlot slot = instr->hydrogen()->slot(); 2389 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2390 int index = vector->GetIndex(slot); 2390 int index = vector->GetIndex(slot);
2391 __ mov(slot_register, Immediate(Smi::FromInt(index))); 2391 __ mov(slot_register, Immediate(Smi::FromInt(index)));
2392 } 2392 }
2393 2393
2394 2394
2395 template <class T>
2396 void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
2397 Register vector_register = ToRegister(instr->temp_vector());
2398 Register slot_register = ToRegister(instr->temp_slot());
2399
2400 AllowDeferredHandleDereference vector_structure_check;
2401 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2402 __ mov(vector_register, vector);
2403 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2404 int index = vector->GetIndex(slot);
2405 __ mov(slot_register, Immediate(Smi::FromInt(index)));
2406 }
2407
2408
2409 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2395 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2410 DCHECK(ToRegister(instr->context()).is(esi)); 2396 DCHECK(ToRegister(instr->context()).is(esi));
2411 DCHECK(ToRegister(instr->result()).is(eax)); 2397 DCHECK(ToRegister(instr->result()).is(eax));
2412 2398
2413 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2399 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2414 Handle<Code> ic = 2400 Handle<Code> ic =
2415 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) 2401 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2416 .code(); 2402 .code();
2417 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2403 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2418 } 2404 }
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
3850 if (instr->is_fixed_typed_array()) { 3836 if (instr->is_fixed_typed_array()) {
3851 DoStoreKeyedExternalArray(instr); 3837 DoStoreKeyedExternalArray(instr);
3852 } else if (instr->hydrogen()->value()->representation().IsDouble()) { 3838 } else if (instr->hydrogen()->value()->representation().IsDouble()) {
3853 DoStoreKeyedFixedDoubleArray(instr); 3839 DoStoreKeyedFixedDoubleArray(instr);
3854 } else { 3840 } else {
3855 DoStoreKeyedFixedArray(instr); 3841 DoStoreKeyedFixedArray(instr);
3856 } 3842 }
3857 } 3843 }
3858 3844
3859 3845
3860 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
3861 DCHECK(ToRegister(instr->context()).is(esi));
3862 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
3863 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
3864 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
3865
3866 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
3867
3868 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
3869 isolate(), instr->language_mode())
3870 .code();
3871 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3872 }
3873
3874
3875 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { 3846 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
3876 Register object = ToRegister(instr->object()); 3847 Register object = ToRegister(instr->object());
3877 Register temp = ToRegister(instr->temp()); 3848 Register temp = ToRegister(instr->temp());
3878 Label no_memento_found; 3849 Label no_memento_found;
3879 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); 3850 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found);
3880 DeoptimizeIf(equal, instr, DeoptimizeReason::kMementoFound); 3851 DeoptimizeIf(equal, instr, DeoptimizeReason::kMementoFound);
3881 __ bind(&no_memento_found); 3852 __ bind(&no_memento_found);
3882 } 3853 }
3883 3854
3884 3855
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
5266 __ bind(deferred->exit()); 5237 __ bind(deferred->exit());
5267 __ bind(&done); 5238 __ bind(&done);
5268 } 5239 }
5269 5240
5270 #undef __ 5241 #undef __
5271 5242
5272 } // namespace internal 5243 } // namespace internal
5273 } // namespace v8 5244 } // namespace v8
5274 5245
5275 #endif // V8_TARGET_ARCH_IA32 5246 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.h ('k') | src/crankshaft/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698