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

Unified Diff: src/crankshaft/x87/lithium-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/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-codegen-x87.cc
diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc
index cfdb610d5ad09c7c69d498b81703f81b7de8373b..28d0a65165f1a67adfe90ca61be8f60e3921d65d 100644
--- a/src/crankshaft/x87/lithium-codegen-x87.cc
+++ b/src/crankshaft/x87/lithium-codegen-x87.cc
@@ -146,12 +146,17 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
__ CallRuntime(Runtime::kNewScriptContext);
deopt_mode = Safepoint::kLazyDeopt;
} else {
- 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);
+ }
}
RecordSafepoint(deopt_mode);
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698