summaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-11-25 16:59:43 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-11-25 16:59:43 -0200
commit33b8a010324863ddb495768ebe9e92403c5116c8 (patch)
tree4007dcc42001b36e739a3af6366547b88dd8ad7b /lopcodes.h
parentd29ce757376dd309f097e8ff30dd2a9b14567575 (diff)
downloadlua-33b8a010324863ddb495768ebe9e92403c5116c8.tar.gz
lua-33b8a010324863ddb495768ebe9e92403c5116c8.tar.bz2
lua-33b8a010324863ddb495768ebe9e92403c5116c8.zip
new way to code CALLs + passing multiple arguments between function calls
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/lopcodes.h b/lopcodes.h
index f9633cac..f6e81bff 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.32 1999/03/10 14:09:45 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.33 1999/06/17 17:04:03 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*/
@@ -20,12 +20,12 @@ typedef enum {
20ENDCODE,/* - - (return) */ 20ENDCODE,/* - - (return) */
21RETCODE,/* b - (return) */ 21RETCODE,/* b - (return) */
22 22
23CALL,/* b c v_c...v_1 f r_b...r_1 f(v1,...,v_c) */ 23CALL,/* b c v_n-v_1 f(at c) r_b-r_1 f(v1,...,v_n) */
24 24
25TAILCALL,/* b c v_c...v_1 f (return) f(v1,...,v_c) */ 25TAILCALL,/* b c v_c-v_1 f (return) f(v1,...,v_c) */
26 26
27PUSHNIL,/* b - nil_0...nil_b */ 27PUSHNIL,/* b - nil_0-nil_b */
28POP,/* b a_b...a_1 - */ 28POP,/* b a_b-a_1 - */
29 29
30PUSHNUMBERW,/* w - (float)w */ 30PUSHNUMBERW,/* w - (float)w */
31PUSHNUMBER,/* b - (float)b */ 31PUSHNUMBER,/* b - (float)b */
@@ -61,12 +61,12 @@ SETGLOBAL,/* b x - VAR[CNST[b]]=x */
61 61
62SETTABLEPOP,/* - v i t - t[i]=v */ 62SETTABLEPOP,/* - v i t - t[i]=v */
63 63
64SETTABLE,/* b v a_b...a_1 i t a_b...a_1 i t t[i]=v */ 64SETTABLE,/* b v a_b-a_1 i t a_b-a_1 i t t[i]=v */
65 65
66SETLISTW,/* w c v_c...v_1 t t t[i+w*FPF]=v_i */ 66SETLISTW,/* w c v_c-v_1 t t t[i+w*FPF]=v_i */
67SETLIST,/* b c v_c...v_1 t t t[i+b*FPF]=v_i */ 67SETLIST,/* b c v_c-v_1 t t t[i+b*FPF]=v_i */
68 68
69SETMAP,/* b v_b k_b ...v_0 k_0 t t t[k_i]=v_i */ 69SETMAP,/* b v_b k_b - v_0 k_0 t t t[k_i]=v_i */
70 70
71NEQOP,/* - y x (x~=y)? 1 : nil */ 71NEQOP,/* - y x (x~=y)? 1 : nil */
72EQOP,/* - y x (x==y)? 1 : nil */ 72EQOP,/* - y x (x==y)? 1 : nil */
@@ -96,16 +96,14 @@ IFTUPJMP,/* b x - (x!=nil)? PC-=b */
96IFFUPJMPW,/* w x - (x==nil)? PC-=w */ 96IFFUPJMPW,/* w x - (x==nil)? PC-=w */
97IFFUPJMP,/* b x - (x==nil)? PC-=b */ 97IFFUPJMP,/* b x - (x==nil)? PC-=b */
98 98
99CLOSUREW,/* w c v_c...v_1 closure(CNST[w], v_c...v_1) */ 99CLOSUREW,/* w c v_c-v_1 closure(CNST[w], v_c-v_1) */
100CLOSURE,/* b c v_c...v_1 closure(CNST[b], v_c...v_1) */ 100CLOSURE,/* b c v_c-v_1 closure(CNST[b], v_c-v_1) */
101 101
102SETLINEW,/* w - - LINE=w */ 102SETLINEW,/* w - - LINE=w */
103SETLINE,/* b - - LINE=b */ 103SETLINE,/* b - - LINE=b */
104 104
105LONGARGW,/* w (add w*(1<<16) to arg of next instruction) */ 105LONGARGW,/* w (add w*(1<<16) to arg of next instruction) */
106LONGARG,/* b (add b*(1<<16) to arg of next instruction) */ 106LONGARG /* b (add b*(1<<16) to arg of next instruction) */
107
108CHECKSTACK /* b (assert #temporaries == b; only for internal debuging!) */
109 107
110} OpCode; 108} OpCode;
111 109