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

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

Issue 2396023002: [crankshaft] Remove HLoadGlobalGeneric and use HCallWithDescriptor instead to call LoadGlobalIC. (Closed)
Patch Set: Created 4 years, 2 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/mips64/lithium-mips64.cc ('k') | src/crankshaft/ppc/lithium-ppc.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 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 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after
2664 AllowDeferredHandleDereference vector_structure_check; 2664 AllowDeferredHandleDereference vector_structure_check;
2665 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2665 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2666 __ Move(vector_register, vector); 2666 __ Move(vector_register, vector);
2667 // No need to allocate this register. 2667 // No need to allocate this register.
2668 FeedbackVectorSlot slot = instr->hydrogen()->slot(); 2668 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2669 int index = vector->GetIndex(slot); 2669 int index = vector->GetIndex(slot);
2670 __ LoadSmiLiteral(slot_register, Smi::FromInt(index)); 2670 __ LoadSmiLiteral(slot_register, Smi::FromInt(index));
2671 } 2671 }
2672 2672
2673 2673
2674 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2675 DCHECK(ToRegister(instr->context()).is(cp));
2676 DCHECK(ToRegister(instr->result()).is(r3));
2677
2678 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2679 Handle<Code> ic =
2680 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2681 .code();
2682 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2683 }
2684
2685
2686 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2674 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2687 Register context = ToRegister(instr->context()); 2675 Register context = ToRegister(instr->context());
2688 Register result = ToRegister(instr->result()); 2676 Register result = ToRegister(instr->result());
2689 __ LoadP(result, ContextMemOperand(context, instr->slot_index())); 2677 __ LoadP(result, ContextMemOperand(context, instr->slot_index()));
2690 if (instr->hydrogen()->RequiresHoleCheck()) { 2678 if (instr->hydrogen()->RequiresHoleCheck()) {
2691 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 2679 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2692 if (instr->hydrogen()->DeoptimizesOnHole()) { 2680 if (instr->hydrogen()->DeoptimizesOnHole()) {
2693 __ cmp(result, ip); 2681 __ cmp(result, ip);
2694 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole); 2682 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole);
2695 } else { 2683 } else {
(...skipping 3036 matching lines...) Expand 10 before | Expand all | Expand 10 after
5732 __ LoadP(result, 5720 __ LoadP(result,
5733 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5721 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5734 __ bind(deferred->exit()); 5722 __ bind(deferred->exit());
5735 __ bind(&done); 5723 __ bind(&done);
5736 } 5724 }
5737 5725
5738 #undef __ 5726 #undef __
5739 5727
5740 } // namespace internal 5728 } // namespace internal
5741 } // namespace v8 5729 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-mips64.cc ('k') | src/crankshaft/ppc/lithium-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698