issue #157 code comments

pull/159/head
Dibyendu Majumdar 6 years ago
parent 08157b102c
commit 07db5d1008

@ -222,28 +222,28 @@ OP_RAVI_TOFLT, /* A R(A) := tofloat(R(A)) */
OP_RAVI_TOIARRAY, /* A R(A) := to_arrayi(R(A)) */
OP_RAVI_TOFARRAY, /* A R(A) := to_arrayf(R(A)) */
OP_RAVI_TOTAB, /* A R(A) := to_table(R(A)) */
OP_RAVI_TOSTRING,
OP_RAVI_TOCLOSURE,
OP_RAVI_TOTYPE,
OP_RAVI_TOSTRING, /* A R(A) := assert_string(R(A)) */
OP_RAVI_TOCLOSURE, /* A R(A) := assert_closure(R(A)) */
OP_RAVI_TOTYPE, /* A R(A) := assert_usertype(R(A)), where usertype has metatable in Lua registry */
OP_RAVI_MOVEI, /* A B R(A) := R(B), check R(B) is int */
OP_RAVI_MOVEF, /* A B R(A) := R(B), check R(B) is float */
OP_RAVI_MOVEIARRAY, /* A B R(A) := R(B), check R(B) is array of int */
OP_RAVI_MOVEFARRAY, /* A B R(A) := R(B), check R(B) is array of floats */
OP_RAVI_MOVETAB, /* A B R(A) := R(B), check R(B) is a table */
OP_RAVI_MOVEI, /* A B R(A) := R(B), check R(B) is int */
OP_RAVI_MOVEF, /* A B R(A) := R(B), check R(B) is float */
OP_RAVI_MOVEIARRAY, /* A B R(A) := R(B), check R(B) is array of int */
OP_RAVI_MOVEFARRAY, /* A B R(A) := R(B), check R(B) is array of floats */
OP_RAVI_MOVETAB, /* A B R(A) := R(B), check R(B) is a table */
OP_RAVI_IARRAY_GET,/* A B C R(A) := R(B)[RK(C)] where R(B) is array of integers and RK(C) is int */
OP_RAVI_FARRAY_GET,/* A B C R(A) := R(B)[RK(C)] where R(B) is array of floats and RK(C) is int */
OP_RAVI_IARRAY_GET, /* A B C R(A) := R(B)[RK(C)] where R(B) is array of integers and RK(C) is int */
OP_RAVI_FARRAY_GET, /* A B C R(A) := R(B)[RK(C)] where R(B) is array of floats and RK(C) is int */
OP_RAVI_IARRAY_SET,/* A B C R(A)[RK(B)] := RK(C) where RK(B) is an int, R(A) is array of ints */
OP_RAVI_FARRAY_SET,/* A B C R(A)[RK(B)] := RK(C) where RK(B) is an int, R(A) is array of floats */
OP_RAVI_IARRAY_SETI,/* A B C R(A)[RK(B)] := RK(C) where RK(B) is an int, R(A) is array of ints, and RK(C) is an int */
OP_RAVI_FARRAY_SETF,/* A B C R(A)[RK(B)] := RK(C) where RK(B) is an int, R(A) is array of floats, and RK(C) is an float */
OP_RAVI_IARRAY_SET, /* A B C R(A)[RK(B)] := RK(C) where RK(B) is an int, R(A) is array of ints */
OP_RAVI_FARRAY_SET, /* A B C R(A)[RK(B)] := RK(C) where RK(B) is an int, R(A) is array of floats */
OP_RAVI_IARRAY_SETI, /* A B C R(A)[RK(B)] := RK(C) where RK(B) is an int, R(A) is array of ints, and RK(C) is an int */
OP_RAVI_FARRAY_SETF, /* A B C R(A)[RK(B)] := RK(C) where RK(B) is an int, R(A) is array of floats, and RK(C) is an float */
OP_RAVI_FORLOOP_IP,
OP_RAVI_FORLOOP_I1,
OP_RAVI_FORPREP_IP,
OP_RAVI_FORPREP_I1,
OP_RAVI_FORLOOP_IP, /* As FORLOOP, but with integer index and positive integer step */
OP_RAVI_FORLOOP_I1, /* As FORLOOP, but with integer index 1 and step 1 */
OP_RAVI_FORPREP_IP, /* As FORPREP, but with integer index and positive integer step */
OP_RAVI_FORPREP_I1, /* As FORPREP, but with integer index 1 and step 1 */
OP_RAVI_SETUPVALI, /* A B UpValue[B] := tointeger(R(A)) */
OP_RAVI_SETUPVALF, /* A B UpValue[B] := tonumber(R(A)) */
@ -267,19 +267,19 @@ OP_RAVI_LE_FF,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */
/* Following op codes are specialised when it is known that indexing is being
done on a table and the key is known type */
OP_RAVI_TABLE_GETFIELD,/* A B C R(A) := R(B)[RK(C)], string key, known table */
OP_RAVI_TABLE_SETFIELD,/* A B C R(A)[RK(B)] := RK(C), string key, known table */
OP_RAVI_TABLE_SELF_SK,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C)], string key, known table */
OP_RAVI_TABLE_GETFIELD,/* A B C R(A) := R(B)[RK(C)], string key, R(B) references a table */
OP_RAVI_TABLE_SETFIELD,/* A B C R(A)[RK(B)] := RK(C), string key, R(A) references a table */
OP_RAVI_TABLE_SELF_SK, /* A B C R(A+1) := R(B); R(A) := R(B)[RK(C)], string key, R(B) references a table */
/* Following opcodes are specialized for indexing where the
key is known to be string but the variable may or may not be
key is known to be string or integer but the variable may or may not be
a table */
OP_RAVI_GETI,/* A B C R(A) := R(B)[RK(C)], integer key, known table */
OP_RAVI_SETI,/* A B C R(A)[RK(B)] := RK(C), integer key, known table */
OP_RAVI_GETFIELD, /* A B C R(A) := R(B)[RK(C)], string key */
OP_RAVI_SELF_SK, /* A B C R(A+1) := R(B); R(A) := R(B)[RK(C)], string key */
OP_RAVI_SETFIELD, /* A B C R(A)[RK(B)] := RK(C), string key */
OP_RAVI_GETTABUP_SK, /* A B C R(A) := UpValue[B][RK(C)], string key */
OP_RAVI_GETI, /* A B C R(A) := R(B)[RK(C)], integer key */
OP_RAVI_SETI, /* A B C R(A)[RK(B)] := RK(C), integer key */
OP_RAVI_GETFIELD, /* A B C R(A) := R(B)[RK(C)], string key */
OP_RAVI_SELF_SK, /* A B C R(A+1) := R(B); R(A) := R(B)[RK(C)], string key */
OP_RAVI_SETFIELD, /* A B C R(A)[RK(B)] := RK(C), string key */
OP_RAVI_GETTABUP_SK, /* A B C R(A) := UpValue[B][RK(C)], string key */
} OpCode;

Loading…
Cancel
Save