You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decide up front whether a term has any static exit
count_helper created its table on the first static exit and reported None
when it never did, which meant threading a lazy accessor through the
whole counting walk. A four line predicate answers the same question
before counting starts, so the counter goes back to the shape it had and
the pass returns its input untouched when there is nothing to rewrite.
That predicate names the two nodes Lam_pass_exits rewrites, so a case
added there that rewrites anything else has to be added here too or the
pass silently stops firing. It says so.
subst_helper also hands its term back when a retained catch or an
unresolved raise comes through unchanged.
The three tests cover what nothing else can. Removing either sharing
site, or the removal of a catch nothing raises to, leaves the generated
JavaScript byte for byte identical, and each mutation fails exactly one
of them: a dead catch is dropped by code generation anyway, so its
removal here is invisible to every output fixture we have.
Signed-off-by: Cristiano Calcagno <ccrisccris@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W8g8qwBARAcvW9MyuKQq8H
0 commit comments