Type system for NIR. Close to C's type system but without its quirks.
Types
NirTypeKind = enum VoidTy, IntTy, UIntTy, FloatTy, BoolTy, CharTy, NameVal, IntVal, SizeVal, AlignVal, OffsetVal, AnnotationVal, ObjectTy, UnionTy, VarargsTy, APtrTy, UPtrTy, AArrayPtrTy, UArrayPtrTy, ArrayTy, LastArrayTy, ProcTy, ObjectDecl, UnionDecl, FieldDecl
- Source Edit
TypePatchPos = distinct int
- Source Edit
Consts
LastBuiltinId = 13
- Source Edit
Procs
proc addAnnotation(g: var TypeGraph; name: string) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc addArrayLen(g: var TypeGraph; len: int64) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc addBuiltinType(g: var TypeGraph; id: TypeId) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc addNominalType(tree: var TypeGraph; kind: NirTypeKind; name: string) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc addVarargs(tree: var TypeGraph) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc finishType(tree: var TypeGraph; p: TypePatchPos): TypeId {....raises: [], tags: [], forbids: [].}
- Source Edit
proc getFloat128Type(tree: var TypeGraph): TypeId {....raises: [], tags: [], forbids: [].}
- Source Edit
proc getTypeTag(tree: TypeGraph; t: TypeId): string {....raises: [], tags: [], forbids: [].}
- Source Edit
proc initTypeGraph(lit: Literals): TypeGraph {....raises: [], tags: [], forbids: [].}
- Source Edit
proc integralBits(n: TypeNode): int {.inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
proc nominalType(tree: var TypeGraph; kind: NirTypeKind; name: string): TypeId {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc openType(tree: var TypeGraph; kind: NirTypeKind): TypePatchPos {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc sealType(tree: var TypeGraph; p: TypePatchPos) {....raises: [], tags: [], forbids: [].}
- Source Edit