From b8af9c56c95722e7a3289f02568b9e2a7495c484 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 6 Mar 1997 14:30:55 -0300 Subject: new form for constructors: {[exp] = exp, ...} --- lua.stx | 50 +++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 27 deletions(-) (limited to 'lua.stx') diff --git a/lua.stx b/lua.stx index d803d4ba..cb0a29d3 100644 --- a/lua.stx +++ b/lua.stx @@ -1,6 +1,6 @@ %{ -char *rcs_luastx = "$Id: lua.stx,v 3.43 1997/01/31 14:27:11 roberto Exp roberto $"; +char *rcs_luastx = "$Id: lua.stx,v 3.44 1997/02/13 16:18:39 roberto Exp roberto $"; #include #include @@ -50,8 +50,6 @@ static TaggedString *localvar[MAXLOCALS]; /* store local variable names */ static int nlocalvar=0; /* number of local variables */ #define MAXFIELDS FIELDS_PER_FLUSH*2 -static Word fields[MAXFIELDS]; /* fieldnames to be flushed */ -static int nfields=0; int lua_debug = 0; @@ -103,22 +101,11 @@ static void code_word_at (Byte *p, int n) memcpy(p, &w, sizeof(Word)); } -static void push_field (Word name) -{ - if (nfields < MAXFIELDS) - fields[nfields++] = name; - else - yyerror ("too many fields in nested constructors"); -} - static void flush_record (int n) { - int i; if (n == 0) return; - code_byte(STORERECORD); + code_byte(STOREMAP); code_byte(n); - for (i=0; i