Index: src/ast/ast.h |
diff --git a/src/ast/ast.h b/src/ast/ast.h |
index 4629c620d379f90ba2e8971a6cde7291f02a1306..bd72eded8153b3d672fa035a52aa16563034b396 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. |
+ // |
+ // Our prediction is consersative in the sense that we may predict uncaught |
+ // although the handler may actually catch, but not the other way around. |
Michael Starzinger
2016/07/12 14:11:12
nit: The very last sentence of this comment is not
neis
2016/07/12 14:38:25
Yes, you are right. I reworded and removed the wo
|
+ 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_; |
}; |