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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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/x64/full-codegen-x64.cc ('k') | src/interpreter/bytecode-generator.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/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 __ Push(info->scope()->scope_info()); 182 __ Push(info->scope()->scope_info());
183 __ CallRuntime(Runtime::kNewScriptContext); 183 __ CallRuntime(Runtime::kNewScriptContext);
184 PrepareForBailoutForId(BailoutId::ScriptContext(), 184 PrepareForBailoutForId(BailoutId::ScriptContext(),
185 BailoutState::TOS_REGISTER); 185 BailoutState::TOS_REGISTER);
186 // The new target value is not used, clobbering is safe. 186 // The new target value is not used, clobbering is safe.
187 DCHECK_NULL(info->scope()->new_target_var()); 187 DCHECK_NULL(info->scope()->new_target_var());
188 } else { 188 } else {
189 if (info->scope()->new_target_var() != nullptr) { 189 if (info->scope()->new_target_var() != nullptr) {
190 __ push(edx); // Preserve new target. 190 __ push(edx); // Preserve new target.
191 } 191 }
192 FastNewFunctionContextStub stub(isolate()); 192 if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
193 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), 193 FastNewFunctionContextStub stub(isolate());
194 Immediate(slots)); 194 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
195 __ CallStub(&stub); 195 Immediate(slots));
196 // Result of FastNewFunctionContextStub is always in new space. 196 __ CallStub(&stub);
197 need_write_barrier = false; 197 // Result of FastNewFunctionContextStub is always in new space.
198 need_write_barrier = false;
199 } else {
200 __ push(edi);
201 __ CallRuntime(Runtime::kNewFunctionContext);
202 }
198 if (info->scope()->new_target_var() != nullptr) { 203 if (info->scope()->new_target_var() != nullptr) {
199 __ pop(edx); // Restore new target. 204 __ pop(edx); // Restore new target.
200 } 205 }
201 } 206 }
202 function_in_register = false; 207 function_in_register = false;
203 // Context is returned in eax. It replaces the context passed to us. 208 // Context is returned in eax. It replaces the context passed to us.
204 // It's saved in the stack and kept live in esi. 209 // It's saved in the stack and kept live in esi.
205 __ mov(esi, eax); 210 __ mov(esi, eax);
206 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); 211 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax);
207 212
(...skipping 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after
3515 isolate->builtins()->OnStackReplacement()->entry(), 3520 isolate->builtins()->OnStackReplacement()->entry(),
3516 Assembler::target_address_at(call_target_address, unoptimized_code)); 3521 Assembler::target_address_at(call_target_address, unoptimized_code));
3517 return ON_STACK_REPLACEMENT; 3522 return ON_STACK_REPLACEMENT;
3518 } 3523 }
3519 3524
3520 3525
3521 } // namespace internal 3526 } // namespace internal
3522 } // namespace v8 3527 } // namespace v8
3523 3528
3524 #endif // V8_TARGET_ARCH_X87 3529 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698