Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Unified Diff: src/ia32/lithium-codegen-ia32.cc

Issue 817483005: LCodeGen::CallKnownFunction gets the function in register. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix arm Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/lithium-codegen-ia32.h ('k') | src/mips/lithium-codegen-mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « src/ia32/lithium-codegen-ia32.h ('k') | src/mips/lithium-codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698