Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 74cfd4782898db131ac44803c58464fae5e46d66..212da8e70efcf882836f631698b18506cd4a9a60 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -652,6 +652,23 @@ void Interpreter::DoJumpIfFalseConstant( |
} |
+// CreateClosure <tenured> |
+// |
+// Creates a new closure for SharedFunctionInfo in the accumulator with the |
+// PretenureFlag <tenured>. |
+void Interpreter::DoCreateClosure(compiler::InterpreterAssembler* assembler) { |
+ // TODO(rmcilroy): Possibly call FastNewClosureStub when possible instead of |
Michael Starzinger
2015/10/09 13:19:00
About this TODO: Michael Stanton is currently work
rmcilroy
2015/10/12 17:00:15
Good to know, thanks!
|
+ // calling into the runtime. |
+ Node* shared = __ GetAccumulator(); |
+ Node* tenured_raw = __ BytecodeOperandImm8(0); |
+ Node* tenured = __ SmiTag(tenured_raw); |
+ Node* result = |
+ __ CallRuntime(Runtime::kInterpreterNewClosure, shared, tenured); |
+ __ SetAccumulator(result); |
+ __ Dispatch(); |
+} |
+ |
+ |
// Return |
// |
// Return the value in the accumulator. |