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

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

Issue 1489323002: [builtins] Remove some (now) unused code from C++ builtin adaptor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address feedback. Created 5 years 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/arm/builtins-arm.cc ('k') | src/builtins.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/builtins-arm64.cc
diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc
index d14d94b94e6403c038953d9ecc59f268f40038a4..f0f92c344b67a5ac4ad9fe4b695e68ff9cd6216a 100644
--- a/src/arm64/builtins-arm64.cc
+++ b/src/arm64/builtins-arm64.cc
@@ -38,8 +38,6 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm,
BuiltinExtraArguments extra_args) {
// ----------- S t a t e -------------
// -- x0 : number of arguments excluding receiver
- // (only guaranteed when the called function
- // is not marked as DontAdaptArguments)
// -- x1 : called function
// -- sp[0] : last argument
// -- ...
@@ -48,13 +46,6 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm,
// -----------------------------------
__ AssertFunction(x1);
- // Make sure we operate in the context of the called function (for example
- // ConstructStubs implemented in C++ will be run in the context of the caller
- // instead of the callee, due to the way that [[Construct]] is defined for
- // ordinary functions).
- // TODO(bmeurer): Can we make this more robust?
- __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset));
-
// Insert extra arguments.
int num_extra_args = 0;
if (extra_args == NEEDS_CALLED_FUNCTION) {
@@ -65,14 +56,7 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm,
}
// JumpToExternalReference expects x0 to contain the number of arguments
- // including the receiver and the extra arguments. But x0 is only valid
- // if the called function is marked as DontAdaptArguments, otherwise we
- // need to load the argument count from the SharedFunctionInfo.
- __ Ldr(x2, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset));
- __ Ldrsw(
- x2, FieldMemOperand(x2, SharedFunctionInfo::kFormalParameterCountOffset));
- __ Cmp(x2, SharedFunctionInfo::kDontAdaptArgumentsSentinel);
- __ Csel(x0, x0, x2, eq);
+ // including the receiver and the extra arguments.
__ Add(x0, x0, num_extra_args + 1);
__ JumpToExternalReference(ExternalReference(id, masm->isolate()));
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698