[runtime] Replace many buggy uses of %_CallFunction with %_Call.
authorbmeurer <bmeurer@chromium.org>
Tue, 8 Sep 2015 13:35:20 +0000 (06:35 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 8 Sep 2015 13:35:32 +0000 (13:35 +0000)
commitdb2ba190dba6983b94eae36e111b0feebb97587e
tree19ea6344142afc9fda9571b5bca5aa380d1ed2b9
parente615c03ba19057a1d40ccd90ac2071863528d804
[runtime] Replace many buggy uses of %_CallFunction with %_Call.

The semantics of the %_CallFunction intrinsic seem to be very unclear,
which resulted in a lot of bugs. Especially the combination with
%IsSloppyModeFunction is always a bug, because the receiver would be
wrapped in the wrong context. So the %IsSloppyModeFunction helper is
gone now, and many of the buggy uses of %_CallFunction are also
eliminated.

If you ever need to call something with a different receiver, then
%_Call is your friend now. It does what you want and implements the
call sequence fully (and correct).

BUG=v8:4413
LOG=n

Review URL: https://codereview.chromium.org/1325573004

Cr-Commit-Position: refs/heads/master@{#30634}
35 files changed:
src/arm/interface-descriptors-arm.cc
src/arm64/interface-descriptors-arm64.cc
src/array.js
src/collection.js
src/compiler/linkage.cc
src/full-codegen/arm/full-codegen-arm.cc
src/full-codegen/arm64/full-codegen-arm64.cc
src/full-codegen/full-codegen.h
src/full-codegen/ia32/full-codegen-ia32.cc
src/full-codegen/mips/full-codegen-mips.cc
src/full-codegen/mips64/full-codegen-mips64.cc
src/full-codegen/x64/full-codegen-x64.cc
src/harmony-array.js
src/harmony-typedarray.js
src/hydrogen.cc
src/hydrogen.h
src/ia32/interface-descriptors-ia32.cc
src/interface-descriptors.cc
src/interface-descriptors.h
src/json.js
src/macros.py
src/mips/interface-descriptors-mips.cc
src/mips64/interface-descriptors-mips64.cc
src/object-observe.js
src/promise.js
src/runtime.js
src/runtime/runtime-function.cc
src/runtime/runtime.h
src/string.js
src/typedarray.js
src/weak-collection.js
src/x64/interface-descriptors-x64.cc
test/mjsunit/debug-liveedit-check-stack.js
test/mjsunit/harmony/proxies-function.js
test/mjsunit/strong/function-arity.js