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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2457783004: Merged: 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/x87/full-codegen-x87.cc ('k') | test/mjsunit/regress/regress-655573.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index c6b6280bc5a0d9ef00a0b7593b45a36a83ac3b32..db5a596b85ba8e6bf5faae6ba309aa50517c2a3f 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -2917,7 +2917,12 @@ void BytecodeGenerator::BuildNewLocalActivationContext() {
.CallRuntime(Runtime::kPushModuleContext, args);
} else {
int slot_count = scope->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
- builder()->CreateFunctionContext(slot_count);
+ if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) {
+ builder()->CreateFunctionContext(slot_count);
+ } else {
+ builder()->CallRuntime(Runtime::kNewFunctionContext,
+ Register::function_closure());
+ }
}
}
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | test/mjsunit/regress/regress-655573.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698