implement M6 borrow checker integration

This commit is contained in:
2026-08-16 20:46:45 +09:00
parent db0ed4bbe0
commit aba9370ea6
3 changed files with 481 additions and 14 deletions
+4 -1
View File
@@ -314,7 +314,10 @@ static int fe_own_live_add(FeOwnLiveness *live, FeNode *decl)
FeOwnLastUse *slot;
unsigned capacity;
const char *cname;
if (!live || !decl || !live->arena || !fe_own_is_reference_like(decl->sem_type))
/* This prepass runs before local inference. Recording every local is
harmless (only reference bindings consume the result) and lets an
inferred `let r = &x` participate in last-use analysis. */
if (!live || !decl || !live->arena)
return 1;
cname = decl->cname ? decl->cname : decl->text;
if (!cname || fe_own_live_find(live, cname)) return 1;