KO
games/alis / src / Alis / Tables.php · commit 9c722cf
<?phpnamespace App\Alis;/** * Opcode dispatch tables (C: opcodes[], codesc1names[], codesc2names[], codesc3names[], opernames[], * storenames[], addnames[] and the version-selected pointers tab_opcodes, tab_codesc1, tab_opernames, * tab_storenames, tab_addnames). Each is a list of callables indexed by the opcode byte, filled by the * table_*() builder of the file that defines the table (alis_init() assigns them). * Names are kept in the parallel *_names arrays for debugging. */final class Tables{    /** @var array<int, callable> */    public static array $opcodes = [];    public static array $codesc1names = [];    public static array $codesc2names = [];    public static array $codesc3names = [];    public static array $opernames = [];    public static array $storenames = [];    public static array $addnames = [];    public static array $tab_opcodes = [];    public static array $tab_codesc1 = [];    public static array $tab_opernames = [];    public static array $tab_storenames = [];    public static array $tab_addnames = [];    /** @var array<string, array<int, string>> table name => opcode => C function name */    public static array $names = [];}