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

Side by Side Diff: src/crankshaft/arm/lithium-codegen-arm.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/arm/lithium-codegen-arm.h ('k') | src/crankshaft/arm64/lithium-arm64.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/crankshaft/arm/lithium-codegen-arm.h" 5 #include "src/crankshaft/arm/lithium-codegen-arm.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h"
(...skipping 2578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2589 AllowDeferredHandleDereference vector_structure_check; 2589 AllowDeferredHandleDereference vector_structure_check;
2590 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2590 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2591 __ Move(vector_register, vector); 2591 __ Move(vector_register, vector);
2592 // No need to allocate this register. 2592 // No need to allocate this register.
2593 FeedbackVectorSlot slot = instr->hydrogen()->slot(); 2593 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2594 int index = vector->GetIndex(slot); 2594 int index = vector->GetIndex(slot);
2595 __ mov(slot_register, Operand(Smi::FromInt(index))); 2595 __ mov(slot_register, Operand(Smi::FromInt(index)));
2596 } 2596 }
2597 2597
2598 2598
2599 template <class T>
2600 void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
2601 Register vector_register = ToRegister(instr->temp_vector());
2602 Register slot_register = ToRegister(instr->temp_slot());
2603
2604 AllowDeferredHandleDereference vector_structure_check;
2605 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2606 __ Move(vector_register, vector);
2607 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2608 int index = vector->GetIndex(slot);
2609 __ mov(slot_register, Operand(Smi::FromInt(index)));
2610 }
2611
2612
2613 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2599 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2614 DCHECK(ToRegister(instr->context()).is(cp)); 2600 DCHECK(ToRegister(instr->context()).is(cp));
2615 DCHECK(ToRegister(instr->result()).is(r0)); 2601 DCHECK(ToRegister(instr->result()).is(r0));
2616 2602
2617 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2603 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2618 Handle<Code> ic = 2604 Handle<Code> ic =
2619 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) 2605 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2620 .code(); 2606 .code();
2621 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2607 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2622 } 2608 }
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
4043 if (instr->is_fixed_typed_array()) { 4029 if (instr->is_fixed_typed_array()) {
4044 DoStoreKeyedExternalArray(instr); 4030 DoStoreKeyedExternalArray(instr);
4045 } else if (instr->hydrogen()->value()->representation().IsDouble()) { 4031 } else if (instr->hydrogen()->value()->representation().IsDouble()) {
4046 DoStoreKeyedFixedDoubleArray(instr); 4032 DoStoreKeyedFixedDoubleArray(instr);
4047 } else { 4033 } else {
4048 DoStoreKeyedFixedArray(instr); 4034 DoStoreKeyedFixedArray(instr);
4049 } 4035 }
4050 } 4036 }
4051 4037
4052 4038
4053 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4054 DCHECK(ToRegister(instr->context()).is(cp));
4055 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4056 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
4057 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4058
4059 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
4060
4061 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
4062 isolate(), instr->language_mode())
4063 .code();
4064 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
4065 }
4066
4067
4068 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) { 4039 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
4069 class DeferredMaybeGrowElements final : public LDeferredCode { 4040 class DeferredMaybeGrowElements final : public LDeferredCode {
4070 public: 4041 public:
4071 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr) 4042 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr)
4072 : LDeferredCode(codegen), instr_(instr) {} 4043 : LDeferredCode(codegen), instr_(instr) {}
4073 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); } 4044 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); }
4074 LInstruction* instr() override { return instr_; } 4045 LInstruction* instr() override { return instr_; }
4075 4046
4076 private: 4047 private:
4077 LMaybeGrowElements* instr_; 4048 LMaybeGrowElements* instr_;
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after
5508 __ ldr(result, FieldMemOperand(scratch, 5479 __ ldr(result, FieldMemOperand(scratch,
5509 FixedArray::kHeaderSize - kPointerSize)); 5480 FixedArray::kHeaderSize - kPointerSize));
5510 __ bind(deferred->exit()); 5481 __ bind(deferred->exit());
5511 __ bind(&done); 5482 __ bind(&done);
5512 } 5483 }
5513 5484
5514 #undef __ 5485 #undef __
5515 5486
5516 } // namespace internal 5487 } // namespace internal
5517 } // namespace v8 5488 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.h ('k') | src/crankshaft/arm64/lithium-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698