From fb1cf6ab2d12bd61e3d429830ab20d4ff3c39fd9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 8 Feb 1999 15:07:59 -0200 Subject: clearer way to set tables. --- lparser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lparser.c') diff --git a/lparser.c b/lparser.c index 4dcae7d3..297eebd6 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 1.15 1999/02/04 16:36:16 roberto Exp roberto $ +** $Id: lparser.c,v 1.16 1999/02/04 17:47:59 roberto Exp roberto $ ** LL(1) Parser and code generator for Lua ** See Copyright Notice in lua.h */ @@ -490,7 +490,7 @@ static void genstorevar (LexState *ls, vardesc *var, OpCode *codes) { static void storevar (LexState *ls, vardesc *var) { - static OpCode codes[] = {SETLOCAL, SETGLOBAL, SETTABLE0}; + static OpCode codes[] = {SETLOCAL, SETGLOBAL, SETTABLEPOP}; genstorevar(ls, var, codes); } @@ -954,7 +954,7 @@ static void exp0 (LexState *ls, vardesc *v) { static void Gexp (LexState *ls, vardesc *v) { /* Gexp -> exp0 | var '=' exp1 */ - static OpCode codes[] = {SETLOCALDUP, SETGLOBALDUP, SETTABLEDUP}; + static OpCode codes[] = {SETLOCALDUP, SETGLOBALDUP, SETTABPPDUP}; exp0(ls, v); if (v->k != VEXP && optional(ls, '=')) { /* assignment expression? */ unloaddot(ls, v); -- cgit v1.2.3-55-g6feb