| 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 4143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4154 } | 4154 } |
| 4155 } | 4155 } |
| 4156 | 4156 |
| 4157 | 4157 |
| 4158 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 4158 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
| 4159 DCHECK(ToRegister(instr->context()).is(esi)); | 4159 DCHECK(ToRegister(instr->context()).is(esi)); |
| 4160 DCHECK(ToRegister(instr->function()).is(edi)); | 4160 DCHECK(ToRegister(instr->function()).is(edi)); |
| 4161 DCHECK(ToRegister(instr->result()).is(eax)); | 4161 DCHECK(ToRegister(instr->result()).is(eax)); |
| 4162 | 4162 |
| 4163 int arity = instr->arity(); | 4163 int arity = instr->arity(); |
| 4164 ConvertReceiverMode mode = instr->hydrogen()->convert_mode(); |
| 4164 if (instr->hydrogen()->HasVectorAndSlot()) { | 4165 if (instr->hydrogen()->HasVectorAndSlot()) { |
| 4165 Register slot_register = ToRegister(instr->temp_slot()); | 4166 Register slot_register = ToRegister(instr->temp_slot()); |
| 4166 Register vector_register = ToRegister(instr->temp_vector()); | 4167 Register vector_register = ToRegister(instr->temp_vector()); |
| 4167 DCHECK(slot_register.is(edx)); | 4168 DCHECK(slot_register.is(edx)); |
| 4168 DCHECK(vector_register.is(ebx)); | 4169 DCHECK(vector_register.is(ebx)); |
| 4169 | 4170 |
| 4170 AllowDeferredHandleDereference vector_structure_check; | 4171 AllowDeferredHandleDereference vector_structure_check; |
| 4171 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); | 4172 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
| 4172 int index = vector->GetIndex(instr->hydrogen()->slot()); | 4173 int index = vector->GetIndex(instr->hydrogen()->slot()); |
| 4173 | 4174 |
| 4174 __ mov(vector_register, vector); | 4175 __ mov(vector_register, vector); |
| 4175 __ mov(slot_register, Immediate(Smi::FromInt(index))); | 4176 __ mov(slot_register, Immediate(Smi::FromInt(index))); |
| 4176 | 4177 |
| 4177 Handle<Code> ic = | 4178 Handle<Code> ic = |
| 4178 CodeFactory::CallICInOptimizedCode(isolate(), arity).code(); | 4179 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); |
| 4179 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4180 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 4180 } else { | 4181 } else { |
| 4181 __ Set(eax, arity); | 4182 __ Set(eax, arity); |
| 4182 CallCode(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET, instr); | 4183 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); |
| 4183 } | 4184 } |
| 4184 } | 4185 } |
| 4185 | 4186 |
| 4186 | 4187 |
| 4187 void LCodeGen::DoCallNew(LCallNew* instr) { | 4188 void LCodeGen::DoCallNew(LCallNew* instr) { |
| 4188 DCHECK(ToRegister(instr->context()).is(esi)); | 4189 DCHECK(ToRegister(instr->context()).is(esi)); |
| 4189 DCHECK(ToRegister(instr->constructor()).is(edi)); | 4190 DCHECK(ToRegister(instr->constructor()).is(edi)); |
| 4190 DCHECK(ToRegister(instr->result()).is(eax)); | 4191 DCHECK(ToRegister(instr->result()).is(eax)); |
| 4191 | 4192 |
| 4192 // No cell in ebx for construct type feedback in optimized code | 4193 // No cell in ebx for construct type feedback in optimized code |
| (...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6264 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6265 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6265 } | 6266 } |
| 6266 | 6267 |
| 6267 | 6268 |
| 6268 #undef __ | 6269 #undef __ |
| 6269 | 6270 |
| 6270 } // namespace internal | 6271 } // namespace internal |
| 6271 } // namespace v8 | 6272 } // namespace v8 |
| 6272 | 6273 |
| 6273 #endif // V8_TARGET_ARCH_X87 | 6274 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |