C# Class System.Xml.Xsl.XmlILGenerator

This internal class is the entry point for creating Msil assemblies from QilExpression.
Generate will return an AssemblyBuilder with the following setup: Assembly Name = "MS.Internal.Xml.CompiledQuery" Module Dll Name = "MS.Internal.Xml.CompiledQuery.dll" public class MS.Internal.Xml.CompiledQuery.Test { public static void Execute(XmlQueryRuntime runtime); public static void Root(XmlQueryRuntime runtime); private static ... UserMethod1(XmlQueryRuntime runtime, ...); ... private static ... UserMethodN(XmlQueryRuntime runtime, ...); } XmlILGenerator incorporates a number of different technologies in order to generate efficient code that avoids caching large result sets in memory: 1. Code Iterators - Query results are computed using a set of composable, interlocking iterators that alone perform a simple task, but together execute complex queries. The iterators are actually little blocks of code that are connected to each other using a series of jumps. Because each iterator is not instantiated as a separate object, the number of objects and number of function calls is kept to a minimum during execution. Also, large result sets are often computed incrementally, with each iterator performing one step in a pipeline of sequence items. 2. Analyzers - During code generation, QilToMsil traverses the semantic tree representation of the query (QIL) several times. As visits to each node in the tree start and end, various Analyzers are invoked. These Analyzers incrementally collect and store information that is later used to generate faster and smaller code.
Exibir arquivo Open project: gbarnett/shared-source-cli-2.0

Public Methods

Method Description
Generate ( QilExpression query, AssemblyName asmName ) : XmlCommand

Given the logical query plan (QilExpression) generate a physical query plan (MSIL) that can be executed.

XmlILGenerator ( ) : System

Always output debug information in debug mode.

Private Methods

Method Description
CreateExecuteFunction ( MethodInfo methRoot ) : MethodInfo

Create and generate the "Execute" method, which is the entry point to the query.

CreateFunctionMetadata ( IList funcList ) : void

Create MethodBuilder metadata for the specified QilExpression function. Annotate ndFunc with the MethodBuilder. Also, each QilExpression argument type should be converted to a corresponding Clr type. Each argument QilExpression node should be annotated with the resulting ParameterBuilder.

CreateGlobalValueMetadata ( IList globalList ) : void

Generate metadata for a method that calculates a global value.

CreateHelperFunctions ( ) : void

Create and generate various helper methods, which are called by the generated code.

EvaluateGlobalValues ( IList iterList ) : void

Generate code to force evaluation of some or all global variables and/or parameters.

Method Details

Generate() public method

Given the logical query plan (QilExpression) generate a physical query plan (MSIL) that can be executed.
public Generate ( QilExpression query, AssemblyName asmName ) : XmlCommand
query System.Xml.Xsl.Qil.QilExpression
asmName System.Reflection.AssemblyName
return XmlCommand

XmlILGenerator() public method

Always output debug information in debug mode.
public XmlILGenerator ( ) : System
return System