removed support for local vars

This commit is contained in:
Luiz Henrique de Figueiredo
1996-03-06 13:01:08 -03:00
parent b58225e93b
commit 9a6cccb08c

View File

@@ -3,7 +3,7 @@
** load bytecodes from files ** load bytecodes from files
*/ */
char *rcs_undump="$Id: undump.c,v 1.7 1996/03/01 03:43:50 lhf Exp lhf $"; char* rcs_undump="$Id: undump.c,v 1.8 1996/03/06 01:41:18 lhf Exp lhf $";
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -69,6 +69,7 @@ static void LoadFunction(FILE *D)
{ {
TFunc* tf=new(TFunc); TFunc* tf=new(TFunc);
tf->next=NULL; tf->next=NULL;
tf->locvars=NULL;
tf->size=LoadWord(D); /* TODO: Long? */ tf->size=LoadWord(D); /* TODO: Long? */
tf->lineDefined=LoadWord(D); tf->lineDefined=LoadWord(D);
if (IsMain(tf)) /* new main */ if (IsMain(tf)) /* new main */
@@ -109,19 +110,6 @@ static void LoadFunction(FILE *D)
int v=luaI_findconstantbyname(s); /* TODO: free s? */ int v=luaI_findconstantbyname(s); /* TODO: free s? */
Unthread(tf->code,i,v); Unthread(tf->code,i,v);
} }
else if (c==ID_LOC) /* local vars */
{
int n=LoadWord(D);
LocVar *v;
if (n==0) continue;
tf->locvars=v=newvector(n,LocVar);
while (n--)
{
LocLoc(v)=LoadWord(D);
LoadString(D); /* TODO: how to save it? */
++v;
}
}
else else
{ {
ungetc(c,D); ungetc(c,D);