Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: src/interpreter/interpreter.cc

Issue 2302013002: Store the scope info in catch contexts (Closed)
Patch Set: updates Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index c8d69e2b377742a5a695c6a44e3265a6579145f7..2fa1b88e50fc70d71c0ae4188f6ee3d98d4df75c 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1993,19 +1993,22 @@ void Interpreter::DoCreateBlockContext(InterpreterAssembler* assembler) {
__ Dispatch();
}
-// CreateCatchContext <exception> <index>
+// CreateCatchContext <exception> <name_idx> <scope_info_idx>
//
// Creates a new context for a catch block with the |exception| in a register,
-// the variable name at |index| and the closure in the accumulator.
+// the variable name at |name_idx|, the ScopeInfo at |scope_info_idx|, and the
+// closure in the accumulator.
void Interpreter::DoCreateCatchContext(InterpreterAssembler* assembler) {
Node* exception_reg = __ BytecodeOperandReg(0);
Node* exception = __ LoadRegister(exception_reg);
- Node* index = __ BytecodeOperandIdx(1);
- Node* name = __ LoadConstantPoolEntry(index);
+ Node* name_idx = __ BytecodeOperandIdx(1);
+ Node* name = __ LoadConstantPoolEntry(name_idx);
+ Node* scope_info_idx = __ BytecodeOperandIdx(2);
+ Node* scope_info = __ LoadConstantPoolEntry(scope_info_idx);
Node* closure = __ GetAccumulator();
Node* context = __ GetContext();
__ SetAccumulator(__ CallRuntime(Runtime::kPushCatchContext, context, name,
- exception, closure));
+ exception, scope_info, closure));
__ Dispatch();
}

Powered by Google App Engine
This is Rietveld 408576698