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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/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 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 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 __ Push(info->scope()->scope_info()); 202 __ Push(info->scope()->scope_info());
203 __ CallRuntime(Runtime::kNewScriptContext); 203 __ CallRuntime(Runtime::kNewScriptContext);
204 PrepareForBailoutForId(BailoutId::ScriptContext(), 204 PrepareForBailoutForId(BailoutId::ScriptContext(),
205 BailoutState::TOS_REGISTER); 205 BailoutState::TOS_REGISTER);
206 // The new target value is not used, clobbering is safe. 206 // The new target value is not used, clobbering is safe.
207 DCHECK_NULL(info->scope()->new_target_var()); 207 DCHECK_NULL(info->scope()->new_target_var());
208 } else { 208 } else {
209 if (info->scope()->new_target_var() != nullptr) { 209 if (info->scope()->new_target_var() != nullptr) {
210 __ push(a3); // Preserve new target. 210 __ push(a3); // Preserve new target.
211 } 211 }
212 FastNewFunctionContextStub stub(isolate()); 212 if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
213 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); 213 FastNewFunctionContextStub stub(isolate());
214 __ CallStub(&stub); 214 __ li(FastNewFunctionContextDescriptor::SlotsRegister(),
215 // Result of FastNewFunctionContextStub is always in new space. 215 Operand(slots));
216 need_write_barrier = false; 216 __ CallStub(&stub);
217 // Result of FastNewFunctionContextStub is always in new space.
218 need_write_barrier = false;
219 } else {
220 __ push(a1);
221 __ CallRuntime(Runtime::kNewFunctionContext);
222 }
217 if (info->scope()->new_target_var() != nullptr) { 223 if (info->scope()->new_target_var() != nullptr) {
218 __ pop(a3); // Restore new target. 224 __ pop(a3); // Restore new target.
219 } 225 }
220 } 226 }
221 function_in_register_a1 = false; 227 function_in_register_a1 = false;
222 // Context is returned in v0. It replaces the context passed to us. 228 // Context is returned in v0. It replaces the context passed to us.
223 // It's saved in the stack and kept live in cp. 229 // It's saved in the stack and kept live in cp.
224 __ mov(cp, v0); 230 __ mov(cp, v0);
225 __ sd(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); 231 __ sd(v0, MemOperand(fp, StandardFrameConstants::kContextOffset));
226 // Copy any necessary parameters into the context. 232 // Copy any necessary parameters into the context.
(...skipping 3421 matching lines...) Expand 10 before | Expand all | Expand 10 after
3648 reinterpret_cast<uint64_t>( 3654 reinterpret_cast<uint64_t>(
3649 isolate->builtins()->OnStackReplacement()->entry())); 3655 isolate->builtins()->OnStackReplacement()->entry()));
3650 return ON_STACK_REPLACEMENT; 3656 return ON_STACK_REPLACEMENT;
3651 } 3657 }
3652 3658
3653 3659
3654 } // namespace internal 3660 } // namespace internal
3655 } // namespace v8 3661 } // namespace v8
3656 3662
3657 #endif // V8_TARGET_ARCH_MIPS64 3663 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698