diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-12-11 20:48:44 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-12-11 20:48:44 -0200 |
| commit | 9aff171f3bf0125314a29a5ca952470b2d83708e (patch) | |
| tree | 8d1b400e0108198bde554a31731c655113bc4086 /lopcodes.h | |
| parent | ed9be5e1f0d4b68aa848f85744ad959d7a57c9f4 (diff) | |
| download | lua-9aff171f3bf0125314a29a5ca952470b2d83708e.tar.gz lua-9aff171f3bf0125314a29a5ca952470b2d83708e.tar.bz2 lua-9aff171f3bf0125314a29a5ca952470b2d83708e.zip | |
new type `boolean'
Diffstat (limited to 'lopcodes.h')
| -rw-r--r-- | lopcodes.h | 7 |
1 files changed, 3 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lopcodes.h,v 1.82 2001/10/25 19:14:14 roberto Exp $ | 2 | ** $Id: lopcodes.h,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $ |
| 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 | */ |
| @@ -130,6 +130,7 @@ name args description | |||
| 130 | OP_MOVE,/* A B R(A) := R(B) */ | 130 | OP_MOVE,/* A B R(A) := R(B) */ |
| 131 | OP_LOADK,/* A Bc R(A) := Kst(Bc) */ | 131 | OP_LOADK,/* A Bc R(A) := Kst(Bc) */ |
| 132 | OP_LOADINT,/* A sBc R(A) := (Number)sBc */ | 132 | OP_LOADINT,/* A sBc R(A) := (Number)sBc */ |
| 133 | OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) PC++ */ | ||
| 133 | OP_LOADNIL,/* A B R(A) := ... := R(B) := nil */ | 134 | OP_LOADNIL,/* A B R(A) := ... := R(B) := nil */ |
| 134 | OP_GETUPVAL,/* A B R(A) := UpValue[B] */ | 135 | OP_GETUPVAL,/* A B R(A) := UpValue[B] */ |
| 135 | 136 | ||
| @@ -165,9 +166,7 @@ OP_TESTGT,/* A C test := (R(A) > R/K(C)) */ | |||
| 165 | OP_TESTGE,/* A C test := (R(A) >= R/K(C)) */ | 166 | OP_TESTGE,/* A C test := (R(A) >= R/K(C)) */ |
| 166 | 167 | ||
| 167 | OP_TESTT,/* A B test := R(B); if (test) R(A) := R(B) */ | 168 | OP_TESTT,/* A B test := R(B); if (test) R(A) := R(B) */ |
| 168 | OP_TESTF,/* A B test := not R(B); if (test) R(A) := nil */ | 169 | OP_TESTF,/* A B test := not R(B); if (test) R(A) := R(B) */ |
| 169 | |||
| 170 | OP_NILJMP,/* A Bc R(A) := nil; PC++; */ | ||
| 171 | 170 | ||
| 172 | OP_CALL,/* A B C R(A), ... ,R(A+C-1) := R(A)(R(A+1), ... ,R(A+B))*/ | 171 | OP_CALL,/* A B C R(A), ... ,R(A+C-1) := R(A)(R(A+1), ... ,R(A+B))*/ |
| 173 | OP_RETURN,/* A B return R(A), ... ,R(A+B-1) (see (3)) */ | 172 | OP_RETURN,/* A B return R(A), ... ,R(A+B-1) (see (3)) */ |
