Commit d1e6a2e2 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

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

  port f5b83dec (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}
parent c031c83d
...@@ -16,10 +16,7 @@ namespace internal { ...@@ -16,10 +16,7 @@ namespace internal {
#define __ ACCESS_MASM(masm) #define __ ACCESS_MASM(masm)
void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id) {
void Builtins::Generate_Adaptor(MacroAssembler* masm,
CFunctionId id,
BuiltinExtraArguments extra_args) {
// ----------- S t a t e ------------- // ----------- S t a t e -------------
// -- eax : number of arguments excluding receiver // -- eax : number of arguments excluding receiver
// -- edi : target // -- edi : target
...@@ -39,19 +36,11 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, ...@@ -39,19 +36,11 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm,
__ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
// Insert extra arguments. // Insert extra arguments.
int num_extra_args = 0; const int num_extra_args = 2;
if (extra_args != BuiltinExtraArguments::kNone) { __ PopReturnAddressTo(ecx);
__ PopReturnAddressTo(ecx); __ Push(edi);
if (extra_args & BuiltinExtraArguments::kTarget) { __ Push(edx);
++num_extra_args; __ PushReturnAddressFrom(ecx);
__ Push(edi);
}
if (extra_args & BuiltinExtraArguments::kNewTarget) {
++num_extra_args;
__ Push(edx);
}
__ PushReturnAddressFrom(ecx);
}
// JumpToExternalReference expects eax to contain the number of arguments // JumpToExternalReference expects eax to contain the number of arguments
// including the receiver and the extra arguments. // including the receiver and the extra arguments.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment