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

Unified Diff: src/x87/builtins-x87.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/x64/builtins-x64.cc ('k') | test/mjsunit/es6/symbols.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/builtins-x87.cc
diff --git a/src/x87/builtins-x87.cc b/src/x87/builtins-x87.cc
index 47581870101035a1dfc8e6736e5edcae3dcd53d4..185a9a62dd84253775f039ab28baed7ae4ff5e87 100644
--- a/src/x87/builtins-x87.cc
+++ b/src/x87/builtins-x87.cc
@@ -22,8 +22,6 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm,
BuiltinExtraArguments extra_args) {
// ----------- S t a t e -------------
// -- eax : number of arguments excluding receiver
- // (only guaranteed when the called function
- // is not marked as DontAdaptArguments)
// -- edi : called function
// -- esp[0] : return address
// -- esp[4] : last argument
@@ -33,13 +31,6 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm,
// -----------------------------------
__ AssertFunction(edi);
- // 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?
- __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
-
// Insert extra arguments.
int num_extra_args = 0;
if (extra_args == NEEDS_CALLED_FUNCTION) {
@@ -53,21 +44,8 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm,
}
// JumpToExternalReference expects eax to contain the number of arguments
- // including the receiver and the extra arguments. But eax 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;
- __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
- __ mov(ebx,
- FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset));
- __ SmiUntag(ebx);
- __ cmp(ebx, SharedFunctionInfo::kDontAdaptArgumentsSentinel);
- __ j(equal, &argc, Label::kNear);
- __ lea(eax, Operand(ebx, num_extra_args + 1));
- __ jmp(&done_argc, Label::kNear);
- __ bind(&argc);
+ // including the receiver and the extra arguments.
__ add(eax, Immediate(num_extra_args + 1));
- __ bind(&done_argc);
__ JumpToExternalReference(ExternalReference(id, masm->isolate()));
}
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | test/mjsunit/es6/symbols.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698