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

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

Issue 2019313003: IC: Eliminate initialization_state as a factor in IC installation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed compile error. Created 4 years, 6 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/mips/lithium-mips.cc ('k') | src/crankshaft/mips64/lithium-mips64.cc » ('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/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after
2634 2634
2635 2635
2636 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2636 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2637 DCHECK(ToRegister(instr->context()).is(cp)); 2637 DCHECK(ToRegister(instr->context()).is(cp));
2638 DCHECK(ToRegister(instr->global_object()) 2638 DCHECK(ToRegister(instr->global_object())
2639 .is(LoadDescriptor::ReceiverRegister())); 2639 .is(LoadDescriptor::ReceiverRegister()));
2640 DCHECK(ToRegister(instr->result()).is(v0)); 2640 DCHECK(ToRegister(instr->result()).is(v0));
2641 2641
2642 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 2642 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
2643 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2643 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2644 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 2644 Handle<Code> ic =
2645 isolate(), instr->typeof_mode(), PREMONOMORPHIC) 2645 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode())
2646 .code(); 2646 .code();
2647 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2647 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2648 } 2648 }
2649 2649
2650 2650
2651 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2651 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2652 Register context = ToRegister(instr->context()); 2652 Register context = ToRegister(instr->context());
2653 Register result = ToRegister(instr->result()); 2653 Register result = ToRegister(instr->result());
2654 2654
2655 __ ld(result, ContextMemOperand(context, instr->slot_index())); 2655 __ ld(result, ContextMemOperand(context, instr->slot_index()));
2656 if (instr->hydrogen()->RequiresHoleCheck()) { 2656 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
2750 2750
2751 2751
2752 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2752 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2753 DCHECK(ToRegister(instr->context()).is(cp)); 2753 DCHECK(ToRegister(instr->context()).is(cp));
2754 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 2754 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2755 DCHECK(ToRegister(instr->result()).is(v0)); 2755 DCHECK(ToRegister(instr->result()).is(v0));
2756 2756
2757 // Name is always in a2. 2757 // Name is always in a2.
2758 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 2758 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
2759 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 2759 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2760 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 2760 Handle<Code> ic =
2761 isolate(), NOT_INSIDE_TYPEOF, 2761 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code();
2762 instr->hydrogen()->initialization_state())
2763 .code();
2764 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2762 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2765 } 2763 }
2766 2764
2767 2765
2768 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2766 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2769 Register scratch = scratch0(); 2767 Register scratch = scratch0();
2770 Register function = ToRegister(instr->function()); 2768 Register function = ToRegister(instr->function());
2771 Register result = ToRegister(instr->result()); 2769 Register result = ToRegister(instr->result());
2772 2770
2773 // Get the prototype or initial map from the function. 2771 // Get the prototype or initial map from the function.
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
3102 return MemOperand(scratch0(), base_offset); 3100 return MemOperand(scratch0(), base_offset);
3103 } 3101 }
3104 } 3102 }
3105 3103
3106 3104
3107 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3105 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3108 DCHECK(ToRegister(instr->context()).is(cp)); 3106 DCHECK(ToRegister(instr->context()).is(cp));
3109 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3107 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3110 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3108 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3111 3109
3112 if (instr->hydrogen()->HasVectorAndSlot()) { 3110 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3113 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3114 }
3115 3111
3116 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( 3112 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code();
3117 isolate(), instr->hydrogen()->initialization_state())
3118 .code();
3119 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3113 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3120 } 3114 }
3121 3115
3122 3116
3123 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3117 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3124 Register scratch = scratch0(); 3118 Register scratch = scratch0();
3125 Register temp = scratch1(); 3119 Register temp = scratch1();
3126 Register result = ToRegister(instr->result()); 3120 Register result = ToRegister(instr->result());
3127 3121
3128 if (instr->hydrogen()->from_inlined()) { 3122 if (instr->hydrogen()->from_inlined()) {
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
4010 instr->hydrogen()->PointersToHereCheckForValue()); 4004 instr->hydrogen()->PointersToHereCheckForValue());
4011 } 4005 }
4012 } 4006 }
4013 4007
4014 4008
4015 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 4009 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
4016 DCHECK(ToRegister(instr->context()).is(cp)); 4010 DCHECK(ToRegister(instr->context()).is(cp));
4017 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 4011 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4018 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 4012 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4019 4013
4020 if (instr->hydrogen()->HasVectorAndSlot()) { 4014 EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr);
4021 EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr);
4022 }
4023 4015
4024 __ li(StoreDescriptor::NameRegister(), Operand(instr->name())); 4016 __ li(StoreDescriptor::NameRegister(), Operand(instr->name()));
4025 Handle<Code> ic = CodeFactory::StoreICInOptimizedCode( 4017 Handle<Code> ic =
4026 isolate(), instr->language_mode(), 4018 CodeFactory::StoreICInOptimizedCode(isolate(), instr->language_mode())
4027 instr->hydrogen()->initialization_state()).code(); 4019 .code();
4028 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4020 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4029 } 4021 }
4030 4022
4031 4023
4032 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 4024 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
4033 Condition cc = instr->hydrogen()->allow_equality() ? hi : hs; 4025 Condition cc = instr->hydrogen()->allow_equality() ? hi : hs;
4034 Operand operand((int64_t)0); 4026 Operand operand((int64_t)0);
4035 Register reg; 4027 Register reg;
4036 if (instr->index()->IsConstantOperand()) { 4028 if (instr->index()->IsConstantOperand()) {
4037 operand = ToOperand(instr->index()); 4029 operand = ToOperand(instr->index());
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
4260 } 4252 }
4261 } 4253 }
4262 4254
4263 4255
4264 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 4256 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4265 DCHECK(ToRegister(instr->context()).is(cp)); 4257 DCHECK(ToRegister(instr->context()).is(cp));
4266 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 4258 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4267 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister())); 4259 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
4268 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 4260 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4269 4261
4270 if (instr->hydrogen()->HasVectorAndSlot()) { 4262 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
4271 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
4272 }
4273 4263
4274 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode( 4264 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
4275 isolate(), instr->language_mode(), 4265 isolate(), instr->language_mode())
4276 instr->hydrogen()->initialization_state()).code(); 4266 .code();
4277 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4267 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4278 } 4268 }
4279 4269
4280 4270
4281 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) { 4271 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
4282 class DeferredMaybeGrowElements final : public LDeferredCode { 4272 class DeferredMaybeGrowElements final : public LDeferredCode {
4283 public: 4273 public:
4284 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr) 4274 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr)
4285 : LDeferredCode(codegen), instr_(instr) {} 4275 : LDeferredCode(codegen), instr_(instr) {}
4286 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); } 4276 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); }
(...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after
5771 __ ld(result, FieldMemOperand(scratch, 5761 __ ld(result, FieldMemOperand(scratch,
5772 FixedArray::kHeaderSize - kPointerSize)); 5762 FixedArray::kHeaderSize - kPointerSize));
5773 __ bind(deferred->exit()); 5763 __ bind(deferred->exit());
5774 __ bind(&done); 5764 __ bind(&done);
5775 } 5765 }
5776 5766
5777 #undef __ 5767 #undef __
5778 5768
5779 } // namespace internal 5769 } // namespace internal
5780 } // namespace v8 5770 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-mips.cc ('k') | src/crankshaft/mips64/lithium-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698