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 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2015 // Return and remove the on-stack parameters. | 2015 // Return and remove the on-stack parameters. |
2016 __ bind(&done); | 2016 __ bind(&done); |
2017 __ DropAndRet(3); | 2017 __ DropAndRet(3); |
2018 | 2018 |
2019 // Do the runtime call to allocate the arguments object. | 2019 // Do the runtime call to allocate the arguments object. |
2020 __ bind(&runtime); | 2020 __ bind(&runtime); |
2021 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 2021 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
2022 } | 2022 } |
2023 | 2023 |
2024 | 2024 |
| 2025 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
| 2026 // sp[0] : index of rest parameter |
| 2027 // sp[4] : number of parameters |
| 2028 // sp[8] : receiver displacement |
| 2029 // Check if the calling frame is an arguments adaptor frame. |
| 2030 |
| 2031 Label runtime; |
| 2032 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 2033 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); |
| 2034 __ Branch(&runtime, ne, a3, |
| 2035 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 2036 |
| 2037 // Patch the arguments.length and the parameters pointer. |
| 2038 __ lw(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 2039 __ sw(a1, MemOperand(sp, 1 * kPointerSize)); |
| 2040 __ sll(at, a1, kPointerSizeLog2 - kSmiTagSize); |
| 2041 __ Addu(a3, a2, Operand(at)); |
| 2042 |
| 2043 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); |
| 2044 __ sw(a3, MemOperand(sp, 2 * kPointerSize)); |
| 2045 |
| 2046 // Do the runtime call to allocate the arguments object. |
| 2047 __ bind(&runtime); |
| 2048 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); |
| 2049 } |
| 2050 |
| 2051 |
2025 void RegExpExecStub::Generate(MacroAssembler* masm) { | 2052 void RegExpExecStub::Generate(MacroAssembler* masm) { |
2026 // Just jump directly to runtime if native RegExp is not selected at compile | 2053 // Just jump directly to runtime if native RegExp is not selected at compile |
2027 // time or if regexp entry in generated code is turned off runtime switch or | 2054 // time or if regexp entry in generated code is turned off runtime switch or |
2028 // at compilation. | 2055 // at compilation. |
2029 #ifdef V8_INTERPRETED_REGEXP | 2056 #ifdef V8_INTERPRETED_REGEXP |
2030 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); | 2057 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); |
2031 #else // V8_INTERPRETED_REGEXP | 2058 #else // V8_INTERPRETED_REGEXP |
2032 | 2059 |
2033 // Stack frame on entry. | 2060 // Stack frame on entry. |
2034 // sp[0]: last_match_info (expected JSArray) | 2061 // sp[0]: last_match_info (expected JSArray) |
(...skipping 3152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5187 kStackUnwindSpace, kInvalidStackOffset, | 5214 kStackUnwindSpace, kInvalidStackOffset, |
5188 MemOperand(fp, 6 * kPointerSize), NULL); | 5215 MemOperand(fp, 6 * kPointerSize), NULL); |
5189 } | 5216 } |
5190 | 5217 |
5191 | 5218 |
5192 #undef __ | 5219 #undef __ |
5193 | 5220 |
5194 } } // namespace v8::internal | 5221 } } // namespace v8::internal |
5195 | 5222 |
5196 #endif // V8_TARGET_ARCH_MIPS | 5223 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |