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

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

Issue 1330033002: [calls] Consistent call protocol for calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add arm64, mips and mips64 ports. 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 | « src/mips64/macro-assembler-mips64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index 250589097452890ef6631493e43d4ccf17269d27..4557ce13be052dbf5af806962863908581899e6a 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -3411,11 +3411,8 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
// Change context.
__ movp(rsi, FieldOperand(function_reg, JSFunction::kContextOffset));
- // Set rax to arguments count if adaption is not needed. Assumes that rax
- // is available to write to at this point.
- if (dont_adapt_arguments) {
- __ Set(rax, arity);
- }
+ // Always initialize rax to the number of actual arguments.
+ __ Set(rax, arity);
// Invoke function.
if (function.is_identical_to(info()->closure())) {
@@ -3478,9 +3475,7 @@ void LCodeGen::DoCallJSFunction(LCallJSFunction* instr) {
DCHECK(ToRegister(instr->function()).is(rdi));
DCHECK(ToRegister(instr->result()).is(rax));
- if (instr->hydrogen()->pass_argument_count()) {
- __ Set(rax, instr->arity());
- }
+ __ Set(rax, instr->arity());
// Change context.
__ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698