Skip to content

Commit

Permalink
Add statistics(choices,N) also slots,frames & trails, re issue #229
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Nov 1, 2024
1 parent 6037cd4 commit 432cc5e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/bif_predicates.c
Original file line number Diff line number Diff line change
Expand Up @@ -3464,25 +3464,25 @@ static bool bif_statistics_2(query *q)
return unify(q, p2, p2_ctx, l, q->st.curr_frame);
}

if (!CMP_STRING_TO_CSTR(q, p1, "active_frames") && is_var(p2)) {
if (!CMP_STRING_TO_CSTR(q, p1, "frames") && is_var(p2)) {
cell tmp;
make_int(&tmp, q->st.fp);
return unify(q, p2, p2_ctx, &tmp, q->st.curr_frame);
}

if (!CMP_STRING_TO_CSTR(q, p1, "active_choices") && is_var(p2)) {
if (!CMP_STRING_TO_CSTR(q, p1, "choices") && is_var(p2)) {
cell tmp;
make_int(&tmp, q->st.cp);
make_int(&tmp, q->cp);
return unify(q, p2, p2_ctx, &tmp, q->st.curr_frame);
}

if (!CMP_STRING_TO_CSTR(q, p1, "active_trails") && is_var(p2)) {
if (!CMP_STRING_TO_CSTR(q, p1, "trails") && is_var(p2)) {
cell tmp;
make_int(&tmp, q->st.tp);
return unify(q, p2, p2_ctx, &tmp, q->st.curr_frame);
}

if (!CMP_STRING_TO_CSTR(q, p1, "active_slots") && is_var(p2)) {
if (!CMP_STRING_TO_CSTR(q, p1, "slots") && is_var(p2)) {
cell tmp;
make_int(&tmp, q->st.sp);
return unify(q, p2, p2_ctx, &tmp, q->st.curr_frame);
Expand Down

0 comments on commit 432cc5e

Please sign in to comment.