diff options
| author | gingerBill <bill@gingerbill.org> | 2023-07-19 14:19:01 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-07-19 14:19:01 +0100 |
| commit | b2edab193f26355020c5c13af432145712d8cf0f (patch) | |
| tree | adf8460f23490425ce748895211c61dcc79dcf8c /src/tilde_stmt.cpp | |
| parent | 184563bbe1f55be17f39cdc13cb784a562419b75 (diff) | |
Support branch statements `break`/`continue`/`fallthrough`
Diffstat (limited to 'src/tilde_stmt.cpp')
| -rw-r--r-- | src/tilde_stmt.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/tilde_stmt.cpp b/src/tilde_stmt.cpp index 06be4f111..e94ac5d18 100644 --- a/src/tilde_stmt.cpp +++ b/src/tilde_stmt.cpp @@ -1330,14 +1330,10 @@ gb_internal void cg_build_stmt(cgProcedure *p, Ast *node) { } } } - if (block != nullptr) { - cg_emit_defer_stmts(p, cgDeferExit_Branch, block); - } - + GB_ASSERT(block != nullptr); + cg_emit_defer_stmts(p, cgDeferExit_Branch, block); tb_inst_goto(p->func, block); - tb_inst_set_control(p->func, block); - tb_inst_unreachable(p->func); tb_inst_set_control(p->func, prev_block); case_end; |