viz: pass through RewriteNotReady (#11690)

This commit is contained in:
qazal 2025-08-16 00:33:59 +03:00 committed by GitHub
commit ec4fccb1da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -848,8 +848,8 @@ class TrackedPatternMatcher(PatternMatcher):
continue
match_stats[p][1] += 1
try: ret = match(uop, ctx)
except Exception:
if TRACK_MATCH_STATS >= 2 and active_rewrites:
except Exception as e:
if TRACK_MATCH_STATS >= 2 and active_rewrites and not isinstance(e, RewriteNotReady):
active_rewrites[-1].matches.append((track_uop(uop), track_uop(UOp(Ops.NOOP, arg=str(sys.exc_info()[1]))), p.location))
raise
if ret is not None and ret is not uop: