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

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

Issue 1613443002: [interpreter] Implement handling of try-finally constructs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. 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/bytecode-generator.cc ('k') | src/interpreter/control-flow-builders.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/control-flow-builders.h
diff --git a/src/interpreter/control-flow-builders.h b/src/interpreter/control-flow-builders.h
index 2de3887a64be0a8a45cab19fcea6f26bf1efff61..d273c2509d5cdf35c4f65c6f1e112e03832b41bb 100644
--- a/src/interpreter/control-flow-builders.h
+++ b/src/interpreter/control-flow-builders.h
@@ -166,15 +166,23 @@ class TryCatchBuilder final : public ControlFlowBuilder {
class TryFinallyBuilder final : public ControlFlowBuilder {
public:
explicit TryFinallyBuilder(BytecodeArrayBuilder* builder)
- : ControlFlowBuilder(builder), handler_id_(builder->NewHandlerEntry()) {}
+ : ControlFlowBuilder(builder),
+ handler_id_(builder->NewHandlerEntry()),
+ finalization_sites_(builder->zone()) {}
void BeginTry(Register context);
+ void LeaveTry();
void EndTry();
+ void BeginHandler();
+ void BeginFinally();
void EndFinally();
private:
int handler_id_;
BytecodeLabel handler_;
+
+ // Unbound labels that identify jumps to the finally block in the code.
+ ZoneVector<BytecodeLabel> finalization_sites_;
};
} // namespace interpreter
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/interpreter/control-flow-builders.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698