add notice regarding options enabled

pull/81/head
Dibyendu Majumdar 9 years ago
parent 7db1eee15b
commit 24d65a5c0a

@ -72,14 +72,15 @@ typedef union { double u; void *s; lua_Integer i; long l; } L_Umaxalign;
typedef LUAI_UACNUMBER l_uacNumber;
typedef LUAI_UACINT l_uacInt;
#if !defined(NDEBUG) && !defined(lua_assert)
#include <assert.h>
#define lua_assert assert
#endif
/* internal assertions for in-house debugging */
#if defined(lua_assert)
#warning lua_assert has been defined
#if !defined(RAVI_OPTION_STRING1)
#define RAVI_OPTION_STRING1 " assertions"
#endif
#if !defined(RAVI_OPTION_STRING2)
#define RAVI_OPTION_STRING2
#endif
#define check_exp(c,e) (lua_assert(c), (e))
/* to avoid problems with conditions too long */
#define lua_longassert(c) { if (!(c)) lua_assert(0); }
@ -87,6 +88,8 @@ typedef LUAI_UACINT l_uacInt;
#define lua_assert(c) ((void)0)
#define check_exp(c,e) (e)
#define lua_longassert(c) ((void)0)
#define RAVI_OPTION_STRING1
#define RAVI_OPTION_STRING2
#endif
/*

@ -33,6 +33,12 @@
#define lua_assert(c) assert(c)
#if !defined(RAVI_OPTION_STRING1)
#define RAVI_OPTION_STRING1 " assertions"
#endif
#define RAVI_OPTION_STRING2 " ltests"
/* to avoid warnings, and to make sure value is really unused */
#define UNUSED(x) (x=0, (void)(x))

@ -59,6 +59,8 @@ LUALIB_API void (luaL_openlibs) (lua_State *L);
#if !defined(lua_assert)
#define lua_assert(x) ((void)0)
#define RAVI_OPTION_STRING1
#define RAVI_OPTION_STRING2
#endif

@ -40,6 +40,15 @@
#define LUA_INITVARVERSION \
LUA_INIT_VAR "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR
#ifdef USE_LLVM
#define RAVI_OPTION_STRING3 " LLVM"
#elif USE_GCCJIT
#define RAVI_OPTION_STRING3 " gccjit"
#else
#define RAVI_OPTION_STRING3 " nojit"
#endif
#define RAVI_OPTIONS "\nOptions" RAVI_OPTION_STRING1 RAVI_OPTION_STRING2 RAVI_OPTION_STRING3
/*
** lua_stdin_is_tty detects whether the standard input is a 'tty' (that
@ -207,6 +216,7 @@ static int docall (lua_State *L, int narg, int nres) {
static void print_version (void) {
lua_writestring(LUA_COPYRIGHT, strlen(LUA_COPYRIGHT));
lua_writestring(RAVI_OPTIONS, strlen(RAVI_OPTIONS));
lua_writeline();
}

@ -910,7 +910,6 @@ newframe: /* reentry point when frame changes (call/return) */
*/
} break;
case OP_GETTABLE: {
l_gettable:
Protect(luaV_gettable(L, RB(i), RKC(i), ra));
} break;
case OP_SETTABUP: {

Loading…
Cancel
Save