aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-02-24 11:30:46 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-02-24 11:30:46 -0300
commit31925e4cc20018b2cf46664febd6347ce4a4b766 (patch)
tree159667853fbe827acdce92923fa34d401b1a89ec /lopcodes.h
parent59c88f846d1dcd901a4420651aedf27816618923 (diff)
downloadlua-31925e4cc20018b2cf46664febd6347ce4a4b766.tar.gz
lua-31925e4cc20018b2cf46664febd6347ce4a4b766.tar.bz2
lua-31925e4cc20018b2cf46664febd6347ce4a4b766.zip
Details
Added documentation and asserts that constants for arithmetic opcodes must be numbers.
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 120cdd94..d6a47e5a 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -225,13 +225,13 @@ OP_SELF,/* A B C R[A+1] := R[B]; R[A] := R[B][RK(C):string] */
225 225
226OP_ADDI,/* A B sC R[A] := R[B] + sC */ 226OP_ADDI,/* A B sC R[A] := R[B] + sC */
227 227
228OP_ADDK,/* A B C R[A] := R[B] + K[C] */ 228OP_ADDK,/* A B C R[A] := R[B] + K[C]:number */
229OP_SUBK,/* A B C R[A] := R[B] - K[C] */ 229OP_SUBK,/* A B C R[A] := R[B] - K[C]:number */
230OP_MULK,/* A B C R[A] := R[B] * K[C] */ 230OP_MULK,/* A B C R[A] := R[B] * K[C]:number */
231OP_MODK,/* A B C R[A] := R[B] % K[C] */ 231OP_MODK,/* A B C R[A] := R[B] % K[C]:number */
232OP_POWK,/* A B C R[A] := R[B] ^ K[C] */ 232OP_POWK,/* A B C R[A] := R[B] ^ K[C]:number */
233OP_DIVK,/* A B C R[A] := R[B] / K[C] */ 233OP_DIVK,/* A B C R[A] := R[B] / K[C]:number */
234OP_IDIVK,/* A B C R[A] := R[B] // K[C] */ 234OP_IDIVK,/* A B C R[A] := R[B] // K[C]:number */
235 235
236OP_BANDK,/* A B C R[A] := R[B] & K[C]:integer */ 236OP_BANDK,/* A B C R[A] := R[B] & K[C]:integer */
237OP_BORK,/* A B C R[A] := R[B] | K[C]:integer */ 237OP_BORK,/* A B C R[A] := R[B] | K[C]:integer */