summaryrefslogtreecommitdiff
path: root/src/mir
diff options
context:
space:
mode:
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