History

Lua 5.3.0-rc2

Lua Team committed 11 years ago

Commit f4a97271 parent 396021810 files · +37 −31Browse files

Showing the changes to src/lcode.c (1 of 10 files). Show all

Unified · Split

src/lcode.c+2−6
@@ -1,5 +1,5 @@
1/*1/*
2** $Id: lcode.c,v 2.97 2014/11/24 14:59:22 roberto Exp $2** $Id: lcode.c,v 2.98 2014/12/19 13:36:32 roberto Exp $
3** Code generator for Lua3** Code generator for Lua
4** See Copyright Notice in lua.h4** See Copyright Notice in lua.h
5*/5*/
@@ -761,12 +761,8 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { · 755 unmodified lines
761** return false if folding can raise an error761** return false if folding can raise an error
762*/762*/
763static int validop (int op, TValue *v1, TValue *v2) {763static int validop (int op, TValue *v1, TValue *v2) {
764 lua_Number a, b;
765 lua_Integer i;764 lua_Integer i;
766 cast_void(a); cast_void(b); /* macro may not use its arguments */765 if (luai_numinvalidop(op, nvalue(v1), nvalue(v2))) return 0;
767 if (luai_numinvalidop(op, (cast_void(tonumber(v1, &a)), a),
768 (cast_void(tonumber(v2, &b)), b)))
769 return 0;
770 switch (op) {766 switch (op) {
771 case LUA_OPBAND: case LUA_OPBOR: case LUA_OPBXOR:767 case LUA_OPBAND: case LUA_OPBOR: case LUA_OPBXOR:
772 case LUA_OPSHL: case LUA_OPSHR: case LUA_OPBNOT: /* conversion errors */768 case LUA_OPSHL: case LUA_OPSHR: case LUA_OPBNOT: /* conversion errors */