new order for binary operations (grouping them by type of result)

This commit is contained in:
Roberto Ierusalimschy
2013-12-16 17:06:52 -02:00
parent a8f8c7fd80
commit a948054a19
9 changed files with 41 additions and 35 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lopcodes.c,v 1.49 2012/05/14 13:34:18 roberto Exp roberto $
** $Id: lopcodes.c,v 1.50 2013/04/26 13:07:53 roberto Exp roberto $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -31,10 +31,10 @@ LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
"ADD",
"SUB",
"MUL",
"DIV",
"IDIV",
"MOD",
"POW",
"DIV",
"IDIV",
"UNM",
"NOT",
"LEN",
@@ -80,10 +80,10 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_ADD */
,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_SUB */
,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_MUL */
,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_DIV */
,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_IDIV */
,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_MOD */
,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_POW */
,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_DIV */
,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_IDIV */
,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_UNM */
,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_NOT */
,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_LEN */