aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 9a2ef6a5..faae8597 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.22 1999/02/08 17:07:59 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.23 1999/02/08 18:54:19 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*/
@@ -21,11 +21,14 @@ ENDCODE,/* - - - */
21RETCODE,/* b - - */ 21RETCODE,/* b - - */
22 22
23PUSHNIL,/* b - nil_0...nil_b */ 23PUSHNIL,/* b - nil_0...nil_b */
24POP,/* b - - TOP-=(b+1) */ 24POP,/* b - - TOP-=b */
25POPDUP,/* b v v TOP-=(b+1) */ 25POPDUP,/* b v v TOP-=b */
26 26
27PUSHNUMBERW,/* w - (float)(w-NUMOFFSET) */ 27PUSHNUMBERW,/* w - (float)w */
28PUSHNUMBER,/* b - (float)(b-NUMOFFSET) */ 28PUSHNUMBER,/* b - (float)b */
29
30PUSHNEGW,/* w - (float)-w */
31PUSHNEG,/* b - (float)-b */
29 32
30PUSHCONSTANTW,/*w - CNST[w] */ 33PUSHCONSTANTW,/*w - CNST[w] */
31PUSHCONSTANT,/* b - CNST[b] */ 34PUSHCONSTANT,/* b - CNST[b] */
@@ -57,7 +60,7 @@ SETGLOBALDUPW,/*w x x VAR[CNST[w]]=x */
57SETGLOBALDUP,/* b x x VAR[CNST[b]]=x */ 60SETGLOBALDUP,/* b x x VAR[CNST[b]]=x */
58 61
59SETTABLEPOP,/* - v i t - t[i]=v */ 62SETTABLEPOP,/* - v i t - t[i]=v */
60SETTABPPDUP,/* - v i t v t[i]=v */ 63SETTABLEPOPDUP,/* - v i t v t[i]=v */
61 64
62SETTABLE,/* 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 */
63SETTABLEDUP,/* 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 */
@@ -95,6 +98,7 @@ IFTUPJMP,/* b x - (x!=nil)? PC-=b */
95IFFUPJMPW,/* w x - (x==nil)? PC-=w */ 98IFFUPJMPW,/* w x - (x==nil)? PC-=w */
96IFFUPJMP,/* b x - (x==nil)? PC-=b */ 99IFFUPJMP,/* b x - (x==nil)? PC-=b */
97 100
101CLOSUREW,/* w c v_c...v_1 closure(CNST[w], v_c...v_1) */
98CLOSURE,/* 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) */
99 103
100CALLFUNC,/* 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) */
@@ -107,8 +111,6 @@ LONGARG /* b (add b*(1<<16) to arg of next instruction) */
107} OpCode; 111} OpCode;
108 112
109 113
110#define NUMOFFSET 100 /* offset for immediate numbers */
111
112#define RFIELDS_PER_FLUSH 32 /* records (SETMAP) */ 114#define RFIELDS_PER_FLUSH 32 /* records (SETMAP) */
113#define LFIELDS_PER_FLUSH 64 /* FPF - lists (SETLIST) */ 115#define LFIELDS_PER_FLUSH 64 /* FPF - lists (SETLIST) */
114 116