Get to the point of needing to construct/reference fields.

This commit is contained in:
2024-03-30 21:17:11 -07:00
parent 854fd60132
commit e1e798ef8e
6 changed files with 176 additions and 152 deletions

View File

@@ -206,14 +206,6 @@ impl From<ConstantType> for cranelift_codegen::ir::Type {
}
impl ConstantType {
/// Returns true if the given type is (a) numeric and (b) signed;
pub fn is_signed(&self) -> bool {
matches!(
self,
ConstantType::I8 | ConstantType::I16 | ConstantType::I32 | ConstantType::I64
)
}
/// Return the set of types that can be safely casted into this type.
pub fn safe_casts_to(self) -> Vec<ConstantType> {
match self {