Re: Lua stack state during 'lua_load'

Jure Bagić <[email protected]>
Newsgroups gmane.comp.lang.lua.general
Message-ID <aeSJPAtxPuLbuV6q@archlinux>
> The parser would reserve one stack slot above the scanner table
> that would be kept as nil.
> It would act as temporary anchor for 'kcache' table before the
> 'kcache' is inserted into the scanner table (the table itself is a key).

Correction,
the parser needs no extra stack slot,
the anchor would be the current stack top as it would be
removed promptly (after insertion into scanner table)
before the next call to reader.
Reserving a stack slot would not be so trivial as lexer would
need to store offset in case stack changes,
but maybe it would prevent very rare cases where 'lua_load' would
be the cause of stack overflow if reader abuses the Lua stack.
However maybe EXTRA_STACK takes care of this.

-- 
Jure

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/aeSJPAtxPuLbuV6q%40archlinux.
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQTilOnPIAgk+VLLAS+FaQJ4QtXaNQUCaeSKmwAKCRCFaQJ4QtXa
NQOqAP96GAXEaCFOZlDEyHXD8Ut/czmHz7jiFxjz+qkIPCfr/wD/Qyp/VNKX6SC6
2aDkpIzT+43yWMp9gSU6ThOq0vISAgE=
=49sk
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.