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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.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/x87/lithium-codegen-x87.h ('k') | src/crankshaft/x87/lithium-x87.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_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 2658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 AllowDeferredHandleDereference vector_structure_check; 2669 AllowDeferredHandleDereference vector_structure_check;
2670 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2670 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2671 __ mov(vector_register, vector); 2671 __ mov(vector_register, vector);
2672 // No need to allocate this register. 2672 // No need to allocate this register.
2673 FeedbackVectorSlot slot = instr->hydrogen()->slot(); 2673 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2674 int index = vector->GetIndex(slot); 2674 int index = vector->GetIndex(slot);
2675 __ mov(slot_register, Immediate(Smi::FromInt(index))); 2675 __ mov(slot_register, Immediate(Smi::FromInt(index)));
2676 } 2676 }
2677 2677
2678 2678
2679 template <class T>
2680 void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
2681 Register vector_register = ToRegister(instr->temp_vector());
2682 Register slot_register = ToRegister(instr->temp_slot());
2683
2684 AllowDeferredHandleDereference vector_structure_check;
2685 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2686 __ mov(vector_register, vector);
2687 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2688 int index = vector->GetIndex(slot);
2689 __ mov(slot_register, Immediate(Smi::FromInt(index)));
2690 }
2691
2692
2693 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2679 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2694 DCHECK(ToRegister(instr->context()).is(esi)); 2680 DCHECK(ToRegister(instr->context()).is(esi));
2695 DCHECK(ToRegister(instr->result()).is(eax)); 2681 DCHECK(ToRegister(instr->result()).is(eax));
2696 2682
2697 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2683 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2698 Handle<Code> ic = 2684 Handle<Code> ic =
2699 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) 2685 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2700 .code(); 2686 .code();
2701 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2687 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2702 } 2688 }
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after
4172 if (instr->is_fixed_typed_array()) { 4158 if (instr->is_fixed_typed_array()) {
4173 DoStoreKeyedExternalArray(instr); 4159 DoStoreKeyedExternalArray(instr);
4174 } else if (instr->hydrogen()->value()->representation().IsDouble()) { 4160 } else if (instr->hydrogen()->value()->representation().IsDouble()) {
4175 DoStoreKeyedFixedDoubleArray(instr); 4161 DoStoreKeyedFixedDoubleArray(instr);
4176 } else { 4162 } else {
4177 DoStoreKeyedFixedArray(instr); 4163 DoStoreKeyedFixedArray(instr);
4178 } 4164 }
4179 } 4165 }
4180 4166
4181 4167
4182 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4183 DCHECK(ToRegister(instr->context()).is(esi));
4184 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4185 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
4186 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4187
4188 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
4189
4190 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
4191 isolate(), instr->language_mode())
4192 .code();
4193 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4194 }
4195
4196
4197 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { 4168 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
4198 Register object = ToRegister(instr->object()); 4169 Register object = ToRegister(instr->object());
4199 Register temp = ToRegister(instr->temp()); 4170 Register temp = ToRegister(instr->temp());
4200 Label no_memento_found; 4171 Label no_memento_found;
4201 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); 4172 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found);
4202 DeoptimizeIf(equal, instr, DeoptimizeReason::kMementoFound); 4173 DeoptimizeIf(equal, instr, DeoptimizeReason::kMementoFound);
4203 __ bind(&no_memento_found); 4174 __ bind(&no_memento_found);
4204 } 4175 }
4205 4176
4206 4177
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after
5753 __ bind(deferred->exit()); 5724 __ bind(deferred->exit());
5754 __ bind(&done); 5725 __ bind(&done);
5755 } 5726 }
5756 5727
5757 #undef __ 5728 #undef __
5758 5729
5759 } // namespace internal 5730 } // namespace internal
5760 } // namespace v8 5731 } // namespace v8
5761 5732
5762 #endif // V8_TARGET_ARCH_X87 5733 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.h ('k') | src/crankshaft/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698