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

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

Issue 2205813002: X87: Make FastNewFunctionContextStub take slots parameter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/x87/lithium-codegen-x87.cc ('k') | src/x87/interface-descriptors-x87.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_X87 5 #if V8_TARGET_ARCH_X87
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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 __ Push(info->scope()->GetScopeInfo(info->isolate())); 169 __ Push(info->scope()->GetScopeInfo(info->isolate()));
170 __ CallRuntime(Runtime::kNewScriptContext); 170 __ CallRuntime(Runtime::kNewScriptContext);
171 PrepareForBailoutForId(BailoutId::ScriptContext(), 171 PrepareForBailoutForId(BailoutId::ScriptContext(),
172 BailoutState::TOS_REGISTER); 172 BailoutState::TOS_REGISTER);
173 // The new target value is not used, clobbering is safe. 173 // The new target value is not used, clobbering is safe.
174 DCHECK_NULL(info->scope()->new_target_var()); 174 DCHECK_NULL(info->scope()->new_target_var());
175 } else { 175 } else {
176 if (info->scope()->new_target_var() != nullptr) { 176 if (info->scope()->new_target_var() != nullptr) {
177 __ push(edx); // Preserve new target. 177 __ push(edx); // Preserve new target.
178 } 178 }
179 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 179 FastNewFunctionContextStub stub(isolate());
180 FastNewFunctionContextStub stub(isolate(), slots); 180 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
181 __ CallStub(&stub); 181 Immediate(slots));
182 // Result of FastNewFunctionContextStub is always in new space. 182 __ CallStub(&stub);
183 need_write_barrier = false; 183 // Result of FastNewFunctionContextStub is always in new space.
184 } else { 184 need_write_barrier = false;
185 __ push(edi);
186 __ CallRuntime(Runtime::kNewFunctionContext);
187 }
188 if (info->scope()->new_target_var() != nullptr) { 185 if (info->scope()->new_target_var() != nullptr) {
189 __ pop(edx); // Restore new target. 186 __ pop(edx); // Restore new target.
190 } 187 }
191 } 188 }
192 function_in_register = false; 189 function_in_register = false;
193 // Context is returned in eax. It replaces the context passed to us. 190 // Context is returned in eax. It replaces the context passed to us.
194 // It's saved in the stack and kept live in esi. 191 // It's saved in the stack and kept live in esi.
195 __ mov(esi, eax); 192 __ mov(esi, eax);
196 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); 193 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax);
197 194
(...skipping 3468 matching lines...) Expand 10 before | Expand all | Expand 10 after
3666 isolate->builtins()->OnStackReplacement()->entry(), 3663 isolate->builtins()->OnStackReplacement()->entry(),
3667 Assembler::target_address_at(call_target_address, unoptimized_code)); 3664 Assembler::target_address_at(call_target_address, unoptimized_code));
3668 return ON_STACK_REPLACEMENT; 3665 return ON_STACK_REPLACEMENT;
3669 } 3666 }
3670 3667
3671 3668
3672 } // namespace internal 3669 } // namespace internal
3673 } // namespace v8 3670 } // namespace v8
3674 3671
3675 #endif // V8_TARGET_ARCH_X87 3672 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.cc ('k') | src/x87/interface-descriptors-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698