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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 __ Push(x1, x10); 180 __ Push(x1, x10);
181 __ CallRuntime(Runtime::kNewScriptContext); 181 __ CallRuntime(Runtime::kNewScriptContext);
182 PrepareForBailoutForId(BailoutId::ScriptContext(), 182 PrepareForBailoutForId(BailoutId::ScriptContext(),
183 BailoutState::TOS_REGISTER); 183 BailoutState::TOS_REGISTER);
184 // The new target value is not used, clobbering is safe. 184 // The new target value is not used, clobbering is safe.
185 DCHECK_NULL(info->scope()->new_target_var()); 185 DCHECK_NULL(info->scope()->new_target_var());
186 } else { 186 } else {
187 if (info->scope()->new_target_var() != nullptr) { 187 if (info->scope()->new_target_var() != nullptr) {
188 __ Push(x3); // Preserve new target. 188 __ Push(x3); // Preserve new target.
189 } 189 }
190 FastNewFunctionContextStub stub(isolate()); 190 if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
191 __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots); 191 FastNewFunctionContextStub stub(isolate());
192 __ CallStub(&stub); 192 __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots);
193 // Result of FastNewFunctionContextStub is always in new space. 193 __ CallStub(&stub);
194 need_write_barrier = false; 194 // Result of FastNewFunctionContextStub is always in new space.
195 need_write_barrier = false;
196 } else {
197 __ Push(x1);
198 __ CallRuntime(Runtime::kNewFunctionContext);
199 }
195 if (info->scope()->new_target_var() != nullptr) { 200 if (info->scope()->new_target_var() != nullptr) {
196 __ Pop(x3); // Restore new target. 201 __ Pop(x3); // Restore new target.
197 } 202 }
198 } 203 }
199 function_in_register_x1 = false; 204 function_in_register_x1 = false;
200 // Context is returned in x0. It replaces the context passed to us. 205 // Context is returned in x0. It replaces the context passed to us.
201 // It's saved in the stack and kept live in cp. 206 // It's saved in the stack and kept live in cp.
202 __ Mov(cp, x0); 207 __ Mov(cp, x0);
203 __ Str(x0, MemOperand(fp, StandardFrameConstants::kContextOffset)); 208 __ Str(x0, MemOperand(fp, StandardFrameConstants::kContextOffset));
204 // Copy any necessary parameters into the context. 209 // Copy any necessary parameters into the context.
(...skipping 3621 matching lines...) Expand 10 before | Expand all | Expand 10 after
3826 } 3831 }
3827 3832
3828 return INTERRUPT; 3833 return INTERRUPT;
3829 } 3834 }
3830 3835
3831 3836
3832 } // namespace internal 3837 } // namespace internal
3833 } // namespace v8 3838 } // namespace v8
3834 3839
3835 #endif // V8_TARGET_ARCH_ARM64 3840 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698