System.Compiler
Public only for use by the Framework. Do not use this class.
Well, if you really really must, use it only if you can tolerate keeping the file locked for at least as long as any Identifier
derived from the file stays alive.
This interface can be used to link an arbitrary source text provider into an IR tree via a DocumentText instance.
Retrieves a substring from this instance. The substring starts with the character at the specified index and has a specified length.
Indicates that the text has been fully scanned and futher references to the text are expected to be infrequent.
The underlying object can now choose to clear cached information if it comes under resource pressure.
The number of characters in the source text.
A "character" corresponds to a System.Char which is actually a Unicode UTF16 code point to be precise.
Retrieves the character at the given position. The first character is at position zero.
Returns null unless the implementer is based on an ASCII buffer that stays alive as long at the implementer itself.
An implementer that returns a non-null value is merely a wrapper to keep the buffer alive. No further methods will
be called on the interface in this case.
Base for all classes that process the IR using the visitor pattern.
Switches on node.NodeType to call a visitor method that has been specialized for node.
The node to be visited.
Returns null if node is null. Otherwise returns an updated node (possibly a different object).
Transfers the state from one visitor to another. This enables separate visitor instances to cooperative process a single IR.
Walks an IR, mutuating it into a new form
Return the current scope's view of the argument type, by asking the current scope's type viewer.
Return a type viewer for the current scope.
[The type viewer acts like the identity function, except for dialects (e.g. Extensible Sing#)
that allow extensions and differing views of types.]
null can be returned to represent an identity-function type viewer.
Provides methods for invoking a parser to obtain AST nodes corresponding to various types of code snippets.
Parses the parser's source document as an entire compilation unit and adds the resulting AST nodes to the
Nodes list of the given CompilationUnit instance.
The compilation unit whose Nodes list will receive the AST root node(s) that the parser produces.
Provides a way for general purpose code to construct parsers using an standard interface.
Useful for base classes without complete knowledge of all the different kinds of parsers that might be used in an application.
Base for all classes that process two IR trees, possibily transforming one of them.
Switches on node.NodeType to call a visitor method that has been specialized for node.
Returns null if node1 is null. Otherwise returns an updated node (possibly a different object).
Transfers the state from one visitor to another. This enables separate visitor instances to cooperative process a single IR.
Walks an IR, mutuating it into a new form
Removes member (by nulling slot) if present
Walks a normalized IR, removing push, pop and dup instructions, replacing them with references to local variables.
Requires all Blocks to be basic blocks. I.e. any transfer statement is always the last statement in a block.
(This precondition is established by Reader but not by Normalizer.)
High performance replacement for System.IO.BinaryWriter.
A version of System.IO.Path that does not throw exceptions.
Use this to set the target platform to a platform with a superset of the platform assemblies in version 1.1, but
where the public key tokens and versions numbers are determined by reading in the actual assemblies from
the supplied location. Only assemblies recognized as platform assemblies in version 1.1 will be unified.
This class specializes a normalized IR by replacing type parameters with type arguments.
Performs a deep value comparison between two IR trees of the same type.
Gets a difference object representing the differences between node1 and node2. Caches the result and returns it for subsequent calls.
I.e. this is a caching factory method for Differences instances. Calls GetNewDifferences to construct new instances when needed.
Uri pointing to the assembly
Returns the original location of the corresponding assembly if available, otherwise returns the location of the shadow copy.
If the corresponding assembly is not in the GAC, null is returned.
This just gets the local variable index for each local declaration.
That associates the debug information with the right block because
it is the block the local is declared in rather than the subblock
it is first referenced in. (When different, the debugger only knows
about the local when control is in the subblock.)
The list of locals declared at this statement
The common base class for all types. This type should not be extended directly.
Instead extend one of the standard subclasses such as Class, Struct or Interface, since in
the CLR a type has to be an instance of one the subclasses, and a type which does not extend
one of these types will have no equivalent in the CLR.
A member of a Namespace or a TypeNode
A node in an Abstract Syntax Tree.
The region in the source code that contains the concrete syntax corresponding to this node in the Abstract Syntax Tree.
Makes a shallow copy of the node.
A shallow copy of the node
A scalar tag that identifies the concrete type of the node. This is provided to allow efficient type membership tests that
facilitate tree traversal.
An integer that uniquely identifies this node. This provides an efficient equality test to facilitate hashing.
Do not override this.
The namespace of which this node is a member. Null if this node is a member of type.
Indicates that the signature of this member may include unsafe types such as pointers. For methods and properties, it also indicates that the
code may contain unsafe constructions such as pointer arithmetic.
A list of other nodes that refer to this member. Must be filled in by client code.
Gets the first attribute of the given type in the attribute list of this member. Returns null if none found.
This should not be called until the AST containing this member has been processed to replace symbolic references
to members with references to the actual members.
The source code, if any, corresponding to the value in Documentation.
Writes out an element with tag "element", name attribute DocumentationId.ToString() and body Documentation using the provided XmlTextWriter instance.
The type of which this node is a member. Null if this node is a member of a Namespace.
The unqualified name of the member.
The attributes of this member. Corresponds to custom attribute annotations in C#.
Indicates if this is a member of a subclass that intentionally has the same signature as a member of a base class. Corresponds to the "new" modifier in C#.
Indicates if this is a virtual method of a subclass that intentionally overrides a method of a base class. Corresponds to the "override" modifier in C#.
If this is true, the name of the member is meaningless and the member is intended as an "invisible" container for other members.
The value of this property is controlled by the presence or absence of the Anonymous attribute.
Exposes the value of the Anonymous attribute. The value is Anonimity.None if no attribute is present.
The concatenation of the FullName of the containing member and the name of this member.
Separated with a '.' character if the containing member is a namespace and a '+' character if the containing member is a Type.
Includes the parameter type full names when this member is a method or a property. Also includes (generic) template arguments.
True if all references to this member must be from the assembly containing the definition of this member.
True if access to this member is controlled by the compiler and not the runtime. Cannot be accessed from other assemblies since these
are not necessarily controlled by the same compiler.
True if this member can only be accessed from subclasses of the class declaring this member.
True if this member can only be accessed from subclasses of the class declaring this member, provided that these subclasses are also
contained in the assembly containing this member.
True if all references to this member must either be from the assembly containing the definition of this member,
or from a subclass of the class declaring this member.
True if all references to this member must be from members of the type declaring this member.///
True if the member can be accessed from anywhere.///
True if the name of this member conforms to a naming pattern with special meaning. For example the name of a property getter.
True if this member always has the same value or behavior for all instances the declaring type.
True if another assembly can contain a reference to this member.
A cached reference to the first Obsolete attribute of this member. Null if no such attribute exsits.
The body of an XML element containing a description of this member. Used to associated documentation (such as this comment) with members.
The fragment usually conforms to the structure defined in the C# standard.
The value of the name attribute of the XML element whose body is the XML fragment returned by Documentation.
The value of the summary child element of the XML fragment returned by Documentation. All markup is stripped from the value.
The invariants associated with this type (for now only classes, interfaces, structs).
If this type is the combined result of a number of partial type definitions, this lists the partial definitions.
True if this type is the result of a template instantiation with arguments that are themselves template parameters.
Used to model template instantiations occurring inside templates.
If this type is a partial definition, the value of this is the combined type resulting from all the partial definitions.
The list of extensions of this type, if it's a non-extension type.
all extensions implement the IExtendTypeNode interface (in the Sing# code base).
null = empty list
Whether or not the list of extensions has been examined;
it's a bug to record a new extension after extensions have been examined.
Record another extension of this type.
Copy a (possibly transformed) set of extensions from source to the
receiver, including whether or not the extensions have been examined.
Return whether t1 represents the same type as t2 (or both are null).
This copes with the cases where t1 and/or t2 may be type views and/or type extensions, as
in Extensible Sing#.
A delegate that is called the first time Members is accessed, if non-null.
Provides for incremental construction of the type node.
Must not leave Members null.
A delegate that is called the first time NestedTypes is accessed, if non-null.
A delegate that is called the first time Attributes is accessed, if non-null.
Provides for incremental construction of the type node.
Must not leave Attributes null.
Opaque information passed as a parameter to the delegates in ProvideTypeMembers et al.
Typically used to associate this namespace instance with a helper object.
Returns the methods of an abstract type that have been left unimplemented. Includes methods inherited from
base classes and interfaces, and methods from any (known) extensions.
A method list to which the abstract methods must be appended.
Returns a type representing an array whose elements are of this type. Will always return the same instance for the same rank.
The number of dimensions of the array.
Returns a type representing an array whose elements are of this type. Will always return the same instance for the same rank, sizes and bounds.
The number of dimensions of the array.
The size of each dimension.
The lower bound for indices. Defaults to zero.
Returns the constructor with the specified parameter types. Returns null if this type has no such constructor.
Gets an instance for the given template arguments of this (generic) template type.
The type in which the reference to the template instance occurs. If the template is not
generic, the instance becomes a nested type of the referring type so that it has the same access privileges as the
code referrring to the instance.
The template arguments.
An instance of the template. Always the same instance for the same arguments.
Gets an instance for the given template arguments of this (generic) template type.
The type in which the reference to the template instance occurs. If the template is not
generic, the instance becomes a nested type of the referring type so that it has the same access privileges as the
code referrring to the instance.
The template arguments.
An instance of the template. Always the same instance for the same arguments.
Returns a list of all the members declared directly by this type with the specified name.
Returns an empty list if this type has no such members.
Returns the first event declared by this type with the specified name.
Returns null if this type has no such event.
Returns the first field declared by this type with the specified name. Returns null if this type has no such field.
Returns the first method declared by this type with the specified name and parameter types. Returns null if this type has no such method.
Returns the first nested type declared by this type with the specified name. Returns null if this type has no such nested type.
Returns the first property declared by this type with the specified name and parameter types. Returns null if this type has no such property.
Gets a TypeNode instance corresponding to the given System.Type instance.
A runtime type.
A TypeNode instance.
Gets a System.Type instance corresponding to this type. The assembly containin this type must be normalized
and must have a location on disk or must have been loaded via AssemblyNode.GetRuntimeAssembly.
A System.Type instance. (A runtime type.)
Returns true if the CLR CTS allows a value of this type may be assigned to a variable of the target type (possibly after boxing),
either because the target type is the same or a base type, or because the target type is an interface implemented by this type or the implementor of this type,
or because this type and the target type are zero based single dimensional arrays with assignment compatible reference element types
Returns true if this type is assignable to some instance of the given template.
Returns true if this type is assignable to some instance of the given template.
Returns true if otherType is the base class of this type or if the base class of this type is derived from otherType.
Needed whenever we change the id of an existing member
Specifies the total size in bytes of instances of types with prescribed layout.
The module or assembly to which the compiled type belongs.
The interfaces implemented by this class or struct, or the extended by this interface.
The namespace to which this type belongs. Null if the type is nested inside another type.
Specifies the alignment of fields within types with prescribed layout.
The property that should be accessed by clients to get the list of extensions of this type.
When duplicating a type node, we want to transfer the extensions and the extensionsExamined flag without
treating this as a "touch" that sets the examined flag. Pretty ugly, though.
If the receiver is a type extension, return the extendee, otherwise return the receiver.
[The identity function, except for dialects (e.g. Extensible Sing#) that allow
extensions and differing views of types]
Contains all the types instantiated from this non generic template type.
Contains declarative security information associated with the type.
The type from which this type is derived. Null in the case of interfaces and System.Object.
A list of any members of this type that have the DefaultMember attribute.
Return the name the constructor should have in this type node. By default, it's
the same as the name of the enclosing type node, but it can be different in e.g.
extensions in Extensible Sing#
True if the type is an abstract class or an interface.
True if this type is a template conforming to the rules of a generic type in the CLR.
True if the type node is in "normal" form. A node is in "normal" form if it is effectively a node in an AST formed directly
from CLR module or assembly. Such a node can be written out as compiled code to an assembly or module without further processing.
True if values of this type can be compared directly in CLR IL instructions.
True if values of this type are integers that can be processed by CLR IL instructions.
True if values of this type are integers or floating point numbers that can be processed by CLR IL instructions.
True if values of this type can be processed by CLR IL instructions.
True if the type cannot be derived from.
True if the identity of the type depends on its structure rather than its name.
Arrays, pointers and generic type instances are examples of such types.
True if the type serves as a parameter to a type template.
True if the type is a value type containing only fields of unmanaged types.
A list of the types that contribute to the structure of a structural type.
True if values of this type are unsigned integers that can be processed by CLR IL instructions.
True if instances of this type have no identity other than their value and are copied upon assignment.
Returns true if the type is definitely a reference type.
True if underlying type (modulo type modifiers) is a pointer type (Pointer)
The list of members contained inside this type, by default ignoring any extensions of this type.
(Subclasses in the Extensible Sing# dialect override this to include members of visible extensions.)
If the value of members is null and the value of ProvideTypeMembers is not null, the
TypeMemberProvider delegate is called to fill in the value of this property.
The (generic) type template from which this type was instantiated. Null if this is not a (generic) type template instance.
The arguments used when this (generic) type template instance was instantiated.
The type parameters of this type. Null if this type is not a (generic) type template.
The System.TypeCode value that Convert.GetTypeCode will return pass an instance of this type as parameter.
The type of delegates that fill in the Members property of the given type.
The type of delegates that fill in the NestedTypes property of the given type.
The type of delegates that fill in the Attributes property of the given type.
The source code, if any, corresponding to the value in Documentation.
Gets the first attribute of the given type in the custom attribute list of this module. Returns null if none found.
This should not be called until the module has been processed to replace symbolic references
to members with references to the actual members.
The identifier represents the structure via some mangling scheme. The result can be either from this module,
or any module this module has a reference to.
The assembly, if any, that includes this module in its ModuleReferences.
An enumeration that indicates if the module is an executable, library or resource, and so on.
The path of the file from which this module or assembly was loaded or will be stored in.
Identifies the version of the CLR that is required to load this module or assembly.
The name of the module or assembly. Includes the file extension if the module is not an assembly.
If any exceptions were encountered while reading in this module, they are recorded here. Since reading is lazy,
this list can grow dynamically during the use of a module.
The attributes associated with this module or assembly. This corresponds to C# custom attributes with the assembly or module target specifier.
Declarative security for the module or assembly.
An XML Document Object Model for a document containing all of the documentation comments applicable to members
defined in this module.
If this module is an executable, this method is the one that gets called to start the execution of managed code.
The list of modules (excluding assemblies) defining members that are referred to in this module or assembly.
A list of managed resources linked or embedded into this module or assembly.
A list of Win32 resources embedded in this module or assembly.
The types contained in this module or assembly.
A thin wrapper for a synchronized System.Collections.Hashtable that inserts and strips WeakReference wrappers for the values stored in the table.
Use this after a source text has already been scanned and parsed. This allows the source text to get released
if there is memory pressure, while still allowing portions of it to be retrieved on demand. This is useful when
a large number of source files are read in, but only infrequent references are made to them.
This class is used to wrap the string contents of a source file with an ISourceText interface. It is used while compiling
a project the first time in order to obtain a symbol table. After that the StringSourceText instance is typically replaced with
a CollectibleSourceText instance, so that the actual source text string can be collected. When a file is edited,
and the editor does not provide its own ISourceText wrapper for its edit buffer, this class can be used to wrap a copy of the edit buffer.
The wrapped string used to implement ISourceText. Use this value when unwrapping.
True when the wrapped string is the contents of a file. Typically used to check if it safe to replace this
StringSourceText instance with a CollectibleSourceText instance.
This class provides a uniform interface to program sources provided in the form of Unicode strings,
unsafe pointers to ascii buffers (as obtained from a memory mapped file, for instance) as well as
arbitrary source text providers that implement the ISourceText interface.
If this is not null it is used to obtain 8-bit ASCII characters.
If this is not null it represents a Unicode string encoded as UTF16.
If this is not null the object implement ISourceText provides some way to get at individual characters and substrings.
The number of characters in the source document.
A "character" corresponds to a System.Char which is actually a Unicode UTF16 code point to be precise.
Compare this.Substring(offset, length) for equality with str.
Call this only if str.Length is known to be equal to length.
Compares the substring of the specificied length starting at offset, with the substring in DocumentText starting at textOffset.
The index of the first character of the substring of this DocumentText.
The Document text with the substring being compared to.
The index of the first character of the substring of the DocumentText being compared to.
The number of characters in the substring being compared.
Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.
Retrieves the character at the given position. The first character is at position zero.
A source document from which an Abstract Syntax Tree has been derived.
A Guid that identifies the kind of document to applications such as a debugger. Typically System.Diagnostics.SymbolStore.SymDocumentType.Text.
A Guid that identifies the programming language used in the source document. Typically used by a debugger to locate language specific logic.
A Guid that identifies the compiler vendor programming language used in the source document. Typically used by a debugger to locate vendor specific logic.
The line number corresponding to the first character in Text. Typically 1 but can be changed by C# preprocessor directives.
Indicates that the document contains machine generated source code that should not show up in tools such as debuggers.
Can be set by C# preprocessor directives.
The name of the document. Typically a file name. Can be a full or relative file path, or a URI or some other kind of identifier.
Contains the source text.
Maps the given zero based character position to the number of the source line containing the same character.
Line number counting starts from the value of LineNumber.
Maps the given zero based character position in the entire text to the position of the same character in a source line.
Counting within the source line starts at 1.
Given a startLine, startColum, endLine and endColumn, this returns the corresponding startPos and endPos. In other words it
converts a range expression in line and columns to a range expressed as a start and end character position.
The number of the line containing the first character. The number of the first line equals this.LineNumber.
The position of the first character relative to the start of the line. Counting from 1.
The number of the line contain the character that immediate follows the last character of the range.
The position, in the last line, of the character that immediately follows the last character of the range.
The position in the entire text of the first character of the range, counting from 0.
The position in the entire text of the character following the last character of the range.
Retrieves a substring from the text of this Document. The substring starts at a specified character position and has a specified length.
Counts the number of end of line marker sequences in the given text.
An array of offsets, with offset at index i corresponding to the position of the first character of line i, (counting lines from 0).
The number of lines in Text.
Returns the index in this.lineOffsets array such that this.lineOffsets[index] is less than or equal to offset
and offset is less than lineOffsets[index+1]
Maps the given zero based character position in the entire text to a (line, column) pair corresponding to the same position.
Counting within the source line starts at 0. Counting source lines start at 0.
Adds the given offset to the this.lineOffsets table as the offset corresponding to the start of line this.lines+1.
Populates this.lineOffsets with an array of offsets, with offset at index i corresponding to the position of the first
character of line i, (counting lines from 0).
Add one to this every time a Document instance gets a unique key.
An integer that uniquely distinguishes this document instance from every other document instance.
This provides an efficient equality test to facilitate hashing.
For creating source contexts that have just a filename, start line and column and end line and column.
If a SourceContext has a DocumentWithPrecomputedLineNumbers as its Document, then it should have 0 as its StartPos
and 1 as its EndPos because those are used here to decide what to return.
Records a location within a source document that corresponds to an Abstract Syntax Tree node.
The source document within which the AST node is located. Null if the node is not derived from a source document.
The zero based index of the first character beyond the last character in the source document that corresponds to the AST node.
The zero based index of the first character in the source document that corresponds to the AST node.
Returns true if the line and column is greater than or equal the position of the first character
and less than or equal to the position of the last character
of the source document that corresponds to the AST node.
A line number(counting from Document.LineNumber)
A column number (counting from one)
The number (counting from Document.LineNumber) of the line containing the first character in the source document that corresponds to the AST node.
The number (counting from one) of the line column containing the first character in the source document that corresponds to the AST node.
The number (counting from Document.LineNumber) of the line containing the first character beyond the last character in the source document that corresponds to the AST node.
The number (counting from one) of the line column containing first character beyond the last character in the source document that corresponds to the AST node.
The substring of the source document that corresponds to the AST node.
Allows a compilation to output progress messages and to query if cancellation was requested.
Do not emit run-time checks for requires clauses of non-externally-accessible methods, assert statements, loop invariants, and ensures clauses.
Do not emit run-time checks for assume statements.
Do not emit run-time checks for requires clauses of externally accessible methods.
Disable the guarded classes feature, which integrates run-time enforcement of object invariants, ownership, and safe concurrency.
Disable the runtime test against null on non-null typed parameters on public methods
If set, the compiler will only parse and then emit an xml file with detailed source contexts
about what is parsed.
0-: Common
1000-: HScript
2000-: EcmaScript
3000-: Zonnon
4000-: Comega
5000-: X++
6000-: Spec#
7000-: Sing#
8000-: Xaml
9000-: C/AL
For your range contact hermanv@microsoft.com
This an Expression wrapper for compile time constants. It is assumed to be correct by construction.
In Normalized IR, the wrapped value must be a primitive numeric type or an enum or a string or null.
If used in custom attributes, types are also allowed as well as single dimensional arrays of other allowed types.
If the wrapped value is null, any reference type is allowed, except in custom attributes, where it must be Type or String.
Holds the wrapped compile time constant value.
The name of a stack location. For example the name of a local variable or the name of a method parameter.
If the parameter is a param array, this returns the element type of the array. If not, it returns null.
Gets the first attribute of the given type in the attribute list of this parameter. Returns null if none found.
This should not be called until the AST containing this member has been processed to replace symbolic references
to members with references to the actual members.
The (C# custom) attributes of this parameter.
The value that should be supplied as the argument value of this optional parameter if the source code omits an explicit argument value.
Zero based index into a parameter list containing this parameter.
Zero based index into the list of arguments on the evaluation stack.
Instance methods have the this object as parameter zero, which means that the first parameter will have value 1, not 0.
True if the corresponding argument value is used by the callee. (This need not be the case for a parameter marked as IsOut.)
True if the caller can omit providing an argument for this parameter.
True if the corresponding argument must be a left hand expression and will be updated when the call returns.
Must forward type to underlying binding, since ThisBindings get built at times when
the bound This node does not have its final type yet.
When the source uses the C# compatibility mode, base calls cannot be put after non-null
field initialization, but must be put before the body. But the user can specify where
the base ctor call should be performed by using "base;" as a marker. During parsing
this flag is set so the right code transformations can be performed at code generation.
An identifier with the empty string ("") as its value.
Use when pointer+offset points to a null terminated string of UTF8 code points.
Use when pointer points to a string of UTF8 code points of a given length
Returns an integer that is the same for every Identifier instance that has the same string value, and that is different from
every other identifier instance that has a different string value. Useful for efficient equality tests when hashing identifiers.
This type is normally expected to be the same the value of Type. However, if the indexer applies to an array of enums, then
Type will be the enum type and ElementType will be the underlying type of the enum.
An expression that is used on the left hand as well as the right hand side of an assignment statement. For example, e in (e += 1).
The actual value of the opcode
The offset from the start of the instruction stream of a method
Immediate data such as a string, the address of a branch target, or a metadata reference, such as a Field
A Type two which both operands must be coerced before carrying out the operation (if any).
Used when converting a declaration with initializer into an assignment statement.
Usually Nop, but could be set to CopyReference to avoid dereferencing on either side.
Associates an identifier with a type or a namespace or a Uri or a list of assemblies.
In C# alias identifiers are used as root identifiers in qualified expressions, or as identifier prefixes.
The identifier that serves as an alias for the type, namespace, Uri or list of assemblies.
The list of assemblies being aliased.
The expression that was (or should be) resolved into a type, namespace or Uri.
The namespace being aliased.
A reference to the type being aliased.
The Uri being aliased.
If an alias definition conflicts with a type definition and this causes an ambiguity, the conflicting type is stored here
by the code that detects the ambiguity. A later visitor is expected to report an error if this is not null.
Gets the value of the literal coercing literals of TypeNode, EnumNode, TypeNode[], and EnumNode[] as needed.
A TypeNode representing the type of the literal
The value of the literal
An object that has been coerced to the appropiate runtime type
Gets the array literal in arrayValue coercing TypeNode[] and EnumNode[] as needed.
A TypeNode representing the array type
The value of the array literal to coerce
An Array object that has been coerced to the appropriate runtime type
Invariant: positional arguments occur first and in order in the expression list. Named arguments
follow posititional arguments in any order.
Gets the first attribute of the given type in the custom attribute list of this member. Returns null if none found.
The member is assumed to be either imported, or already in a form suitable for export.
A separate assembly that supplied the type and method contracts for this assembly.
A string containing the name, version, culture and key of this assembly, formatted as required by the CLR loader.
The target culture of any localized resources in this assembly.
An enumeration that identifies the what kind of assembly this is.
Attributes that specifically target a module rather an assembly.
The public part of the key pair used to sign this assembly, or a hash of the public key.
The version of this assembly.
Public types defined in other modules making up this assembly and to which other assemblies may refer to.
The attributes associated with this module. This corresponds to C# custom attributes with the module target specifier.
The class from which this class has been derived. Null if this class is System.Object.
Does not model a real type, but leverages the symbol table methods of Class. In other words, this is implementation inheritance, not an ISA relationship.
Walks an IR, duplicating it while fixing up self references to point to the duplicate IR. Only good for one duplication.
Largest unit of duplication is a single module.
The module into which the duplicate IR will be grafted.
The type into which the duplicate Member will be grafted. Ignored if entire type, or larger unit is duplicated.
Search this namespace for a type with this name nested in the given namespace. Also considers used name spaces.
If more than one type is found, a list is returned in duplicates.
Searches this namespace for a type with this name. Also considers aliases and used name spaces, including those of outer namespaces.
If more than one type is found, a list is returned in duplicates. Types defined in the associated
module mask types defined in referenced modules and assemblies. Results are cached and duplicates are returned only when
there is a cache miss.
Searches the module and assembly references of the associated module to find types
The underlying integer type used to store values of this enumeration.
True if the type is a value type containing only fields of unmanaged types.
Zero based index into a parameter list containing this parameter.
Zero based index into a parameter list containing this parameter.
True if the type serves as a parameter to a type template.
Zero based index into a parameter list containing this parameter.
True if the type serves as a parameter to a type template.
Bundles a type with a boolean expression. The bundle is a subtype of the given type.
The class is a struct with a single private field of the given type and implicit coercions to and from the underlying type.
The to coercion checks that the constraint is satisfied and throws ArgumentOutOfRangeException if not.
Only needed because IsUnmanaged test is performed in the Looker rather than checker. Once the test
is moved, this code can be removed.
Can be removed once the Unmanaged check moves from Looker to Checker.
This is only needed because the Unmanaged test is done in the Looker rather than the checker.
(Once the check moves, this can be removed).
The list of types (just one in C#) that contain abstract or virtual events that are explicity implemented or overridden by this event.
Provides a delegate instance that is added to the event upon initialization.
Bits characterizing this event.
The method to be called in order to add a handler to an event. Corresponds to the add clause of a C# event declaration.
The method that gets called to fire an event. There is no corresponding C# syntax.
The method to be called in order to remove a handler from an event. Corresponds to the remove clause of a C# event declaration.
The delegate type that a handler for this event must have. Corresponds to the type clause of C# event declaration.
True if the methods constituting this event are abstract.
True if that the methods constituting this event are virtual.
The ThrowException can be a type reference (like "NullReferenceException")
or a value that would evaluate to something of an exception type.
(like new NullReferenceException("...") or C.f where the f is a static field
of class C whose type is an exception.
Provides a way to retrieve the parameters and local variables defined in this method given their names.
Contains declarative security information associated with this method.
Returns the local associated with the given field, allocating a new local if necessary.
True if all local variables are to be initialized to default values before executing the method body.
True if this method is a template that conforms to the rules for a CLR generic method.
The parameters this method has to be called with.
Attributes that apply to the return value of this method.
The type of value that this method may return.
Provides the declaring event or property of an accessor.
The instructions constituting the body of this method, in the form of a tree.
The instructions constituting the body of this method, in the form of a linear list of Instruction nodes.
True if this method can in principle be overridden by a method in a derived class.
The (generic) method template from which this method was instantiated. Null if this is not a (generic) method template instance.
The arguments used when this (generic) method template instance was instantiated.
Microsoft.Contracts.FrameGuardGetter implementation for this class.
True if this constructor calls a constructor declared in the same class, as opposed to the base class.
When the source uses the C# compatibility mode, base calls cannot be put after non-null
field initialization, but must be put before the body. But the user can specify where
the base ctor call should be performed by using "base;" as a marker. During parsing
this flag is set so the right code transformations can be performed at code generation.
Provides a value that is assigned to the field upon initialization.
The compile-time value to be substituted for references to this field if it is a literal.
True if the field may not be cached. Used for sharing data between multiple threads.
The type of values that may be stored in the field.
True if all references to the field are replaced with a value that is determined at compile-time.
True if the field may only be assigned to inside the constructor.
The behavior of a field in the Spec# object invariants/ownership/concurrency methodology.
The list of types (just one in C#) that contain abstract or virtual properties that are explicity implemented or overridden by this property.
The method that is called to get the value of this property. Corresponds to the get clause in C#.
The method that is called to set the value of this property. Corresponds to the set clause in C#.
Other methods associated with the property. No equivalent in C#.
True if this property can in principle be overridden by a property in a derived class.
The parameters of this property if it is an indexer.
The type of value that this property holds.
A named container of types and nested namespaces.
The name of the container implicitly qualifies the names of the contained types and namespaces.
The FullName of the namespace in the form of an Identifier rather than in the form of a string.
Provides alternative names for types and nested namespaces. Useful for introducing shorter names or for resolving name clashes.
The names should be added to the scope associated with this namespace.
The list of namespaces that are fully contained inside this namespace.
The Universal Resource Identifier that should be associated with all declarations inside this namespace.
Typically used when the types inside the namespace are serialized as an XML Schema Definition. (XSD)
The list of the namespaces of types that should be imported into the scope associated with this namespace.
A delegate that is called the first time Types is accessed. Provides for incremental construction of the namespace node.
Opaque information passed as a parameter to the delegate in ProvideTypes. Typically used to associate this namespace
instance with a helper object.
The list of types contained inside this namespace. If the value of Types is null and the value of ProvideTypes is not null, the
TypeProvider delegate is called to fill in the value of this property.
A method that fills in the Types property of the given namespace. Must not leave Types null.
The root node of an Abstract Syntax Tree. Typically corresponds to multiple source files compiled to form a single target.
The compilation parameters that are used for this compilation.
The target code object that is produced as a result of this compilation.
A list of all the compilation units (typically source files) that make up this compilation.
A scope for symbols that belong to the compilation as a whole. No C# equivalent. Null if not applicable.
A list of compilations that produce assemblies and modules that are referenced by this compilation and hence need to be
compiled before this Compilation is compiled. This list is not intended to include already compiled framework assemblies
such as system.dll.
The root node of an Abstract Syntax Tree. Corresponds to the starting production of the syntax. Equivalent to C# compilation-unit.
Typically a compilation unit corresponds to a single source file.
An identifier that can be used to retrieve the source text of the compilation unit.
An anonymous (name is Identifier.Empty) namespace holding types and nested namespaces.
The preprocessor symbols that are to treated as defined when compiling this CompilationUnit into the TargetModule.
Pragma warning information.
The compilation of which this unit forms a part.
An object that knows how to produce a particular scope's view of a type.
Return a scope's view of the argument type, where the scope's view is represented
by a type viewer.
[The identity function, except for dialects (e.g. Extensible Sing#) that allow
extensions and differing views of types].
Defined as a static method to allow the type viewer to be null,
meaning an identity-function view.
Return the typeViewer's view of the argument type. Overridden by subclasses
that support non-identity-function type viewers, e.g. Extensible Sing#.