Sha256: eccb89b8f0b570396ff30efbb01a37d1d8e227a202f829a0277f18e79f9e3b89

Contents?: true

Size: 1.02 KB

Versions: 24

Compression:

Stored size: 1.02 KB

Contents

/*
** State and stack handling.
** Copyright (C) 2005-2015 Mike Pall. See Copyright Notice in luajit.h
*/

#ifndef _LJ_STATE_H
#define _LJ_STATE_H

#include "lj_obj.h"

#define incr_top(L) \
  (++L->top >= tvref(L->maxstack) && (lj_state_growstack1(L), 0))

#define savestack(L, p)		((char *)(p) - mref(L->stack, char))
#define restorestack(L, n)	((TValue *)(mref(L->stack, char) + (n)))

LJ_FUNC void lj_state_relimitstack(lua_State *L);
LJ_FUNC void lj_state_shrinkstack(lua_State *L, MSize used);
LJ_FUNCA void LJ_FASTCALL lj_state_growstack(lua_State *L, MSize need);
LJ_FUNC void LJ_FASTCALL lj_state_growstack1(lua_State *L);

static LJ_AINLINE void lj_state_checkstack(lua_State *L, MSize need)
{
  if ((mref(L->maxstack, char) - (char *)L->top) <=
      (ptrdiff_t)need*(ptrdiff_t)sizeof(TValue))
    lj_state_growstack(L, need);
}

LJ_FUNC lua_State *lj_state_new(lua_State *L);
LJ_FUNC void LJ_FASTCALL lj_state_free(global_State *g, lua_State *L);
#if LJ_64
LJ_FUNC lua_State *lj_state_newstate(lua_Alloc f, void *ud);
#endif

#endif

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
immunio-1.1.2 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.1.1 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.1.0 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.22 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.19 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.17 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.15 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.14 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.13 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.12 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.11 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.10 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.9 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.8 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.7 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.6 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.5 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.4 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.3 lua-hooks/ext/luajit/src/lj_state.h
immunio-1.0.2 lua-hooks/ext/luajit/src/lj_state.h