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

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

Issue 2187523002: [interpreter] Add CreateFunctionContext bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fncontextstubslotparam
Patch Set: fix bytecode-generator 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 side-by-side diff with in-line comments
Download patch
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 58f6e7288dc9c71e5c37863e4c643c0dbbfafaa0..38a280a4d746b2c4f9b807324938d2f6ce658fd5 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -3010,8 +3010,8 @@ void BytecodeGenerator::VisitNewLocalFunctionContext() {
.StoreAccumulatorInRegister(scope_info)
.CallRuntime(Runtime::kNewScriptContext, closure, 2);
} else {
- builder()->CallRuntime(Runtime::kNewFunctionContext,
- Register::function_closure(), 1);
+ int slot_count = scope->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
+ builder()->CreateFunctionContext(slot_count);
}
execution_result()->SetResultInAccumulator();
}

Powered by Google App Engine
This is Rietveld 408576698