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

Unified 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, 2 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/x87/full-codegen-x87.cc
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc
index e07a7e6ba894a24c5b24b384888aec1cc06d09af..ebac0b8c161e36b4d3b28d3a16686cc279bcc2e3 100644
--- a/src/full-codegen/x87/full-codegen-x87.cc
+++ b/src/full-codegen/x87/full-codegen-x87.cc
@@ -189,12 +189,17 @@ void FullCodeGenerator::Generate() {
if (info->scope()->new_target_var() != nullptr) {
__ push(edx); // Preserve new target.
}
- FastNewFunctionContextStub stub(isolate());
- __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
- Immediate(slots));
- __ CallStub(&stub);
- // Result of FastNewFunctionContextStub is always in new space.
- need_write_barrier = false;
+ if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
+ FastNewFunctionContextStub stub(isolate());
+ __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
+ Immediate(slots));
+ __ CallStub(&stub);
+ // Result of FastNewFunctionContextStub is always in new space.
+ need_write_barrier = false;
+ } else {
+ __ push(edi);
+ __ CallRuntime(Runtime::kNewFunctionContext);
+ }
if (info->scope()->new_target_var() != nullptr) {
__ pop(edx); // Restore new target.
}
« 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