This patch point makes sure that when the object has a singleton class, the JIT code is invalidated. As of now, this is only needed for C call optimization.
In YJIT, the singleton class guard only applies to Array, Hash, and String. But in ZJIT, we may optimize C calls from gems (e.g. sqlite3). So the patch point needs to be applied to a broader range of classes.
ZJIT: Only generate NoSingletonClass guard when the type can have singleton class
ZJIT: Update or forget NoSingletonClass patch point when needed
ZJIT: Add
NoSingletonClass
patch point (#14680)This patch point makes sure that when the object has a singleton class,
the JIT code is invalidated. As of now, this is only needed for C call
optimization.
In YJIT, the singleton class guard only applies to Array, Hash, and String.
But in ZJIT, we may optimize C calls from gems (e.g.
sqlite3
). So thepatch point needs to be applied to a broader range of classes.
ZJIT: Only generate NoSingletonClass guard when the type can have singleton class
ZJIT: Update or forget NoSingletonClass patch point when needed