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

Side by Side Diff: src/ia32/code-stubs-ia32.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/arm64/code-stubs-arm64.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | 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_IA32 7 #if V8_TARGET_ARCH_IA32
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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 __ j(not_equal, &runtime, Label::kNear); 1091 __ j(not_equal, &runtime, Label::kNear);
1092 1092
1093 // Patch the arguments.length and the parameters pointer. 1093 // Patch the arguments.length and the parameters pointer.
1094 __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); 1094 __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset));
1095 __ mov(Operand(esp, 1 * kPointerSize), ecx); 1095 __ mov(Operand(esp, 1 * kPointerSize), ecx);
1096 __ lea(edx, Operand(edx, ecx, times_2, 1096 __ lea(edx, Operand(edx, ecx, times_2,
1097 StandardFrameConstants::kCallerSPOffset)); 1097 StandardFrameConstants::kCallerSPOffset));
1098 __ mov(Operand(esp, 2 * kPointerSize), edx); 1098 __ mov(Operand(esp, 2 * kPointerSize), edx);
1099 1099
1100 __ bind(&runtime); 1100 __ bind(&runtime);
1101 __ TailCallRuntime(Runtime::kHiddenNewArgumentsFast, 3, 1); 1101 __ TailCallRuntime(Runtime::kHiddenNewSloppyArguments, 3, 1);
1102 } 1102 }
1103 1103
1104 1104
1105 void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) { 1105 void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
1106 // esp[0] : return address 1106 // esp[0] : return address
1107 // esp[4] : number of parameters (tagged) 1107 // esp[4] : number of parameters (tagged)
1108 // esp[8] : receiver displacement 1108 // esp[8] : receiver displacement
1109 // esp[12] : function 1109 // esp[12] : function
1110 1110
1111 // ebx = parameter count (tagged) 1111 // ebx = parameter count (tagged)
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 __ pop(eax); // Address of arguments object. 1314 __ pop(eax); // Address of arguments object.
1315 __ pop(ebx); // Parameter count. 1315 __ pop(ebx); // Parameter count.
1316 1316
1317 // Return and remove the on-stack parameters. 1317 // Return and remove the on-stack parameters.
1318 __ ret(3 * kPointerSize); 1318 __ ret(3 * kPointerSize);
1319 1319
1320 // Do the runtime call to allocate the arguments object. 1320 // Do the runtime call to allocate the arguments object.
1321 __ bind(&runtime); 1321 __ bind(&runtime);
1322 __ pop(eax); // Remove saved parameter count. 1322 __ pop(eax); // Remove saved parameter count.
1323 __ mov(Operand(esp, 1 * kPointerSize), ecx); // Patch argument count. 1323 __ mov(Operand(esp, 1 * kPointerSize), ecx); // Patch argument count.
1324 __ TailCallRuntime(Runtime::kHiddenNewArgumentsFast, 3, 1); 1324 __ TailCallRuntime(Runtime::kHiddenNewSloppyArguments, 3, 1);
1325 } 1325 }
1326 1326
1327 1327
1328 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { 1328 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
1329 // esp[0] : return address 1329 // esp[0] : return address
1330 // esp[4] : number of parameters 1330 // esp[4] : number of parameters
1331 // esp[8] : receiver displacement 1331 // esp[8] : receiver displacement
1332 // esp[12] : function 1332 // esp[12] : function
1333 1333
1334 // Check if the calling frame is an arguments adaptor frame. 1334 // Check if the calling frame is an arguments adaptor frame.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 __ sub(edx, Immediate(kPointerSize)); 1411 __ sub(edx, Immediate(kPointerSize));
1412 __ dec(ecx); 1412 __ dec(ecx);
1413 __ j(not_zero, &loop); 1413 __ j(not_zero, &loop);
1414 1414
1415 // Return and remove the on-stack parameters. 1415 // Return and remove the on-stack parameters.
1416 __ bind(&done); 1416 __ bind(&done);
1417 __ ret(3 * kPointerSize); 1417 __ ret(3 * kPointerSize);
1418 1418
1419 // Do the runtime call to allocate the arguments object. 1419 // Do the runtime call to allocate the arguments object.
1420 __ bind(&runtime); 1420 __ bind(&runtime);
1421 __ TailCallRuntime(Runtime::kHiddenNewStrictArgumentsFast, 3, 1); 1421 __ TailCallRuntime(Runtime::kHiddenNewStrictArguments, 3, 1);
1422 } 1422 }
1423 1423
1424 1424
1425 void RegExpExecStub::Generate(MacroAssembler* masm) { 1425 void RegExpExecStub::Generate(MacroAssembler* masm) {
1426 // Just jump directly to runtime if native RegExp is not selected at compile 1426 // Just jump directly to runtime if native RegExp is not selected at compile
1427 // time or if regexp entry in generated code is turned off runtime switch or 1427 // time or if regexp entry in generated code is turned off runtime switch or
1428 // at compilation. 1428 // at compilation.
1429 #ifdef V8_INTERPRETED_REGEXP 1429 #ifdef V8_INTERPRETED_REGEXP
1430 __ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1); 1430 __ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1);
1431 #else // V8_INTERPRETED_REGEXP 1431 #else // V8_INTERPRETED_REGEXP
(...skipping 3653 matching lines...) Expand 10 before | Expand all | Expand 10 after
5085 Operand(ebp, 7 * kPointerSize), 5085 Operand(ebp, 7 * kPointerSize),
5086 NULL); 5086 NULL);
5087 } 5087 }
5088 5088
5089 5089
5090 #undef __ 5090 #undef __
5091 5091
5092 } } // namespace v8::internal 5092 } } // namespace v8::internal
5093 5093
5094 #endif // V8_TARGET_ARCH_IA32 5094 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698