| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
| 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 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1973 __ beq(&adaptor_frame); | 1973 __ beq(&adaptor_frame); |
| 1974 | 1974 |
| 1975 // Get the length from the frame. | 1975 // Get the length from the frame. |
| 1976 __ LoadP(r4, MemOperand(sp, 0)); | 1976 __ LoadP(r4, MemOperand(sp, 0)); |
| 1977 __ b(&try_allocate); | 1977 __ b(&try_allocate); |
| 1978 | 1978 |
| 1979 // Patch the arguments.length and the parameters pointer. | 1979 // Patch the arguments.length and the parameters pointer. |
| 1980 __ bind(&adaptor_frame); | 1980 __ bind(&adaptor_frame); |
| 1981 __ LoadP(r4, MemOperand(r5, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 1981 __ LoadP(r4, MemOperand(r5, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 1982 if (has_new_target()) { | 1982 if (has_new_target()) { |
| 1983 __ CmpSmiLiteral(r4, Smi::FromInt(0), r0); |
| 1984 Label skip_decrement; |
| 1985 __ beq(&skip_decrement); |
| 1983 // Subtract 1 from smi-tagged arguments count. | 1986 // Subtract 1 from smi-tagged arguments count. |
| 1984 __ SubSmiLiteral(r4, r4, Smi::FromInt(1), r0); | 1987 __ SubSmiLiteral(r4, r4, Smi::FromInt(1), r0); |
| 1988 __ bind(&skip_decrement); |
| 1985 } | 1989 } |
| 1986 __ StoreP(r4, MemOperand(sp, 0)); | 1990 __ StoreP(r4, MemOperand(sp, 0)); |
| 1987 __ SmiToPtrArrayOffset(r6, r4); | 1991 __ SmiToPtrArrayOffset(r6, r4); |
| 1988 __ add(r6, r5, r6); | 1992 __ add(r6, r5, r6); |
| 1989 __ addi(r6, r6, Operand(StandardFrameConstants::kCallerSPOffset)); | 1993 __ addi(r6, r6, Operand(StandardFrameConstants::kCallerSPOffset)); |
| 1990 __ StoreP(r6, MemOperand(sp, 1 * kPointerSize)); | 1994 __ StoreP(r6, MemOperand(sp, 1 * kPointerSize)); |
| 1991 | 1995 |
| 1992 // Try the new space allocation. Start out with computing the size | 1996 // Try the new space allocation. Start out with computing the size |
| 1993 // of the arguments object and the elements array in words. | 1997 // of the arguments object and the elements array in words. |
| 1994 Label add_arguments_object; | 1998 Label add_arguments_object; |
| (...skipping 3589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5584 kStackUnwindSpace, NULL, | 5588 kStackUnwindSpace, NULL, |
| 5585 MemOperand(fp, 6 * kPointerSize), NULL); | 5589 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5586 } | 5590 } |
| 5587 | 5591 |
| 5588 | 5592 |
| 5589 #undef __ | 5593 #undef __ |
| 5590 } | 5594 } |
| 5591 } // namespace v8::internal | 5595 } // namespace v8::internal |
| 5592 | 5596 |
| 5593 #endif // V8_TARGET_ARCH_PPC | 5597 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |