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

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

Issue 338883003: Rename arguments object support functions to new scheme. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/code-stubs-x64.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 __ j(not_equal, &runtime, Label::kNear); 764 __ j(not_equal, &runtime, Label::kNear);
765 765
766 // Patch the arguments.length and the parameters pointer. 766 // Patch the arguments.length and the parameters pointer.
767 __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); 767 __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset));
768 __ mov(Operand(esp, 1 * kPointerSize), ecx); 768 __ mov(Operand(esp, 1 * kPointerSize), ecx);
769 __ lea(edx, Operand(edx, ecx, times_2, 769 __ lea(edx, Operand(edx, ecx, times_2,
770 StandardFrameConstants::kCallerSPOffset)); 770 StandardFrameConstants::kCallerSPOffset));
771 __ mov(Operand(esp, 2 * kPointerSize), edx); 771 __ mov(Operand(esp, 2 * kPointerSize), edx);
772 772
773 __ bind(&runtime); 773 __ bind(&runtime);
774 __ TailCallRuntime(Runtime::kHiddenNewArgumentsFast, 3, 1); 774 __ TailCallRuntime(Runtime::kHiddenNewSloppyArguments, 3, 1);
775 } 775 }
776 776
777 777
778 void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) { 778 void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
779 // esp[0] : return address 779 // esp[0] : return address
780 // esp[4] : number of parameters (tagged) 780 // esp[4] : number of parameters (tagged)
781 // esp[8] : receiver displacement 781 // esp[8] : receiver displacement
782 // esp[12] : function 782 // esp[12] : function
783 783
784 // ebx = parameter count (tagged) 784 // ebx = parameter count (tagged)
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 __ pop(eax); // Address of arguments object. 987 __ pop(eax); // Address of arguments object.
988 __ pop(ebx); // Parameter count. 988 __ pop(ebx); // Parameter count.
989 989
990 // Return and remove the on-stack parameters. 990 // Return and remove the on-stack parameters.
991 __ ret(3 * kPointerSize); 991 __ ret(3 * kPointerSize);
992 992
993 // Do the runtime call to allocate the arguments object. 993 // Do the runtime call to allocate the arguments object.
994 __ bind(&runtime); 994 __ bind(&runtime);
995 __ pop(eax); // Remove saved parameter count. 995 __ pop(eax); // Remove saved parameter count.
996 __ mov(Operand(esp, 1 * kPointerSize), ecx); // Patch argument count. 996 __ mov(Operand(esp, 1 * kPointerSize), ecx); // Patch argument count.
997 __ TailCallRuntime(Runtime::kHiddenNewArgumentsFast, 3, 1); 997 __ TailCallRuntime(Runtime::kHiddenNewSloppyArguments, 3, 1);
998 } 998 }
999 999
1000 1000
1001 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { 1001 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
1002 // esp[0] : return address 1002 // esp[0] : return address
1003 // esp[4] : number of parameters 1003 // esp[4] : number of parameters
1004 // esp[8] : receiver displacement 1004 // esp[8] : receiver displacement
1005 // esp[12] : function 1005 // esp[12] : function
1006 1006
1007 // Check if the calling frame is an arguments adaptor frame. 1007 // Check if the calling frame is an arguments adaptor frame.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 __ sub(edx, Immediate(kPointerSize)); 1084 __ sub(edx, Immediate(kPointerSize));
1085 __ dec(ecx); 1085 __ dec(ecx);
1086 __ j(not_zero, &loop); 1086 __ j(not_zero, &loop);
1087 1087
1088 // Return and remove the on-stack parameters. 1088 // Return and remove the on-stack parameters.
1089 __ bind(&done); 1089 __ bind(&done);
1090 __ ret(3 * kPointerSize); 1090 __ ret(3 * kPointerSize);
1091 1091
1092 // Do the runtime call to allocate the arguments object. 1092 // Do the runtime call to allocate the arguments object.
1093 __ bind(&runtime); 1093 __ bind(&runtime);
1094 __ TailCallRuntime(Runtime::kHiddenNewStrictArgumentsFast, 3, 1); 1094 __ TailCallRuntime(Runtime::kHiddenNewStrictArguments, 3, 1);
1095 } 1095 }
1096 1096
1097 1097
1098 void RegExpExecStub::Generate(MacroAssembler* masm) { 1098 void RegExpExecStub::Generate(MacroAssembler* masm) {
1099 // Just jump directly to runtime if native RegExp is not selected at compile 1099 // Just jump directly to runtime if native RegExp is not selected at compile
1100 // time or if regexp entry in generated code is turned off runtime switch or 1100 // time or if regexp entry in generated code is turned off runtime switch or
1101 // at compilation. 1101 // at compilation.
1102 #ifdef V8_INTERPRETED_REGEXP 1102 #ifdef V8_INTERPRETED_REGEXP
1103 __ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1); 1103 __ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1);
1104 #else // V8_INTERPRETED_REGEXP 1104 #else // V8_INTERPRETED_REGEXP
(...skipping 3620 matching lines...) Expand 10 before | Expand all | Expand 10 after
4725 Operand(ebp, 7 * kPointerSize), 4725 Operand(ebp, 7 * kPointerSize),
4726 NULL); 4726 NULL);
4727 } 4727 }
4728 4728
4729 4729
4730 #undef __ 4730 #undef __
4731 4731
4732 } } // namespace v8::internal 4732 } } // namespace v8::internal
4733 4733
4734 #endif // V8_TARGET_ARCH_X87 4734 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698