Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 0c55ae79270af27e3fe3c0102795dc2aaa3f3435..ef7735e38ccbe00521091c3aee72ba62366b7b86 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -1356,15 +1356,16 @@ void Interpreter::DoCreateObjectLiteral( |
} |
-// CreateClosure <tenured> |
+// CreateClosure <index> <tenured> |
// |
-// Creates a new closure for SharedFunctionInfo in the accumulator with the |
-// PretenureFlag <tenured>. |
+// Creates a new closure for SharedFunctionInfo at position |index| in the |
+// constant pool and with the PretenureFlag <tenured>. |
void Interpreter::DoCreateClosure(compiler::InterpreterAssembler* assembler) { |
// TODO(rmcilroy): Possibly call FastNewClosureStub when possible instead of |
// calling into the runtime. |
- Node* shared = __ GetAccumulator(); |
- Node* tenured_raw = __ BytecodeOperandImm(0); |
+ Node* index = __ BytecodeOperandIdx(0); |
+ Node* shared = __ LoadConstantPoolEntry(index); |
+ Node* tenured_raw = __ BytecodeOperandImm(1); |
Node* tenured = __ SmiTag(tenured_raw); |
Node* result = |
__ CallRuntime(Runtime::kInterpreterNewClosure, shared, tenured); |
@@ -1373,6 +1374,16 @@ void Interpreter::DoCreateClosure(compiler::InterpreterAssembler* assembler) { |
} |
+// CreateClosureWide <index> <tenured> |
+// |
+// Creates a new closure for SharedFunctionInfo at position |index| in the |
+// constant pool and with the PretenureFlag <tenured>. |
+void Interpreter::DoCreateClosureWide( |
+ compiler::InterpreterAssembler* assembler) { |
+ return DoCreateClosure(assembler); |
+} |
+ |
+ |
// CreateMappedArguments |
// |
// Creates a new mapped arguments object. |