[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua limits
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 12 Jan 2015 13:15:28 -0200
> How are the various limits in Lua below related to the size of the
> operands in Lua bytecode instruction? I assume that if the operand A
> is 7-bits then MAXREGS must be set to <= 127?
>
> MAXVARS (in lparser.c)
> MAXREGS (in lcode.c)
> LUAI_MAXCCALLS in (llimits.h)
> MAXUPVAL (in llimits.h)
MAXVARS, MAXREGS, and MAXUPVAL are limited by the size of operand A (and
the other operands, too); they must fit in any operand. (In particular,
MAXUPVAL has an awkward definition, that is legacy from older times :-)
LUAI_MAXCCALLS has nothing to do with that.
-- Roberto