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

Side by Side Diff: src/mips/code-stubs-mips.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/ia32/code-stubs-ia32.cc ('k') | src/runtime.h » ('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_MIPS 7 #if V8_TARGET_ARCH_MIPS
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 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 2171
2172 // Patch the arguments.length and the parameters pointer in the current frame. 2172 // Patch the arguments.length and the parameters pointer in the current frame.
2173 __ lw(a2, MemOperand(a3, ArgumentsAdaptorFrameConstants::kLengthOffset)); 2173 __ lw(a2, MemOperand(a3, ArgumentsAdaptorFrameConstants::kLengthOffset));
2174 __ sw(a2, MemOperand(sp, 0 * kPointerSize)); 2174 __ sw(a2, MemOperand(sp, 0 * kPointerSize));
2175 __ sll(t3, a2, 1); 2175 __ sll(t3, a2, 1);
2176 __ Addu(a3, a3, Operand(t3)); 2176 __ Addu(a3, a3, Operand(t3));
2177 __ addiu(a3, a3, StandardFrameConstants::kCallerSPOffset); 2177 __ addiu(a3, a3, StandardFrameConstants::kCallerSPOffset);
2178 __ sw(a3, MemOperand(sp, 1 * kPointerSize)); 2178 __ sw(a3, MemOperand(sp, 1 * kPointerSize));
2179 2179
2180 __ bind(&runtime); 2180 __ bind(&runtime);
2181 __ TailCallRuntime(Runtime::kHiddenNewArgumentsFast, 3, 1); 2181 __ TailCallRuntime(Runtime::kHiddenNewSloppyArguments, 3, 1);
2182 } 2182 }
2183 2183
2184 2184
2185 void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) { 2185 void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
2186 // Stack layout: 2186 // Stack layout:
2187 // sp[0] : number of parameters (tagged) 2187 // sp[0] : number of parameters (tagged)
2188 // sp[4] : address of receiver argument 2188 // sp[4] : address of receiver argument
2189 // sp[8] : function 2189 // sp[8] : function
2190 // Registers used over whole function: 2190 // Registers used over whole function:
2191 // t2 : allocated object (tagged) 2191 // t2 : allocated object (tagged)
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2390 __ bind(&arguments_test); 2390 __ bind(&arguments_test);
2391 __ Branch(&arguments_loop, lt, t5, Operand(a2)); 2391 __ Branch(&arguments_loop, lt, t5, Operand(a2));
2392 2392
2393 // Return and remove the on-stack parameters. 2393 // Return and remove the on-stack parameters.
2394 __ DropAndRet(3); 2394 __ DropAndRet(3);
2395 2395
2396 // Do the runtime call to allocate the arguments object. 2396 // Do the runtime call to allocate the arguments object.
2397 // a2 = argument count (tagged) 2397 // a2 = argument count (tagged)
2398 __ bind(&runtime); 2398 __ bind(&runtime);
2399 __ sw(a2, MemOperand(sp, 0 * kPointerSize)); // Patch argument count. 2399 __ sw(a2, MemOperand(sp, 0 * kPointerSize)); // Patch argument count.
2400 __ TailCallRuntime(Runtime::kHiddenNewArgumentsFast, 3, 1); 2400 __ TailCallRuntime(Runtime::kHiddenNewSloppyArguments, 3, 1);
2401 } 2401 }
2402 2402
2403 2403
2404 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { 2404 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
2405 // sp[0] : number of parameters 2405 // sp[0] : number of parameters
2406 // sp[4] : receiver displacement 2406 // sp[4] : receiver displacement
2407 // sp[8] : function 2407 // sp[8] : function
2408 // Check if the calling frame is an arguments adaptor frame. 2408 // Check if the calling frame is an arguments adaptor frame.
2409 Label adaptor_frame, try_allocate, runtime; 2409 Label adaptor_frame, try_allocate, runtime;
2410 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 2410 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
2488 __ Addu(t0, t0, Operand(kPointerSize)); 2488 __ Addu(t0, t0, Operand(kPointerSize));
2489 __ Subu(a1, a1, Operand(1)); 2489 __ Subu(a1, a1, Operand(1));
2490 __ Branch(&loop, ne, a1, Operand(zero_reg)); 2490 __ Branch(&loop, ne, a1, Operand(zero_reg));
2491 2491
2492 // Return and remove the on-stack parameters. 2492 // Return and remove the on-stack parameters.
2493 __ bind(&done); 2493 __ bind(&done);
2494 __ DropAndRet(3); 2494 __ DropAndRet(3);
2495 2495
2496 // Do the runtime call to allocate the arguments object. 2496 // Do the runtime call to allocate the arguments object.
2497 __ bind(&runtime); 2497 __ bind(&runtime);
2498 __ TailCallRuntime(Runtime::kHiddenNewStrictArgumentsFast, 3, 1); 2498 __ TailCallRuntime(Runtime::kHiddenNewStrictArguments, 3, 1);
2499 } 2499 }
2500 2500
2501 2501
2502 void RegExpExecStub::Generate(MacroAssembler* masm) { 2502 void RegExpExecStub::Generate(MacroAssembler* masm) {
2503 // Just jump directly to runtime if native RegExp is not selected at compile 2503 // Just jump directly to runtime if native RegExp is not selected at compile
2504 // time or if regexp entry in generated code is turned off runtime switch or 2504 // time or if regexp entry in generated code is turned off runtime switch or
2505 // at compilation. 2505 // at compilation.
2506 #ifdef V8_INTERPRETED_REGEXP 2506 #ifdef V8_INTERPRETED_REGEXP
2507 __ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1); 2507 __ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1);
2508 #else // V8_INTERPRETED_REGEXP 2508 #else // V8_INTERPRETED_REGEXP
(...skipping 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after
5407 MemOperand(fp, 6 * kPointerSize), 5407 MemOperand(fp, 6 * kPointerSize),
5408 NULL); 5408 NULL);
5409 } 5409 }
5410 5410
5411 5411
5412 #undef __ 5412 #undef __
5413 5413
5414 } } // namespace v8::internal 5414 } } // namespace v8::internal
5415 5415
5416 #endif // V8_TARGET_ARCH_MIPS 5416 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698