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
{{ message }}
Repository navigation
Dataflow analysis in the compiler to avoid runtime NULL checks #93143
We can turn this NULL-check into an assertion in many cases, where we can determine at compile time that the local variable is already initialized. Preliminary tests show that almost all LOAD_FAST instructions can be statically analyzed to be loading already-initialized variables.
The one twist is handling del frame.f_locals["x"] or frame.f_lineno = 17, where previously-safe loads could become unsafe. For now, we can just replace all the LOAD_FAST (no null check) with LOAD_FAST_CHECK in that particular code object.
Activity
gh-93143: Avoid NULL check in LOAD_FAST based on analysis in the comp…
sweeneyde commentedon Jun 1, 2022
TODO: documentation
GH-93143: Don't turn LOAD_FAST into LOAD_FAST_CHECK (GH-99075)