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 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1970 __ bind(&done); | 1970 __ bind(&done); |
1971 __ Ret(); | 1971 __ Ret(); |
1972 | 1972 |
1973 // Do the runtime call to allocate the arguments object. | 1973 // Do the runtime call to allocate the arguments object. |
1974 __ bind(&runtime); | 1974 __ bind(&runtime); |
1975 __ Push(a1, a3, a2); | 1975 __ Push(a1, a3, a2); |
1976 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 1976 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
1977 } | 1977 } |
1978 | 1978 |
1979 | 1979 |
| 1980 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
| 1981 // sp[0] : language mode |
| 1982 // sp[4] : index of rest parameter |
| 1983 // sp[8] : number of parameters |
| 1984 // sp[12] : receiver displacement |
| 1985 // Check if the calling frame is an arguments adaptor frame. |
| 1986 |
| 1987 Label runtime; |
| 1988 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 1989 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); |
| 1990 __ Branch(&runtime, ne, a3, |
| 1991 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 1992 |
| 1993 // Patch the arguments.length and the parameters pointer. |
| 1994 __ lw(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 1995 __ sw(a1, MemOperand(sp, 2 * kPointerSize)); |
| 1996 __ sll(at, a1, kPointerSizeLog2 - kSmiTagSize); |
| 1997 __ Addu(a3, a2, Operand(at)); |
| 1998 |
| 1999 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); |
| 2000 __ sw(a3, MemOperand(sp, 3 * kPointerSize)); |
| 2001 |
| 2002 // Do the runtime call to allocate the arguments object. |
| 2003 __ bind(&runtime); |
| 2004 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); |
| 2005 } |
| 2006 |
| 2007 |
1980 void RegExpExecStub::Generate(MacroAssembler* masm) { | 2008 void RegExpExecStub::Generate(MacroAssembler* masm) { |
1981 // Just jump directly to runtime if native RegExp is not selected at compile | 2009 // Just jump directly to runtime if native RegExp is not selected at compile |
1982 // time or if regexp entry in generated code is turned off runtime switch or | 2010 // time or if regexp entry in generated code is turned off runtime switch or |
1983 // at compilation. | 2011 // at compilation. |
1984 #ifdef V8_INTERPRETED_REGEXP | 2012 #ifdef V8_INTERPRETED_REGEXP |
1985 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 2013 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
1986 #else // V8_INTERPRETED_REGEXP | 2014 #else // V8_INTERPRETED_REGEXP |
1987 | 2015 |
1988 // Stack frame on entry. | 2016 // Stack frame on entry. |
1989 // sp[0]: last_match_info (expected JSArray) | 2017 // sp[0]: last_match_info (expected JSArray) |
(...skipping 3588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5578 MemOperand(fp, 6 * kPointerSize), NULL); | 5606 MemOperand(fp, 6 * kPointerSize), NULL); |
5579 } | 5607 } |
5580 | 5608 |
5581 | 5609 |
5582 #undef __ | 5610 #undef __ |
5583 | 5611 |
5584 } // namespace internal | 5612 } // namespace internal |
5585 } // namespace v8 | 5613 } // namespace v8 |
5586 | 5614 |
5587 #endif // V8_TARGET_ARCH_MIPS | 5615 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |