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

Unified Diff: runtime/vm/intermediate_language.h

Issue 2692803006: Track the 'awaiter return' call stack use it to detect uncaught exceptions in async functions (Closed)
Patch Set: rmacnak review Created 3 years, 10 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
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 5f837bf9219f634e99772f38893d076ac8fe362e..b58d9bf41e1c5310a63dcf474dfec02cc5c4bd49 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -1469,7 +1469,9 @@ class IndirectEntryInstr : public JoinEntryInstr {
class CatchBlockEntryInstr : public BlockEntryInstr {
public:
- CatchBlockEntryInstr(intptr_t block_id,
+ CatchBlockEntryInstr(TokenPosition handler_token_pos,
+ bool is_generated,
+ intptr_t block_id,
intptr_t try_index,
GraphEntryInstr* graph_entry,
const Array& handler_types,
@@ -1487,7 +1489,9 @@ class CatchBlockEntryInstr : public BlockEntryInstr {
exception_var_(exception_var),
stacktrace_var_(stacktrace_var),
needs_stacktrace_(needs_stacktrace),
- should_restore_closure_context_(should_restore_closure_context) {
+ should_restore_closure_context_(should_restore_closure_context),
+ handler_token_pos_(handler_token_pos),
+ is_generated_(is_generated) {
deopt_id_ = deopt_id;
}
@@ -1508,6 +1512,9 @@ class CatchBlockEntryInstr : public BlockEntryInstr {
bool needs_stacktrace() const { return needs_stacktrace_; }
+ bool is_generated() const { return is_generated_; }
+ TokenPosition handler_token_pos() const { return handler_token_pos_; }
+
// Returns try index for the try block to which this catch handler
// corresponds.
intptr_t catch_try_index() const { return catch_try_index_; }
@@ -1541,6 +1548,8 @@ class CatchBlockEntryInstr : public BlockEntryInstr {
const LocalVariable& stacktrace_var_;
const bool needs_stacktrace_;
const bool should_restore_closure_context_;
+ TokenPosition handler_token_pos_;
+ bool is_generated_;
DISALLOW_COPY_AND_ASSIGN(CatchBlockEntryInstr);
};

Powered by Google App Engine
This is Rietveld 408576698