From a948054a1951cd526c732d6a0e16d99cae837d49 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 16 Dec 2013 17:06:52 -0200 Subject: new order for binary operations (grouping them by type of result) --- lcode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lcode.c') diff --git a/lcode.c b/lcode.c index 34dadd1f..149114cf 100644 --- a/lcode.c +++ b/lcode.c @@ -1,5 +1,5 @@ /* -** $Id: lcode.c,v 2.72 2013/08/30 16:01:37 roberto Exp roberto $ +** $Id: lcode.c,v 2.73 2013/12/16 14:30:22 roberto Exp roberto $ ** Code generator for Lua ** See Copyright Notice in lua.h */ @@ -762,6 +762,7 @@ static int constfolding (OpCode op, expdesc *e1, expdesc *e2) { ((op == OP_MOD && ivalue(&v2) == 0) || /* ...avoid module by 0... */ (op == OP_POW && ivalue(&v2) < 0))) /* ...and negative exponents */ return 0; + lua_assert(OP_IDIV - OP_ADD + LUA_OPADD == LUA_OPIDIV); luaO_arith(NULL, op - OP_ADD + LUA_OPADD, &v1, &v2, &res); if (ttisinteger(&res)) { e1->k = VKINT; -- cgit v1.2.3-55-g6feb