aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-03-21 17:31:43 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-03-21 17:31:43 -0300
commit2626708b72f987b62747801443f22953655a2bfc (patch)
tree6188c9ee06748bfea90b2678869b9851def52a23
parent19ac0fadc9ed657d550f44f66873be762dda39f1 (diff)
downloadlua-2626708b72f987b62747801443f22953655a2bfc.tar.gz
lua-2626708b72f987b62747801443f22953655a2bfc.tar.bz2
lua-2626708b72f987b62747801443f22953655a2bfc.zip
details
-rw-r--r--lcode.c7
-rw-r--r--lcode.h4
2 files changed, 5 insertions, 6 deletions
diff --git a/lcode.c b/lcode.c
index 3cc0ea5c..086b527f 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 1.90 2002/03/05 12:42:47 roberto Exp roberto $ 2** $Id: lcode.c,v 1.91 2002/03/08 19:10:32 roberto Exp roberto $
3** Code generator for Lua 3** Code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -22,9 +22,6 @@
22 22
23#define hasjumps(e) ((e)->t != (e)->f) 23#define hasjumps(e) ((e)->t != (e)->f)
24 24
25#define getcode(fs,e) ((fs)->f->code[(e)->info])
26
27
28 25
29void luaK_error (LexState *ls, const char *msg) { 26void luaK_error (LexState *ls, const char *msg) {
30 luaX_error(ls, msg, ls->t.token); 27 luaX_error(ls, msg, ls->t.token);
@@ -501,7 +498,7 @@ static OpCode invertoperator (OpCode op) {
501 498
502static void invertjump (FuncState *fs, expdesc *e) { 499static void invertjump (FuncState *fs, expdesc *e) {
503 Instruction *pc = getjumpcontrol(fs, e->info); 500 Instruction *pc = getjumpcontrol(fs, e->info);
504 *pc = SET_OPCODE(*pc, invertoperator(GET_OPCODE(*pc))); 501 SET_OPCODE(*pc, invertoperator(GET_OPCODE(*pc)));
505} 502}
506 503
507 504
diff --git a/lcode.h b/lcode.h
index ef6b1f61..ae4dd34f 100644
--- a/lcode.h
+++ b/lcode.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.h,v 1.27 2002/02/05 22:39:12 roberto Exp roberto $ 2** $Id: lcode.h,v 1.28 2002/03/08 19:10:32 roberto Exp roberto $
3** Code generator for Lua 3** Code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -36,6 +36,8 @@ typedef enum BinOpr {
36typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_NOUNOPR } UnOpr; 36typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_NOUNOPR } UnOpr;
37 37
38 38
39#define getcode(fs,e) ((fs)->f->code[(e)->info])
40
39#define luaK_codeAsBc(fs,o,A,sBc) luaK_codeABc(fs,o,A,(sBc)+MAXARG_sBc) 41#define luaK_codeAsBc(fs,o,A,sBc) luaK_codeABc(fs,o,A,(sBc)+MAXARG_sBc)
40 42
41void luaK_error (LexState *ls, const char *msg); 43void luaK_error (LexState *ls, const char *msg);