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

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

Issue 1475793003: Reland "[Interpreter] Add CreateClosure to BytecodeGraphBuilder." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..56c2d7947ba40b710ea2444d58f9f616ec24bafc 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -643,7 +643,20 @@ void BytecodeGraphBuilder::VisitPopContext(
void BytecodeGraphBuilder::VisitCreateClosure(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ Handle<SharedFunctionInfo> shared_info =
+ Handle<SharedFunctionInfo>::cast(iterator.GetConstantForIndexOperand(0));
+ PretenureFlag tenured =
+ iterator.GetImmediateOperand(1) ? TENURED : NOT_TENURED;
+ const Operator* op = javascript()->CreateClosure(shared_info, tenured);
+ Node* closure = NewNode(op);
+ AddEmptyFrameStateInputs(closure);
+ environment()->BindAccumulator(closure);
+}
+
+
+void BytecodeGraphBuilder::VisitCreateClosureWide(
+ const interpreter::BytecodeArrayIterator& iterator) {
+ VisitCreateClosure(iterator);
}
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698