| 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 3986 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3997     __ InvokeFunction(edi, no_reg, count, CALL_FUNCTION, generator); | 3997     __ InvokeFunction(edi, no_reg, count, CALL_FUNCTION, generator); | 
| 3998   } else { | 3998   } else { | 
| 3999     CallKnownFunction(known_function, | 3999     CallKnownFunction(known_function, | 
| 4000                       instr->hydrogen()->formal_parameter_count(), | 4000                       instr->hydrogen()->formal_parameter_count(), | 
| 4001                       instr->arity(), instr); | 4001                       instr->arity(), instr); | 
| 4002   } | 4002   } | 
| 4003 } | 4003 } | 
| 4004 | 4004 | 
| 4005 | 4005 | 
| 4006 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 4006 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 
|  | 4007   HCallFunction* hinstr = instr->hydrogen(); | 
| 4007   DCHECK(ToRegister(instr->context()).is(esi)); | 4008   DCHECK(ToRegister(instr->context()).is(esi)); | 
| 4008   DCHECK(ToRegister(instr->function()).is(edi)); | 4009   DCHECK(ToRegister(instr->function()).is(edi)); | 
| 4009   DCHECK(ToRegister(instr->result()).is(eax)); | 4010   DCHECK(ToRegister(instr->result()).is(eax)); | 
| 4010 | 4011 | 
| 4011   int arity = instr->arity(); | 4012   int arity = instr->arity(); | 
| 4012   ConvertReceiverMode mode = instr->hydrogen()->convert_mode(); | 4013   ConvertReceiverMode mode = hinstr->convert_mode(); | 
| 4013   if (instr->hydrogen()->HasVectorAndSlot()) { | 4014   TailCallMode tail_call_mode = hinstr->tail_call_mode(); | 
|  | 4015   if (hinstr->HasVectorAndSlot()) { | 
| 4014     Register slot_register = ToRegister(instr->temp_slot()); | 4016     Register slot_register = ToRegister(instr->temp_slot()); | 
| 4015     Register vector_register = ToRegister(instr->temp_vector()); | 4017     Register vector_register = ToRegister(instr->temp_vector()); | 
| 4016     DCHECK(slot_register.is(edx)); | 4018     DCHECK(slot_register.is(edx)); | 
| 4017     DCHECK(vector_register.is(ebx)); | 4019     DCHECK(vector_register.is(ebx)); | 
| 4018 | 4020 | 
| 4019     AllowDeferredHandleDereference vector_structure_check; | 4021     AllowDeferredHandleDereference vector_structure_check; | 
| 4020     Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); | 4022     Handle<TypeFeedbackVector> vector = hinstr->feedback_vector(); | 
| 4021     int index = vector->GetIndex(instr->hydrogen()->slot()); | 4023     int index = vector->GetIndex(hinstr->slot()); | 
| 4022 | 4024 | 
| 4023     __ mov(vector_register, vector); | 4025     __ mov(vector_register, vector); | 
| 4024     __ mov(slot_register, Immediate(Smi::FromInt(index))); | 4026     __ mov(slot_register, Immediate(Smi::FromInt(index))); | 
| 4025 | 4027 | 
| 4026     Handle<Code> ic = | 4028     Handle<Code> ic = CodeFactory::CallICInOptimizedCode(isolate(), arity, mode, | 
| 4027         CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); | 4029                                                          tail_call_mode) | 
|  | 4030                           .code(); | 
| 4028     CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4031     CallCode(ic, RelocInfo::CODE_TARGET, instr); | 
| 4029   } else { | 4032   } else { | 
| 4030     __ Set(eax, arity); | 4033     __ Set(eax, arity); | 
| 4031     CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); | 4034     CallCode(isolate()->builtins()->Call(mode, tail_call_mode), | 
|  | 4035              RelocInfo::CODE_TARGET, instr); | 
| 4032   } | 4036   } | 
| 4033 } | 4037 } | 
| 4034 | 4038 | 
| 4035 | 4039 | 
| 4036 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 4040 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 
| 4037   DCHECK(ToRegister(instr->context()).is(esi)); | 4041   DCHECK(ToRegister(instr->context()).is(esi)); | 
| 4038   DCHECK(ToRegister(instr->constructor()).is(edi)); | 4042   DCHECK(ToRegister(instr->constructor()).is(edi)); | 
| 4039   DCHECK(ToRegister(instr->result()).is(eax)); | 4043   DCHECK(ToRegister(instr->result()).is(eax)); | 
| 4040 | 4044 | 
| 4041   __ Move(eax, Immediate(instr->arity())); | 4045   __ Move(eax, Immediate(instr->arity())); | 
| (...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6013   RecordSafepoint(Safepoint::kNoLazyDeopt); | 6017   RecordSafepoint(Safepoint::kNoLazyDeopt); | 
| 6014 } | 6018 } | 
| 6015 | 6019 | 
| 6016 | 6020 | 
| 6017 #undef __ | 6021 #undef __ | 
| 6018 | 6022 | 
| 6019 }  // namespace internal | 6023 }  // namespace internal | 
| 6020 }  // namespace v8 | 6024 }  // namespace v8 | 
| 6021 | 6025 | 
| 6022 #endif  // V8_TARGET_ARCH_X87 | 6026 #endif  // V8_TARGET_ARCH_X87 | 
| OLD | NEW | 
|---|