diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-04-22 13:31:07 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-04-22 13:31:07 +0800 |
commit | 83b9e560df97f054dc2ea0660cda3fb55cd274d7 (patch) | |
tree | 057be3e50eee6278f00b260a581d08931aa6e929 /src/mir/mir.cpp | |
parent | 6f5792ac00800b1a28b8c9c81eb80046f37b2f03 (diff) | |
download | mrust-83b9e560df97f054dc2ea0660cda3fb55cd274d7.tar.gz |
MIR - Add ScopeEnd statement to indicate where a value will no longer be used
Diffstat (limited to 'src/mir/mir.cpp')
-rw-r--r-- | src/mir/mir.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mir/mir.cpp b/src/mir/mir.cpp index 3c16af37..9edc925b 100644 --- a/src/mir/mir.cpp +++ b/src/mir/mir.cpp @@ -483,6 +483,14 @@ namespace MIR { if(e.flag_idx != ~0u) os << "IF df$" << e.flag_idx; os << ")"; + ), + (ScopeEnd, + os << "ScopeEnd("; + for(auto idx : e.vars) + os << "var$" << idx << ","; + for(auto idx : e.tmps) + os << "tmp$" << idx << ","; + os << ")"; ) ) return os; |