| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |