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

Unified Diff: src/ppc/builtins-ppc.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/mips64/builtins-mips64.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/builtins-ppc.cc
diff --git a/src/ppc/builtins-ppc.cc b/src/ppc/builtins-ppc.cc
index 590a242aee5ff083c1d466e19ccb420baafae008..4e23f38102c9eb4d3702d1d84c2c844678ad64e6 100644
--- a/src/ppc/builtins-ppc.cc
+++ b/src/ppc/builtins-ppc.cc
@@ -21,8 +21,6 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id,
BuiltinExtraArguments extra_args) {
// ----------- S t a t e -------------
// -- r3 : number of arguments excluding receiver
- // (only guaranteed when the called function
- // is not marked as DontAdaptArguments)
// -- r4 : called function
// -- sp[0] : last argument
// -- ...
@@ -31,13 +29,6 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id,
// -----------------------------------
__ AssertFunction(r4);
- // 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?
- __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset));
-
// Insert extra arguments.
int num_extra_args = 0;
if (extra_args == NEEDS_CALLED_FUNCTION) {
@@ -48,24 +39,7 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id,
}
// JumpToExternalReference expects r3 to contain the number of arguments
- // including the receiver and the extra arguments. But r3 is only valid
- // if the called function is marked as DontAdaptArguments, otherwise we
- // need to load the argument count from the SharedFunctionInfo.
- __ LoadP(r5, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
- __ LoadWordArith(
- r5, FieldMemOperand(r5, SharedFunctionInfo::kFormalParameterCountOffset));
-#if !V8_TARGET_ARCH_PPC64
- __ SmiUntag(r5);
-#endif
- __ cmpi(r5, Operand(SharedFunctionInfo::kDontAdaptArgumentsSentinel));
- if (CpuFeatures::IsSupported(ISELECT)) {
- __ isel(ne, r3, r5, r3);
- } else {
- Label skip;
- __ beq(&skip);
- __ mr(r3, r5);
- __ bind(&skip);
- }
+ // including the receiver and the extra arguments.
__ addi(r3, r3, Operand(num_extra_args + 1));
__ JumpToExternalReference(ExternalReference(id, masm->isolate()));
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698