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

Side by Side Diff: src/ppc/code-stubs-ppc.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/mips64/full-codegen-mips64.cc ('k') | src/ppc/full-codegen-ppc.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 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 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after
2085 __ Ret(); 2085 __ Ret();
2086 2086
2087 // Do the runtime call to allocate the arguments object. 2087 // Do the runtime call to allocate the arguments object.
2088 __ bind(&runtime); 2088 __ bind(&runtime);
2089 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); 2089 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
2090 } 2090 }
2091 2091
2092 2092
2093 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { 2093 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
2094 // Stack layout on entry. 2094 // Stack layout on entry.
2095 // sp[0] : index of rest parameter 2095 // sp[0] : language mode
2096 // sp[4] : number of parameters 2096 // sp[4] : index of rest parameter
2097 // sp[8] : receiver displacement 2097 // sp[8] : number of parameters
2098 // sp[12] : receiver displacement
2098 2099
2099 Label runtime; 2100 Label runtime;
2100 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 2101 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
2101 __ LoadP(r6, MemOperand(r5, StandardFrameConstants::kContextOffset)); 2102 __ LoadP(r6, MemOperand(r5, StandardFrameConstants::kContextOffset));
2102 __ CmpSmiLiteral(r6, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); 2103 __ CmpSmiLiteral(r6, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0);
2103 __ bne(&runtime); 2104 __ bne(&runtime);
2104 2105
2105 // Patch the arguments.length and the parameters pointer. 2106 // Patch the arguments.length and the parameters pointer.
2106 __ LoadP(r4, MemOperand(r5, ArgumentsAdaptorFrameConstants::kLengthOffset)); 2107 __ LoadP(r4, MemOperand(r5, ArgumentsAdaptorFrameConstants::kLengthOffset));
2107 __ StoreP(r4, MemOperand(sp, 1 * kPointerSize)); 2108 __ StoreP(r4, MemOperand(sp, 2 * kPointerSize));
2108 __ SmiToPtrArrayOffset(r6, r4); 2109 __ SmiToPtrArrayOffset(r6, r4);
2109 __ add(r6, r5, r6); 2110 __ add(r6, r5, r6);
2110 __ addi(r6, r6, Operand(StandardFrameConstants::kCallerSPOffset)); 2111 __ addi(r6, r6, Operand(StandardFrameConstants::kCallerSPOffset));
2111 __ StoreP(r6, MemOperand(sp, 2 * kPointerSize)); 2112 __ StoreP(r6, MemOperand(sp, 3 * kPointerSize));
2112 2113
2113 __ bind(&runtime); 2114 __ bind(&runtime);
2114 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); 2115 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
2115 } 2116 }
2116 2117
2117 2118
2118 void RegExpExecStub::Generate(MacroAssembler* masm) { 2119 void RegExpExecStub::Generate(MacroAssembler* masm) {
2119 // Just jump directly to runtime if native RegExp is not selected at compile 2120 // Just jump directly to runtime if native RegExp is not selected at compile
2120 // time or if regexp entry in generated code is turned off runtime switch or 2121 // time or if regexp entry in generated code is turned off runtime switch or
2121 // at compilation. 2122 // at compilation.
2122 #ifdef V8_INTERPRETED_REGEXP 2123 #ifdef V8_INTERPRETED_REGEXP
2123 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); 2124 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
2124 #else // V8_INTERPRETED_REGEXP 2125 #else // V8_INTERPRETED_REGEXP
(...skipping 3530 matching lines...) Expand 10 before | Expand all | Expand 10 after
5655 kStackUnwindSpace, NULL, 5656 kStackUnwindSpace, NULL,
5656 MemOperand(fp, 6 * kPointerSize), NULL); 5657 MemOperand(fp, 6 * kPointerSize), NULL);
5657 } 5658 }
5658 5659
5659 5660
5660 #undef __ 5661 #undef __
5661 } 5662 }
5662 } // namespace v8::internal 5663 } // namespace v8::internal
5663 5664
5664 #endif // V8_TARGET_ARCH_PPC 5665 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698