fix bug in DeleteAttribute
This commit is contained in:
@@ -314,6 +314,7 @@ static QUEUES: &str = include_str!("../lib/queues.pl");
|
||||
static ERROR: &str = include_str!("../lib/error.pl");
|
||||
static TERMS: &str = include_str!("../lib/terms.pl");
|
||||
static DCGS: &str = include_str!("../lib/dcgs.pl");
|
||||
static ATTS: &str = include_str!("../lib/atts.pl");
|
||||
|
||||
impl Machine {
|
||||
pub fn new() -> Self {
|
||||
@@ -335,6 +336,7 @@ impl Machine {
|
||||
compile_user_module(&mut wam, ERROR.as_bytes());
|
||||
compile_user_module(&mut wam, TERMS.as_bytes());
|
||||
compile_user_module(&mut wam, DCGS.as_bytes());
|
||||
compile_user_module(&mut wam, ATTS.as_bytes());
|
||||
|
||||
wam
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ impl MachineState {
|
||||
if let Addr::Lis(l2) = self.store(self.deref(Addr::HeapCell(l1 + 1))) {
|
||||
let addr = self.heap[l1 + 1].as_addr(l1 + 1);
|
||||
self.heap[l1 + 1] = HeapCellValue::Addr(Addr::HeapCell(l2 + 1));
|
||||
self.trail(TrailRef::AttrVarLink(l2 + 1, addr));
|
||||
self.trail(TrailRef::AttrVarLink(l1 + 1, addr));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user