correct register threshold calculation.
This commit is contained in:
@@ -59,17 +59,10 @@ impl MachineState {
|
|||||||
|
|
||||||
pub(super)
|
pub(super)
|
||||||
fn calculate_register_threshold(&self) -> usize {
|
fn calculate_register_threshold(&self) -> usize {
|
||||||
let mut count = 0;
|
/* for all we know, all registers might be valid when we
|
||||||
|
* return from the verify_attributes interrupt. we currently
|
||||||
for r in 1 .. MAX_ARITY + 1 {
|
* lack a more precise way of determining this. */
|
||||||
if let &Addr::HeapCell(0) = &self[RegType::Temp(r)] {
|
MAX_ARITY
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
count += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
count
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn verify_attributes(&mut self)
|
fn verify_attributes(&mut self)
|
||||||
|
|||||||
Reference in New Issue
Block a user