| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 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 3108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3119 if (instr->hydrogen()->RequiresHoleCheck()) { | 3119 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 3120 __ cmp(result, factory()->the_hole_value()); | 3120 __ cmp(result, factory()->the_hole_value()); |
| 3121 DeoptimizeIf(equal, instr, "hole"); | 3121 DeoptimizeIf(equal, instr, "hole"); |
| 3122 } | 3122 } |
| 3123 } | 3123 } |
| 3124 | 3124 |
| 3125 | 3125 |
| 3126 template <class T> | 3126 template <class T> |
| 3127 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { | 3127 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { |
| 3128 DCHECK(FLAG_vector_ics); | 3128 DCHECK(FLAG_vector_ics); |
| 3129 Register vector = ToRegister(instr->temp_vector()); | 3129 Register vector_register = ToRegister(instr->temp_vector()); |
| 3130 DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister())); | 3130 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister())); |
| 3131 __ mov(vector, instr->hydrogen()->feedback_vector()); | 3131 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
| 3132 __ mov(vector_register, vector); |
| 3132 // No need to allocate this register. | 3133 // No need to allocate this register. |
| 3133 DCHECK(VectorLoadICDescriptor::SlotRegister().is(eax)); | 3134 DCHECK(VectorLoadICDescriptor::SlotRegister().is(eax)); |
| 3135 int index = vector->GetIndex(instr->hydrogen()->slot()); |
| 3134 __ mov(VectorLoadICDescriptor::SlotRegister(), | 3136 __ mov(VectorLoadICDescriptor::SlotRegister(), |
| 3135 Immediate(Smi::FromInt(instr->hydrogen()->slot().ToInt()))); | 3137 Immediate(Smi::FromInt(index))); |
| 3136 } | 3138 } |
| 3137 | 3139 |
| 3138 | 3140 |
| 3139 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 3141 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 3140 DCHECK(ToRegister(instr->context()).is(esi)); | 3142 DCHECK(ToRegister(instr->context()).is(esi)); |
| 3141 DCHECK(ToRegister(instr->global_object()) | 3143 DCHECK(ToRegister(instr->global_object()) |
| 3142 .is(LoadDescriptor::ReceiverRegister())); | 3144 .is(LoadDescriptor::ReceiverRegister())); |
| 3143 DCHECK(ToRegister(instr->result()).is(eax)); | 3145 DCHECK(ToRegister(instr->result()).is(eax)); |
| 3144 | 3146 |
| 3145 __ mov(LoadDescriptor::NameRegister(), instr->name()); | 3147 __ mov(LoadDescriptor::NameRegister(), instr->name()); |
| (...skipping 3151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6297 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6299 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6298 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6300 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6299 } | 6301 } |
| 6300 | 6302 |
| 6301 | 6303 |
| 6302 #undef __ | 6304 #undef __ |
| 6303 | 6305 |
| 6304 } } // namespace v8::internal | 6306 } } // namespace v8::internal |
| 6305 | 6307 |
| 6306 #endif // V8_TARGET_ARCH_X87 | 6308 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |