2
0
Roberto Ierusalimschy 23 жил өмнө
parent
commit
2626708b72
2 өөрчлөгдсөн 5 нэмэгдсэн , 6 устгасан
  1. 2 5
      lcode.c
  2. 3 1
      lcode.h

+ 2 - 5
lcode.c

@@ -1,5 +1,5 @@
 /*
-** $Id: lcode.c,v 1.90 2002/03/05 12:42:47 roberto Exp roberto $
+** $Id: lcode.c,v 1.91 2002/03/08 19:10:32 roberto Exp roberto $
 ** Code generator for Lua
 ** See Copyright Notice in lua.h
 */
@@ -22,9 +22,6 @@
 
 #define hasjumps(e)	((e)->t != (e)->f)
 
-#define getcode(fs,e)	((fs)->f->code[(e)->info])
-
-
 
 void luaK_error (LexState *ls, const char *msg) {
   luaX_error(ls, msg, ls->t.token);
@@ -501,7 +498,7 @@ static OpCode invertoperator (OpCode op) {
 
 static void invertjump (FuncState *fs, expdesc *e) {
   Instruction *pc = getjumpcontrol(fs, e->info);
-  *pc = SET_OPCODE(*pc, invertoperator(GET_OPCODE(*pc)));
+  SET_OPCODE(*pc, invertoperator(GET_OPCODE(*pc)));
 }
 
 

+ 3 - 1
lcode.h

@@ -1,5 +1,5 @@
 /*
-** $Id: lcode.h,v 1.27 2002/02/05 22:39:12 roberto Exp roberto $
+** $Id: lcode.h,v 1.28 2002/03/08 19:10:32 roberto Exp roberto $
 ** Code generator for Lua
 ** See Copyright Notice in lua.h
 */
@@ -36,6 +36,8 @@ typedef enum BinOpr {
 typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_NOUNOPR } UnOpr;
 
 
+#define getcode(fs,e)	((fs)->f->code[(e)->info])
+
 #define luaK_codeAsBc(fs,o,A,sBc)	luaK_codeABc(fs,o,A,(sBc)+MAXARG_sBc)
 
 void luaK_error (LexState *ls, const char *msg);