Removing use of $assignable and deprecate it. Fix regression for stacktraces on MacOS. Added readline_to_stream. Regression: Chaining an optional together with contracts could in some cases lose the optional.

This commit is contained in:
Christoffer Lerno
2025-07-21 03:20:40 +02:00
parent 382a65abcd
commit 869bcf8b2b
18 changed files with 116 additions and 69 deletions

View File

@@ -1359,14 +1359,13 @@ void llvm_emit_ignored_expr(GenContext *c, Expr *expr)
LLVMBasicBlockRef discard_fail = llvm_basic_block_new(c, "voiderr");
PUSH_CATCH_VAR_BLOCK(NULL, discard_fail);
llvm_emit_expr(c, &value, expr);
llvm_value_fold_optional(c, &value);
EMIT_EXPR_LOC(c, expr);
// We only optimize if there is no instruction the current block
if (!LLVMGetFirstInstruction(c->current_block))
{
llvm_prune_optional(c, discard_fail);
}
else
else if (!llvm_basic_block_is_unused(discard_fail))
{
llvm_emit_br(c, discard_fail);
llvm_emit_block(c, discard_fail);