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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1952 // Return and remove the on-stack parameters. | 1952 // Return and remove the on-stack parameters. |
1953 __ bind(&done); | 1953 __ bind(&done); |
1954 __ DropAndRet(3); | 1954 __ DropAndRet(3); |
1955 | 1955 |
1956 // Do the runtime call to allocate the arguments object. | 1956 // Do the runtime call to allocate the arguments object. |
1957 __ bind(&runtime); | 1957 __ bind(&runtime); |
1958 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 1958 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
1959 } | 1959 } |
1960 | 1960 |
1961 | 1961 |
1962 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | |
1963 // sp[0] : language mode | |
1964 // sp[4] : index of rest parameter | |
1965 // sp[8] : number of parameters | |
1966 // sp[12] : receiver displacement | |
1967 // Check if the calling frame is an arguments adaptor frame. | |
1968 | |
1969 Label runtime; | |
1970 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
1971 __ ld(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); | |
1972 __ Branch(&runtime, ne, a3, | |
1973 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | |
1974 | |
1975 // Patch the arguments.length and the parameters pointer. | |
1976 __ ld(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); | |
1977 __ sd(a1, MemOperand(sp, 2 * kPointerSize)); | |
1978 __ SmiScale(at, a1, kPointerSizeLog2); | |
1979 | |
1980 __ Daddu(a3, a2, Operand(at)); | |
1981 | |
1982 __ Daddu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); | |
1983 __ sd(a3, MemOperand(sp, 3 * kPointerSize)); | |
1984 | |
1985 // Do the runtime call to allocate the arguments object. | |
1986 __ bind(&runtime); | |
1987 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); | |
1988 } | |
1989 | |
1990 | |
1991 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1962 void RegExpExecStub::Generate(MacroAssembler* masm) { |
1992 // Just jump directly to runtime if native RegExp is not selected at compile | 1963 // Just jump directly to runtime if native RegExp is not selected at compile |
1993 // time or if regexp entry in generated code is turned off runtime switch or | 1964 // time or if regexp entry in generated code is turned off runtime switch or |
1994 // at compilation. | 1965 // at compilation. |
1995 #ifdef V8_INTERPRETED_REGEXP | 1966 #ifdef V8_INTERPRETED_REGEXP |
1996 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 1967 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
1997 #else // V8_INTERPRETED_REGEXP | 1968 #else // V8_INTERPRETED_REGEXP |
1998 | 1969 |
1999 // Stack frame on entry. | 1970 // Stack frame on entry. |
2000 // sp[0]: last_match_info (expected JSArray) | 1971 // sp[0]: last_match_info (expected JSArray) |
(...skipping 3691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5692 MemOperand(fp, 6 * kPointerSize), NULL); | 5663 MemOperand(fp, 6 * kPointerSize), NULL); |
5693 } | 5664 } |
5694 | 5665 |
5695 | 5666 |
5696 #undef __ | 5667 #undef __ |
5697 | 5668 |
5698 } // namespace internal | 5669 } // namespace internal |
5699 } // namespace v8 | 5670 } // namespace v8 |
5700 | 5671 |
5701 #endif // V8_TARGET_ARCH_MIPS64 | 5672 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |