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

Unified Diff: src/compiler/bytecode-graph-builder.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/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 37cb564864f6a15abffaa22450804b6caa13fedb..7bec8be6c5a4edca2da351b5f44937116d4f523e 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -1224,6 +1224,14 @@ void BytecodeGraphBuilder::VisitCreateFunctionContext() {
environment()->BindAccumulator(context);
}
+void BytecodeGraphBuilder::VisitCreateEvalContext() {
+ uint32_t slots = bytecode_iterator().GetUnsignedImmediateOperand(0);
+ // TODO(littledan): Make an eval context, not a function context
+ const Operator* op = javascript()->CreateFunctionContext(slots);
+ Node* context = NewNode(op, GetFunctionClosure());
+ environment()->BindAccumulator(context);
+}
+
void BytecodeGraphBuilder::VisitCreateCatchContext() {
interpreter::Register reg = bytecode_iterator().GetRegisterOperand(0);
Node* exception = environment()->LookupRegister(reg);
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler/js-create-lowering.h » ('j') | src/contexts.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698