aboutsummaryrefslogtreecommitdiff
path: root/lcode.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-10-04 18:56:32 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-10-04 18:56:32 -0300
commita1ef58b3a5986293ed0b7acef50073d94c7f932f (patch)
treea2bb5ad195001c03caeec9b536a1f8d97acba693 /lcode.h
parent283e7455ffe32235eaf790ebd3c40c7970b7a833 (diff)
downloadlua-a1ef58b3a5986293ed0b7acef50073d94c7f932f.tar.gz
lua-a1ef58b3a5986293ed0b7acef50073d94c7f932f.tar.bz2
lua-a1ef58b3a5986293ed0b7acef50073d94c7f932f.zip
eplicit 1-bit opcode operand 'k'
Diffstat (limited to 'lcode.h')
-rw-r--r--lcode.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lcode.h b/lcode.h
index e7f048fd..1c3229d9 100644
--- a/lcode.h
+++ b/lcode.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.h,v 1.66 2017/09/13 19:50:08 roberto Exp roberto $ 2** $Id: lcode.h,v 1.67 2017/09/28 16:53:29 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*/
@@ -37,6 +37,9 @@ typedef enum BinOpr {
37} BinOpr; 37} BinOpr;
38 38
39 39
40#define luaK_codeABC(fs,o,a,b,c) luaK_codeABCk(fs,o,a,b,c,0)
41
42
40typedef enum UnOpr { OPR_MINUS, OPR_BNOT, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr; 43typedef enum UnOpr { OPR_MINUS, OPR_BNOT, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr;
41 44
42 45
@@ -50,7 +53,8 @@ typedef enum UnOpr { OPR_MINUS, OPR_BNOT, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr;
50 53
51LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); 54LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);
52LUAI_FUNC int luaK_codeAsBx (FuncState *fs, OpCode o, int A, int Bx); 55LUAI_FUNC int luaK_codeAsBx (FuncState *fs, OpCode o, int A, int Bx);
53LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C); 56LUAI_FUNC int luaK_codeABCk (FuncState *fs, OpCode o, int A,
57 int B, int C, int k);
54LUAI_FUNC void luaK_fixline (FuncState *fs, int line); 58LUAI_FUNC void luaK_fixline (FuncState *fs, int line);
55LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n); 59LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n);
56LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); 60LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n);