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

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

Issue 1335453002: X87: [calls] Consistent call protocol for calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/lithium-codegen-x87.cc
diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc
index 1b5b176be134ad9034a0d0a9032ed05bc7e2c6a3..b3dc919dff935171fdb43533dce6b2fbadfb4d4f 100644
--- a/src/x87/lithium-codegen-x87.cc
+++ b/src/x87/lithium-codegen-x87.cc
@@ -3611,11 +3611,8 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
// Change context.
__ 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.
- if (dont_adapt_arguments) {
- __ mov(eax, arity);
- }
+ // Always initialize eax to the number of actual arguments.
+ __ mov(eax, arity);
// Invoke function directly.
if (function.is_identical_to(info()->closure())) {
@@ -3677,9 +3674,7 @@ void LCodeGen::DoCallJSFunction(LCallJSFunction* instr) {
DCHECK(ToRegister(instr->function()).is(edi));
DCHECK(ToRegister(instr->result()).is(eax));
- if (instr->hydrogen()->pass_argument_count()) {
- __ mov(eax, instr->arity());
- }
+ __ mov(eax, instr->arity());
// Change context.
__ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
« no previous file with comments | « no previous file | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698