logo

compiler

Assemble Assemble is responsible for assembling the resolved, analyzed, normalized abstract syntax tree into it's fcode representation in memory as a FPod stored on compiler.fpod.
Assembler Assembler assembles all the TypeDefs into their fcode representation.
AstWriter AstWriter
AttrAsm AttrAsm provides support for assembling the attributes table for types and slots.
BinaryExpr BinaryExpr is used for binary expressions with a left hand side and a right hand side including assignment.
Block Block is a list of zero or more Stmts
BreakStmt BreakStmt breaks out of a while/for loop.
CField CField is a "compiler field" which is represents a Field in the compiler.
CMethod CMethod is a "compiler method" which is represents a Method in the compiler.
CNamespace CNamespace is responsible for providing a unified view pods, types, and slots between the entities currently being compiled and the entities being imported from pre-compiled pods.
CParam CParam models a MethodParam in the compiler.
CPod CPod is a "compiler pod" used for representing a Pod in the compiler.
CSlot CSlot is a "compiler slot" which is represents a Slot in the compiler.
CType CType is a "compiler type" which is class used for representing the Fan type system in the compiler.
CallExpr CallExpr is a method call.
CallResolver CallResolver handles the process of resolving a CallExpr or UnknownVarExpr to a method call or a field access.
Case Case models a single case block of a SwitchStmt
Catch Catch models a single catch clause of a TryStmt
CheckErrors CheckErrors walks the tree of statements and expressions looking for errors the compiler can detect such as invalid type usage.
CheckInheritance CheckInheritance is used to check invalid extends or mixins.
CheckParamDefs CheckParamDefs is used to process all the parameter default expressions for all the methods.
ClosureExpr ClosureExpr is an "inlined anonymous method" which closes over it's lexical scope.
ClosureVars ClosureVars (cvars) is used to pull local variables used by closures into an auto-generated anonymous class so that they can be used outside and inside the closure as well as have a lifetime once the method returns:
CodeAsm CodeAsm is used to assemble the fcode instructions of an Expr or Block.
CompilationUnit CompilationUnit models the top level compilation unit of a source file.
Compiler Compiler manages the top level process of the compiler pipeline.
CompilerErr CompilerErr - instances should always be created via CompilerStep.err().
CompilerInput CompilerInput encapsulates all the input needed run the compiler.
CompilerInputMode Input source from the file system
CompilerLog CompilerLog manages logging compiler messages.
CompilerOutput CompilerOutput encapsulates the result of a compile.
CompilerOutputMode Input source from the file system
CompilerStep VisitStep represents one discrete task run during the compiler pipeline.
CompilerSupport CompilerSupport provides lots of convenience methods for classes used during the compiler pipeline.
Cond Cond
CondExpr CondExpr is used for || and && short-circuit boolean conditionals.
ConstantFolder ConstantFolder is used to implement constant folding optimizations where known literals and operations can be performed ahead of time by the compiler.
ContinueStmt ContinueStmt continues a while/for loop.
CurryExpr CurryExpr is used to "curry" a function into another function thru partially evaluation
CurryResolver CurryResolver handles the process of resolving a CurryExpr.
DefNode DefNode is the abstract base class for definition nodes such as TypeDef, MethodDef, and FieldDef.
DefaultCtor DefaultCtor adds a default public constructor called make() if no constructor was explicitly specified.
EnumDef EnumDef is used to define one ordinal/named enum value in an enum TypeDef.
Expr Expr
ExprId ExprId uniquely identifies the type of expr
ExprStmt ExprStmt is a statement with a stand along expression such as an assignment or method call.
FAttr FAttr is attribute meta-data for a FType or FSlot
FCodePrinter FCodePrinter prints a human readable syntax for fcode
FConst FConst provides all the fcode constants
FField FField is the read/write fcode representation of sys::Field.
FFieldRef FFieldRef
FMethod FMethod is the read/write fcode representation of sys::Method.
FMethodRef FMethodRef
FMethodVar FMethodVar models one parameter or local variable in a FMethod
FOp FOp provides all the fcode constants
FOpArg FOpArg
FPod FPod is the read/write fcode representation of sys::Pod.
FPodNamespace FPodNamespace implements Namespace by reading the fcode from pods directly.
FPrinter FPrinter is used to pretty print fcode
FSlot FSlot is the read/write fcode representation of sys::Slot.
FTable FTable is a 16-bit indexed lookup table for pod constants.
FType FType is the read/write fcode representation of sys::Type.
FTypeRef FTypeRef stores a typeRef structure used to reference type signatures.
FUtil FUtil provides fcode encoding and decoding utilities.
FacetDef FacetDef models a facet declaration.
Fanp Fan Disassembler
FieldDef FieldDef models a field definition
FieldExpr FieldExpr is used for a field variable access.
FindSourceFiles Search the module's source tree for all the fan source files and map them to SourceFile instances and store to Compiler.srcFiles.
ForStmt ForStmt models a for loop of the format:
FuncType FuncType models a parameterized Func type.
GenerateOutput GenerateOutput creates the appropriate CompilerOutput instance for Compiler.output based on the configured CompilerInput.output.
GenericParameterType GenericParameterType models the generic parameter types sys::V, sys::K, etc.
GenericType GenericType models a parameterized generic type: List, Map, or Func
IfStmt IfStmt models an if or if/else statement.
IndexedAssignExpr IndexedAssignExpr is a subclass of ShortcutExpr used in situations like x[y] += z where we need keep of two extra scratch variables and the get's matching set method.
Inherit Inherit processes each TypeDef to resolve the inherited slots.
InitClosures During the Parse step we created a list of all the closures.
InitEnum InitEnum is used to auto-generate EnumDefs into abstract syntax tree representation of the fields and method.
InitInput InitInput is responsible:
ListLiteralExpr ListLiteralExpr creates a List instance
ListType ListType models a parameterized List type.
LiteralExpr LiteralExpr puts an Bool, Int, Float, Str, Duration, Uri, or null constant onto the stack.
LoadPod LoadPod is used to immediately load the pod which has just been successfully compiled into Compiler.fpod.
LocalDefStmt LocalDefStmt models a local variable declaration and its optional initialization expression.
LocalVarExpr LocalVarExpr is used to access a local variable stored in a register.
Location Location provides a source file, line number, and column number.
Loop Loop
Main Main is the main entry point for the Fan compiler.
MapLiteralExpr MapLiteralExpr creates a List instance
MapType MapType models a parameterized Map type.
MethodDef MethodDef models a method definition - it's signature and body.
MethodVar MethodVar is a variable used in a method - either param or local.
NameExpr NameExpr is the base class for an identifier expression which has an optional base expression.
Node Node is the base class of all classes which represent a node in the abstract syntax tree generated by the parser.
NopStmt NopStmt is no operation do nothing statement.
Normalize Normalize the abstract syntax tree:
OrderByInheritance OrderByInheritance orders the list of TypeDefs from top to bottom such that any inherited types are guaranteed to be positioned first in the types list.
ParamDef ParamDef models the definition of a method parameter.
ParameterizedMethod ParameterizedMethod models a parameterized CMethod
ParameterizedMethodParam ParameterizedMethodParam
Parse Parse is responsible for parsing all the compilation units which have already been tokenized into their full abstract syntax tree representation in memory.
Parser Parser is responsible for parsing a list of tokens into the abstract syntax tree.
PodDef PodDef models the pod being compiled.
ProtectedRegion ProtectedRegion
RangeLiteralExpr RangeLiteralExpr creates a Range instance
ReflectField ReflectField
ReflectMethod ReflectMethod
ReflectNamespace ReflectNamespace implements Namespace using reflection to compile against the VM's current pod repository.
ReflectParam ReflectParam
ReflectPod ReflectPod is the CPod wrapper for a dependent Pod loaded via reflection.
ReflectSlot ReflectSlot is the implementation of CSlot for a slot imported from a precompiled pod (as opposed to a SlotDef within the compilation units being compiled).
ReflectType ReflectType is the implementation of CType for a type imported from a precompiled pod (as opposed to a TypeDef within the compilation units being compiled).
ResolveDepends ResolveDepends resolves each dependency to a CPod and checks the version.
ResolveExpr Walk the AST to resolve:
ResolveImports ResolveImports maps every Using node in each CompilationUnit to a pod and ensures that it exists and that no imports are duplicated.
ReturnStmt ReturnStmt returns from the method
ScanForUsingsAndTypes ScanForUsingsAndTypes is the first phase in a two pass parser.
ShortcutExpr ShortcutExpr is used for operator expressions which are a shortcut to a method call:
ShortcutOp ShortcutOp is a sub-id for ExprId.shortcut which identifies the an shortuct operation and it's method call
SlotDef SlotDef models a slot definition - a FieldDef or MethodDef
SlotLiteralExpr SlotLiteralExpr
StaticTargetExpr StaticTargetExpr wraps a type reference as an Expr for use as a target in a static field access or method call
Stmt Stmt
StmtId StmtId
SuperExpr SuperExpr is used to access super class slots.
SwitchStmt SwitchStmt models a switch and its case and default block
TernaryExpr TernaryExpr is used for the ternary expression <cond> ? <true> : <false>
ThisExpr ThisExpr models the "this" keyword to access the implicit this local variable always stored in register zero.
ThrowStmt ThrowStmt throws an exception
Token Token is the enum for all the token types.
TokenVal TokenVal stores an instance of a Token at a specific Location.
Tokenize Tokenize is responsible for parsing all the source files into a a list of tokens.
Tokenizer Tokenizer inputs a Str and output a list of Tokens
TryStmt TryStmt models a try/catch/finally block
TypeCheckExpr TypeCheckExpr is an expression which is composed of an arbitrary expression and a type - is, as, & casts
TypeDef TypeDef models a type definition for a class, mixin or enum
TypeParser TypeParser is used to parser formal type signatures into CTypes.
TypeRef TypeRef models a type reference such as an extends clause or a method parameter.
UnaryExpr UnaryExpr is used for unary expressions including !, +.
UnknownVarExpr UnknownVarExpr is a place holder in the AST for a variable until we can figure out what it references: local or slot.
Using Using models an using import statement.
UsingAndTypeScanner UsingAndTypeScanner
Visitor Vistor is used to walk the abstract syntax tree and visit key nodes.
WhileStmt WhileStmt models a while loop of the format:
WithBaseExpr WithBaseExpr is a place holder used as the target of sub-expressions within a with block typed to the with base.
WithBlockExpr WithBlockExpr is used enclose a series of sub-expressions against a base expression:
WithSubExpr WithSubExpr wraps each sub-expr within a with-block.
WritePod WritePod writes the FPod to a zip file.

Types