Skip to content

Commit

Permalink
Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorng committed Mar 5, 2025
1 parent 14c8b7c commit d709d37
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 38 deletions.
14 changes: 0 additions & 14 deletions erts/emulator/beam/big.c
Original file line number Diff line number Diff line change
Expand Up @@ -1777,20 +1777,6 @@ erts_make_integer_fact(Uint x, ErtsHeapFactory *hf)
return uint_to_big(x, hp);
}
}
/*
* As erts_make_integer, but from a whole UWord.
*/
Eterm
erts_make_integer_from_uword(UWord x, Process *p)
{
Eterm* hp;
if (IS_USMALL(0,x))
return make_small(x);
else {
hp = HAlloc(p, BIG_UWORD_HEAP_SIZE(x));
return uword_to_big(x,hp);
}
}

/*
** convert Uint to bigint
Expand Down
1 change: 0 additions & 1 deletion erts/emulator/beam/big.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ Eterm uint_to_big(Uint, Eterm*);
Eterm uword_to_big(UWord, Eterm*);
Eterm erts_make_integer(Uint, Process *);
Eterm erts_make_integer_fact(Uint, ErtsHeapFactory *);
Eterm erts_make_integer_from_uword(UWord x, Process *p);

dsize_t big_bytes(Eterm);
Eterm bytes_to_big(const byte*, dsize_t, int, Eterm*);
Expand Down
22 changes: 0 additions & 22 deletions erts/emulator/beam/index.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,28 +114,6 @@ int index_get(IndexTable* t, void* tmpl)
return -1;
}

static void index_merge_foreach(IndexSlot *p, IndexTable *dst)
{
Uint sz;
int ix = dst->entries++;
if (ix >= dst->size) {
if (ix >= dst->limit) {
erts_exit(ERTS_ERROR_EXIT, "no more index entries in %s (max=%d)\n",
dst->htable.name, dst->limit);
}
sz = INDEX_PAGE_SIZE*sizeof(IndexSlot*);
dst->seg_table[ix>>INDEX_PAGE_SHIFT] = erts_alloc(dst->type, sz);
dst->size += INDEX_PAGE_SIZE;
}
p->index = ix;
dst->seg_table[ix>>INDEX_PAGE_SHIFT][ix&INDEX_PAGE_MASK] = p;
}

void erts_index_merge(Hash* src, IndexTable* dst)
{
hash_foreach(src, (HFOREACH_FUN)index_merge_foreach, dst);
}

void index_erase_latest_from(IndexTable* t, Uint from_ix)
{
if(from_ix < (Uint)t->entries) {
Expand Down
1 change: 0 additions & 1 deletion erts/emulator/beam/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ int index_table_sz(IndexTable *);
int index_get(IndexTable*, void*);

IndexSlot* index_put_entry(IndexTable*, void*);
void erts_index_merge(Hash*, IndexTable*);

/* Erase all entries with index 'ix' and higher
*/
Expand Down

0 comments on commit d709d37

Please sign in to comment.