Index: src/interpreter/control-flow-builders.cc |
diff --git a/src/interpreter/control-flow-builders.cc b/src/interpreter/control-flow-builders.cc |
index b50360c8e713265ef8edab44f6c8cb66c7c1ba8b..c30fc6d0f676f3cb4b48aa52e94c8bdb16a90101 100644 |
--- a/src/interpreter/control-flow-builders.cc |
+++ b/src/interpreter/control-flow-builders.cc |
@@ -159,13 +159,31 @@ void TryFinallyBuilder::BeginTry(Register context) { |
} |
+void TryFinallyBuilder::LeaveTry() { |
+ finalization_sites_.push_back(BytecodeLabel()); |
+ builder()->Jump(&finalization_sites_.back()); |
+} |
+ |
+ |
void TryFinallyBuilder::EndTry() { |
builder()->MarkTryEnd(handler_id_); |
+} |
+ |
+ |
+void TryFinallyBuilder::BeginHandler() { |
builder()->Bind(&handler_); |
builder()->MarkHandler(handler_id_, false); |
} |
+void TryFinallyBuilder::BeginFinally() { |
+ for (size_t i = 0; i < finalization_sites_.size(); i++) { |
+ BytecodeLabel& site = finalization_sites_.at(i); |
+ builder()->Bind(&site); |
+ } |
+} |
+ |
+ |
void TryFinallyBuilder::EndFinally() { |
// Nothing to be done here. |
} |