Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index ec9a48b30f5403299aaf32fca20d720cd526e598..5905b7cc127e7d5cac4d6a6d296fd36e0c95832b 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -15,10 +15,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 ------------- |
// -- rax : number of arguments excluding receiver |
// -- rdi : target |
@@ -37,20 +34,13 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, |
// ordinary functions). |
__ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); |
- // Insert extra arguments. |
- int num_extra_args = 0; |
- if (extra_args != BuiltinExtraArguments::kNone) { |
- __ PopReturnAddressTo(kScratchRegister); |
- if (extra_args & BuiltinExtraArguments::kTarget) { |
- ++num_extra_args; |
- __ Push(rdi); |
- } |
- if (extra_args & BuiltinExtraArguments::kNewTarget) { |
- ++num_extra_args; |
- __ Push(rdx); |
- } |
- __ PushReturnAddressFrom(kScratchRegister); |
- } |
+ // Unconditionally insert the target and new target as extra arguments. They |
+ // will be used by stack frame iterators when constructing the stack trace. |
+ const int num_extra_args = 2; |
+ __ PopReturnAddressTo(kScratchRegister); |
+ __ Push(rdi); |
+ __ Push(rdx); |
+ __ PushReturnAddressFrom(kScratchRegister); |
// JumpToExternalReference expects rax to contain the number of arguments |
// including the receiver and the extra arguments. |