Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 761199766eb9c5e3663ad435d55761c2775defe1..e86612ce90afd8ce9e067884629a5e3c7777a31a 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -1821,6 +1821,20 @@ void Interpreter::DoCreateFunctionContext(InterpreterAssembler* assembler) { |
__ Dispatch(); |
} |
+// CreateWithContext <register> |
+// |
+// Creates a new context for a with-statement with the object in |register| and |
+// the closure in the accumulator. |
+void Interpreter::DoCreateWithContext(InterpreterAssembler* assembler) { |
+ Node* reg_index = __ BytecodeOperandReg(0); |
+ Node* object = __ LoadRegister(reg_index); |
+ Node* closure = __ GetAccumulator(); |
+ Node* context = __ GetContext(); |
+ __ SetAccumulator( |
+ __ CallRuntime(Runtime::kPushWithContext, context, object, closure)); |
+ __ Dispatch(); |
+} |
+ |
// CreateMappedArguments |
// |
// Creates a new mapped arguments object. |