X87: [builtins] Always pass target and new target to C++ builtins.

port f5b83dec4e (r37061)

  original commit message:
  As a first step towards showing builtin frames in stack traces, we will now
  push target and new target unconditionally.

  Since the various specializations of BuiltinArguments are made redundant by
  this change, we can remove them and all related code.

BUG=

Review-Url: https://codereview.chromium.org/2095323002
Cr-Commit-Position: refs/heads/master@{#37282}
This commit is contained in:
zhengxing.li 2016-06-27 03:16:57 -07:00 committed by Commit bot
parent c031c83d3d
commit d1e6a2e21a

View File

@ -16,10 +16,7 @@ namespace internal {
#define __ ACCESS_MASM(masm)
void Builtins::Generate_Adaptor(MacroAssembler* masm,
CFunctionId id,
BuiltinExtraArguments extra_args) {
void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id) {
// ----------- S t a t e -------------
// -- eax : number of arguments excluding receiver
// -- edi : target
@ -39,19 +36,11 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm,
__ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
// Insert extra arguments.
int num_extra_args = 0;
if (extra_args != BuiltinExtraArguments::kNone) {
__ PopReturnAddressTo(ecx);
if (extra_args & BuiltinExtraArguments::kTarget) {
++num_extra_args;
__ Push(edi);
}
if (extra_args & BuiltinExtraArguments::kNewTarget) {
++num_extra_args;
__ Push(edx);
}
__ PushReturnAddressFrom(ecx);
}
const int num_extra_args = 2;
__ PopReturnAddressTo(ecx);
__ Push(edi);
__ Push(edx);
__ PushReturnAddressFrom(ecx);
// JumpToExternalReference expects eax to contain the number of arguments
// including the receiver and the extra arguments.