Project

General

Profile

« Previous | Next » 

Revision 2ed5a02f

Added by Stan Lo 5 days ago

ZJIT: Add NoSingletonClass patch point (#14680)

  • ZJIT: Add NoSingletonClass patch point

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