Struct cranelift_isle::sema::TypeEnv
source · pub struct TypeEnv {
pub filenames: Vec<Arc<str>>,
pub file_texts: Vec<Arc<str>>,
pub syms: Vec<String>,
pub sym_map: StableMap<String, Sym>,
pub types: Vec<Type>,
pub type_map: StableMap<Sym, TypeId>,
pub const_types: StableMap<Sym, TypeId>,
pub errors: Vec<Error>,
}
Expand description
The type environment.
Keeps track of which symbols and rules have which types.
Fields§
§filenames: Vec<Arc<str>>
Arena of input ISLE source filenames.
We refer to these indirectly through the Pos::file
indices.
file_texts: Vec<Arc<str>>
Arena of input ISLE source contents.
We refer to these indirectly through the Pos::file
indices.
syms: Vec<String>
Arena of interned symbol names.
Referred to indirectly via Sym
indices.
sym_map: StableMap<String, Sym>
Map of already-interned symbol names to their Sym
ids.
types: Vec<Type>
Arena of type definitions.
Referred to indirectly via TypeId
s.
type_map: StableMap<Sym, TypeId>
A map from a type name symbol to its TypeId
.
const_types: StableMap<Sym, TypeId>
The types of constant symbols.
errors: Vec<Error>
Type errors that we’ve found so far during type checking.