aboutsummaryrefslogtreecommitdiff
path: root/opcode.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-08-04 16:15:05 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-08-04 16:15:05 -0300
commitdd1aa28390ca1acc389a91f5c64a916f0339e594 (patch)
treeb9b23515091875df7de6082a5e833774c9d434c9 /opcode.h
parentabbf14cd32bf83d5ea5ab70977e0653a03b455c5 (diff)
downloadlua-dd1aa28390ca1acc389a91f5c64a916f0339e594.tar.gz
lua-dd1aa28390ca1acc389a91f5c64a916f0339e594.tar.bz2
lua-dd1aa28390ca1acc389a91f5c64a916f0339e594.zip
small optimization in opcodes for "and" and "or"
Diffstat (limited to 'opcode.h')
-rw-r--r--opcode.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/opcode.h b/opcode.h
index 386cec36..406ff971 100644
--- a/opcode.h
+++ b/opcode.h
@@ -1,6 +1,6 @@
1/* 1/*
2** TeCGraf - PUC-Rio 2** TeCGraf - PUC-Rio
3** $Id: opcode.h,v 3.36 1997/07/29 20:38:06 roberto Exp roberto $ 3** $Id: opcode.h,v 3.37 1997/07/30 22:00:50 roberto Exp roberto $
4*/ 4*/
5 5
6#ifndef opcode_h 6#ifndef opcode_h
@@ -60,7 +60,7 @@ PUSHLOCAL9,/* - LOC[9] */
60PUSHLOCAL,/* b - LOC[b] */ 60PUSHLOCAL,/* b - LOC[b] */
61PUSHGLOBAL,/* w - VAR[w] */ 61PUSHGLOBAL,/* w - VAR[w] */
62PUSHINDEXED,/* i t t[i] */ 62PUSHINDEXED,/* i t t[i] */
63PUSHSELF,/* w t t t[STR[w]] */ 63PUSHSELF,/* w t t t[CNST[w]] */
64STORELOCAL0,/* x - LOC[0]=x */ 64STORELOCAL0,/* x - LOC[0]=x */
65STORELOCAL1,/* x - LOC[1]=x */ 65STORELOCAL1,/* x - LOC[1]=x */
66STORELOCAL2,/* x - LOC[2]=x */ 66STORELOCAL2,/* x - LOC[2]=x */
@@ -78,7 +78,7 @@ STOREINDEXED,/* b v a_b...a_1 i t a_b...a_1 i t t[i]=v */
78STORELIST0,/* b v_b...v_1 t - t[i]=v_i */ 78STORELIST0,/* b v_b...v_1 t - t[i]=v_i */
79STORELIST,/* b c v_b...v_1 t - t[i+c*FPF]=v_i */ 79STORELIST,/* b c v_b...v_1 t - t[i+c*FPF]=v_i */
80STORERECORD,/* b 80STORERECORD,/* b
81 w_b...w_1 v_b...v_1 t - t[STR[w_i]]=v_i */ 81 w_b...w_1 v_b...v_1 t - t[CNST[w_i]]=v_i */
82ADJUST0,/* - - TOP=BASE */ 82ADJUST0,/* - - TOP=BASE */
83ADJUST,/* b - - TOP=BASE+b */ 83ADJUST,/* b - - TOP=BASE+b */
84CREATEARRAY,/* w - newarray(size = w) */ 84CREATEARRAY,/* w - newarray(size = w) */
@@ -95,21 +95,20 @@ POWOP,/* y x x^y */
95CONCOP,/* y x x..y */ 95CONCOP,/* y x x..y */
96MINUSOP,/* x -x */ 96MINUSOP,/* x -x */
97NOTOP,/* x (x==nil)? 1 : nil */ 97NOTOP,/* x (x==nil)? 1 : nil */
98ONTJMP,/* w x - (x!=nil)? PC+=w */ 98ONTJMP,/* w x (x!=nil)? x : - (x!=nil)? PC+=w */
99ONFJMP,/* w x - (x==nil)? PC+=w */ 99ONFJMP,/* w x (x==nil)? x : - (x==nil)? PC+=w */
100JMP,/* w - - PC+=w */ 100JMP,/* w - - PC+=w */
101UPJMP,/* w - - PC-=w */ 101UPJMP,/* w - - PC-=w */
102IFFJMP,/* w x - (x==nil)? PC+=w */ 102IFFJMP,/* w x - (x==nil)? PC+=w */
103IFFUPJMP,/* w x - (x==nil)? PC-=w */ 103IFFUPJMP,/* w x - (x==nil)? PC-=w */
104POP,/* x - */
105CALLFUNC,/* b c v_b...v_1 f r_c...r_1 f(v1,...,v_b) */ 104CALLFUNC,/* b c v_b...v_1 f r_c...r_1 f(v1,...,v_b) */
106RETCODE0, 105RETCODE0,
107RETCODE,/* b - - */ 106RETCODE,/* b - - */
108SETLINE,/* w - - LINE=w */ 107SETLINE,/* w - - LINE=w */
109VARARGS,/* b v_b...v_1 {v_1...v_b;n=b} */ 108VARARGS,/* b v_b...v_1 {v_1...v_b;n=b} */
110STOREMAP,/* b v_b k_b ...v_1 k_1 t - t[k_i]=v_i */ 109STOREMAP,/* b v_b k_b ...v_1 k_1 t - t[k_i]=v_i */
111PUSHCONSTANTB,/*b - const[b] */ 110PUSHCONSTANTB,/*b - CNST[b] */
112PUSHCONSTANT,/* w - const[w] */ 111PUSHCONSTANT,/* w - CNST[w] */
113ENDCODE = 127 112ENDCODE = 127
114} OpCode; 113} OpCode;
115 114