FSharp.PowerPack.Metadata
Return the System.Reflection.Assembly object for the assembly
Holds the full qualified assembly name
Get the object representing the F# core library (FSharp.Core.dll) for the running program
A handle to the full specification of the contents of the module contained in this Assembly
A hint as to where does the code for the CCU live (e.g what was the tcConfig.implicitIncludeDir at compilation time for this DLL?)
Return the System.Reflection.Assembly object for the assembly
This is one way of starting the loading process off.
This is one way of starting the loading process off. Dependencies are automatically
resolved by calling System.Reflection.Assembly.Load.
The declared documentation for the type or module
Indicates the type prefers the "tycon<a,b>" syntax for display etc.
The cases of a discriminated union
The fields of the class, struct or enum
The declaration location for the type constructor
Get the fully qualified name of the type or module
The name of the type, possibly with `n mangling
Properties, methods etc. with implementations, also values in a module
Indicates the type is a struct
Indicates the entity is an F# module definition
Indicates the entity is a measure definition
If true, then this is a reference to something in some .NET assembly from another .NET language
Indicates an F# exception declaration
Indicates the type is a measure, type or exception abbreviation
Interface implementations - boolean indicates compiler-generated
Indicates that a module is compiled to a class with the given mangled name. The mangling is reversed during lookup
Indicates the type is implemented through a mapping to IL assembly code. THis is only
true for types in FSharp.Core.dll
Get the generic parameters, possibly including unit-of-measure parameters
Base type, if any
The declared attributes for the type
Return the System.Type for the type
Raises InvalidOperationException if the type is an abbreviation or has an assembly code representation.
Return the FSharpEntity corresponding to a .NET type
The documentation for the type parameter.
Is this a ^a type variable
Is this a measure variable
The declared attributes of the type parameter.
An F# discriminated union, as an object model
XML documentation attached to a value.
The full type of the member or value when used as a first class value
Is this an F# type function
Is this a mutable value
Is this a module or member value
Is this an implicit constructor?
Is this an extension member?
Is this a compiler generated value
Is this a must-inline value
The typars of the member or value
The member name in compiled code
Custom attributes attached to the value. These contain references to other values (i.e. constructors in types). Mutable to fixup
these value references after copying a colelction of values.
Documentation for the field
The type of the field, w.r.t. the generic parameters of the enclosing type constructor
Declaration-location of the field
Attributes attached to generated property
Name of the field
Indicates a static field
Is the field declared in F#?
Indicates a compiler generated field, not visible to Intellisense or name resolution
Attributes attached to generated field
Get the named entity for a type constructed using a named entity
Indicates the type is a tuple type. The GenericArguments property returns the elements of the tuple type.
Indicates the type is constructed using a named entity
Indicates the type is a variable type, whether declared, generalized or an inference type parameter
Indicates the type is a function type. The GenericArguments property returns the domain and range of the function type.
Get the index for a generic parameter type
Get the generic parameter data for a generic parameter type
Get the generic arguments for a tuple type, a function type or a type constructed using a named entity
Documentation for the case
Return type constructed by the case. Normally exactly the type of the enclosing type, sometimes an abbreviation of it
Range of the name of the case
Name of the case
Data carried by the case.
Name of the case in generated IL code
Attributes, attached to the generated static method to make instances of the case
Calling conventions. These are used in method pointer types.
Global state: table of all assembly references keyed by AssemblyRefData
The explicit offset in bytes when explicit layout is used.
Index table by name and arity.
This is used to store event, property and field maps.
Review: this is not such a great data structure.
keyed first on namespace then on type name. The namespace is often a unique key for a given type map.
A little ugly, but the idea is that if a data structure does not
contain lazy values then we don't add laziness. So if the thing to map
is already evaluated then immediately apply the function.
Global State. All namespace splits
Like Fixup but loader may return None, in which case there is no fixup.
Used when generating the secret paths used by FSI file generation
The characters that are allowed to be in an identifier.
Is this character a part of a long identifier
Used when generating the secret paths used by FSI file generation
Used when generating the secret paths used by FSI file generation
Try to chop "get_" or "set_" from a string
Attrib(kind,unnamedArgs,propVals)
We keep both source expression and evaluated expression around to help intellisense and signature printing
AttribNamedArg(name,type,isField,value)
The result of attempting to resolve an assembly name to a full ccu.
UnresolvedCcu will contain the name of the assembly that could not be resolved.
Ensure the ccu is derefable in advance. Supply a path to attach to any resulting error message.
A relinkable handle to the contents of a compilation unit. Relinking is performed by mutation.
The information ILXGEN needs about the location of an item
Specifies the compiled representations of type and exception definitions.
Computed and cached by later phases (never computed type checking). Cached at
type and exception definitions. Not pickled.
Constants in expressions
Decision trees. Pattern matching has been compiled down to
a decision tree by this point. The right-hand-sides (actions) of
the decision tree are labelled by integers that are unique for that
particular tree.
A target of a decision tree. Can be thought of as a little function, though is compiled as a local block.
From TAST TyconRef to IL ILTypeRef
A named module-or-namespace-fragment definition
The module_typ is a binder. However it is not used in the ModuleOrNamespaceExpr: it is only referenced from the 'outside'
The contents of a module-or-namespace-fragment definition
A type for a module-or-namespace-fragment and the actual definition of the module-or-namespace-fragment
note: ModuleOrNamespaceRef and TyconRef are type equivalent
Namespace or module-compiled-as-type?
Values, including members in F# types in this module-or-namespace-fragment.
Type, mapping mangled name to Tycon, e.g.
Lookup tables keyed the way various clients expect them to be keyed.
We attach them here so we don't need to store lookup tables via any other technique
Mutation used during compilation of FSharp.Core.dll
Non-local references indirect via a CCU
The lookup into the CCU is a NonLocalPath, which is a series of strings
We cache the result of dereferencing
Index into the namespace/module structure of a particular CCU
A representation of a method in an object expression.
Note: Methods associated with types are represented as val declarations
Note: We should probably use val_specs for object expressions, as then the treatment of members
in object expressions could be more unified with the treatment of members in types
A public path records where a construct lives within the global namespace
of a CCU.
This ModuleOrNamespace that represents the compilation of a module as a class.
The same set of tycons etc. are bound in the ModuleOrNamespace as in the ModuleOrNamespaceExpr
This is the body of the module/namespace
The extra metadata stored about typars for top-level definitions. Any information here is propagated from signature through
to the compiled code.
The extra metadata stored about typars for top-level definitions. Any information here is propagated from signature through
to the compiled code.
The specification of a member constraint that must be solved
The ILX data structure representing the discriminated union.
The type of the value.
May be a Type_forall for a generic value.
May be a type variable or type containing type variables during type inference.
A unique stamp within the context of this invocation of the compiler process
The place where the value was defined.
What is the public path to the value, if any? Should be set if and only if
IsMemberOrModuleBinding is set.
Is this a member, if so some more data about the member.
Note, the value may still be (a) an extension member or (b) and abtract slot without
a true body.
The internal name the value.
Was the value inferred to be a method or function that definitely makes no critical tailcalls?
The value of a value or member marked with [<LiteralAttribute>]
Is this a member definition or module definition?
Is this represented as a "top level" static binding (i.e. a static field, static member,
instance member), rather than an "inner" binding that may result in a closure.
This is implied by IsMemberOrModuleBinding, however not vice versa, for two reasons.
Some optimizations mutate this value when they decide to change the representation of a
binding to be IsCompiledAsTopLevel. Second, even immediately after type checking we expect
some non-module, non-member bindings to be marked IsCompiledAsTopLevel, e.g. 'y' in
'let x = let y = 1 in y + y' (NOTE: check this, don't take it as gospel)
Range of the definition (implementation) of the value, used by Visual Studio
Updated by mutation when the implementation is matched against the signature.
The parent type or module, if any (None for expression bindings and parameters)
References are either local or nonlocal
The big type of expressions.
The algebra of types
Unique name generator for stamps attached to lambdas and object expressions
Create a module Tycon based on an existing one using the function 'f'.
We require that we be given the parent for the new module.
We pass the new module to 'f' in case it needs to reparent the
contents of the module.
Create a tycon based on an existing one using the function 'f'.
We require that we be given the new parent for the new tycon.
We pass the new tycon to 'f' in case it needs to reparent the
contents of the tycon.
Create a Val based on an existing one using the function 'f'.
We require that we be given the parent for the new Val.
Given (newPath,oldPath) replace oldPath by newPath in the TAccess.
Equality on CCUs, implemented as reference equality
Combine module types when multiple namespace fragments contribute to the
same namespace, making new module specs as we go.
Identical to tcref.Deref and deref_tycon, just used to help distinguish what kind of entity we expect here
Compiler-internal references to items in fslib are generated as Ref_nonlocal even when compiling fslib
Unique name generator for stamps attached to to val_specs, tycon_specs etc.
This predicate tests if non-local resolution paths are definitely known to resolve
to different entities. All references with different named paths always resolve to
different entities. Two references with the same named paths may resolve to the same
entities even if they reference through different CCUs, because one reference
may be forwarded to another via a .NET TypeForwarder.
See nlpath_definitely_not_eq
Equality on type varialbes, implemented as reference equality
verboseStamps: print #stamp on each id -- very verbose - but sometimes useful. Turn on using '--stamps'
Equality on value specs, implemented as reference equality
Metadata on values (names of arguments etc.
The default location of FSharp.Core.dll and fsc.exe based on the version of fsc.exe that is running