change '$delete_all_attributes' to '$delete_all_attributes_from_var'
This commit is contained in:
@@ -1037,23 +1037,13 @@ impl MachineState {
|
||||
|
||||
impl Machine {
|
||||
#[inline(always)]
|
||||
pub(crate) fn delete_all_attributes(&mut self) {
|
||||
let h = self.machine_st.heap.len();
|
||||
|
||||
self.machine_st.heap.push(heap_loc_as_cell!(h));
|
||||
self.machine_st.registers[2] = heap_loc_as_cell!(h);
|
||||
|
||||
self.term_attributed_variables();
|
||||
|
||||
let mut list_of_attr_vars = self.deref_register(2);
|
||||
|
||||
while let HeapCellValueTag::Lis = list_of_attr_vars.get_tag() {
|
||||
let attr_var_loc = list_of_attr_vars.get_value();
|
||||
pub(crate) fn delete_all_attributes_from_var(&mut self) {
|
||||
let attr_var = self.deref_register(1);
|
||||
|
||||
if let HeapCellValueTag::AttrVar = attr_var.get_tag() {
|
||||
let attr_var_loc = attr_var.get_value();
|
||||
self.machine_st.heap[attr_var_loc] = heap_loc_as_cell!(attr_var_loc);
|
||||
self.machine_st.trail(TrailRef::Ref(Ref::attr_var(attr_var_loc)));
|
||||
|
||||
list_of_attr_vars = self.machine_st.heap[attr_var_loc + 1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user