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

Unified Diff: src/x64/code-stubs-x64.cc

Issue 1688163004: [runtime] Kill %Arguments and %ArgumentsLength. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@StringFromCharCode
Patch Set: Created 4 years, 10 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/runtime/runtime-scopes.cc ('k') | src/x64/interface-descriptors-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index 29978d1dd0a7d6b0f8b000253811497f2ac38ebd..83a1c779aebc18044e8e79c9ba8780109994c7ef 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -534,64 +534,6 @@ void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
}
-void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
- // The key is in rdx and the parameter count is in rax.
- DCHECK(rdx.is(ArgumentsAccessReadDescriptor::index()));
- DCHECK(rax.is(ArgumentsAccessReadDescriptor::parameter_count()));
-
- // Check that the key is a smi.
- Label slow;
- __ JumpIfNotSmi(rdx, &slow);
-
- // Check if the calling frame is an arguments adaptor frame. We look at the
- // context offset, and if the frame is not a regular one, then we find a
- // Smi instead of the context. We can't use SmiCompare here, because that
- // only works for comparing two smis.
- Label adaptor;
- __ movp(rbx, Operand(rbp, StandardFrameConstants::kCallerFPOffset));
- __ Cmp(Operand(rbx, StandardFrameConstants::kContextOffset),
- Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
- __ j(equal, &adaptor);
-
- // Check index against formal parameters count limit passed in
- // through register rax. Use unsigned comparison to get negative
- // check for free.
- __ cmpp(rdx, rax);
- __ j(above_equal, &slow);
-
- // Read the argument from the stack and return it.
- __ SmiSub(rax, rax, rdx);
- __ SmiToInteger32(rax, rax);
- StackArgumentsAccessor args(rbp, rax, ARGUMENTS_DONT_CONTAIN_RECEIVER);
- __ movp(rax, args.GetArgumentOperand(0));
- __ Ret();
-
- // Arguments adaptor case: Check index against actual arguments
- // limit found in the arguments adaptor frame. Use unsigned
- // comparison to get negative check for free.
- __ bind(&adaptor);
- __ movp(rcx, Operand(rbx, ArgumentsAdaptorFrameConstants::kLengthOffset));
- __ cmpp(rdx, rcx);
- __ j(above_equal, &slow);
-
- // Read the argument from the stack and return it.
- __ SmiSub(rcx, rcx, rdx);
- __ SmiToInteger32(rcx, rcx);
- StackArgumentsAccessor adaptor_args(rbx, rcx,
- ARGUMENTS_DONT_CONTAIN_RECEIVER);
- __ movp(rax, adaptor_args.GetArgumentOperand(0));
- __ Ret();
-
- // Slow-case: Handle non-smi or out-of-bounds access to arguments
- // by calling the runtime system.
- __ bind(&slow);
- __ PopReturnAddressTo(rbx);
- __ Push(rdx);
- __ PushReturnAddressFrom(rbx);
- __ TailCallRuntime(Runtime::kArguments);
-}
-
-
void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
// rcx : number of parameters (tagged)
// rdx : parameters pointer
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | src/x64/interface-descriptors-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698