diff options
Diffstat (limited to 'undump.c')
-rw-r--r-- | undump.c | 19 |
1 files changed, 3 insertions, 16 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** load bytecodes from files | 3 | ** load bytecodes from files |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char* rcs_undump="$Id: undump.c,v 1.24 1997/06/17 18:19:17 roberto Exp roberto $"; | 6 | char* rcs_undump="$Id: undump.c,v 1.25 1997/07/29 19:44:02 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <stdio.h> | 8 | #include <stdio.h> |
9 | #include <string.h> | 9 | #include <string.h> |
@@ -67,7 +67,6 @@ static void FixCode(Byte* code, Byte* end) /* swap words */ | |||
67 | case CONCOP: | 67 | case CONCOP: |
68 | case MINUSOP: | 68 | case MINUSOP: |
69 | case NOTOP: | 69 | case NOTOP: |
70 | case POP: | ||
71 | case RETCODE0: | 70 | case RETCODE0: |
72 | p++; | 71 | p++; |
73 | break; | 72 | break; |
@@ -86,9 +85,6 @@ static void FixCode(Byte* code, Byte* end) /* swap words */ | |||
86 | case CALLFUNC: | 85 | case CALLFUNC: |
87 | p+=3; | 86 | p+=3; |
88 | break; | 87 | break; |
89 | case PUSHFUNCTION: | ||
90 | p+=5; /* TODO: use sizeof(TFunc*) or old? */ | ||
91 | break; | ||
92 | case PUSHWORD: | 88 | case PUSHWORD: |
93 | case PUSHSELF: | 89 | case PUSHSELF: |
94 | case CREATEARRAY: | 90 | case CREATEARRAY: |
@@ -99,7 +95,6 @@ static void FixCode(Byte* code, Byte* end) /* swap words */ | |||
99 | case IFFJMP: | 95 | case IFFJMP: |
100 | case IFFUPJMP: | 96 | case IFFUPJMP: |
101 | case SETLINE: | 97 | case SETLINE: |
102 | case PUSHSTRING: | ||
103 | case PUSHGLOBAL: | 98 | case PUSHGLOBAL: |
104 | case STOREGLOBAL: | 99 | case STOREGLOBAL: |
105 | { | 100 | { |
@@ -108,14 +103,6 @@ static void FixCode(Byte* code, Byte* end) /* swap words */ | |||
108 | p+=3; | 103 | p+=3; |
109 | break; | 104 | break; |
110 | } | 105 | } |
111 | case PUSHFLOAT: /* assumes sizeof(float)==4 */ | ||
112 | { | ||
113 | Byte t; | ||
114 | t=p[1]; p[1]=p[4]; p[4]=t; | ||
115 | t=p[2]; p[2]=p[3]; p[3]=t; | ||
116 | p+=5; | ||
117 | break; | ||
118 | } | ||
119 | case STORERECORD: | 106 | case STORERECORD: |
120 | { | 107 | { |
121 | int n=*++p; | 108 | int n=*++p; |
@@ -226,7 +213,7 @@ static void LoadFunction(ZIO* Z) | |||
226 | { | 213 | { |
227 | int i=LoadWord(Z); | 214 | int i=LoadWord(Z); |
228 | char* s=LoadString(Z); | 215 | char* s=LoadString(Z); |
229 | int v=luaI_findconstantbyname(s); | 216 | int v; /*=luaI_findconstantbyname(s); ??????? */ |
230 | Unthread(tf->code,i,v); | 217 | Unthread(tf->code,i,v); |
231 | } | 218 | } |
232 | else | 219 | else |
@@ -324,7 +311,7 @@ int luaI_undump(ZIO* Z) | |||
324 | while ((m=luaI_undump1(Z))) | 311 | while ((m=luaI_undump1(Z))) |
325 | { | 312 | { |
326 | int status=luaI_dorun(m); | 313 | int status=luaI_dorun(m); |
327 | luaI_freefunc(m); | 314 | /* luaI_freefunc(m); ???*/ |
328 | if (status!=0) return status; | 315 | if (status!=0) return status; |
329 | } | 316 | } |
330 | return 0; | 317 | return 0; |