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

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

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: Crankshaft backends and scope deserialization 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
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 9c6dcf9fc8ee513365d6c41606294bb3486110ba..bd8399c781d4e090331d07e5baf097a1dfc059ed 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -2927,6 +2927,9 @@ void BytecodeGenerator::BuildNewLocalActivationContext() {
.LoadLiteral(scope->scope_info())
.StoreAccumulatorInRegister(args[2])
.CallRuntime(Runtime::kPushModuleContext, args);
+ } else if (scope->is_eval_scope()) {
+ int slot_count = scope->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
+ builder()->CreateEvalContext(slot_count);
} else {
int slot_count = scope->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
builder()->CreateFunctionContext(slot_count);

Powered by Google App Engine
This is Rietveld 408576698