Skip to main content

Module exprs

Module exprs 

Source
Expand description

The “object IR” is an intermediate IR that we create as a first pass for type checking. The name “object” derives from the fact that it doesn’t track precise types, but rather just the type of the underlying object without any permissions (i.e., what class/struct/enum/etc is it?). This can then be used to bootstrap full type checking.

We need to create this IR first because full type checking will require knowing which variables are live. Knowing that requires that we have fully parsed the AST. But fully parsing the AST requires being able to disambiguate things like x.foo[..](), which could be either indexing a field foo and then calling the result or invoking a method foo with generic arguments. The object IR gives us enough information to make those determinations.

Structs§

SymByteLiteral
SymByteLiteralData
SymExpr
SymMatchArm
A match arm is one part of a match statement.
SymPlaceExpr

Enums§

SymBinaryOp
SymExprKind
SymLiteral
SymPlaceExprKind