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

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

Issue 2177273002: Make FastNewFunctionContextStub take slots parameter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased 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/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 __ Push(info->scope()->GetScopeInfo(info->isolate())); 177 __ Push(info->scope()->GetScopeInfo(info->isolate()));
178 __ CallRuntime(Runtime::kNewScriptContext); 178 __ CallRuntime(Runtime::kNewScriptContext);
179 PrepareForBailoutForId(BailoutId::ScriptContext(), 179 PrepareForBailoutForId(BailoutId::ScriptContext(),
180 BailoutState::TOS_REGISTER); 180 BailoutState::TOS_REGISTER);
181 // The new target value is not used, clobbering is safe. 181 // The new target value is not used, clobbering is safe.
182 DCHECK_NULL(info->scope()->new_target_var()); 182 DCHECK_NULL(info->scope()->new_target_var());
183 } else { 183 } else {
184 if (info->scope()->new_target_var() != nullptr) { 184 if (info->scope()->new_target_var() != nullptr) {
185 __ push(r3); // Preserve new target. 185 __ push(r3); // Preserve new target.
186 } 186 }
187 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 187 FastNewFunctionContextStub stub(isolate());
188 FastNewFunctionContextStub stub(isolate(), slots); 188 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots));
189 __ CallStub(&stub); 189 __ CallStub(&stub);
190 // Result of FastNewFunctionContextStub is always in new space. 190 // Result of FastNewFunctionContextStub is always in new space.
191 need_write_barrier = false; 191 need_write_barrier = false;
192 } else {
193 __ push(r1);
194 __ CallRuntime(Runtime::kNewFunctionContext);
195 }
196 if (info->scope()->new_target_var() != nullptr) { 192 if (info->scope()->new_target_var() != nullptr) {
197 __ pop(r3); // Preserve new target. 193 __ pop(r3); // Preserve new target.
198 } 194 }
199 } 195 }
200 function_in_register_r1 = false; 196 function_in_register_r1 = false;
201 // Context is returned in r0. It replaces the context passed to us. 197 // Context is returned in r0. It replaces the context passed to us.
202 // It's saved in the stack and kept live in cp. 198 // It's saved in the stack and kept live in cp.
203 __ mov(cp, r0); 199 __ mov(cp, r0);
204 __ str(r0, MemOperand(fp, StandardFrameConstants::kContextOffset)); 200 __ str(r0, MemOperand(fp, StandardFrameConstants::kContextOffset));
205 // Copy any necessary parameters into the context. 201 // Copy any necessary parameters into the context.
(...skipping 3638 matching lines...) Expand 10 before | Expand all | Expand 10 after
3844 DCHECK(interrupt_address == 3840 DCHECK(interrupt_address ==
3845 isolate->builtins()->OnStackReplacement()->entry()); 3841 isolate->builtins()->OnStackReplacement()->entry());
3846 return ON_STACK_REPLACEMENT; 3842 return ON_STACK_REPLACEMENT;
3847 } 3843 }
3848 3844
3849 3845
3850 } // namespace internal 3846 } // namespace internal
3851 } // namespace v8 3847 } // namespace v8
3852 3848
3853 #endif // V8_TARGET_ARCH_ARM 3849 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698