| Index: src/x87/lithium-codegen-x87.cc
|
| diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc
|
| index c292bb94b3d3a759188e1abdbb7708bf01599393..d30a90891af344ddb57ed9c3e4631bac6d728aab 100644
|
| --- a/src/x87/lithium-codegen-x87.cc
|
| +++ b/src/x87/lithium-codegen-x87.cc
|
| @@ -3693,22 +3693,18 @@ void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
|
|
|
|
|
| void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
|
| - int formal_parameter_count,
|
| - int arity,
|
| - LInstruction* instr,
|
| - EDIState edi_state) {
|
| + int formal_parameter_count, int arity,
|
| + LInstruction* instr) {
|
| bool dont_adapt_arguments =
|
| formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel;
|
| bool can_invoke_directly =
|
| dont_adapt_arguments || formal_parameter_count == arity;
|
|
|
| - if (can_invoke_directly) {
|
| - if (edi_state == EDI_UNINITIALIZED) {
|
| - __ LoadHeapObject(edi, function);
|
| - }
|
| + Register function_reg = edi;
|
|
|
| + if (can_invoke_directly) {
|
| // Change context.
|
| - __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
|
| + __ mov(esi, FieldOperand(function_reg, JSFunction::kContextOffset));
|
|
|
| // Set eax to arguments count if adaption is not needed. Assumes that eax
|
| // is available to write to at this point.
|
| @@ -3720,7 +3716,7 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
|
| if (function.is_identical_to(info()->closure())) {
|
| __ CallSelf();
|
| } else {
|
| - __ call(FieldOperand(edi, JSFunction::kCodeEntryOffset));
|
| + __ call(FieldOperand(function_reg, JSFunction::kCodeEntryOffset));
|
| }
|
| RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT);
|
| } else {
|
| @@ -3730,7 +3726,7 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
|
| this, pointers, Safepoint::kLazyDeopt);
|
| ParameterCount count(arity);
|
| ParameterCount expected(formal_parameter_count);
|
| - __ InvokeFunction(function, expected, count, CALL_FUNCTION, generator);
|
| + __ InvokeFunction(function_reg, expected, count, CALL_FUNCTION, generator);
|
| }
|
| }
|
|
|
| @@ -4355,9 +4351,7 @@ void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) {
|
| } else {
|
| CallKnownFunction(known_function,
|
| instr->hydrogen()->formal_parameter_count(),
|
| - instr->arity(),
|
| - instr,
|
| - EDI_CONTAINS_TARGET);
|
| + instr->arity(), instr);
|
| }
|
| }
|
|
|
|
|