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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.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/x64/lithium-x64.cc ('k') | src/crankshaft/x87/lithium-x87.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 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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 AllowDeferredHandleDereference vector_structure_check; 2669 AllowDeferredHandleDereference vector_structure_check;
2670 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2670 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2671 __ mov(vector_register, vector); 2671 __ mov(vector_register, vector);
2672 // No need to allocate this register. 2672 // No need to allocate this register.
2673 FeedbackVectorSlot slot = instr->hydrogen()->slot(); 2673 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2674 int index = vector->GetIndex(slot); 2674 int index = vector->GetIndex(slot);
2675 __ mov(slot_register, Immediate(Smi::FromInt(index))); 2675 __ mov(slot_register, Immediate(Smi::FromInt(index)));
2676 } 2676 }
2677 2677
2678 2678
2679 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2680 DCHECK(ToRegister(instr->context()).is(esi));
2681 DCHECK(ToRegister(instr->result()).is(eax));
2682
2683 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2684 Handle<Code> ic =
2685 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2686 .code();
2687 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2688 }
2689
2690
2691 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2679 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2692 Register context = ToRegister(instr->context()); 2680 Register context = ToRegister(instr->context());
2693 Register result = ToRegister(instr->result()); 2681 Register result = ToRegister(instr->result());
2694 __ mov(result, ContextOperand(context, instr->slot_index())); 2682 __ mov(result, ContextOperand(context, instr->slot_index()));
2695 2683
2696 if (instr->hydrogen()->RequiresHoleCheck()) { 2684 if (instr->hydrogen()->RequiresHoleCheck()) {
2697 __ cmp(result, factory()->the_hole_value()); 2685 __ cmp(result, factory()->the_hole_value());
2698 if (instr->hydrogen()->DeoptimizesOnHole()) { 2686 if (instr->hydrogen()->DeoptimizesOnHole()) {
2699 DeoptimizeIf(equal, instr, DeoptimizeReason::kHole); 2687 DeoptimizeIf(equal, instr, DeoptimizeReason::kHole);
2700 } else { 2688 } else {
(...skipping 3023 matching lines...) Expand 10 before | Expand all | Expand 10 after
5724 __ bind(deferred->exit()); 5712 __ bind(deferred->exit());
5725 __ bind(&done); 5713 __ bind(&done);
5726 } 5714 }
5727 5715
5728 #undef __ 5716 #undef __
5729 5717
5730 } // namespace internal 5718 } // namespace internal
5731 } // namespace v8 5719 } // namespace v8
5732 5720
5733 #endif // V8_TARGET_ARCH_X87 5721 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-x64.cc ('k') | src/crankshaft/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698