| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |