remove string/1, use a more general test for the partial_string/1 type test (#328)

This commit is contained in:
Mark Thom
2020-04-11 22:47:52 -06:00
parent 0499005db5
commit 4f0adad78e
5 changed files with 17 additions and 39 deletions

View File

@@ -1196,15 +1196,20 @@ impl MachineState {
}
}
&SystemClauseType::IsPartialString => {
let pstr = self.store(self.deref(self[temp_v!(1)]));
let mut heap_pstr_iter = self.heap_pstr_iter(self[temp_v!(1)]);
match pstr {
Addr::PStrLocation(..) => {
}
_ => {
self.fail = true;
}
}
while let Some(_) = heap_pstr_iter.next() {}
self.fail =
match heap_pstr_iter.focus() {
Addr::AttrVar(_) | Addr::HeapCell(_) | Addr::StackCell(..) |
Addr::EmptyList => {
false
}
_ => {
true
}
};
}
&SystemClauseType::PartialStringTail => {
let pstr = self.store(self.deref(self[temp_v!(1)]));