Index: src/mips64/builtins-mips64.cc |
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc |
index 6c8d22498f537ccd38bfc6edf273006f7cc3d1fa..5580acfcc1e2cad4f09ace373b86e767de18706b 100644 |
--- a/src/mips64/builtins-mips64.cc |
+++ b/src/mips64/builtins-mips64.cc |
@@ -32,13 +32,6 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, |
// ----------------------------------- |
__ AssertFunction(a1); |
- // 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? |
- __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
- |
// Insert extra arguments. |
int num_extra_args = 0; |
if (extra_args == NEEDS_CALLED_FUNCTION) { |
@@ -49,20 +42,8 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, |
} |
// JumpToExternalReference expects a0 to contain the number of arguments |
- // including the receiver and the extra arguments. But a0 is only valid |
- // if the called function is marked as DontAdaptArguments, otherwise we |
- // need to load the argument count from the SharedFunctionInfo. |
- Label argc, done_argc; |
- __ ld(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
- __ lw(a2, |
- FieldMemOperand(a2, SharedFunctionInfo::kFormalParameterCountOffset)); |
- __ Branch(&argc, eq, a2, |
- Operand(SharedFunctionInfo::kDontAdaptArgumentsSentinel)); |
- __ Daddu(a0, a2, num_extra_args + 1); |
- __ jmp(&done_argc); |
- __ bind(&argc); |
+ // including the receiver and the extra arguments. |
__ Daddu(a0, a0, num_extra_args + 1); |
- __ bind(&done_argc); |
__ JumpToExternalReference(ExternalReference(id, masm->isolate())); |
} |