Sainan
unread,May 30, 2025, 6:23:59 PMMay 30Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lu...@googlegroups.com
It seems like the semantic is to copy verbatim the path that was passed to luac or ? when -s was passed, which seems kind of unexpected to me.
Like, on one hand I understand that debug info is somewhat unrelated from 'chunkname', but e.g. in the case of stripped debug info, the chunkname could be used in place of the '?'. Like, looking at loadFunction, it seems like this is vaguely what it already supports:
if (f->source == NULL) /* no source in dump? */
f->source = psource; /* reuse parent's source */
but then at luaU_undump, the 'psource' parameter is set to NULL for the main function:
loadFunction(&S, cl->p, NULL);
Of course, this also looks wholly different on the main branch now so I'm not sure if this is even still an issue in Lua 5.5?
-- Sainan