diff options
Diffstat (limited to 'lcode.c')
| -rw-r--r-- | lcode.c | 6 |
1 files changed, 1 insertions, 5 deletions
| @@ -31,10 +31,6 @@ | |||
| 31 | #include "lvm.h" | 31 | #include "lvm.h" |
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | /* Maximum number of registers in a Lua function (must fit in 8 bits) */ | ||
| 35 | #define MAXREGS 255 | ||
| 36 | |||
| 37 | |||
| 38 | #define hasjumps(e) ((e)->t != (e)->f) | 34 | #define hasjumps(e) ((e)->t != (e)->f) |
| 39 | 35 | ||
| 40 | 36 | ||
| @@ -466,7 +462,7 @@ static int luaK_codek (FuncState *fs, int reg, int k) { | |||
| 466 | void luaK_checkstack (FuncState *fs, int n) { | 462 | void luaK_checkstack (FuncState *fs, int n) { |
| 467 | int newstack = fs->freereg + n; | 463 | int newstack = fs->freereg + n; |
| 468 | if (newstack > fs->f->maxstacksize) { | 464 | if (newstack > fs->f->maxstacksize) { |
| 469 | if (newstack >= MAXREGS) | 465 | if (newstack > MAX_FSTACK) |
| 470 | luaX_syntaxerror(fs->ls, | 466 | luaX_syntaxerror(fs->ls, |
| 471 | "function or expression needs too many registers"); | 467 | "function or expression needs too many registers"); |
| 472 | fs->f->maxstacksize = cast_byte(newstack); | 468 | fs->f->maxstacksize = cast_byte(newstack); |
