Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index ba1c701c556977e0f5a4d8a95d1fc2d733ff5470..a7e14f3fa18f6dd4bd7a67223830f788a22cfe83 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -1821,6 +1821,22 @@ void Interpreter::DoCreateFunctionContext(InterpreterAssembler* assembler) { |
__ Dispatch(); |
} |
+// CreateCatchContext <exception> <index> |
+// |
+// Creates a new context for a catch block with the |exception| in register and |
+// the variable name at |index| for and the closure in the accumulator. |
Michael Starzinger
2016/08/18 15:00:42
nit: Stray "for" in comment.
klaasb
2016/08/18 15:21:42
Done.
|
+void Interpreter::DoCreateCatchContext(InterpreterAssembler* assembler) { |
+ Node* exception_reg = __ BytecodeOperandReg(0); |
+ Node* exception = __ LoadRegister(exception_reg); |
+ Node* index = __ BytecodeOperandIdx(1); |
+ Node* name = __ LoadConstantPoolEntry(index); |
+ Node* closure = __ GetAccumulator(); |
+ Node* context = __ GetContext(); |
+ __ SetAccumulator(__ CallRuntime(Runtime::kPushCatchContext, context, name, |
+ exception, closure)); |
+ __ Dispatch(); |
+} |
+ |
// CreateMappedArguments |
// |
// Creates a new mapped arguments object. |