[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Question regarding handling of OP_CALL
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 9 Mar 2015 12:23:56 -0300
> In lvm.c if the target of OP_CALL is a Lua function then it is handled
> by the same invocation of luaV_execute(). When I compile a Lua
> function I cannot do this so I need to recursively invoke
> luaV_execute() on the called function. I was wondering if I should
> directly call luaV_execute() or call luaD_call() - what would be the
> correct approach?
Probably luaD_call, but depends on your code. luaD_call handles C
functions, controls the stack depth, and controls yields. Probably
you want all of them.