first implementation of `for' over tables

This commit is contained in:
Roberto Ierusalimschy 2000-05-15 16:48:04 -03:00
parent 9e1f94fc1c
commit 93d93a0bfb
5 changed files with 118 additions and 35 deletions

14
lcode.c
View file

@ -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: