add Addr::AttVar to address ordering

This commit is contained in:
Mark Thom
2019-02-02 12:20:39 -07:00
parent c5fbff505b
commit 8f771792b3
3 changed files with 13 additions and 12 deletions

View File

@@ -747,7 +747,7 @@ impl PartialOrd<Ref> for Addr {
Some(Ordering::Less)
}
},
&Addr::HeapCell(h) =>
&Addr::HeapCell(h) | &Addr::AttrVar(h, _) =>
match r {
&Ref::StackCell(..) => Some(Ordering::Less),
&Ref::HeapCell(h1) => h.partial_cmp(&h1)

View File

@@ -429,7 +429,8 @@ impl Machine {
let mut heap_locs = HashMap::new();
self.code_repo.cached_query = code;
self.machine_st.run_query(&mut self.indices, &mut self.policies, &self.code_repo, &alloc_locs, &mut heap_locs);
self.machine_st.run_query(&mut self.indices, &mut self.policies, &self.code_repo,
&alloc_locs, &mut heap_locs);
if self.machine_st.fail {
self.fail(&heap_locs)