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

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

Issue 1152093003: [strong] create strong array literals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback Created 5 years, 6 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/json-parser.h ('k') | src/mips/full-codegen-mips.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 2045 matching lines...) Expand 10 before | Expand all | Expand 10 after
2056 __ bind(&done); 2056 __ bind(&done);
2057 __ DropAndRet(3); 2057 __ DropAndRet(3);
2058 2058
2059 // Do the runtime call to allocate the arguments object. 2059 // Do the runtime call to allocate the arguments object.
2060 __ bind(&runtime); 2060 __ bind(&runtime);
2061 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); 2061 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
2062 } 2062 }
2063 2063
2064 2064
2065 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { 2065 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
2066 // sp[0] : index of rest parameter 2066 // sp[0] : language mode
2067 // sp[4] : number of parameters 2067 // sp[4] : index of rest parameter
2068 // sp[8] : receiver displacement 2068 // sp[8] : number of parameters
2069 // sp[12] : receiver displacement
2069 // Check if the calling frame is an arguments adaptor frame. 2070 // Check if the calling frame is an arguments adaptor frame.
2070 2071
2071 Label runtime; 2072 Label runtime;
2072 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 2073 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
2073 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); 2074 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset));
2074 __ Branch(&runtime, ne, a3, 2075 __ Branch(&runtime, ne, a3,
2075 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 2076 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
2076 2077
2077 // Patch the arguments.length and the parameters pointer. 2078 // Patch the arguments.length and the parameters pointer.
2078 __ lw(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); 2079 __ lw(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset));
2079 __ sw(a1, MemOperand(sp, 1 * kPointerSize)); 2080 __ sw(a1, MemOperand(sp, 2 * kPointerSize));
2080 __ sll(at, a1, kPointerSizeLog2 - kSmiTagSize); 2081 __ sll(at, a1, kPointerSizeLog2 - kSmiTagSize);
2081 __ Addu(a3, a2, Operand(at)); 2082 __ Addu(a3, a2, Operand(at));
2082 2083
2083 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); 2084 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset));
2084 __ sw(a3, MemOperand(sp, 2 * kPointerSize)); 2085 __ sw(a3, MemOperand(sp, 3 * kPointerSize));
2085 2086
2086 // Do the runtime call to allocate the arguments object. 2087 // Do the runtime call to allocate the arguments object.
2087 __ bind(&runtime); 2088 __ bind(&runtime);
2088 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); 2089 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
2089 } 2090 }
2090 2091
2091 2092
2092 void RegExpExecStub::Generate(MacroAssembler* masm) { 2093 void RegExpExecStub::Generate(MacroAssembler* masm) {
2093 // Just jump directly to runtime if native RegExp is not selected at compile 2094 // Just jump directly to runtime if native RegExp is not selected at compile
2094 // time or if regexp entry in generated code is turned off runtime switch or 2095 // time or if regexp entry in generated code is turned off runtime switch or
2095 // at compilation. 2096 // at compilation.
2096 #ifdef V8_INTERPRETED_REGEXP 2097 #ifdef V8_INTERPRETED_REGEXP
2097 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); 2098 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
2098 #else // V8_INTERPRETED_REGEXP 2099 #else // V8_INTERPRETED_REGEXP
(...skipping 3464 matching lines...) Expand 10 before | Expand all | Expand 10 after
5563 kStackUnwindSpace, kInvalidStackOffset, 5564 kStackUnwindSpace, kInvalidStackOffset,
5564 MemOperand(fp, 6 * kPointerSize), NULL); 5565 MemOperand(fp, 6 * kPointerSize), NULL);
5565 } 5566 }
5566 5567
5567 5568
5568 #undef __ 5569 #undef __
5569 5570
5570 } } // namespace v8::internal 5571 } } // namespace v8::internal
5571 5572
5572 #endif // V8_TARGET_ARCH_MIPS 5573 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/json-parser.h ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698