summaryrefslogtreecommitdiff
path: root/src/mir
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-27 21:16:59 +1100
committerJohn Hodge <tpg@mutabah.net>2016-12-27 21:16:59 +1100
commitd82161dd7a94601433e5b9abae7a220a0980d8e0 (patch)
tree7c7cc8c72d70d71932d4b70a10bc08134f705ca2 /src/mir
parentf0a84933ab3fa31f10001808eeb7e98dd6f8318e (diff)
downloadmrust-d82161dd7a94601433e5b9abae7a220a0980d8e0.tar.gz
MIR - Disable validation so travis build will pass
Diffstat (limited to 'src/mir')
-rw-r--r--src/mir/from_hir.cpp2
-rw-r--r--src/mir/from_hir_match.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp
index 5e8bf757..40b5a848 100644
--- a/src/mir/from_hir.cpp
+++ b/src/mir/from_hir.cpp
@@ -528,6 +528,8 @@ namespace {
assert( !m_builder.has_result() );
m_builder.end_block( ::MIR::Terminator::make_Diverge({}) );
}
+
+ // TODO: Store the variable state on a break for restoration at the end of the loop.
}
void visit(::HIR::ExprNode_LoopControl& node) override
{
diff --git a/src/mir/from_hir_match.cpp b/src/mir/from_hir_match.cpp
index 78382db3..a8752a73 100644
--- a/src/mir/from_hir_match.cpp
+++ b/src/mir/from_hir_match.cpp
@@ -120,8 +120,6 @@ void MIR_LowerHIR_Match( MirBuilder& builder, MirConverter& conv, ::HIR::ExprNod
auto next_block = builder.new_bb_unlinked();
// 1. Stop the current block so we can generate code
- //auto first_cmp_block = builder.new_bb_unlinked();
- //builder.end_block( ::MIR::Terminator::make_Goto(first_cmp_block) );
auto first_cmp_block = builder.pause_cur_block();
@@ -384,6 +382,8 @@ void MIR_LowerHIR_Match( MirBuilder& builder, MirConverter& conv, ::HIR::ExprNod
{
DEBUG("> (" << arm_rule.arm_idx << ", " << arm_rule.pat_idx << ") - " << arm_rule.m_rules);
}
+
+ // TODO: Don't generate inner code until decisions are generated (keeps MIR flow nice)
// TODO: Detect if a rule is ordering-dependent. In this case we currently have to fall back on the simple match code
// - A way would be to search for `_` rules with non _ rules following. Would false-positive in some cases, but shouldn't false negative