Commit a49c9d4e authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

rts: drop unused 'traverseAllRetainerSet'



While at is mark 'printRetainer' as 'static'.

Noticed by uselex.rb:
    printRetainer: [R]: exported from:
        ./rts/dist/build/RetainerSet.p_o
    traverseAllRetainerSet: [R]: exported from:
        ./rts/dist/build/RetainerSet.p_o
Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
parent 7a488653
......@@ -510,8 +510,6 @@ set is created. Otherwise, a new retainer set is created.
is created. Otherwise, a new retainer set is created.
\item[@rtsBool isMember(retainer r, retainerSet *rs)@] returns a boolean value
indicating whether @r@ is a member of @rs@.
\item[@void traverseAllRetainerSet(void (*f)(retainerSet *))@] invokes the function
@f@ on every retainer set created.
\item[@void printRetainerSetShort(FILE *, retainerSet *)@] prints a single retainer
set.
\item[@void outputRetainerSet(FILE *, nat *allCost, nat *numSet)@] prints all
......
......@@ -214,43 +214,27 @@ addElement(retainer r, RetainerSet *rs)
return nrs;
}
/* -----------------------------------------------------------------------------
* Call f() for each retainer set.
* -------------------------------------------------------------------------- */
void
traverseAllRetainerSet(void (*f)(RetainerSet *))
{
int i;
RetainerSet *rs;
(*f)(&rs_MANY);
for (i = 0; i < HASH_TABLE_SIZE; i++)
for (rs = hashTable[i]; rs != NULL; rs = rs->link)
(*f)(rs);
}
/* -----------------------------------------------------------------------------
* printRetainer() prints the full information on a given retainer,
* not a retainer set.
* -------------------------------------------------------------------------- */
#if defined(RETAINER_SCHEME_INFO)
// Retainer scheme 1: retainer = info table
void
static void
printRetainer(FILE *f, retainer itbl)
{
fprintf(f, "%s[%s]", GET_PROF_DESC(itbl), itbl->prof.closure_type);
}
#elif defined(RETAINER_SCHEME_CCS)
// Retainer scheme 2: retainer = cost centre stack
void
static void
printRetainer(FILE *f, retainer ccs)
{
fprintCCS(f, ccs);
}
#elif defined(RETAINER_SCHEME_CC)
// Retainer scheme 3: retainer = cost centre
void
static void
printRetainer(FILE *f, retainer cc)
{
fprintf(f,"%s.%s", cc->module, cc->label);
......
......@@ -160,9 +160,6 @@ isMember(retainer r, RetainerSet *rs)
// Finds or creates a retainer set augmented with a new retainer.
RetainerSet *addElement(retainer, RetainerSet *);
// Call f() for each retainer set.
void traverseAllRetainerSet(void (*f)(RetainerSet *));
#ifdef SECOND_APPROACH
// Prints a single retainer set.
void printRetainerSetShort(FILE *, RetainerSet *, nat);
......@@ -194,11 +191,6 @@ void outputAllRetainerSet(FILE *);
#define hashKeySingleton(r) ((StgWord)(r))
#define hashKeyAddElement(r, s) (hashKeySingleton((r)) + (s)->hashKey)
// Prints the full information on a given retainer.
// Note: This function is not part of retainerSet interface, but this is
// the best place to define it.
void printRetainer(FILE *, retainer);
#include "EndPrivate.h"
#endif /* PROFILING */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment