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

Side by Side Diff: src/x87/code-stubs-x87.cc

Issue 1545053002: X87: Partial revert of rest parameter desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 __ bind(&runtime); 846 __ bind(&runtime);
847 __ pop(eax); // Pop return address. 847 __ pop(eax); // Pop return address.
848 __ push(edi); // Push function. 848 __ push(edi); // Push function.
849 __ push(edx); // Push parameters pointer. 849 __ push(edx); // Push parameters pointer.
850 __ push(ecx); // Push parameter count. 850 __ push(ecx); // Push parameter count.
851 __ push(eax); // Push return address. 851 __ push(eax); // Push return address.
852 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); 852 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
853 } 853 }
854 854
855 855
856 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
857 // esp[0] : return address
858 // esp[4] : language mode
859 // esp[8] : index of rest parameter
860 // esp[12] : number of parameters
861 // esp[16] : receiver displacement
862
863 // Check if the calling frame is an arguments adaptor frame.
864 Label runtime;
865 __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
866 __ mov(ecx, Operand(edx, StandardFrameConstants::kContextOffset));
867 __ cmp(ecx, Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
868 __ j(not_equal, &runtime);
869
870 // Patch the arguments.length and the parameters pointer.
871 __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset));
872 __ mov(Operand(esp, 3 * kPointerSize), ecx);
873 __ lea(edx,
874 Operand(edx, ecx, times_2, StandardFrameConstants::kCallerSPOffset));
875 __ mov(Operand(esp, 4 * kPointerSize), edx);
876
877 __ bind(&runtime);
878 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
879 }
880
881
856 void RegExpExecStub::Generate(MacroAssembler* masm) { 882 void RegExpExecStub::Generate(MacroAssembler* masm) {
857 // Just jump directly to runtime if native RegExp is not selected at compile 883 // Just jump directly to runtime if native RegExp is not selected at compile
858 // time or if regexp entry in generated code is turned off runtime switch or 884 // time or if regexp entry in generated code is turned off runtime switch or
859 // at compilation. 885 // at compilation.
860 #ifdef V8_INTERPRETED_REGEXP 886 #ifdef V8_INTERPRETED_REGEXP
861 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); 887 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
862 #else // V8_INTERPRETED_REGEXP 888 #else // V8_INTERPRETED_REGEXP
863 889
864 // Stack frame on entry. 890 // Stack frame on entry.
865 // esp[0]: return address 891 // esp[0]: return address
(...skipping 4467 matching lines...) Expand 10 before | Expand all | Expand 10 after
5333 Operand(ebp, 7 * kPointerSize), NULL); 5359 Operand(ebp, 7 * kPointerSize), NULL);
5334 } 5360 }
5335 5361
5336 5362
5337 #undef __ 5363 #undef __
5338 5364
5339 } // namespace internal 5365 } // namespace internal
5340 } // namespace v8 5366 } // namespace v8
5341 5367
5342 #endif // V8_TARGET_ARCH_X87 5368 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698