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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 1458603012: [Interpreter] Add CreateClosure to BytecodeGraphBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Better matching. Created 5 years, 1 month 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 5bb208ce94f7e5d8a2550d24cb9d0a1f4268c29b..7dc6dbe580e050729402afeff8d6afd23d2e56ba 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -5,6 +5,7 @@
#include "src/compiler/bytecode-graph-builder.h"
#include "src/compiler/linkage.h"
+#include "src/compiler/node-matchers.h"
#include "src/compiler/operator-properties.h"
#include "src/interpreter/bytecode-array-iterator.h"
@@ -643,7 +644,15 @@ void BytecodeGraphBuilder::VisitPopContext(
void BytecodeGraphBuilder::VisitCreateClosure(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ Node* accumulator = environment()->LookupAccumulator();
+ HeapObjectMatcher shared_info_matcher(accumulator);
+ PretenureFlag pretenure =
+ iterator.GetImmediateOperand(0) ? TENURED : NOT_TENURED;
+ const Operator* op = javascript()->CreateClosure(
+ Handle<SharedFunctionInfo>::cast(shared_info_matcher.Value()), pretenure);
+ Node* closure = NewNode(op);
+ AddEmptyFrameStateInputs(closure);
+ environment()->BindAccumulator(closure);
}

Powered by Google App Engine
This is Rietveld 408576698