Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: src/x64/builtins-x64.cc

Issue 2074063002: [builtins] Always pass target and new target to C++ builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698