Replace upvalue-based shell dispatch with OP_LUSH opcode
Add a dedicated OP_LUSH A B instruction that loads shell C functions directly from the registry, eliminating the need for upvalue allocation in mainfunc(), upvalue population in lua_load(), and the fragile LUSH_NUM_UPVALS heuristic. Every chunk no longer carries 4 extra upvalues.
This commit is contained in:
@@ -106,6 +106,7 @@ static const void *const disptab[NUM_OPCODES] = {
|
||||
&&L_OP_SETLIST,
|
||||
&&L_OP_CLOSURE,
|
||||
&&L_OP_VARARG,
|
||||
&&L_OP_LUSH,
|
||||
&&L_OP_GETVARG,
|
||||
&&L_OP_ERRNNIL,
|
||||
&&L_OP_VARARGPREP,
|
||||
|
||||
Reference in New Issue
Block a user