mirror of
https://github.com/lua/lua
synced 2024-11-22 21:01:26 +03:00
23e6bac8a0
When calling metamethods for things like 'a < 3.0', which generates the opcode OP_LTI, the C register tells that the operand was converted to an integer, so that it can be corrected to float when calling a metamethod. This commit also includes some other stuff: - file 'onelua.c' added to the project - opcode OP_PREPVARARG renamed to OP_VARARGPREP - comparison opcodes rewritten through macros
102 lines
1.1 KiB
C
102 lines
1.1 KiB
C
/*
|
|
** $Id: lopnames.h $
|
|
** Opcode names
|
|
** See Copyright Notice in lua.h
|
|
*/
|
|
|
|
#if !defined(lopnames_h)
|
|
#define lopnames_h
|
|
|
|
/* ORDER OP */
|
|
|
|
static const char *const opnames[] = {
|
|
"MOVE",
|
|
"LOADI",
|
|
"LOADF",
|
|
"LOADK",
|
|
"LOADKX",
|
|
"LOADBOOL",
|
|
"LOADNIL",
|
|
"GETUPVAL",
|
|
"SETUPVAL",
|
|
"GETTABUP",
|
|
"GETTABLE",
|
|
"GETI",
|
|
"GETFIELD",
|
|
"SETTABUP",
|
|
"SETTABLE",
|
|
"SETI",
|
|
"SETFIELD",
|
|
"NEWTABLE",
|
|
"SELF",
|
|
"ADDI",
|
|
"SUBI",
|
|
"MULI",
|
|
"MODI",
|
|
"POWI",
|
|
"DIVI",
|
|
"IDIVI",
|
|
"ADDK",
|
|
"SUBK",
|
|
"MULK",
|
|
"MODK",
|
|
"POWK",
|
|
"DIVK",
|
|
"IDIVK",
|
|
"BANDK",
|
|
"BORK",
|
|
"BXORK",
|
|
"SHRI",
|
|
"SHLI",
|
|
"ADD",
|
|
"SUB",
|
|
"MUL",
|
|
"MOD",
|
|
"POW",
|
|
"DIV",
|
|
"IDIV",
|
|
"BAND",
|
|
"BOR",
|
|
"BXOR",
|
|
"SHL",
|
|
"SHR",
|
|
"UNM",
|
|
"BNOT",
|
|
"NOT",
|
|
"LEN",
|
|
"CONCAT",
|
|
"CLOSE",
|
|
"TBC",
|
|
"JMP",
|
|
"EQ",
|
|
"LT",
|
|
"LE",
|
|
"EQK",
|
|
"EQI",
|
|
"LTI",
|
|
"LEI",
|
|
"GTI",
|
|
"GEI",
|
|
"TEST",
|
|
"TESTSET",
|
|
"CALL",
|
|
"TAILCALL",
|
|
"RETURN",
|
|
"RETURN0",
|
|
"RETURN1",
|
|
"FORLOOP",
|
|
"FORPREP",
|
|
"TFORPREP",
|
|
"TFORCALL",
|
|
"TFORLOOP",
|
|
"SETLIST",
|
|
"CLOSURE",
|
|
"VARARG",
|
|
"VARARGPREP",
|
|
"EXTRAARG",
|
|
NULL
|
|
};
|
|
|
|
#endif
|
|
|