From 93d93a0bfbc30f1176e973e1238b51e560eeb233 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 15 May 2000 16:48:04 -0300 Subject: first implementation of `for' over tables --- lcode.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lcode.c') diff --git a/lcode.c b/lcode.c index b5ef968e..138ee78a 100644 --- a/lcode.c +++ b/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: -- cgit v1.2.3-55-g6feb