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

Unified Diff: src/ast/ast.h

Issue 2146493002: Move catch prediction into frontend. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable test on Turbofan Created 4 years, 5 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/ast/ast-numbering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index 4629c620d379f90ba2e8971a6cde7291f02a1306..f03e8c8352f2fce55be6a6e59eaba0205ec24953 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -1140,12 +1140,26 @@ class TryStatement : public Statement {
Block* try_block() const { return try_block_; }
void set_try_block(Block* b) { try_block_ = b; }
+ // Prediction of whether exceptions thrown into the handler for this try block
+ // will be caught.
+ //
+ // This is set in ast-numbering and later compiled into the code's handler
+ // table. The runtime uses this information to implement a feature that
+ // notifies the debugger when an uncaught exception is thrown, _before_ the
+ // exception propagates to the top.
+ //
+ // Since it's generally undecidable whether an exception will be caught, our
+ // prediction is only an approximation.
+ bool catch_predicted() const { return catch_predicted_; }
+ void set_catch_predicted(bool b) { catch_predicted_ = b; }
+
protected:
TryStatement(Zone* zone, Block* try_block, int pos)
- : Statement(zone, pos), try_block_(try_block) {}
+ : Statement(zone, pos), try_block_(try_block), catch_predicted_(false) {}
private:
Block* try_block_;
+ bool catch_predicted_;
};
« no previous file with comments | « no previous file | src/ast/ast-numbering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698