Coverage Report

Created: 2025-11-12 07:01

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/tarantool/third_party/luajit/src/lj_state.h
Line
Count
Source
1
/*
2
** State and stack handling.
3
** Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h
4
*/
5
6
#ifndef _LJ_STATE_H
7
#define _LJ_STATE_H
8
9
#include "lj_obj.h"
10
11
#define incr_top(L) \
12
63.1M
  (++L->top >= tvref(L->maxstack) && (lj_state_growstack1(L), 0))
13
14
166k
#define savestack(L, p)   ((char *)(p) - mref(L->stack, char))
15
7.97M
#define restorestack(L, n)  ((TValue *)(mref(L->stack, char) + (n)))
16
17
LJ_FUNC void lj_state_relimitstack(lua_State *L);
18
LJ_FUNC void lj_state_shrinkstack(lua_State *L, MSize used);
19
LJ_FUNCA void LJ_FASTCALL lj_state_growstack(lua_State *L, MSize need);
20
LJ_FUNC void LJ_FASTCALL lj_state_growstack1(lua_State *L);
21
22
static LJ_AINLINE void lj_state_checkstack(lua_State *L, MSize need)
23
15.1M
{
24
15.1M
  if ((mref(L->maxstack, char) - (char *)L->top) <=
25
15.1M
      (ptrdiff_t)need*(ptrdiff_t)sizeof(TValue))
26
2.03k
    lj_state_growstack(L, need);
27
15.1M
}
lj_api.c:lj_state_checkstack
Line
Count
Source
23
1.17M
{
24
1.17M
  if ((mref(L->maxstack, char) - (char *)L->top) <=
25
1.17M
      (ptrdiff_t)need*(ptrdiff_t)sizeof(TValue))
26
58
    lj_state_growstack(L, need);
27
1.17M
}
Unexecuted instantiation: lj_debug.c:lj_state_checkstack
lj_err.c:lj_state_checkstack
Line
Count
Source
23
73.6k
{
24
73.6k
  if ((mref(L->maxstack, char) - (char *)L->top) <=
25
73.6k
      (ptrdiff_t)need*(ptrdiff_t)sizeof(TValue))
26
595
    lj_state_growstack(L, need);
27
73.6k
}
Unexecuted instantiation: lj_gc.c:lj_state_checkstack
Unexecuted instantiation: lj_state.c:lj_state_checkstack
Unexecuted instantiation: lj_strfmt.c:lj_state_checkstack
lj_vmevent.c:lj_state_checkstack
Line
Count
Source
23
2.15k
{
24
2.15k
  if ((mref(L->maxstack, char) - (char *)L->top) <=
25
2.15k
      (ptrdiff_t)need*(ptrdiff_t)sizeof(TValue))
26
0
    lj_state_growstack(L, need);
27
2.15k
}
Unexecuted instantiation: lib_aux.c:lj_state_checkstack
Unexecuted instantiation: lj_bcread.c:lj_state_checkstack
Unexecuted instantiation: lj_lex.c:lj_state_checkstack
Unexecuted instantiation: lj_parse.c:lj_state_checkstack
Unexecuted instantiation: lj_trace.c:lj_state_checkstack
lj_dispatch.c:lj_state_checkstack
Line
Count
Source
23
13.9M
{
24
13.9M
  if ((mref(L->maxstack, char) - (char *)L->top) <=
25
13.9M
      (ptrdiff_t)need*(ptrdiff_t)sizeof(TValue))
26
1.35k
    lj_state_growstack(L, need);
27
13.9M
}
Unexecuted instantiation: lib_base.c:lj_state_checkstack
Unexecuted instantiation: lj_snap.c:lj_state_checkstack
Unexecuted instantiation: lj_ccallback.c:lj_state_checkstack
lib_string.c:lj_state_checkstack
Line
Count
Source
23
26.6k
{
24
26.6k
  if ((mref(L->maxstack, char) - (char *)L->top) <=
25
26.6k
      (ptrdiff_t)need*(ptrdiff_t)sizeof(TValue))
26
29
    lj_state_growstack(L, need);
27
26.6k
}
Unexecuted instantiation: lib_io.c:lj_state_checkstack
Unexecuted instantiation: lib_jit.c:lj_state_checkstack
Unexecuted instantiation: box.cc:lj_state_checkstack(lua_State*, unsigned int)
Unexecuted instantiation: mem.c:lj_state_checkstack
Unexecuted instantiation: call.c:lj_state_checkstack
Unexecuted instantiation: console.c:lj_state_checkstack
Unexecuted instantiation: serialize_lua.c:lj_state_checkstack
Unexecuted instantiation: tuple.c:lj_state_checkstack
Unexecuted instantiation: misc.cc:lj_state_checkstack(lua_State*, unsigned int)
Unexecuted instantiation: execute.c:lj_state_checkstack
Unexecuted instantiation: tuple_format.c:lj_state_checkstack
Unexecuted instantiation: space.c:lj_state_checkstack
Unexecuted instantiation: session.c:lj_state_checkstack
Unexecuted instantiation: iproto.c:lj_state_checkstack
Unexecuted instantiation: trigger.c:lj_state_checkstack
Unexecuted instantiation: module_cache.c:lj_state_checkstack
Unexecuted instantiation: func_adapter.c:lj_state_checkstack
Unexecuted instantiation: cfg.c:lj_state_checkstack
Unexecuted instantiation: init.c:lj_state_checkstack
Unexecuted instantiation: fiber.c:lj_state_checkstack
Unexecuted instantiation: fiber_cond.c:lj_state_checkstack
Unexecuted instantiation: fiber_channel.c:lj_state_checkstack
Unexecuted instantiation: msgpack.c:lj_state_checkstack
Unexecuted instantiation: utils.c:lj_state_checkstack
Unexecuted instantiation: serializer.c:lj_state_checkstack
Unexecuted instantiation: errno.c:lj_state_checkstack
Unexecuted instantiation: error.c:lj_state_checkstack
Unexecuted instantiation: socket.c:lj_state_checkstack
Unexecuted instantiation: pickle.c:lj_state_checkstack
Unexecuted instantiation: minifio.c:lj_state_checkstack
Unexecuted instantiation: fio.c:lj_state_checkstack
Unexecuted instantiation: popen.c:lj_state_checkstack
Unexecuted instantiation: httpc.c:lj_state_checkstack
Unexecuted instantiation: utf8.c:lj_state_checkstack
Unexecuted instantiation: swim.c:lj_state_checkstack
Unexecuted instantiation: decimal.c:lj_state_checkstack
Unexecuted instantiation: uri.c:lj_state_checkstack
Unexecuted instantiation: tweaks.c:lj_state_checkstack
Unexecuted instantiation: xml.c:lj_state_checkstack
Unexecuted instantiation: lyaml.cc:lj_state_checkstack(lua_State*, unsigned int)
Unexecuted instantiation: lua_cjson.c:lj_state_checkstack
Unexecuted instantiation: alloc.c:lj_state_checkstack
Unexecuted instantiation: digest.c:lj_state_checkstack
28
29
LJ_FUNC lua_State *lj_state_new(lua_State *L);
30
LJ_FUNC void LJ_FASTCALL lj_state_free(global_State *g, lua_State *L);
31
#if LJ_64 && !LJ_GC64 && !(defined(LUAJIT_USE_VALGRIND) && defined(LUAJIT_USE_SYSMALLOC))
32
LJ_FUNC lua_State *lj_state_newstate(lua_Alloc f, void *ud);
33
#endif
34
35
#endif