Reviewers: Jarin,

Message:
Hey Jaro,

This unifies the handling of "actual number of arguments" for JSFunction calls. It basically removes premature optimization (saving one LoadImmediate for some
calls).
Please take a look.

Thanks,
Benedikt

Description:
[calls] Consistent call protocol for calls.

The number of actual arguments should always be available, there's no
point in trying to optimize away a simple assignment of an immediate to
a register before some calls.

The main motivation is to have a consistent state at the beginning of every
function. Currently the arguments register (i.e. rax or eax) either contains
the number of arguments or some random garbage depending on whether
the callsite decided that the callee might need the information or not.
This causes trouble with runtime implementations of functions that
do not set internal_formal_parameter_count to the DontAdaptArguments
sentinel (we don't have any of those yet), but also makes it impossible
to sanity check the arguments in the callee, because the callee doesn't
know whether the caller decided to pass the number of arguments or
random garbage.

BUG=v8:4413
LOG=n

Please review this at https://codereview.chromium.org/1330033002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+43, -81 lines):
  M src/arm/lithium-codegen-arm.cc
  M src/arm/macro-assembler-arm.cc
  M src/arm64/lithium-codegen-arm64.cc
  M src/arm64/macro-assembler-arm64.cc
  M src/hydrogen.h
  M src/hydrogen.cc
  M src/hydrogen-instructions.h
  M src/hydrogen-instructions.cc
  M src/ia32/lithium-codegen-ia32.cc
  M src/ia32/macro-assembler-ia32.cc
  M src/mips/lithium-codegen-mips.cc
  M src/mips/macro-assembler-mips.cc
  M src/mips64/lithium-codegen-mips64.cc
  M src/mips64/macro-assembler-mips64.cc
  M src/x64/lithium-codegen-x64.cc
  M src/x64/macro-assembler-x64.cc


--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to