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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.cc

Issue 2200263003: PPC/s390: Make FastNewFunctionContextStub take slots parameter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/full-codegen/s390/full-codegen-s390.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 #if V8_TARGET_ARCH_PPC 5 #if V8_TARGET_ARCH_PPC
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 __ Push(info->scope()->GetScopeInfo(info->isolate())); 183 __ Push(info->scope()->GetScopeInfo(info->isolate()));
184 __ CallRuntime(Runtime::kNewScriptContext); 184 __ CallRuntime(Runtime::kNewScriptContext);
185 PrepareForBailoutForId(BailoutId::ScriptContext(), 185 PrepareForBailoutForId(BailoutId::ScriptContext(),
186 BailoutState::TOS_REGISTER); 186 BailoutState::TOS_REGISTER);
187 // The new target value is not used, clobbering is safe. 187 // The new target value is not used, clobbering is safe.
188 DCHECK_NULL(info->scope()->new_target_var()); 188 DCHECK_NULL(info->scope()->new_target_var());
189 } else { 189 } else {
190 if (info->scope()->new_target_var() != nullptr) { 190 if (info->scope()->new_target_var() != nullptr) {
191 __ push(r6); // Preserve new target. 191 __ push(r6); // Preserve new target.
192 } 192 }
193 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 193 FastNewFunctionContextStub stub(isolate());
194 FastNewFunctionContextStub stub(isolate(), slots); 194 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots));
195 __ CallStub(&stub); 195 __ CallStub(&stub);
196 // Result of FastNewFunctionContextStub is always in new space. 196 // Result of FastNewFunctionContextStub is always in new space.
197 need_write_barrier = false; 197 need_write_barrier = false;
198 } else {
199 __ push(r4);
200 __ CallRuntime(Runtime::kNewFunctionContext);
201 }
202 if (info->scope()->new_target_var() != nullptr) { 198 if (info->scope()->new_target_var() != nullptr) {
203 __ pop(r6); // Preserve new target. 199 __ pop(r6); // Preserve new target.
204 } 200 }
205 } 201 }
206 function_in_register_r4 = false; 202 function_in_register_r4 = false;
207 // Context is returned in r3. It replaces the context passed to us. 203 // Context is returned in r3. It replaces the context passed to us.
208 // It's saved in the stack and kept live in cp. 204 // It's saved in the stack and kept live in cp.
209 __ mr(cp, r3); 205 __ mr(cp, r3);
210 __ StoreP(r3, MemOperand(fp, StandardFrameConstants::kContextOffset)); 206 __ StoreP(r3, MemOperand(fp, StandardFrameConstants::kContextOffset));
211 // Copy any necessary parameters into the context. 207 // Copy any necessary parameters into the context.
(...skipping 3553 matching lines...) Expand 10 before | Expand all | Expand 10 after
3765 3761
3766 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 3762 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
3767 3763
3768 DCHECK(interrupt_address == 3764 DCHECK(interrupt_address ==
3769 isolate->builtins()->OnStackReplacement()->entry()); 3765 isolate->builtins()->OnStackReplacement()->entry());
3770 return ON_STACK_REPLACEMENT; 3766 return ON_STACK_REPLACEMENT;
3771 } 3767 }
3772 } // namespace internal 3768 } // namespace internal
3773 } // namespace v8 3769 } // namespace v8
3774 #endif // V8_TARGET_ARCH_PPC 3770 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698