| 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);
|
| }
|
|
|
|
|
|
|