diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-28 15:55:37 +1100 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-28 15:55:37 +1100 |
commit | f057e423c91a7ab821b68e7ec04f3280c24a1ffc (patch) | |
tree | 94eb3e0a31635aae23ae13ee86b2a6204cf83ed4 /src/mir/from_hir.hpp | |
parent | 583686bd2ebef786e1396ecaff4c61a984135b74 (diff) | |
download | mrust-f057e423c91a7ab821b68e7ec04f3280c24a1ffc.tar.gz |
MIR Gen - Track exit states of loops
Diffstat (limited to 'src/mir/from_hir.hpp')
-rw-r--r-- | src/mir/from_hir.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mir/from_hir.hpp b/src/mir/from_hir.hpp index b89e8750..405d4ffd 100644 --- a/src/mir/from_hir.hpp +++ b/src/mir/from_hir.hpp @@ -91,6 +91,8 @@ TAGGED_UNION(ScopeType, Variables, ::std::vector<SplitArm> arms; }), (Loop, struct { + ::std::set<unsigned int> changed_vars; + ::std::set<unsigned int> changed_tmps; ::std::vector<SplitArm> exit_states; }) ); @@ -198,7 +200,7 @@ public: ScopeHandle new_scope_split(const Span& sp); ScopeHandle new_scope_loop(const Span& sp); void terminate_scope(const Span& sp, ScopeHandle , bool cleanup=true); - void terminate_scope_early(const Span& sp, const ScopeHandle& ); + void terminate_scope_early(const Span& sp, const ScopeHandle& , bool loop_exit=false); void end_split_arm(const Span& sp, const ScopeHandle& , bool reachable); void end_split_arm_early(const Span& sp); |