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

Unified Diff: src/interpreter/control-flow-builders.cc

Issue 1607433005: [interpreter] Implement exception handler table building. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added moar tests. Created 4 years, 11 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 | « src/interpreter/control-flow-builders.h ('k') | src/interpreter/handler-table-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/control-flow-builders.cc
diff --git a/src/interpreter/control-flow-builders.cc b/src/interpreter/control-flow-builders.cc
index 99066e8c7e96fc3a51696ae754f3b9401ba30c2d..b50360c8e713265ef8edab44f6c8cb66c7c1ba8b 100644
--- a/src/interpreter/control-flow-builders.cc
+++ b/src/interpreter/control-flow-builders.cc
@@ -137,6 +137,39 @@ void SwitchBuilder::SetCaseTarget(int index) {
builder()->Bind(&site);
}
+
+void TryCatchBuilder::BeginTry(Register context) {
+ builder()->MarkTryBegin(handler_id_, context);
+}
+
+
+void TryCatchBuilder::EndTry() {
+ builder()->MarkTryEnd(handler_id_);
+ builder()->Jump(&exit_);
+ builder()->Bind(&handler_);
+ builder()->MarkHandler(handler_id_, true);
+}
+
+
+void TryCatchBuilder::EndCatch() { builder()->Bind(&exit_); }
+
+
+void TryFinallyBuilder::BeginTry(Register context) {
+ builder()->MarkTryBegin(handler_id_, context);
+}
+
+
+void TryFinallyBuilder::EndTry() {
+ builder()->MarkTryEnd(handler_id_);
+ builder()->Bind(&handler_);
+ builder()->MarkHandler(handler_id_, false);
+}
+
+
+void TryFinallyBuilder::EndFinally() {
+ // Nothing to be done here.
+}
+
} // namespace interpreter
} // namespace internal
} // namespace v8
« no previous file with comments | « src/interpreter/control-flow-builders.h ('k') | src/interpreter/handler-table-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698