src/ravi_jit.c
static int ravi_auto(lua_State *L) {
  int n = lua_gettop(L);
  lua_pushboolean(L, raviV_getauto(L));
  lua_pushinteger(L, raviV_getmincodesize(L));
  lua_pushinteger(L, raviV_getminexeccount(L));
  if (n >= 1) raviV_setauto(L, lua_toboolean(L, 1));
  int min_code_size = (n >= 2) ? (int)(lua_tointeger(L, 2)) : -1;
  int min_exec_count = (n == 3) ? (int)(lua_tointeger(L, 3)) : -1;
  if (min_code_size >= 1) raviV_setmincodesize(L, min_code_size);
  if (min_exec_count >= 1) raviV_setminexeccount(L, min_exec_count);
  return 3;
}
// Turn on/off auto JIT compilation
Turn on/off auto JIT compilation
Turn on / off auto JIT compilation
static int ravi_auto(lua_State *L) {
  int n = lua_gettop(L);
  lua_pushboolean(L, raviV_getauto(L));
  lua_pushinteger(L, raviV_getmincodesize(L));
  lua_pushinteger(L, raviV_getminexeccount(L));
  if (n >= 1) raviV_setauto(L, lua_toboolean(L, 1));
  int min_code_size = (n >= 2) ? (int)(lua_tointeger(L, 2)) : -1;
  int min_exec_count = (n == 3) ? (int)(lua_tointeger(L, 3)) : -1;
  if (min_code_size >= 1) raviV_setmincodesize(L, min_code_size);
  if (min_exec_count >= 1) raviV_setminexeccount(L, min_exec_count);
  return 3;
}
static int ravi_auto ( lua_State * L ) { int n = lua_gettop ( L ) ; lua_pushboolean ( L , raviV_getauto ( L ) ) ; lua_pushinteger ( L , raviV_getmincodesize ( L ) ) ; lua_pushinteger ( L , raviV_getminexeccount ( L ) ) ; if ( n >= 1 ) raviV_setauto ( L , lua_toboolean ( L , 1 ) ) ; int min_code_size = ( n >= 2 ) ? ( int ) ( lua_tointeger ( L , 2 ) ) : -1 ; int min_exec_count = ( n == 3 ) ? ( int ) ( lua_tointeger ( L , 3 ) ) : -1 ; if ( min_code_size >= 1 ) raviV_setmincodesize ( L , min_code_size ) ; if ( min_exec_count >= 1 ) raviV_setminexeccount ( L , min_exec_count ) ; return 3 ; }
Turn on/off auto JIT compilation
Turn on / off auto JIT compilation