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

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

Issue 1912633002: [ic] Split LoadIC into LoadGlobalIC and LoadIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.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/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after
2697 2697
2698 2698
2699 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2699 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2700 DCHECK(ToRegister(instr->context()).is(cp)); 2700 DCHECK(ToRegister(instr->context()).is(cp));
2701 DCHECK(ToRegister(instr->global_object()) 2701 DCHECK(ToRegister(instr->global_object())
2702 .is(LoadDescriptor::ReceiverRegister())); 2702 .is(LoadDescriptor::ReceiverRegister()));
2703 DCHECK(ToRegister(instr->result()).is(r3)); 2703 DCHECK(ToRegister(instr->result()).is(r3));
2704 2704
2705 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 2705 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
2706 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2706 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2707 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 2707 Handle<Code> ic =
2708 isolate(), instr->typeof_mode()).code(); 2708 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2709 .code();
2709 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2710 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2710 } 2711 }
2711 2712
2712 2713
2713 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2714 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2714 Register context = ToRegister(instr->context()); 2715 Register context = ToRegister(instr->context());
2715 Register result = ToRegister(instr->result()); 2716 Register result = ToRegister(instr->result());
2716 __ LoadP(result, ContextMemOperand(context, instr->slot_index())); 2717 __ LoadP(result, ContextMemOperand(context, instr->slot_index()));
2717 if (instr->hydrogen()->RequiresHoleCheck()) { 2718 if (instr->hydrogen()->RequiresHoleCheck()) {
2718 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 2719 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
2813 2814
2814 2815
2815 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2816 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2816 DCHECK(ToRegister(instr->context()).is(cp)); 2817 DCHECK(ToRegister(instr->context()).is(cp));
2817 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 2818 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2818 DCHECK(ToRegister(instr->result()).is(r3)); 2819 DCHECK(ToRegister(instr->result()).is(r3));
2819 2820
2820 // Name is always in r5. 2821 // Name is always in r5.
2821 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 2822 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
2822 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 2823 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2823 Handle<Code> ic = 2824 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code();
2824 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code();
2825 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2825 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2826 } 2826 }
2827 2827
2828 2828
2829 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2829 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2830 Register scratch = scratch0(); 2830 Register scratch = scratch0();
2831 Register function = ToRegister(instr->function()); 2831 Register function = ToRegister(instr->function());
2832 Register result = ToRegister(instr->result()); 2832 Register result = ToRegister(instr->result());
2833 2833
2834 // Get the prototype or initial map from the function. 2834 // Get the prototype or initial map from the function.
(...skipping 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after
5811 __ LoadP(result, 5811 __ LoadP(result,
5812 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5812 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5813 __ bind(deferred->exit()); 5813 __ bind(deferred->exit());
5814 __ bind(&done); 5814 __ bind(&done);
5815 } 5815 }
5816 5816
5817 #undef __ 5817 #undef __
5818 5818
5819 } // namespace internal 5819 } // namespace internal
5820 } // namespace v8 5820 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698