new form for constructors: {[exp] = exp, ...}
This commit is contained in:
14
opcode.c
14
opcode.c
@@ -3,7 +3,7 @@
|
||||
** TecCGraf - PUC-Rio
|
||||
*/
|
||||
|
||||
char *rcs_opcode="$Id: opcode.c,v 3.81 1997/02/20 15:51:14 roberto Exp roberto $";
|
||||
char *rcs_opcode="$Id: opcode.c,v 3.82 1997/02/26 17:38:41 roberto Unstable roberto $";
|
||||
|
||||
#include <setjmp.h>
|
||||
#include <stdio.h>
|
||||
@@ -1184,7 +1184,7 @@ static StkId lua_execute (Byte *pc, StkId base)
|
||||
}
|
||||
break;
|
||||
|
||||
case STORERECORD:
|
||||
case STORERECORD: /* opcode obsolete: supersed by STOREMAP */
|
||||
{
|
||||
int n = *(pc++);
|
||||
Object *arr = top-n-1;
|
||||
@@ -1200,6 +1200,16 @@ static StkId lua_execute (Byte *pc, StkId base)
|
||||
}
|
||||
break;
|
||||
|
||||
case STOREMAP: {
|
||||
int n = *(pc++);
|
||||
Object *arr = top-(2*n)-1;
|
||||
while (n--) {
|
||||
*(lua_hashdefine (avalue(arr), top-2)) = *(top-1);
|
||||
top-=2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ADJUST0:
|
||||
adjust_top(base);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user