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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2005 // Return and remove the on-stack parameters. | 2005 // Return and remove the on-stack parameters. |
2006 __ bind(&done); | 2006 __ bind(&done); |
2007 __ DropAndRet(3); | 2007 __ DropAndRet(3); |
2008 | 2008 |
2009 // Do the runtime call to allocate the arguments object. | 2009 // Do the runtime call to allocate the arguments object. |
2010 __ bind(&runtime); | 2010 __ bind(&runtime); |
2011 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 2011 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
2012 } | 2012 } |
2013 | 2013 |
2014 | 2014 |
| 2015 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
| 2016 // sp[0] : index of rest parameter |
| 2017 // sp[4] : number of parameters |
| 2018 // sp[8] : receiver displacement |
| 2019 // Check if the calling frame is an arguments adaptor frame. |
| 2020 Label runtime; |
| 2021 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 2022 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); |
| 2023 __ Branch(&runtime, ne, a3, |
| 2024 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 2025 |
| 2026 // Patch the arguments.length and the parameters pointer. |
| 2027 __ lw(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 2028 __ sw(a1, MemOperand(sp, 1 * kPointerSize)); |
| 2029 __ sll(at, a1, kPointerSizeLog2 - kSmiTagSize); |
| 2030 __ Addu(a3, a2, Operand(at)); |
| 2031 |
| 2032 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); |
| 2033 __ sw(a3, MemOperand(sp, 2 * kPointerSize)); |
| 2034 |
| 2035 // Do the runtime call to allocate the arguments object. |
| 2036 __ bind(&runtime); |
| 2037 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); |
| 2038 } |
| 2039 |
| 2040 |
2015 void RegExpExecStub::Generate(MacroAssembler* masm) { | 2041 void RegExpExecStub::Generate(MacroAssembler* masm) { |
2016 // Just jump directly to runtime if native RegExp is not selected at compile | 2042 // Just jump directly to runtime if native RegExp is not selected at compile |
2017 // time or if regexp entry in generated code is turned off runtime switch or | 2043 // time or if regexp entry in generated code is turned off runtime switch or |
2018 // at compilation. | 2044 // at compilation. |
2019 #ifdef V8_INTERPRETED_REGEXP | 2045 #ifdef V8_INTERPRETED_REGEXP |
2020 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); | 2046 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); |
2021 #else // V8_INTERPRETED_REGEXP | 2047 #else // V8_INTERPRETED_REGEXP |
2022 | 2048 |
2023 // Stack frame on entry. | 2049 // Stack frame on entry. |
2024 // sp[0]: last_match_info (expected JSArray) | 2050 // sp[0]: last_match_info (expected JSArray) |
(...skipping 3144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5169 kStackUnwindSpace, kInvalidStackOffset, | 5195 kStackUnwindSpace, kInvalidStackOffset, |
5170 MemOperand(fp, 6 * kPointerSize), NULL); | 5196 MemOperand(fp, 6 * kPointerSize), NULL); |
5171 } | 5197 } |
5172 | 5198 |
5173 | 5199 |
5174 #undef __ | 5200 #undef __ |
5175 | 5201 |
5176 } } // namespace v8::internal | 5202 } } // namespace v8::internal |
5177 | 5203 |
5178 #endif // V8_TARGET_ARCH_MIPS | 5204 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |