diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-02-04 15:53:55 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-02-04 15:53:55 +0100 |
commit | b1bf1e999fcfd32dacbc7396dbeda64882272b8a (patch) | |
tree | 494d4de13c1fc637a51e5f65b6ba13a305b318ce /vala/valablock.vala | |
parent | d9a849a7338b45bf9f95128584538d7b02b76ee6 (diff) | |
download | vala-b1bf1e999fcfd32dacbc7396dbeda64882272b8a.tar.gz |
vala: Add Block.unreachable_exit and have it set accordingly by FlowAnalyzer
Use this control flow information in codegen rather than doing an
educated guess based on occurring ReturnStatement nodes.
See https://gitlab.gnome.org/GNOME/vala/issues/838
Diffstat (limited to 'vala/valablock.vala')
-rw-r--r-- | vala/valablock.vala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vala/valablock.vala b/vala/valablock.vala index e13f2b2be..e002909bf 100644 --- a/vala/valablock.vala +++ b/vala/valablock.vala @@ -32,6 +32,11 @@ public class Vala.Block : Symbol, Statement { */ public bool contains_jump_statement { get; set; } + /** + * Specifies whether the end of this block is unreachable. + */ + public bool unreachable_exit { get; set; } + public bool captured { get; set; } private List<Statement> statement_list = new ArrayList<Statement> (); |