[Tarantool-patches] [PATCH luajit 1/2] Fix maxslots when recording BC_VARG.
Igor Munkin
imun at tarantool.org
Tue Jul 18 11:18:29 MSK 2023
Sergey,
Thanks for the patch! The commit message is OK after fixing Max nits,
but I still have some questions regarding the test.
On 10.07.23, Sergey Kaplun wrote:
> From: Mike Pall <mike>
<snipped>
> diff --git a/test/tarantool-tests/lj-1024-varg-maxslot.test.lua b/test/tarantool-tests/lj-1024-varg-maxslot.test.lua
> new file mode 100644
> index 00000000..14270595
> --- /dev/null
> +++ b/test/tarantool-tests/lj-1024-varg-maxslot.test.lua
> @@ -0,0 +1,23 @@
> +local tap = require('tap')
> +local test = tap.test('lj-noticket-varg-usedef'):skipcond({
Now you have a ticket number.
> + ['Test requires JIT enabled'] = not jit.status(),
> +})
> +
> +test:plan(1)
> +
> +jit.opt.start('hotloop=1')
> +
> +local counter = 0
> +-- luacheck: ignore
> +local anchor
> +while counter < 3 do
> + counter = counter + 1
> + -- BC_VARG 5 1 0. `...` is nil (argument for the script).
> + -- luacheck: ignore
> + -- XXX: some condition to use several slots on the Lua stack.
> + anchor = 1 >= 1, ...
Well, I have no idea, why this black voodoo magic is required. Comment
doesn't make it clear either. It would be nice to describe the purpose
of this in a more verbose way.
> +end
> +
> +test:ok(true, 'BC_VARG recording 0th frame depth')
> +
> +os.exit(test:check() and 0 or 1)
> --
> 2.34.1
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list