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

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: ... 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') | src/full-codegen/full-codegen.h » ('J')
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..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_;
};
« no previous file with comments | « no previous file | src/ast/ast-numbering.h » ('j') | src/full-codegen/full-codegen.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698