• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / luajit / 5736456212

02 Aug 2023 08:19AM UTC coverage: 85.197% (+4.1%) from 81.139%
5736456212

push

github

ligurio
ci: support coveralls

The patch adds a workflow that runs regression test suites, produces a
summary of current code coverage and sends code coverage data to
Coveralls. Coveralls is a web service that lets you inspect every detail
of your coverage. See Tarantool's LuaJIT page on Coveralls [1].

1. https://coveralls.io/github/tarantool/luajit

5211 of 6004 branches covered (86.79%)

Branch coverage included in aggregate %.

19854 of 23416 relevant lines covered (84.79%)

208195.42 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.0
/src/lj_obj.c
1
/*
2
** Miscellaneous object handling.
3
** Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h
4
*/
5

6
#define lj_obj_c
7
#define LUA_CORE
8

9
#include "lj_obj.h"
10

11
/* Object type names. */
12
LJ_DATADEF const char *const lj_obj_typename[] = {  /* ORDER LUA_T */
13
  "no value", "nil", "boolean", "userdata", "number", "string",
14
  "table", "function", "userdata", "thread", "proto", "cdata"
15
};
16

17
LJ_DATADEF const char *const lj_obj_itypename[] = {  /* ORDER LJ_T */
18
  "nil", "boolean", "boolean", "userdata", "string", "upval", "thread",
19
  "proto", "function", "trace", "cdata", "table", "userdata", "number"
20
};
21

22
/* Compare two objects without calling metamethods. */
23
int LJ_FASTCALL lj_obj_equal(cTValue *o1, cTValue *o2)
4,783✔
24
{
25
  if (itype(o1) == itype(o2)) {
4,783✔
26
    if (tvispri(o1))
1,390✔
27
      return 1;
28
    if (!tvisnum(o1))
1,388✔
29
      return gcrefeq(o1->gcr, o2->gcr);
1,304✔
30
  } else if (!tvisnumber(o1) || !tvisnumber(o2)) {
3,393✔
31
    return 0;
32
  }
33
  return numberVnum(o1) == numberVnum(o2);
104✔
34
}
35

36
/* Return pointer to object or its object data. */
37
const void * LJ_FASTCALL lj_obj_ptr(global_State *g, cTValue *o)
2✔
38
{
39
  UNUSED(g);
2✔
40
  if (tvisudata(o))
2✔
41
    return uddata(udataV(o));
×
42
  else if (tvislightud(o))
2✔
43
    return lightudV(g, o);
×
44
  else if (LJ_HASFFI && tviscdata(o))
2✔
45
    return cdataptr(cdataV(o));
×
46
  else if (tvisgcv(o))
2✔
47
    return gcV(o);
2✔
48
  else
49
    return NULL;
50
}
51

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc