Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 1126783003: Handle the case when derived constructor is [[Call]]ed with 0 args. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
1955 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 1955 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
1956 1956
1957 // Get the length from the frame. 1957 // Get the length from the frame.
1958 __ lw(a1, MemOperand(sp, 0)); 1958 __ lw(a1, MemOperand(sp, 0));
1959 __ Branch(&try_allocate); 1959 __ Branch(&try_allocate);
1960 1960
1961 // Patch the arguments.length and the parameters pointer. 1961 // Patch the arguments.length and the parameters pointer.
1962 __ bind(&adaptor_frame); 1962 __ bind(&adaptor_frame);
1963 __ lw(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); 1963 __ lw(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset));
1964 if (has_new_target()) { 1964 if (has_new_target()) {
1965 Label skip_decrement;
1966 __ Branch(&skip_decrement, eq, a1, Operand(Smi::FromInt(0)));
1965 // Subtract 1 from smi-tagged arguments count. 1967 // Subtract 1 from smi-tagged arguments count.
1966 __ Subu(a1, a1, Operand(2)); 1968 __ Subu(a1, a1, Operand(2));
1969 __ bind(&skip_decrement);
1967 } 1970 }
1968 __ sw(a1, MemOperand(sp, 0)); 1971 __ sw(a1, MemOperand(sp, 0));
1969 __ sll(at, a1, kPointerSizeLog2 - kSmiTagSize); 1972 __ sll(at, a1, kPointerSizeLog2 - kSmiTagSize);
1970 __ Addu(a3, a2, Operand(at)); 1973 __ Addu(a3, a2, Operand(at));
1971 1974
1972 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); 1975 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset));
1973 __ sw(a3, MemOperand(sp, 1 * kPointerSize)); 1976 __ sw(a3, MemOperand(sp, 1 * kPointerSize));
1974 1977
1975 // Try the new space allocation. Start out with computing the size 1978 // Try the new space allocation. Start out with computing the size
1976 // of the arguments object and the elements array in words. 1979 // of the arguments object and the elements array in words.
(...skipping 3520 matching lines...) Expand 10 before | Expand all | Expand 10 after
5497 kStackUnwindSpace, kInvalidStackOffset, 5500 kStackUnwindSpace, kInvalidStackOffset,
5498 MemOperand(fp, 6 * kPointerSize), NULL); 5501 MemOperand(fp, 6 * kPointerSize), NULL);
5499 } 5502 }
5500 5503
5501 5504
5502 #undef __ 5505 #undef __
5503 5506
5504 } } // namespace v8::internal 5507 } } // namespace v8::internal
5505 5508
5506 #endif // V8_TARGET_ARCH_MIPS 5509 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698