Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 03a0d8a3df94b3d03234f6b037bec2f15ad7cf26..c4e0a9df406396918285493e150328c2ea725962 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -3407,22 +3407,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. |
@@ -3434,7 +3430,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 { |
@@ -3444,7 +3440,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); |
} |
} |
@@ -3936,9 +3932,7 @@ void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
} else { |
CallKnownFunction(known_function, |
instr->hydrogen()->formal_parameter_count(), |
- instr->arity(), |
- instr, |
- EDI_CONTAINS_TARGET); |
+ instr->arity(), instr); |
} |
} |