(constants: &[Value], idx: u16)
| 175 | } |
| 176 | |
| 177 | fn const_to_val(constants: &[Value], idx: u16) -> Option<Val> { |
| 178 | match constants.get(idx as usize)? { |
| 179 | Value::Int(i) if (Val::INT_MIN..=Val::INT_MAX).contains(i) => Some(Val::int(*i)), |
| 180 | Value::Float(f) => Some(Val::float(*f)), |
| 181 | Value::Bool(b) => Some(Val::bool(*b)), |
| 182 | _ => None, |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | /* Nearest live instruction before `from`; skips entries already marked dead by inner folds. */ |
| 187 | fn prev_live(dead: &[bool], from: usize) -> Option<usize> { |
no test coverage detected