| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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 2810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2821 if (instr->hydrogen()->RequiresHoleCheck()) { | 2821 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2822 __ cmp(result, factory()->the_hole_value()); | 2822 __ cmp(result, factory()->the_hole_value()); |
| 2823 DeoptimizeIf(equal, instr, "hole"); | 2823 DeoptimizeIf(equal, instr, "hole"); |
| 2824 } | 2824 } |
| 2825 } | 2825 } |
| 2826 | 2826 |
| 2827 | 2827 |
| 2828 template <class T> | 2828 template <class T> |
| 2829 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { | 2829 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { |
| 2830 DCHECK(FLAG_vector_ics); | 2830 DCHECK(FLAG_vector_ics); |
| 2831 Register vector = ToRegister(instr->temp_vector()); | 2831 Register vector_register = ToRegister(instr->temp_vector()); |
| 2832 DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister())); | 2832 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister())); |
| 2833 __ mov(vector, instr->hydrogen()->feedback_vector()); | 2833 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
| 2834 __ mov(vector_register, vector); |
| 2834 // No need to allocate this register. | 2835 // No need to allocate this register. |
| 2835 DCHECK(VectorLoadICDescriptor::SlotRegister().is(eax)); | 2836 DCHECK(VectorLoadICDescriptor::SlotRegister().is(eax)); |
| 2837 int index = vector->GetIndex(instr->hydrogen()->slot()); |
| 2836 __ mov(VectorLoadICDescriptor::SlotRegister(), | 2838 __ mov(VectorLoadICDescriptor::SlotRegister(), |
| 2837 Immediate(Smi::FromInt(instr->hydrogen()->slot().ToInt()))); | 2839 Immediate(Smi::FromInt(index))); |
| 2838 } | 2840 } |
| 2839 | 2841 |
| 2840 | 2842 |
| 2841 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2843 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2842 DCHECK(ToRegister(instr->context()).is(esi)); | 2844 DCHECK(ToRegister(instr->context()).is(esi)); |
| 2843 DCHECK(ToRegister(instr->global_object()) | 2845 DCHECK(ToRegister(instr->global_object()) |
| 2844 .is(LoadDescriptor::ReceiverRegister())); | 2846 .is(LoadDescriptor::ReceiverRegister())); |
| 2845 DCHECK(ToRegister(instr->result()).is(eax)); | 2847 DCHECK(ToRegister(instr->result()).is(eax)); |
| 2846 | 2848 |
| 2847 __ mov(LoadDescriptor::NameRegister(), instr->name()); | 2849 __ mov(LoadDescriptor::NameRegister(), instr->name()); |
| (...skipping 2850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5698 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5700 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5699 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5701 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5700 } | 5702 } |
| 5701 | 5703 |
| 5702 | 5704 |
| 5703 #undef __ | 5705 #undef __ |
| 5704 | 5706 |
| 5705 } } // namespace v8::internal | 5707 } } // namespace v8::internal |
| 5706 | 5708 |
| 5707 #endif // V8_TARGET_ARCH_IA32 | 5709 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |