mirror of
https://github.com/lua/lua.git
synced 2025-07-04 07:03:24 +00:00
first implementation of `for' over tables
This commit is contained in:
parent
9e1f94fc1c
commit
93d93a0bfb
5 changed files with 118 additions and 35 deletions
14
lcode.c
14
lcode.c
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lcode.c,v 1.28 2000/04/19 13:41:37 roberto Exp roberto $
|
||||
** $Id: lcode.c,v 1.29 2000/05/08 19:32:53 roberto Exp roberto $
|
||||
** Code generator for Lua
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -475,6 +475,18 @@ int luaK_code2 (FuncState *fs, OpCode o, int arg1, int arg2) {
|
|||
mode = iS;
|
||||
break;
|
||||
|
||||
case OP_LFORPREP:
|
||||
delta = 3;
|
||||
arg1 = NO_JUMP;
|
||||
mode = iS;
|
||||
break;
|
||||
|
||||
case OP_LFORLOOP:
|
||||
delta = -4;
|
||||
arg1 = NO_JUMP;
|
||||
mode = iS;
|
||||
break;
|
||||
|
||||
case OP_END:
|
||||
case OP_PUSHNILJMP:
|
||||
case OP_NOT:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue