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

Side by Side Diff: src/crankshaft/s390/lithium-codegen-s390.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/ppc/lithium-ppc.cc ('k') | src/crankshaft/s390/lithium-s390.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 // 2 //
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" 6 #include "src/crankshaft/s390/lithium-codegen-s390.h"
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2628 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 2639
2640 AllowDeferredHandleDereference vector_structure_check; 2640 AllowDeferredHandleDereference vector_structure_check;
2641 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2641 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2642 __ Move(vector_register, vector); 2642 __ Move(vector_register, vector);
2643 // No need to allocate this register. 2643 // No need to allocate this register.
2644 FeedbackVectorSlot slot = instr->hydrogen()->slot(); 2644 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2645 int index = vector->GetIndex(slot); 2645 int index = vector->GetIndex(slot);
2646 __ LoadSmiLiteral(slot_register, Smi::FromInt(index)); 2646 __ LoadSmiLiteral(slot_register, Smi::FromInt(index));
2647 } 2647 }
2648 2648
2649 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2650 DCHECK(ToRegister(instr->context()).is(cp));
2651 DCHECK(ToRegister(instr->result()).is(r2));
2652
2653 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2654 Handle<Code> ic =
2655 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2656 .code();
2657 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2658 }
2659
2660 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2649 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2661 Register context = ToRegister(instr->context()); 2650 Register context = ToRegister(instr->context());
2662 Register result = ToRegister(instr->result()); 2651 Register result = ToRegister(instr->result());
2663 __ LoadP(result, ContextMemOperand(context, instr->slot_index())); 2652 __ LoadP(result, ContextMemOperand(context, instr->slot_index()));
2664 if (instr->hydrogen()->RequiresHoleCheck()) { 2653 if (instr->hydrogen()->RequiresHoleCheck()) {
2665 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 2654 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
2666 if (instr->hydrogen()->DeoptimizesOnHole()) { 2655 if (instr->hydrogen()->DeoptimizesOnHole()) {
2667 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole); 2656 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole);
2668 } else { 2657 } else {
2669 Label skip; 2658 Label skip;
(...skipping 2954 matching lines...) Expand 10 before | Expand all | Expand 10 after
5624 __ LoadP(result, 5613 __ LoadP(result,
5625 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5614 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5626 __ bind(deferred->exit()); 5615 __ bind(deferred->exit());
5627 __ bind(&done); 5616 __ bind(&done);
5628 } 5617 }
5629 5618
5630 #undef __ 5619 #undef __
5631 5620
5632 } // namespace internal 5621 } // namespace internal
5633 } // namespace v8 5622 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-ppc.cc ('k') | src/crankshaft/s390/lithium-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698