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 2445703002: Don't call FastNewFunctionContextStub if context is bigger than kMaxRegularHeapObjectSize. (Closed)
Patch Set: Created 4 years, 1 month 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
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/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 __ Push(info->scope()->scope_info()); 201 __ Push(info->scope()->scope_info());
202 __ CallRuntime(Runtime::kNewScriptContext); 202 __ CallRuntime(Runtime::kNewScriptContext);
203 PrepareForBailoutForId(BailoutId::ScriptContext(), 203 PrepareForBailoutForId(BailoutId::ScriptContext(),
204 BailoutState::TOS_REGISTER); 204 BailoutState::TOS_REGISTER);
205 // The new target value is not used, clobbering is safe. 205 // The new target value is not used, clobbering is safe.
206 DCHECK_NULL(info->scope()->new_target_var()); 206 DCHECK_NULL(info->scope()->new_target_var());
207 } else { 207 } else {
208 if (info->scope()->new_target_var() != nullptr) { 208 if (info->scope()->new_target_var() != nullptr) {
209 __ push(r6); // Preserve new target. 209 __ push(r6); // Preserve new target.
210 } 210 }
211 FastNewFunctionContextStub stub(isolate()); 211 if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
212 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); 212 FastNewFunctionContextStub stub(isolate());
213 __ CallStub(&stub); 213 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
214 // Result of FastNewFunctionContextStub is always in new space. 214 Operand(slots));
215 need_write_barrier = false; 215 __ CallStub(&stub);
216 // Result of FastNewFunctionContextStub is always in new space.
217 need_write_barrier = false;
218 } else {
219 __ push(r4);
220 __ CallRuntime(Runtime::kNewFunctionContext);
221 }
216 if (info->scope()->new_target_var() != nullptr) { 222 if (info->scope()->new_target_var() != nullptr) {
217 __ pop(r6); // Preserve new target. 223 __ pop(r6); // Preserve new target.
218 } 224 }
219 } 225 }
220 function_in_register_r4 = false; 226 function_in_register_r4 = false;
221 // Context is returned in r3. It replaces the context passed to us. 227 // Context is returned in r3. It replaces the context passed to us.
222 // It's saved in the stack and kept live in cp. 228 // It's saved in the stack and kept live in cp.
223 __ mr(cp, r3); 229 __ mr(cp, r3);
224 __ StoreP(r3, MemOperand(fp, StandardFrameConstants::kContextOffset)); 230 __ StoreP(r3, MemOperand(fp, StandardFrameConstants::kContextOffset));
225 // Copy any necessary parameters into the context. 231 // Copy any necessary parameters into the context.
(...skipping 3394 matching lines...) Expand 10 before | Expand all | Expand 10 after
3620 3626
3621 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 3627 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
3622 3628
3623 DCHECK(interrupt_address == 3629 DCHECK(interrupt_address ==
3624 isolate->builtins()->OnStackReplacement()->entry()); 3630 isolate->builtins()->OnStackReplacement()->entry());
3625 return ON_STACK_REPLACEMENT; 3631 return ON_STACK_REPLACEMENT;
3626 } 3632 }
3627 } // namespace internal 3633 } // namespace internal
3628 } // namespace v8 3634 } // namespace v8
3629 #endif // V8_TARGET_ARCH_PPC 3635 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.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