Handling of the interrupted OP_TAILCALL instruction
51 views
Skip to first unread message
Jure Bagić
unread,
Nov 24, 2025, 11:05:30 PM (3 days ago) Nov 24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lua-l
Just wondering if 'luaV_finishOp' relies on fall-through to the OP_RETURN
instruction in order to properly put results in correct place in case the
interrupted opcode is OP_TAILCALL (in case the called function is C and the
caller is Lua vararg function)?
(I see no other way, as 'default' case is empty.)
-- Jure
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
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
(I am not sure what you mean by "fall-through" here.) An OP_TAILCALL
is always followed by OP_RETURN. If OP_TAILCALL is interrupted, the
OP_RETURN will naturally be the next instruction to be executed and then
it will complete the task.