Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Apr 23, 2023
1 parent c1a85a0 commit 354c1a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/builtins.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ inline static void set_var(query *q, const cell *c, pl_idx_t c_ctx, cell *v, pl_
cell *c_attrs = is_empty(&e->c) ? e->c.attrs : NULL, *v_attrs = NULL;
pl_idx_t c_attrs_ctx = c_attrs ? e->c.attrs_ctx : 0;

add_trail(q, c_ctx, c->var_nbr, c_attrs, c_attrs_ctx);
if (c_attrs || (q->cp && (c_ctx < q->st.fp)))
add_trail(q, c_ctx, c->var_nbr, c_attrs, c_attrs_ctx);

if (c_attrs && is_var(v)) {
const frame *vf = GET_FRAME(v_ctx);
Expand Down Expand Up @@ -219,7 +220,8 @@ inline static void reset_var(query *q, const cell *c, pl_idx_t c_ctx, cell *v, p
const frame *f = GET_FRAME(c_ctx);
slot *e = GET_SLOT(f, c->var_nbr);

//add_trail(q, c_ctx, c->var_nbr, NULL, 0);
if (q->cp && (c_ctx < q->st.fp))
add_trail(q, c_ctx, c->var_nbr, NULL, 0);

if (is_structure(v)) {
q->no_tco = true;
Expand Down

0 comments on commit 354c1a0

Please sign in to comment.