]> Repositorios git - scryer-prolog.git/commitdiff
use '$enqueue_attr_var' when adding attributes only
authorMark Thom <[email protected]>
Sat, 24 Dec 2022 07:31:39 +0000 (00:31 -0700)
committerMark Thom <[email protected]>
Sat, 24 Dec 2022 07:31:47 +0000 (00:31 -0700)
src/lib/atts.pl

index a9369426e889841bd6a888bac737ed70d367e90a..372a9bdd052e078ec7d324a6b1f3a88adcab8d4f 100644 (file)
@@ -41,8 +41,7 @@
     (  L \= Attr ->
        nonvar(Ls),
        '$get_from_list'(Ls, V, Attr)
-    ;  L = Attr,
-       '$enqueue_attr_var'(V)
+    ;  L = Attr
     ).
 
 '$put_attr'(V, Attr) :-
@@ -65,8 +64,7 @@
     nonvar(Att),
     (  Att \= Attr ->
        '$del_attr_buried'(Ls0, Ls1, V, Attr)
-    ;  '$enqueue_attr_var'(V),
-       '$del_attr_head'(V),
+    ;  '$del_attr_head'(V),
        '$del_attr'(Ls1, V, Attr)
     ).
 
@@ -84,8 +82,7 @@
     ;  Ls1 = [Att | Ls2] ->
        (  Att \= Attr ->
           '$del_attr_buried'(Ls1, Ls2, V, Attr)
-       ;  '$enqueue_attr_var'(V),
-             '$del_attr_non_head'(Ls0), %% set tail of Ls0 = tail of Ls1. can be undone by backtracking.
+       ;  '$del_attr_non_head'(Ls0), %% set tail of Ls0 = tail of Ls1. can be undone by backtracking.
              '$del_attr_step'(Ls1, V, Attr)
        )
     ).