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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 2260473003: [interpreter] Add CreateCatchContext bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | src/interpreter/interpreter.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 796ceafea1d68008944397f68747e23a6a94beb5..24cd2ed911135461536b941dba60ab4f8ac21bb7 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -942,6 +942,18 @@ void BytecodeGraphBuilder::VisitCreateFunctionContext() {
environment()->BindAccumulator(context);
}
+void BytecodeGraphBuilder::VisitCreateCatchContext() {
+ interpreter::Register reg = bytecode_iterator().GetRegisterOperand(0);
+ Node* exception = environment()->LookupRegister(reg);
+ Handle<String> name =
+ Handle<String>::cast(bytecode_iterator().GetConstantForIndexOperand(1));
+ Node* closure = environment()->LookupAccumulator();
+
+ const Operator* op = javascript()->CreateCatchContext(name);
+ Node* context = NewNode(op, exception, closure);
+ environment()->BindAccumulator(context);
+}
+
void BytecodeGraphBuilder::BuildCreateArguments(CreateArgumentsType type) {
FrameStateBeforeAndAfter states(this);
const Operator* op = javascript()->CreateArguments(type);
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | src/interpreter/interpreter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698