aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-04-07 16:35:31 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-04-07 16:35:31 -0300
commit1eabd0549e165fe8e907afad9df314cbec3fab5d (patch)
treef2b0c97d93628ecd13912b9473f8a5bb038d058a
parent54dd5cc7fd42a8b073f64b7d16efdb1ed01e2dd5 (diff)
downloadlua-1eabd0549e165fe8e907afad9df314cbec3fab5d.tar.gz
lua-1eabd0549e165fe8e907afad9df314cbec3fab5d.tar.bz2
lua-1eabd0549e165fe8e907afad9df314cbec3fab5d.zip
comments
-rw-r--r--lopcodes.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 47a9f622..a40fcbde 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.54 2000/04/04 20:48:44 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.55 2000/04/07 13:12:50 roberto Exp roberto $
3** Opcodes for Lua virtual machine 3** Opcodes for Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -81,7 +81,7 @@
81/* 81/*
82** K = U argument used as index to `kstr' 82** K = U argument used as index to `kstr'
83** J = S argument used as jump offset (relative to pc of next instruction) 83** J = S argument used as jump offset (relative to pc of next instruction)
84** L = U argument used as index of local variable 84** L = unsigned argument used as index of local variable
85** N = U argument used as index to `knum' 85** N = U argument used as index to `knum'
86*/ 86*/
87 87
@@ -89,8 +89,8 @@ typedef enum {
89/*---------------------------------------------------------------------- 89/*----------------------------------------------------------------------
90name args stack before stack after side effects 90name args stack before stack after side effects
91------------------------------------------------------------------------*/ 91------------------------------------------------------------------------*/
92OP_END,/* - - (return) */ 92OP_END,/* - - (return) no results */
93OP_RETURN,/* U - (return) */ 93OP_RETURN,/* U v_n-v_x(at u) (return) returns v_x-v_n */
94 94
95OP_CALL,/* A B v_n-v_1 f(at a) r_b-r_1 f(v1,...,v_n) */ 95OP_CALL,/* A B v_n-v_1 f(at a) r_b-r_1 f(v1,...,v_n) */
96OP_TAILCALL,/* A B v_n-v_1 f(at a) (return) f(v1,...,v_n) */ 96OP_TAILCALL,/* A B v_n-v_1 f(at a) (return) f(v1,...,v_n) */
@@ -100,29 +100,29 @@ OP_POP,/* U a_u-a_1 - */
100 100
101OP_PUSHINT,/* S - (Number)s */ 101OP_PUSHINT,/* S - (Number)s */
102OP_PUSHSTRING,/* K - KSTR[k] */ 102OP_PUSHSTRING,/* K - KSTR[k] */
103OP_PUSHNUM,/* N - KNUM[u] */ 103OP_PUSHNUM,/* N - KNUM[n] */
104OP_PUSHNEGNUM,/* N - -KNUM[u] */ 104OP_PUSHNEGNUM,/* N - -KNUM[n] */
105 105
106OP_PUSHUPVALUE,/* U - Closure[u] */ 106OP_PUSHUPVALUE,/* U - Closure[u] */
107 107
108OP_GETLOCAL,/* L - LOC[u] */ 108OP_GETLOCAL,/* L - LOC[l] */
109OP_GETGLOBAL,/* K - VAR[KSTR[k]] */ 109OP_GETGLOBAL,/* K - VAR[KSTR[k]] */
110 110
111OP_GETTABLE,/* - i t t[i] */ 111OP_GETTABLE,/* - i t t[i] */
112OP_GETDOTTED,/* K t t[KSTR[k]] */ 112OP_GETDOTTED,/* K t t[KSTR[k]] */
113OP_GETINDEXED,/* L t t[LOC[U]] */ 113OP_GETINDEXED,/* L t t[LOC[l]] */
114OP_PUSHSELF,/* K t t t[KSTR[k]] */ 114OP_PUSHSELF,/* K t t t[KSTR[k]] */
115 115
116OP_CREATETABLE,/* U - newarray(size = u) */ 116OP_CREATETABLE,/* U - newarray(size = u) */
117 117
118OP_SETLOCAL,/* L B v_b-v_1 - LOC[L]=v_b */ 118OP_SETLOCAL,/* L B v_b-v_1 - LOC[l]=v_b */
119OP_SETGLOBAL,/* K x - VAR[KSTR[k]]=x */ 119OP_SETGLOBAL,/* K x - VAR[KSTR[k]]=x */
120OP_SETTABLE,/* A B v a_a-a_1 i t a_x-a_1 i t t[i]=v */ 120OP_SETTABLE,/* A B v a_a-a_1 i t (pops b values) t[i]=v */
121 121
122OP_SETLIST,/* A B v_b-v_0 t t t[i+a*FPF]=v_i */ 122OP_SETLIST,/* A B v_b-v_0 t t t[i+a*FPF]=v_i */
123OP_SETMAP,/* U v_u k_u - v_0 k_0 t t t[k_i]=v_i */ 123OP_SETMAP,/* U v_u k_u - v_0 k_0 t t t[k_i]=v_i */
124 124
125OP_INCLOCAL,/* sA L - - LOC[L]+=sA */ 125OP_INCLOCAL,/* sA L - - LOC[l]+=sA */
126OP_ADD,/* - y x x+y */ 126OP_ADD,/* - y x x+y */
127OP_ADDI,/* S x x+s */ 127OP_ADDI,/* S x x+s */
128OP_SUB,/* - y x x-y */ 128OP_SUB,/* - y x x-y */
@@ -140,9 +140,9 @@ OP_JMPLE,/* J y x - (x<y)? PC+=s */
140OP_JMPGT,/* J y x - (x>y)? PC+=s */ 140OP_JMPGT,/* J y x - (x>y)? PC+=s */
141OP_JMPGE,/* J y x - (x>=y)? PC+=s */ 141OP_JMPGE,/* J y x - (x>=y)? PC+=s */
142 142
143OP_JMPT,/* J x - (x!=nil)? PC+=s */ 143OP_JMPT,/* J x - (x~=nil)? PC+=s */
144OP_JMPF,/* J x - (x==nil)? PC+=s */ 144OP_JMPF,/* J x - (x==nil)? PC+=s */
145OP_JMPONT,/* J x (x!=nil)? x : - (x!=nil)? PC+=s */ 145OP_JMPONT,/* J x (x~=nil)? x : - (x~=nil)? PC+=s */
146OP_JMPONF,/* J x (x==nil)? x : - (x==nil)? PC+=s */ 146OP_JMPONF,/* J x (x==nil)? x : - (x==nil)? PC+=s */
147OP_JMP,/* J - - PC+=s */ 147OP_JMP,/* J - - PC+=s */
148 148