Remove HB_DEBUG_SET_DIGESTS
Wasn't correct with the new combiner. I should add it back somehow, but for now the digests seem to be working very well...
This commit is contained in:
parent
f7466ee76f
commit
f9a6110267
@ -80,17 +80,12 @@ struct hb_set_digest_lowest_bits_t
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static inline mask_t mask_for (hb_codepoint_t g)
|
static inline mask_t mask_for (hb_codepoint_t g) {
|
||||||
{
|
|
||||||
return ((mask_t) 1) << ((g >> shift) & (sizeof (mask_t) * 8 - 1));
|
return ((mask_t) 1) << ((g >> shift) & (sizeof (mask_t) * 8 - 1));
|
||||||
}
|
}
|
||||||
mask_t mask;
|
mask_t mask;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HB_DEBUG_SET_DIGESTS
|
|
||||||
extern unsigned long digest_total, digest_yes, digest_yes1, digest_yes2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <typename head_t, typename tail_t>
|
template <typename head_t, typename tail_t>
|
||||||
struct hb_set_digest_combiner_t
|
struct hb_set_digest_combiner_t
|
||||||
{
|
{
|
||||||
@ -112,15 +107,6 @@ struct hb_set_digest_combiner_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline bool may_have (hb_codepoint_t g) const {
|
inline bool may_have (hb_codepoint_t g) const {
|
||||||
#ifdef HB_DEBUG_SET_DIGESTS
|
|
||||||
digest_total++;
|
|
||||||
if (head.may_have (g) && tail.may_have (g))
|
|
||||||
digest_yes++;
|
|
||||||
if (head.may_have (g))
|
|
||||||
digest_yes1++;
|
|
||||||
if (tail.may_have (g))
|
|
||||||
digest_yes2++;
|
|
||||||
#endif
|
|
||||||
return head.may_have (g) && tail.may_have (g);
|
return head.may_have (g) && tail.may_have (g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,20 +27,6 @@
|
|||||||
#include "hb-set-private.hh"
|
#include "hb-set-private.hh"
|
||||||
|
|
||||||
|
|
||||||
#ifdef HB_DEBUG_SET_DIGESTS
|
|
||||||
unsigned long digest_total, digest_yes, digest_yes1, digest_yes2;
|
|
||||||
__attribute__((__destructor__))
|
|
||||||
void digest_print (void)
|
|
||||||
{
|
|
||||||
if (!digest_total)
|
|
||||||
return;
|
|
||||||
printf("Set digest summary: both %%%ld first %%%ld second %%%ld\n",
|
|
||||||
100 * digest_yes / digest_total,
|
|
||||||
100 * digest_yes1 / digest_total,
|
|
||||||
100 * digest_yes2 / digest_total);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Public API */
|
/* Public API */
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user