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

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

Issue 2460723005: Merged: 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
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x64/full-codegen-x64.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_S390 5 #if V8_TARGET_ARCH_S390
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 __ Push(info->scope()->GetScopeInfo(info->isolate())); 188 __ Push(info->scope()->GetScopeInfo(info->isolate()));
189 __ CallRuntime(Runtime::kNewScriptContext); 189 __ CallRuntime(Runtime::kNewScriptContext);
190 PrepareForBailoutForId(BailoutId::ScriptContext(), 190 PrepareForBailoutForId(BailoutId::ScriptContext(),
191 BailoutState::TOS_REGISTER); 191 BailoutState::TOS_REGISTER);
192 // The new target value is not used, clobbering is safe. 192 // The new target value is not used, clobbering is safe.
193 DCHECK_NULL(info->scope()->new_target_var()); 193 DCHECK_NULL(info->scope()->new_target_var());
194 } else { 194 } else {
195 if (info->scope()->new_target_var() != nullptr) { 195 if (info->scope()->new_target_var() != nullptr) {
196 __ push(r5); // Preserve new target. 196 __ push(r5); // Preserve new target.
197 } 197 }
198 FastNewFunctionContextStub stub(isolate()); 198 if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
199 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); 199 FastNewFunctionContextStub stub(isolate());
200 __ CallStub(&stub); 200 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
201 // Result of FastNewFunctionContextStub is always in new space. 201 Operand(slots));
202 need_write_barrier = false; 202 __ CallStub(&stub);
203 // Result of FastNewFunctionContextStub is always in new space.
204 need_write_barrier = false;
205 } else {
206 __ push(r3);
207 __ CallRuntime(Runtime::kNewFunctionContext);
208 }
203 if (info->scope()->new_target_var() != nullptr) { 209 if (info->scope()->new_target_var() != nullptr) {
204 __ pop(r5); // Preserve new target. 210 __ pop(r5); // Preserve new target.
205 } 211 }
206 } 212 }
207 function_in_register_r3 = false; 213 function_in_register_r3 = false;
208 // Context is returned in r2. It replaces the context passed to us. 214 // Context is returned in r2. It replaces the context passed to us.
209 // It's saved in the stack and kept live in cp. 215 // It's saved in the stack and kept live in cp.
210 __ LoadRR(cp, r2); 216 __ LoadRR(cp, r2);
211 __ StoreP(r2, MemOperand(fp, StandardFrameConstants::kContextOffset)); 217 __ StoreP(r2, MemOperand(fp, StandardFrameConstants::kContextOffset));
212 // Copy any necessary parameters into the context. 218 // Copy any necessary parameters into the context.
(...skipping 3438 matching lines...) Expand 10 before | Expand all | Expand 10 after
3651 DCHECK(kOSRBranchInstruction == br_instr); 3657 DCHECK(kOSRBranchInstruction == br_instr);
3652 3658
3653 DCHECK(interrupt_address == 3659 DCHECK(interrupt_address ==
3654 isolate->builtins()->OnStackReplacement()->entry()); 3660 isolate->builtins()->OnStackReplacement()->entry());
3655 return ON_STACK_REPLACEMENT; 3661 return ON_STACK_REPLACEMENT;
3656 } 3662 }
3657 3663
3658 } // namespace internal 3664 } // namespace internal
3659 } // namespace v8 3665 } // namespace v8
3660 #endif // V8_TARGET_ARCH_S390 3666 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698