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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.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/x64/lithium-codegen-x64.h ('k') | src/crankshaft/x64/lithium-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.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 2516 matching lines...) Expand 10 before | Expand all | Expand 10 after
2527 AllowDeferredHandleDereference vector_structure_check; 2527 AllowDeferredHandleDereference vector_structure_check;
2528 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2528 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2529 __ Move(vector_register, vector); 2529 __ Move(vector_register, vector);
2530 // No need to allocate this register. 2530 // No need to allocate this register.
2531 FeedbackVectorSlot slot = instr->hydrogen()->slot(); 2531 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2532 int index = vector->GetIndex(slot); 2532 int index = vector->GetIndex(slot);
2533 __ Move(slot_register, Smi::FromInt(index)); 2533 __ Move(slot_register, Smi::FromInt(index));
2534 } 2534 }
2535 2535
2536 2536
2537 template <class T>
2538 void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
2539 Register vector_register = ToRegister(instr->temp_vector());
2540 Register slot_register = ToRegister(instr->temp_slot());
2541
2542 AllowDeferredHandleDereference vector_structure_check;
2543 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2544 __ Move(vector_register, vector);
2545 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2546 int index = vector->GetIndex(slot);
2547 __ Move(slot_register, Smi::FromInt(index));
2548 }
2549
2550
2551 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2537 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2552 DCHECK(ToRegister(instr->context()).is(rsi)); 2538 DCHECK(ToRegister(instr->context()).is(rsi));
2553 DCHECK(ToRegister(instr->result()).is(rax)); 2539 DCHECK(ToRegister(instr->result()).is(rax));
2554 2540
2555 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2541 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2556 Handle<Code> ic = 2542 Handle<Code> ic =
2557 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) 2543 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2558 .code(); 2544 .code();
2559 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2545 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2560 } 2546 }
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after
4131 if (instr->is_fixed_typed_array()) { 4117 if (instr->is_fixed_typed_array()) {
4132 DoStoreKeyedExternalArray(instr); 4118 DoStoreKeyedExternalArray(instr);
4133 } else if (instr->hydrogen()->value()->representation().IsDouble()) { 4119 } else if (instr->hydrogen()->value()->representation().IsDouble()) {
4134 DoStoreKeyedFixedDoubleArray(instr); 4120 DoStoreKeyedFixedDoubleArray(instr);
4135 } else { 4121 } else {
4136 DoStoreKeyedFixedArray(instr); 4122 DoStoreKeyedFixedArray(instr);
4137 } 4123 }
4138 } 4124 }
4139 4125
4140 4126
4141 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4142 DCHECK(ToRegister(instr->context()).is(rsi));
4143 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4144 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
4145 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4146
4147 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
4148
4149 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
4150 isolate(), instr->language_mode())
4151 .code();
4152 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4153 }
4154
4155
4156 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) { 4127 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
4157 class DeferredMaybeGrowElements final : public LDeferredCode { 4128 class DeferredMaybeGrowElements final : public LDeferredCode {
4158 public: 4129 public:
4159 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr) 4130 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr)
4160 : LDeferredCode(codegen), instr_(instr) {} 4131 : LDeferredCode(codegen), instr_(instr) {}
4161 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); } 4132 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); }
4162 LInstruction* instr() override { return instr_; } 4133 LInstruction* instr() override { return instr_; }
4163 4134
4164 private: 4135 private:
4165 LMaybeGrowElements* instr_; 4136 LMaybeGrowElements* instr_;
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
5549 __ bind(deferred->exit()); 5520 __ bind(deferred->exit());
5550 __ bind(&done); 5521 __ bind(&done);
5551 } 5522 }
5552 5523
5553 #undef __ 5524 #undef __
5554 5525
5555 } // namespace internal 5526 } // namespace internal
5556 } // namespace v8 5527 } // namespace v8
5557 5528
5558 #endif // V8_TARGET_ARCH_X64 5529 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.h ('k') | src/crankshaft/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698