| 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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 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 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2018 // Return and remove the on-stack parameters. | 2018 // Return and remove the on-stack parameters. |
| 2019 __ bind(&done); | 2019 __ bind(&done); |
| 2020 __ DropAndRet(3); | 2020 __ DropAndRet(3); |
| 2021 | 2021 |
| 2022 // Do the runtime call to allocate the arguments object. | 2022 // Do the runtime call to allocate the arguments object. |
| 2023 __ bind(&runtime); | 2023 __ bind(&runtime); |
| 2024 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 2024 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
| 2025 } | 2025 } |
| 2026 | 2026 |
| 2027 | 2027 |
| 2028 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
| 2029 // sp[0] : index of rest parameter |
| 2030 // sp[4] : number of parameters |
| 2031 // sp[8] : receiver displacement |
| 2032 // Check if the calling frame is an arguments adaptor frame. |
| 2033 |
| 2034 Label runtime; |
| 2035 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 2036 __ ld(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); |
| 2037 __ Branch(&runtime, ne, a3, |
| 2038 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 2039 |
| 2040 // Patch the arguments.length and the parameters pointer. |
| 2041 __ ld(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 2042 __ sd(a1, MemOperand(sp, 1 * kPointerSize)); |
| 2043 __ SmiScale(at, a1, kPointerSizeLog2); |
| 2044 |
| 2045 __ Daddu(a3, a2, Operand(at)); |
| 2046 |
| 2047 __ Daddu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); |
| 2048 __ sd(a3, MemOperand(sp, 2 * kPointerSize)); |
| 2049 |
| 2050 // Do the runtime call to allocate the arguments object. |
| 2051 __ bind(&runtime); |
| 2052 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); |
| 2053 } |
| 2054 |
| 2055 |
| 2028 void RegExpExecStub::Generate(MacroAssembler* masm) { | 2056 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 2029 // Just jump directly to runtime if native RegExp is not selected at compile | 2057 // Just jump directly to runtime if native RegExp is not selected at compile |
| 2030 // time or if regexp entry in generated code is turned off runtime switch or | 2058 // time or if regexp entry in generated code is turned off runtime switch or |
| 2031 // at compilation. | 2059 // at compilation. |
| 2032 #ifdef V8_INTERPRETED_REGEXP | 2060 #ifdef V8_INTERPRETED_REGEXP |
| 2033 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); | 2061 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); |
| 2034 #else // V8_INTERPRETED_REGEXP | 2062 #else // V8_INTERPRETED_REGEXP |
| 2035 | 2063 |
| 2036 // Stack frame on entry. | 2064 // Stack frame on entry. |
| 2037 // sp[0]: last_match_info (expected JSArray) | 2065 // sp[0]: last_match_info (expected JSArray) |
| (...skipping 3191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5229 kStackUnwindSpace, kInvalidStackOffset, | 5257 kStackUnwindSpace, kInvalidStackOffset, |
| 5230 MemOperand(fp, 6 * kPointerSize), NULL); | 5258 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5231 } | 5259 } |
| 5232 | 5260 |
| 5233 | 5261 |
| 5234 #undef __ | 5262 #undef __ |
| 5235 | 5263 |
| 5236 } } // namespace v8::internal | 5264 } } // namespace v8::internal |
| 5237 | 5265 |
| 5238 #endif // V8_TARGET_ARCH_MIPS64 | 5266 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |