locals closed over by a ^:once fn aren't cleared if the fn is in a branch

Description

Minimal case:

This is a severe bug as it means that every local used inside a loop or try/catch expression that the clojure compiler internally hoists in a FNONCE, in a conditional branch, cannot be cleared at the moment.

As a concrete example reported in slack,

Approach: don't set a new clearing frame if the fn is ^:once and there's an existing clearing frame
Patch: 0001-CLJ-2145-fix-clearing-of-locals-closed-over-by-a-FNO.patch

Environment

None

Assignee

Unassigned

Reporter

Nicola Mometto

Approval

Triaged

Patch

Code

Priority

Critical
Configure