fix profiling during equality

This commit is contained in:
Paul Driver 2018-03-05 13:20:34 -08:00
parent d214d00e89
commit f90c714942
2 changed files with 9 additions and 0 deletions

View File

@ -719,7 +719,9 @@ _song_x(u3_noun a, u3_noun b, void (*uni)(u3_noun*, u3_noun*))
else {
if ( har_p != 0 ) {
u3_noun key = u3nc(u3a_to_off(a), u3a_to_off(b));
u3t_off(euq_o);
u3_noun got = u3h_get(har_p, key);
u3t_on(euq_o);
u3z(key);
if ( u3_none != got ) {
_eq_pop();
@ -749,7 +751,9 @@ _song_x(u3_noun a, u3_noun b, void (*uni)(u3_noun*, u3_noun*))
}
if ( 0 != har_p ) {
u3_noun key = u3nc(u3a_to_off(a), u3a_to_off(b));
u3t_off(euq_o);
u3h_put(har_p, key, c3y);
u3t_on(euq_o);
u3z(key);
}
_eq_pop();

View File

@ -361,7 +361,12 @@ u3t_damp(void)
void _ct_sigaction(c3_i x_i)
{
// fprintf(stderr, "itimer!\r\n"); abort();
// sampling mid-equality can break without this
c3_o meq_o = u3T.euq_o;
u3T.euq_o = c3n;
u3t_samp();
u3T.euq_o = meq_o;
}
/* u3t_init(): initialize tracing layer.