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

Side by Side Diff: src/crankshaft/mips/lithium-codegen-mips.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/ia32/lithium-ia32.cc ('k') | src/crankshaft/mips/lithium-mips.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2503 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 2514
2515 2515
2516 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2516 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2517 DCHECK(ToRegister(instr->context()).is(cp)); 2517 DCHECK(ToRegister(instr->context()).is(cp));
2518 DCHECK(ToRegister(instr->global_object()) 2518 DCHECK(ToRegister(instr->global_object())
2519 .is(LoadDescriptor::ReceiverRegister())); 2519 .is(LoadDescriptor::ReceiverRegister()));
2520 DCHECK(ToRegister(instr->result()).is(v0)); 2520 DCHECK(ToRegister(instr->result()).is(v0));
2521 2521
2522 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 2522 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
2523 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2523 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2524 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 2524 Handle<Code> ic =
2525 isolate(), instr->typeof_mode(), PREMONOMORPHIC) 2525 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode())
2526 .code(); 2526 .code();
2527 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2527 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2528 } 2528 }
2529 2529
2530 2530
2531 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2531 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2532 Register context = ToRegister(instr->context()); 2532 Register context = ToRegister(instr->context());
2533 Register result = ToRegister(instr->result()); 2533 Register result = ToRegister(instr->result());
2534 2534
2535 __ lw(result, ContextMemOperand(context, instr->slot_index())); 2535 __ lw(result, ContextMemOperand(context, instr->slot_index()));
2536 if (instr->hydrogen()->RequiresHoleCheck()) { 2536 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
2615 2615
2616 2616
2617 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2617 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2618 DCHECK(ToRegister(instr->context()).is(cp)); 2618 DCHECK(ToRegister(instr->context()).is(cp));
2619 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 2619 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2620 DCHECK(ToRegister(instr->result()).is(v0)); 2620 DCHECK(ToRegister(instr->result()).is(v0));
2621 2621
2622 // Name is always in a2. 2622 // Name is always in a2.
2623 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 2623 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
2624 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 2624 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2625 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 2625 Handle<Code> ic =
2626 isolate(), NOT_INSIDE_TYPEOF, 2626 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code();
2627 instr->hydrogen()->initialization_state())
2628 .code();
2629 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2627 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2630 } 2628 }
2631 2629
2632 2630
2633 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2631 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2634 Register scratch = scratch0(); 2632 Register scratch = scratch0();
2635 Register function = ToRegister(instr->function()); 2633 Register function = ToRegister(instr->function());
2636 Register result = ToRegister(instr->result()); 2634 Register result = ToRegister(instr->result());
2637 2635
2638 // Get the prototype or initial map from the function. 2636 // Get the prototype or initial map from the function.
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
2923 return MemOperand(scratch0(), base_offset); 2921 return MemOperand(scratch0(), base_offset);
2924 } 2922 }
2925 } 2923 }
2926 2924
2927 2925
2928 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 2926 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
2929 DCHECK(ToRegister(instr->context()).is(cp)); 2927 DCHECK(ToRegister(instr->context()).is(cp));
2930 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 2928 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2931 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 2929 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
2932 2930
2933 if (instr->hydrogen()->HasVectorAndSlot()) { 2931 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
2934 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
2935 }
2936 2932
2937 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( 2933 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code();
2938 isolate(), instr->hydrogen()->initialization_state())
2939 .code();
2940 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2934 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2941 } 2935 }
2942 2936
2943 2937
2944 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 2938 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
2945 Register scratch = scratch0(); 2939 Register scratch = scratch0();
2946 Register temp = scratch1(); 2940 Register temp = scratch1();
2947 Register result = ToRegister(instr->result()); 2941 Register result = ToRegister(instr->result());
2948 2942
2949 if (instr->hydrogen()->from_inlined()) { 2943 if (instr->hydrogen()->from_inlined()) {
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
3802 } 3796 }
3803 } 3797 }
3804 } 3798 }
3805 3799
3806 3800
3807 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 3801 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
3808 DCHECK(ToRegister(instr->context()).is(cp)); 3802 DCHECK(ToRegister(instr->context()).is(cp));
3809 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 3803 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
3810 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 3804 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
3811 3805
3812 if (instr->hydrogen()->HasVectorAndSlot()) { 3806 EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr);
3813 EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr);
3814 }
3815 3807
3816 __ li(StoreDescriptor::NameRegister(), Operand(instr->name())); 3808 __ li(StoreDescriptor::NameRegister(), Operand(instr->name()));
3817 Handle<Code> ic = CodeFactory::StoreICInOptimizedCode( 3809 Handle<Code> ic =
3818 isolate(), instr->language_mode(), 3810 CodeFactory::StoreICInOptimizedCode(isolate(), instr->language_mode())
3819 instr->hydrogen()->initialization_state()).code(); 3811 .code();
3820 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3812 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3821 } 3813 }
3822 3814
3823 3815
3824 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 3816 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
3825 Condition cc = instr->hydrogen()->allow_equality() ? hi : hs; 3817 Condition cc = instr->hydrogen()->allow_equality() ? hi : hs;
3826 Operand operand(0); 3818 Operand operand(0);
3827 Register reg; 3819 Register reg;
3828 if (instr->index()->IsConstantOperand()) { 3820 if (instr->index()->IsConstantOperand()) {
3829 operand = ToOperand(instr->index()); 3821 operand = ToOperand(instr->index());
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
4030 } 4022 }
4031 } 4023 }
4032 4024
4033 4025
4034 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 4026 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4035 DCHECK(ToRegister(instr->context()).is(cp)); 4027 DCHECK(ToRegister(instr->context()).is(cp));
4036 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 4028 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4037 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister())); 4029 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
4038 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 4030 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4039 4031
4040 if (instr->hydrogen()->HasVectorAndSlot()) { 4032 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
4041 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
4042 }
4043 4033
4044 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode( 4034 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
4045 isolate(), instr->language_mode(), 4035 isolate(), instr->language_mode())
4046 instr->hydrogen()->initialization_state()).code(); 4036 .code();
4047 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4037 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4048 } 4038 }
4049 4039
4050 4040
4051 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) { 4041 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
4052 class DeferredMaybeGrowElements final : public LDeferredCode { 4042 class DeferredMaybeGrowElements final : public LDeferredCode {
4053 public: 4043 public:
4054 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr) 4044 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr)
4055 : LDeferredCode(codegen), instr_(instr) {} 4045 : LDeferredCode(codegen), instr_(instr) {}
4056 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); } 4046 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); }
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
5568 __ lw(result, FieldMemOperand(scratch, 5558 __ lw(result, FieldMemOperand(scratch,
5569 FixedArray::kHeaderSize - kPointerSize)); 5559 FixedArray::kHeaderSize - kPointerSize));
5570 __ bind(deferred->exit()); 5560 __ bind(deferred->exit());
5571 __ bind(&done); 5561 __ bind(&done);
5572 } 5562 }
5573 5563
5574 #undef __ 5564 #undef __
5575 5565
5576 } // namespace internal 5566 } // namespace internal
5577 } // namespace v8 5567 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-ia32.cc ('k') | src/crankshaft/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698