aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-25 18:07:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-25 18:07:26 -0300
commit6a853fcb8b9e333d768c739c36c99b144bbde607 (patch)
tree5645e5fbe3a43f15044591be30c5d4607cb7357c /lopcodes.h
parent31bea2190b25e5b6687d92d807af522378168bfa (diff)
downloadlua-6a853fcb8b9e333d768c739c36c99b144bbde607.tar.gz
lua-6a853fcb8b9e333d768c739c36c99b144bbde607.tar.bz2
lua-6a853fcb8b9e333d768c739c36c99b144bbde607.zip
details (from lhf)
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h138
1 files changed, 69 insertions, 69 deletions
diff --git a/lopcodes.h b/lopcodes.h
index f1d6a2e1..c66b4a7f 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.26 1999/02/23 13:38:38 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.27 1999/02/24 17:55:51 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*/
@@ -17,97 +17,97 @@
17typedef enum { 17typedef enum {
18/* name parm before after side effect 18/* name parm before after side effect
19-----------------------------------------------------------------------------*/ 19-----------------------------------------------------------------------------*/
20ENDCODE,/* - - - */ 20ENDCODE,/* - - - */
21RETCODE,/* b - - */ 21RETCODE,/* b - - */
22 22
23PUSHNIL,/* b - nil_0...nil_b */ 23PUSHNIL,/* b - nil_0...nil_b */
24POP,/* b - - TOP-=b */ 24POP,/* b - - TOP-=b */
25POPDUP,/* b v v TOP-=b */ 25POPDUP,/* b v v TOP-=b */
26 26
27PUSHNUMBERW,/* w - (float)w */ 27PUSHNUMBERW,/* w - (float)w */
28PUSHNUMBER,/* b - (float)b */ 28PUSHNUMBER,/* b - (float)b */
29 29
30PUSHNUMBERNEGW,/* w - (float)-w */ 30PUSHNUMBERNEGW,/* w - (float)-w */
31PUSHNUMBERNEG,/* b - (float)-b */ 31PUSHNUMBERNEG,/* b - (float)-b */
32 32
33PUSHCONSTANTW,/*w - CNST[w] */ 33PUSHCONSTANTW,/*w - CNST[w] */
34PUSHCONSTANT,/* b - CNST[b] */ 34PUSHCONSTANT,/* b - CNST[b] */
35 35
36PUSHUPVALUE,/* b - Closure[b] */ 36PUSHUPVALUE,/* b - Closure[b] */
37 37
38PUSHLOCAL,/* b - LOC[b] */ 38PUSHLOCAL,/* b - LOC[b] */
39 39
40GETGLOBALW,/* w - VAR[CNST[w]] */ 40GETGLOBALW,/* w - VAR[CNST[w]] */
41GETGLOBAL,/* b - VAR[CNST[b]] */ 41GETGLOBAL,/* b - VAR[CNST[b]] */
42 42
43GETTABLE,/* - i t t[i] */ 43GETTABLE,/* - i t t[i] */
44 44
45GETDOTTEDW,/* w t t[CNST[w]] */ 45GETDOTTEDW,/* w t t[CNST[w]] */
46GETDOTTED,/* b t t[CNST[b]] */ 46GETDOTTED,/* b t t[CNST[b]] */
47 47
48PUSHSELFW,/* w t t t[CNST[w]] */ 48PUSHSELFW,/* w t t t[CNST[w]] */
49PUSHSELF,/* b t t t[CNST[b]] */ 49PUSHSELF,/* b t t t[CNST[b]] */
50 50
51CREATEARRAYW,/* w - newarray(size = w) */ 51CREATEARRAYW,/* w - newarray(size = w) */
52CREATEARRAY,/* b - newarray(size = b) */ 52CREATEARRAY,/* b - newarray(size = b) */
53 53
54SETLOCAL,/* b x - LOC[b]=x */ 54SETLOCAL,/* b x - LOC[b]=x */
55SETLOCALDUP,/* b x x LOC[b]=x */ 55SETLOCALDUP,/* b x x LOC[b]=x */
56 56
57SETGLOBALW,/* w x - VAR[CNST[w]]=x */ 57SETGLOBALW,/* w x - VAR[CNST[w]]=x */
58SETGLOBAL,/* b x - VAR[CNST[b]]=x */ 58SETGLOBAL,/* b x - VAR[CNST[b]]=x */
59SETGLOBALDUPW,/*w x x VAR[CNST[w]]=x */ 59SETGLOBALDUPW,/*w x x VAR[CNST[w]]=x */
60SETGLOBALDUP,/* b x x VAR[CNST[b]]=x */ 60SETGLOBALDUP,/* b x x VAR[CNST[b]]=x */
61 61
62SETTABLEPOP,/* - v i t - t[i]=v */ 62SETTABLEPOP,/* - v i t - t[i]=v */
63SETTABLEPOPDUP,/* - v i t v t[i]=v */ 63SETTABLEPOPDUP,/* - v i t v t[i]=v */
64 64
65SETTABLE,/* b v a_b...a_1 i t a_b...a_1 i t t[i]=v */ 65SETTABLE,/* b v a_b...a_1 i t a_b...a_1 i t t[i]=v */
66SETTABLEDUP,/* b v a_b...a_1 i t v a_b...a_1 i t t[i]=v */ 66SETTABLEDUP,/* b v a_b...a_1 i t v a_b...a_1 i t t[i]=v */
67 67
68SETLISTW,/* w c v_c...v_1 t - t[i+w*FPF]=v_i */ 68SETLISTW,/* w c v_c...v_1 t - t[i+w*FPF]=v_i */
69SETLIST,/* b c v_c...v_1 t - t[i+b*FPF]=v_i */ 69SETLIST,/* b c v_c...v_1 t - t[i+b*FPF]=v_i */
70 70
71SETMAP,/* b v_b k_b ...v_0 k_0 t t t[k_i]=v_i */ 71SETMAP,/* b v_b k_b ...v_0 k_0 t t t[k_i]=v_i */
72 72
73NEQOP,/* - y x (x~=y)? 1 : nil */ 73NEQOP,/* - y x (x~=y)? 1 : nil */
74EQOP,/* - y x (x==y)? 1 : nil */ 74EQOP,/* - y x (x==y)? 1 : nil */
75LTOP,/* - y x (x<y)? 1 : nil */ 75LTOP,/* - y x (x<y)? 1 : nil */
76LEOP,/* - y x (x<y)? 1 : nil */ 76LEOP,/* - y x (x<y)? 1 : nil */
77GTOP,/* - y x (x>y)? 1 : nil */ 77GTOP,/* - y x (x>y)? 1 : nil */
78GEOP,/* - y x (x>=y)? 1 : nil */ 78GEOP,/* - y x (x>=y)? 1 : nil */
79ADDOP,/* - y x x+y */ 79ADDOP,/* - y x x+y */
80SUBOP,/* - y x x-y */ 80SUBOP,/* - y x x-y */
81MULTOP,/* - y x x*y */ 81MULTOP,/* - y x x*y */
82DIVOP,/* - y x x/y */ 82DIVOP,/* - y x x/y */
83POWOP,/* - y x x^y */ 83POWOP,/* - y x x^y */
84CONCOP,/* - y x x..y */ 84CONCOP,/* - y x x..y */
85MINUSOP,/* - x -x */ 85MINUSOP,/* - x -x */
86NOTOP,/* - x (x==nil)? 1 : nil */ 86NOTOP,/* - x (x==nil)? 1 : nil */
87 87
88ONTJMPW,/* w x (x!=nil)? x : - (x!=nil)? PC+=w */ 88ONTJMPW,/* w x (x!=nil)? x : - (x!=nil)? PC+=w */
89ONTJMP,/* b x (x!=nil)? x : - (x!=nil)? PC+=b */ 89ONTJMP,/* b x (x!=nil)? x : - (x!=nil)? PC+=b */
90ONFJMPW,/* w x (x==nil)? x : - (x==nil)? PC+=w */ 90ONFJMPW,/* w x (x==nil)? x : - (x==nil)? PC+=w */
91ONFJMP,/* b x (x==nil)? x : - (x==nil)? PC+=b */ 91ONFJMP,/* b x (x==nil)? x : - (x==nil)? PC+=b */
92JMPW,/* w - - PC+=w */ 92JMPW,/* w - - PC+=w */
93JMP,/* b - - PC+=b */ 93JMP,/* b - - PC+=b */
94IFFJMPW,/* w x - (x==nil)? PC+=w */ 94IFFJMPW,/* w x - (x==nil)? PC+=w */
95IFFJMP,/* b x - (x==nil)? PC+=b */ 95IFFJMP,/* b x - (x==nil)? PC+=b */
96IFTUPJMPW,/* w x - (x!=nil)? PC-=w */ 96IFTUPJMPW,/* w x - (x!=nil)? PC-=w */
97IFTUPJMP,/* b x - (x!=nil)? PC-=b */ 97IFTUPJMP,/* b x - (x!=nil)? PC-=b */
98IFFUPJMPW,/* w x - (x==nil)? PC-=w */ 98IFFUPJMPW,/* w x - (x==nil)? PC-=w */
99IFFUPJMP,/* b x - (x==nil)? PC-=b */ 99IFFUPJMP,/* b x - (x==nil)? PC-=b */
100 100
101CLOSUREW,/* w c v_c...v_1 closure(CNST[w], v_c...v_1) */ 101CLOSUREW,/* w c v_c...v_1 closure(CNST[w], v_c...v_1) */
102CLOSURE,/* b c v_c...v_1 closure(CNST[b], v_c...v_1) */ 102CLOSURE,/* b c v_c...v_1 closure(CNST[b], v_c...v_1) */
103 103
104CALLFUNC,/* b c v_c...v_1 f r_b...r_1 f(v1,...,v_c) */ 104CALLFUNC,/* b c v_c...v_1 f r_b...r_1 f(v1,...,v_c) */
105 105
106SETLINEW,/* w - - LINE=w */ 106SETLINEW,/* w - - LINE=w */
107SETLINE,/* b - - LINE=b */ 107SETLINE,/* b - - LINE=b */
108 108
109LONGARGW,/* w (add w*(1<<16) to arg of next instruction) */ 109LONGARGW,/* w (add w*(1<<16) to arg of next instruction) */
110LONGARG,/* b (add b*(1<<16) to arg of next instruction) */ 110LONGARG,/* b (add b*(1<<16) to arg of next instruction) */
111 111
112CHECKSTACK /* b (assert #temporaries == b; only for internal debuging!) */ 112CHECKSTACK /* b (assert #temporaries == b; only for internal debuging!) */
113 113