From f53460aab94c64879624c72222e282fe492122ae Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 1 Nov 1994 16:25:20 -0200 Subject: CREATEARRAY now has an argument, the size of the array to create. --- lua.stx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'lua.stx') diff --git a/lua.stx b/lua.stx index 75971a45..ceed9c4b 100644 --- a/lua.stx +++ b/lua.stx @@ -1,6 +1,6 @@ %{ -char *rcs_luastx = "$Id: lua.stx,v 2.10 1994/10/17 19:05:32 celes Exp roberto $"; +char *rcs_luastx = "$Id: lua.stx,v 2.11 1994/10/21 19:00:12 roberto Exp roberto $"; #include #include @@ -528,10 +528,8 @@ expr : '(' expr ')' { $$ = $2; } table : { - code_byte(PUSHWORD); - $$ = pc; code_word(0); - incr_ntemp(); code_byte(CREATEARRAY); + $$ = pc; code_word(0); } '{' fieldlist '}' { @@ -918,7 +916,15 @@ static void PrintCode (Byte *code, Byte *end) printf ("%d ADJUST %d\n", p-code, *(++p)); p++; break; - case CREATEARRAY: printf ("%d CREATEARRAY\n", (p++)-code); break; + case CREATEARRAY: + { + CodeWord c; + int n = p-code; + p++; + get_word(c,p); + printf ("%d CREATEARRAY\n", n, c.w); + break; + } case EQOP: printf ("%d EQOP\n", (p++)-code); break; case LTOP: printf ("%d LTOP\n", (p++)-code); break; case LEOP: printf ("%d LEOP\n", (p++)-code); break; -- cgit v1.2.3-55-g6feb