diff --git a/aspclassiccompiler/AspWebApp/AspWebApp.csproj b/aspclassiccompiler/AspWebApp/AspWebApp.csproj index 75a04fd..8c9e002 100644 --- a/aspclassiccompiler/AspWebApp/AspWebApp.csproj +++ b/aspclassiccompiler/AspWebApp/AspWebApp.csproj @@ -30,7 +30,10 @@ 4 - + + False + ..\asp\bin\Release\Dlrsoft.Asp.dll + diff --git a/aspclassiccompiler/AspWebApp/AspWebApp.csproj.user b/aspclassiccompiler/AspWebApp/AspWebApp.csproj.user index 234112c..4d6e175 100644 --- a/aspclassiccompiler/AspWebApp/AspWebApp.csproj.user +++ b/aspclassiccompiler/AspWebApp/AspWebApp.csproj.user @@ -1,6 +1,6 @@  - ProjectFiles + ShowAllFiles diff --git a/aspclassiccompiler/AspWebApp/bin/AspWebApp.dll b/aspclassiccompiler/AspWebApp/bin/AspWebApp.dll index 5054aa6..af1dff6 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/AspWebApp.dll and b/aspclassiccompiler/AspWebApp/bin/AspWebApp.dll differ diff --git a/aspclassiccompiler/AspWebApp/bin/AspWebApp.pdb b/aspclassiccompiler/AspWebApp/bin/AspWebApp.pdb index c48249c..4a858f5 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/AspWebApp.pdb and b/aspclassiccompiler/AspWebApp/bin/AspWebApp.pdb differ diff --git a/aspclassiccompiler/AspWebApp/bin/Dlrsoft.Asp.dll b/aspclassiccompiler/AspWebApp/bin/Dlrsoft.Asp.dll index c70bc5d..5d75126 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Dlrsoft.Asp.dll and b/aspclassiccompiler/AspWebApp/bin/Dlrsoft.Asp.dll differ diff --git a/aspclassiccompiler/AspWebApp/bin/Dlrsoft.Asp.pdb b/aspclassiccompiler/AspWebApp/bin/Dlrsoft.Asp.pdb index 3544d23..6bfac1a 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Dlrsoft.Asp.pdb and b/aspclassiccompiler/AspWebApp/bin/Dlrsoft.Asp.pdb differ diff --git a/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBParser.dll b/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBParser.dll index 0c44883..f79bcac 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBParser.dll and b/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBParser.dll differ diff --git a/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBScript.dll b/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBScript.dll index cf7ea96..f10ae44 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBScript.dll and b/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBScript.dll differ diff --git a/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBScript.pdb b/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBScript.pdb index 5639157..d2bd1d3 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBScript.pdb and b/aspclassiccompiler/AspWebApp/bin/Dlrsoft.VBScript.pdb differ diff --git a/aspclassiccompiler/AspWebApp/bin/Interop.ASPTypeLibrary.dll b/aspclassiccompiler/AspWebApp/bin/Interop.ASPTypeLibrary.dll index 0cee3e0..6e4d4ea 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Interop.ASPTypeLibrary.dll and b/aspclassiccompiler/AspWebApp/bin/Interop.ASPTypeLibrary.dll differ diff --git a/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.dll b/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.dll index f98fe21..a24f2ed 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.dll and b/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.dll differ diff --git a/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.pdb b/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.pdb index 06c6b03..6971692 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.pdb and b/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.pdb differ diff --git a/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.xml b/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.xml index e758432..3c9c396 100644 --- a/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.xml +++ b/aspclassiccompiler/AspWebApp/bin/Microsoft.Dynamic.xml @@ -4,109 +4,9 @@ Microsoft.Dynamic - + - Provides hashing and equality based upon the value of the object instead of the reference. - - - - - Gets the hash code for the value of the instance. - - A hash code - The type is mutable and cannot be hashed by value - - - - Determines if two values are equal - - The object to compare the current object against. - Returns true if the objects are equal, false if they are not. - - - - Seeks the first character of a specified line in the text stream. - - The reader. - Line number. The current position is assumed to be line #1. - - Returns true if the line is found, false otherwise. - - - - - Reads characters to a string until end position or a terminator is reached. - Doesn't include the terminator into the resulting string. - Returns null, if the reader is at the end position. - - - - - Reads characters until end position or a terminator is reached. - Returns true if the character has been found (the reader is positioned right behind the character), - false otherwise. - - - - - Allows wrapping of proxy types (like COM RCWs) to expose their IEnumerable functionality - which is supported after casting to IEnumerable, even though Reflection will not indicate - IEnumerable as a supported interface - - - - - Represents an ops-extension method which is added as an operator. - - The name must be a well-formed name such as "Add" that matches the CLS - naming conventions for adding overloads associated with op_* methods. - - - - - Event args for when a ScriptScope has had its contents changed. - - - - - Creates a new ModuleChangeEventArgs object with the specified name and type. - - - - - Creates a nwe ModuleChangeEventArgs with the specified name, type, and changed value. - - - - - Gets the name of the symbol that has changed. - - - - - Gets the way in which the symbol has changed: Set or Delete. - - - - - The the symbol has been set provides the new value. - - - - - The MethodBinder will perform normal method binding. - - - - - The MethodBinder will return the languages definition of NotImplemented if the arguments are - incompatible with the signature. - - - - - The MethodBinder will set properties/fields for unused keyword arguments on the instance - that gets returned from the method. + Represents extension method. @@ -204,563 +104,199 @@ extension type when ensuring that we only have 1 MemberTracker ever created. - + - Provides a list of all the members of an instance. + The declaring type of the extension (the type this extension method extends) - + - Enables implicit Type to TypeTracker conversions accross dynamic languages. + The declaring type of the extension method. Since this is an extension method, + the declaring type is in fact the type this extension method extends, + not Method.DeclaringType - + - A helper routine to check if a type can be treated as sealed - i.e. there - can never be a subtype of this given type. This corresponds to a type - that is either declared "Sealed" or is a ValueType and thus unable to be - extended. + Convention for an individual argument at a callsite. - TODO: this should not be needed. Type.IsSealed does the right thing. + Multiple different callsites can match against a single declaration. + Some argument kinds can be "unrolled" into multiple arguments, such as list and dictionary. - + - Returns true if the specified parameter is mandatory, i.e. is not optional and doesn't have a default value. + Simple unnamed positional argument. + In Python: foo(1,2,3) are all simple arguments. - + - Provides binding semantics for a language. This include conversions as well as support - for producing rules for actions. These optimized rules are used for calling methods, - performing operators, and getting members using the ActionBinder's conversion semantics. + Argument with associated name at the callsite + In Python: foo(a=1) - + - Provides binding semantics for a language. This include conversions as well as support - for producing rules for actions. These optimized rules are used for calling methods, - performing operators, and getting members using the ActionBinder's conversion semantics. + Argument containing a list of arguments. + In Python: foo(*(1,2*2,3)) would match 'def foo(a,b,c)' with 3 declared arguments such that (a,b,c)=(1,4,3). + it could also match 'def foo(*l)' with 1 declared argument such that l=(1,4,3) - + - Converts an object at runtime into the specified type. + Argument containing a dictionary of named arguments. + In Python: foo(**{'a':1, 'b':2}) - + - Determines if a conversion exists from fromType to toType at the specified narrowing level. - toNotNullable is true if the target variable doesn't allow null values. + TODO: Alternatively, it should be sufficient to remember indices for this, list, dict and block. - + - Provides ordering for two parameter types if there is no conversion between the two parameter types. + Sets the value at the given index for a tuple of the given size. This set supports + walking through nested tuples to get the correct final index. - + - Converts the provided expression to the given type. The expression is safe to evaluate multiple times. + Gets the value at the given index for a tuple of the given size. This get + supports walking through nested tuples to get the correct final index. - + - Gets the members that are visible from the provided type of the specified name. + Gets the unbound generic Tuple type which has at lease size slots or null if a large enough tuple is not available. + + + + + Creates a generic tuple with the specified types. - The default implemetnation first searches the type, then the flattened heirachy of the type, and then - registered extension methods. + If the number of slots fits within the maximum tuple size then we simply + create a single tuple. If it's greater then we create nested tuples + (e.g. a Tuple`2 which contains a Tuple`128 and a Tuple`8 if we had a size of 136). - + - Called when a set is attempting to assign to a field or property from a derived class through the base class. + Gets the number of usable slots in the provided Tuple type including slots available in nested tuples. + + + + + Creates a new instance of tupleType with the specified args. If the tuple is a nested + tuple the values are added in their nested forms. + + + + + Gets the values from a tuple including unpacking nested values. + + + + + Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. + + + + + Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. + + + + + Provides an expression for creating a tuple with the specified values. + + + + + A useful interface for taking slices of numeric arrays, inspired by Python's Slice objects. + + + + + The starting index of the slice or null if no first index defined + + + + + The ending index of the slice or null if no ending index defined + + + + + The length of step to take + + + + + ScriptCode is an instance of compiled code that is bound to a specific LanguageContext + but not a specific ScriptScope. The code can be re-executed multiple times in different + scopes. Hosting API counterpart for this class is CompiledCode. + + + + + This takes an assembly name including extension and saves the provided ScriptCode objects into the assembly. - The default behavior is to allow the assignment. - - - - - Creates an ErrorInfo object when a static property is accessed from an instance member. The default behavior is throw - an exception indicating that static members properties be accessed via an instance. Languages can override this to - customize the exception, message, or to produce an ErrorInfo object which reads or writes to the property being accessed. - - The static property being accessed through an instance - True if the user is assigning to the property, false if the user is reading from the property - The parameters being used to access the property. This includes the instance as the first entry, any index parameters, and the - value being assigned as the last entry if isAssignment is true. - - - - - Provides a way for the binder to provide a custom error message when lookup fails. Just - doing this for the time being until we get a more robust error return mechanism. + The provided script codes can constitute code from multiple languages. The assemblyName can be either a fully qualified + or a relative path. The DLR will simply save the assembly to the desired location. The assembly is created by the DLR and + if a file already exists than an exception is raised. - Deprecated, use the non-generic version instead + The DLR determines the internal format of the ScriptCode and the DLR can feel free to rev this as appropriate. - + - Gets the extension members of the given name from the provided type. Base classes are also - searched for their extension members. Once any of the types in the inheritance hierarchy - provide an extension member the search is stopped. - - - - - Gets the extension members of the given name from the provided type. Subclasses of the - type and their extension members are not searched. - - - - - Provides an opportunity for languages to replace all MemberInfo's with their own type. + This will take an assembly object which the user has loaded and return a new set of ScriptCode�s which have + been loaded into the provided ScriptDomainManager. - Alternatlely a language can expose MemberInfo's directly. - - The member which is being returned to the user. - Tthe type which the memberTrack was accessed from - - - - - Performs binding against a set of overloaded methods using the specified arguments. The arguments are - consumed as specified by the CallSignature object. - - Overload resolver. - The methods to be called - A meta object which results from the call. - - - - Performs binding against a set of overloaded methods using the specified arguments. The arguments are - consumed as specified by the CallSignature object. - - Overload resolver. - The methods to be called - The name of the method or null to use the name from targets. - A meta object which results from the call. - - - - Performs binding against a set of overloaded methods using the specified arguments. The arguments are - consumed as specified by the CallSignature object. - - Overload resolver. - The methods to be called - Additional restrictions which should be applied to the resulting MetaObject. - A meta object which results from the call. - - - - Performs binding against a set of overloaded methods using the specified arguments. The arguments are - consumed as specified by the CallSignature object. - - Overload resolver. - The methods to be called - Additional restrictions which should be applied to the resulting MetaObject. - The name of the method or null to use the name from targets. - A meta object which results from the call. - - - - Performs binding against a set of overloaded methods using the specified arguments. The arguments are - consumed as specified by the CallSignature object. - - TODO. - TODO. - Overload resolver. - The methods to be called - Additional restrictions which should be applied to the resulting MetaObject. - The resulting binding target which can be used for producing error information. - The name of the method or null to use the name from targets. - A meta object which results from the call. - - - - Makes test for param arrays and param dictionary parameters. - - - - - Pulls out the right argument to build the splat test. MakeParamsTest makes the actual test. - - - - - Builds the restrictions for calling with a splatted argument array. Ensures that the - argument is still an ICollection of object and that it has the same number of arguments. - - - - - Builds the restrictions for calling with keyword arguments. The restrictions include - tests on the individual keys of the dictionary to ensure they have the same names. - - - - if a member-injector is defined-on or registered-for this type call it - - - - Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod - GetBoundMember, and StrongBox instances. - - - The name of the member to retrieve. This name is not processed by the DefaultBinder and - is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... - - - The MetaObject from which the member is retrieved. - - - Provides overload resolution and method binding for any calls which need to be performed for the GetMember. - - - - - Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod - GetBoundMember, and StrongBox instances. - - - The name of the member to retrieve. This name is not processed by the DefaultBinder and - is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... - - - The MetaObject from which the member is retrieved. - - - An OverloadResolverFactory which can be used for performing overload resolution and method binding. - - - True if the operation should return Operation.Failed on failure, false if it - should return the exception produced by MakeMissingMemberError. - - - The meta object to be used if the get results in an error. - - - - if a member-injector is defined-on or registered-for this type call it - - - - Creates the MetaObject for indexing directly into arrays or indexing into objects which have - default members. Returns null if we're not an indexing operation. - - - - - Creates the MetaObject for indexing directly into arrays or indexing into objects which have - default members. Returns null if we're not an indexing operation. - - - - - Creates the meta object for the rest of the operations: comparisons and all other - ExpressionType. If the operation cannot be completed a MetaObject which indicates an - error will be returned. - - - - - Produces a rule for comparing a value to null - supports comparing object references and nullable types. - - - - - Provides a way for the binder to provide a custom error message when lookup fails. Just - doing this for the time being until we get a more robust error return mechanism. - - - - - Called when the user is accessing a protected or private member on a get. + If the language associated with the ScriptCode�s has not already been loaded the DLR will load the + LanguageContext into the ScriptDomainManager based upon the saved LanguageContext type. - The default implementation allows access to the fields or properties using reflection. + If the LanguageContext or the version of the DLR the language was compiled against is unavailable a + TypeLoadException will be raised unless policy has been applied by the administrator to redirect bindings. - + - Provides a way for the binder to provide a custom error message when lookup fails. Just - doing this for the time being until we get a more robust error return mechanism. + Indicates that a MetaObject is already representing a restricted type. Useful + when we're already restricted to a known type but this isn't captured in + the type info (e.g. the type is not sealed). - + - Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod - GetBoundMember, and StrongBox instances. - - - The name of the member to retrieve. This name is not processed by the DefaultBinder and - is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... - - - The MetaObject from which the member is retrieved. - - - The value being assigned to the target member. - - - Provides overload resolution and method binding for any calls which need to be performed for the SetMember. - - - - - Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod - GetBoundMember, and StrongBox instances. - - - The name of the member to retrieve. This name is not processed by the DefaultBinder and - is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... - - - The MetaObject from which the member is retrieved. - - - The value being assigned to the target member. - - - Provides overload resolution and method binding for any calls which need to be performed for the SetMember. - - - Provides a DynamicMetaObject that is to be used as the result if the member cannot be set. If null then then a language - specific error code is provided by ActionBinder.MakeMissingMemberErrorForAssign which can be overridden by the language. - - - - if a member-injector is defined-on or registered-for this type call it - - - - Checks if the conversion is to object and produces a target if it is. + Represents the context that is flowed for doing Compiler. Languages can derive + from this class to provide additional contextual information. - + - Checks if any conversions are available and if so builds the target for that conversion. + Source unit currently being compiled in the CompilerContext - + - Checks if the conversion can be handled by a simple cast. + Current error sink. - + - Checks if the conversion can be handled by calling a user-defined conversion method. + Sink for parser callbacks (e.g. brace matching, etc.). - + - Helper that checkes both types to see if either one defines the specified conversion - method. + Compiler specific options. - + - Checks if any of the members of the MemberGroup provide the applicable conversion and - if so uses it to build a conversion rule. - - - - - Checks if the conversion is to applicable by extracting the value from Extensible of T. - - - - - Checks if there's an implicit numeric conversion for primitive data types. - - - - - Checks if there's a conversion to/from Nullable of T. - - - - - Checks to see if there's a conversion of null to a reference type - - - - - Helper to produce an error when a conversion cannot occur - - - - - Helper to produce a rule which just boxes a value type - - - - - Helper to produce a conversion rule by calling the helper method to do the convert - - - - - Helper to produce a conversion rule by calling the helper method to do the convert - - - - - Helper to produce a conversion rule by calling the method to do the convert. This version takes the parameter - to be passed to the conversion function and we call it w/ our own value or w/ our Extensible.Value. - - - - - Helper to wrap explicit conversion call into try/catch incase it throws an exception. If - it throws the default value is returned. - - - - - Helper to produce a rule when no conversion is required (the strong type of the expression - input matches the type we're converting to or has an implicit conversion at the IL level) - - - - - Helper to produce a rule when no conversion is required from an extensible type's - underlying storage to the type we're converting to. The type of extensible type - matches the type we're converting to or has an implicit conversion at the IL level. - - - - - Helper to extract the value from an Extensible of T - - - - - Helper to convert a null value to nullable of T - - - - - Helper to produce the rule for converting T to Nullable of T - - - - - Helper to produce the rule for converting T to Nullable of T - - - - - Returns a value which indicates failure when a OldConvertToAction of ImplicitTry or - ExplicitTry. - - - - - Helper to extract the Value of an Extensible of T from the - expression being converted. - - - - - Helper that checks if fromType is an Extensible of T or a subtype of - Extensible of T and if so returns the T. Otherwise it returns fromType. - - This is used to treat extensible types the same as their underlying types. - - - - - Creates a target which returns null for a reference type. - - - - - Provides default binding for performing a call on the specified meta objects. - - The signature describing the call - The meta object to be called. - - Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. - - Overload resolver factory. - A MetaObject representing the call or the error. - - - - Gets a TargetInfo object for performing a call on this object. - - If this object is a delegate we bind to the Invoke method. - If this object is a MemberGroup or MethodGroup we bind to the methods in the member group. - If this object is a BoundMemberTracker we bind to the methods with the bound instance. - If the underlying type has defined an operator Call method we'll bind to that method. - - - - - Binds to the methods in a method group. - - - - - Binds to the methods in a member group. - - TODO: We should really only have either MemberGroup or MethodGroup, not both. - - - - - Binds to the BoundMemberTracker and uses the instance in the tracker and restricts - based upon the object instance type. - - - - - Binds to the Invoke method on a delegate if this is a delegate type. - - - - - Attempts to bind to an operator Call method. - - - - - Helper class for flowing information about the GetMember request. - - - - - Helper class for flowing information about the GetMember request. - - - - - Encapsulates information about the target of the call. This includes an implicit instance for the call, - the methods that we'll be calling as well as any restrictions required to perform the call. - - - - - Literal script command given using -c option - - - - - Filename to execute passed on the command line options. - - - - - Only print the version of the script interpreter and exit - - - - - - - - name == null means that the argument doesn't specify an option; the value contains the entire argument - name == "" means that the option name is empty (argument separator); the value is null then + Customize the CommandLine for remote scenarios @@ -854,468 +390,198 @@ the command is executed on, how long the command is allowed to execute, etc - + - This instruction implements a goto expression that can jump out of any expression. - It pops values (arguments) from the evaluation stack that the expression tree nodes in between - the goto expression and the target label node pushed and not consumed yet. - A goto expression can jump into a node that evaluates arguments only if it carries - a value and jumps right after the first argument (the carried value will be used as the first argument). - Goto can jump into an arbitrary child of a BlockExpression since the block doesn�t accumulate values - on evaluation stack as its child expressions are being evaluated. + CommandDispatcher to ensure synchronize output from the remote runtime + + + + + Supports detecting the remote runtime being killed, and starting up a new one. + + Threading model: + + ConsoleRestartManager creates a separate thread on which to create and execute the consoles. + There are usually atleast three threads involved: + + 1. Main app thread: Instantiates ConsoleRestartManager and accesses its APIs. This thread has to stay + responsive to user input and so the ConsoleRestartManager APIs cannot be long-running or blocking. + Since the remote runtime process can terminate asynchronously, the current RemoteConsoleHost can + change at any time (if auto-restart is enabled). The app should typically not care which instance of + RemoteConsoleHost is currently being used. The flowchart of this thread is: + Create ConsoleRestartManager + ConsoleRestartManager.Start + Loop: + Respond to user input | Send user input to console for execution | BreakExecution | RestartConsole | GetMemberNames + ConsoleRestartManager.Terminate + TODO: Currently, BreakExecution and GetMemberNames are called by the main thread synchronously. + Since they execute code in the remote runtime, they could take arbitrarily long. We should change + this so that the main app thread can never be blocked indefinitely. - Goto needs to execute any finally blocks on the way to the target label. - - { - f(1, 2, try { g(3, 4, try { goto L } finally { ... }, 6) } finally { ... }, 7, 8) - L: ... - } - - The goto expression here jumps to label L while having 4 items on evaluation stack (1, 2, 3 and 4). - The jump needs to execute both finally blocks, the first one on stack level 4 the - second one on stack level 2. So, it needs to jump the first finally block, pop 2 items from the stack, - run second finally block and pop another 2 items from the stack and set instruction pointer to label L. + 2. Console thread: Dedicated thread for creating RemoteConsoleHosts and executing code (which could + take a long time or block indefinitely). + Wait for ConsoleRestartManager.Start to be called + Loop: + Create RemoteConsoleHost + Wait for signal for: + Execute code | RestartConsole | Process.Exited - Goto also needs to rethrow ThreadAbortException iff it jumps out of a catch handler and - the current thread is in "abort requested" state. + 3. CompletionPort async callbacks: + Process.Exited | Process.OutputDataReceived | Process.ErrorDataReceived + + 4. Finalizer thred + Some objects may have a Finalize method (which possibly calls Dispose). Not many (if any) types + should have a Finalize method. + + + + + + Accessing _remoteConsoleHost from a thread other than console thread can result in race. + If _remoteConsoleHost is accessed while holding _accessLock, it is guaranteed to be + null or non-disposed. - + - ArgBuilder which always produces null. + This is created on the "creating thread", and goes on standby. Start needs to be called for activation. + + A host might want one of two behaviors: + 1. Keep the REPL loop alive indefinitely, even when a specific instance of the RemoteConsoleHost terminates normally + 2. Close the REPL loop when an instance of the RemoteConsoleHost terminates normally, and restart the loop + only if the instance terminates abnormally. + + + + Needs to be called for activation. - + - ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each - physical parameter defined on a method. + Request (from another thread) the console REPL loop to terminate + + + + + Encapsulates the result of an attempt to bind to one or methods using the OverloadResolver. - Contrast this with ParameterWrapper which represents the logical argument passed to the method. + Users should first check the Result property to see if the binding was successful or + to determine the specific type of failure that occured. If the binding was successful + MakeExpression can then be called to create an expression which calls the method. + If the binding was a failure callers can then create a custom error message based upon + the reason the call failed. - + - Provides the Expression which provides the value to be passed to the argument. + Creates a new BindingTarget when the method binding has succeeded. - + - Provides the Expression which provides the value to be passed to the argument. - This method is called when result is intended to be used ByRef. + Creates a new BindingTarget when the method binding has failed due to an incorrect argument count - + - Provides an Expression which will update the provided value after a call to the method. - May return null if no update is required. + Creates a new BindingTarget when the method binding has failued due to + one or more parameters which could not be converted. - + - SimpleArgBuilder produces the value produced by the user as the argument value. It - also tracks information about the original parameter and is used to create extended - methods for params arrays and param dictionary functions. + Creates a new BindingTarget when the match was ambiguous - + - Stores information needed to emit debugging symbol information for a - source file, in particular the file name and unique language identifier + Other failure. - + - The source file name - - - - - Returns the language's unique identifier, if any - - - - - Returns the language vendor's unique identifier, if any - - - - - The purpose of this rewriter is simple: ETs do not allow jumps (break, continue, return, goto) - that would go through a finally/fault. So we replace them with code that instead stores a flag, - and then jumps to the end of the finally/fault. At the end of the try-finally, we emit a switch - that then jumps to the correct label. + Gets an Expression which calls the binding target if the method binding succeeded. - A few things that make this more complicated: + Throws InvalidOperationException if the binding failed. + + + + + Gets the result of the attempt to bind. + + + + + Returns the method if the binding succeeded, or null if no method was applicable. + + + + + Gets the name of the method as supplied to the OverloadResolver. + + + + + Returns the MethodTarget if the binding succeeded, or null if no method was applicable. + + + + + Returns the methods which don't have any matches or null if Result == BindingResult.AmbiguousMatch + + + + + Returns the methods and their associated conversion failures if Result == BindingResult.CallFailure. + + + + + Returns the acceptable number of arguments which can be passed to the method if Result == BindingResult.IncorrectArgumentCount. + + + + + Returns the total number of arguments provided to the call. 0 if the call succeeded or failed for a reason other + than argument count mismatch. + + + + + Gets the MetaObjects which we originally did binding against in their restricted form. - 1. If a finally contains a jump out, then jumps in the try/catch need to be replaced as well. - It's to support cases like this: - # returns 234 - def foo(): - try: return 123 - finally: return 234 - - We need to replace the "return 123" because after it jumps, we'll go to the finally, which - might decide to jump again, but once the IL finally exits, it ignores the finally jump and - keeps going with the original jump. The moral of the story is: if any jumps in finally are - rewritten, try/catch jumps must be also. - - 2. To generate better code, we only have one state variable, so if we have to jump out of - multiple finallys we just keep jumping. It looks sort of like this: - foo: - try { ... } finally { - try { ... } finally { - ... - if (...) { - // was: goto foo; - $flow = 1; goto endInnerFinally; - } - ... - endInnerFinally: - } - switch ($flow) { - case 1: goto endOuterFinally; - } - ... - endOuterFinally: - } - switch ($flow) { - case 1: $flow = 0; goto foo; - } - ... + The members of the array correspond to each of the arguments. All members of the array + have a value. + + + + + Returns the return type of the binding, or null if no method was applicable. + + + + + Returns the NarrowingLevel of the method if the call succeeded. If the call + failed returns NarrowingLevel.None. + + + + + Returns true if the binding was succesful, false if it failed. + This is an alias for BindingTarget.Result == BindingResult.Success. - + - SimpleArgBuilder produces the value produced by the user as the argument value. It - also tracks information about the original parameter and is used to create extended - methods for params arrays and param dictionary functions. + Splits text and optionally indents first lines - breaks along words, not characters. - + - ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each - physical parameter defined on a method. - - Contrast this with ParameterWrapper which represents the logical argument passed to the method. - - - - - Provides the Expression which provides the value to be passed to the argument. - If null is returned the argument is skipped (not passed to the callee). - - - - - Function for accessing an argument from a given index. When returned from - ToDelegate closed over the value will enable delegate invocations for argument - gets to be optimized away. - - This function is referenced via reflection and if renamed needs CALLERS UPDATED. - - - - - Provides an Expression which will update the provided value after a call to the method. May - return null if no update is required. - - - - - If the argument produces a return value (e.g. a ref or out value) this provides - the additional value to be returned. - - - - - The number of actual arguments consumed by this builder. - - - - - Returns the type required for the argument or null if the ArgBuilder - does not consume a type. - - - - - An assignable value that is passed to a byref parameter - After the call it will contain the updated value - - - - - Parameter info is not available for this argument. - - - - - Type and whether the parameter is a params-array or params-dictionary is derived from info. - - - - - An argument that the user wants to explicitly pass by-reference (with copy-in copy-out semantics). - The user passes a StrongBox[T] object whose value will get updated when the call returns. - - - - - Helper for storing information about stack frames. - - - - - Provides a mechanism for providing documentation stored in an assembly as metadata. - - Applying this attribute will enable documentation to be provided to the user at run-time - even if XML Docuementation files are unavailable. - - - - - An attribute that is applied to saved ScriptCode's to be used to re-create the ScriptCode - from disk. - - - - - Gets names stored in optimized scope. - - - - - This class holds onto internal debugging options used in this assembly. - These options can be set via environment variables DLR_{option-name}. - Boolean options map "true" to true and other values to false. - - These options are for internal debugging only, and should not be - exposed through any public APIs. - - - - - Similar to Dictionary[TKey,TValue], but it also ensures that the keys will not be kept alive - if the only reference is from this collection. The value will be kept alive as long as the key - is alive. - - This currently has a limitation that the caller is responsible for ensuring that an object used as - a key is not also used as a value in *any* instance of a WeakHash. Otherwise, it will result in the - object being kept alive forever. This effectively means that the owner of the WeakHash should be the - only one who has access to the object used as a value. - - Currently, there is also no guarantee of how long the values will be kept alive even after the keys - get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection - by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). - - - - - Check if any of the keys have gotten collected - - Currently, there is also no guarantee of how long the values will be kept alive even after the keys - get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection - by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). - - - - - Used as the key for the LanguageContext.GetDelegate method caching system - - - - - Represents the context that is flowed for doing Compiler. Languages can derive - from this class to provide additional contextual information. - - - - - Source unit currently being compiled in the CompilerContext - - - - - Current error sink. - - - - - Sink for parser callbacks (e.g. brace matching, etc.). - - - - - Compiler specific options. - - - - - Wrapping a tree in this node enables jumps from finally blocks - It does this by generating control-flow logic in the tree - - Reducing this node requires a full tree walk of its body - (but not nested lambdas) - - WARNING: this node cannot contain jumps across blocks, because it - assumes any unknown jumps are jumps to an outer scope. - - - - - Factory methods. - - - - - Creates a generator with type IEnumerable{T}, where T is the label.Type - - - - - - - - Wraps the given value in a WeakReference and returns a tree that will retrieve - the value from the WeakReference. - - - - - Converts an expression to a void type. - - An to convert to void. - An that has the property equal to and the and property set to void. - - - - Creates new instance of the LambdaBuilder with the specified name and return type. - - Return type of the lambda being built. - Name for the lambda being built. - new LambdaBuilder instance - - - - Null coalescing expression - {result} ::= ((tmp = {_left}) == null) ? {right} : tmp - '??' operator in C#. - - - - - True coalescing expression. - {result} ::= IsTrue(tmp = {left}) ? {right} : tmp - Generalized AND semantics. - - - - - False coalescing expression. - {result} ::= IsTrue(tmp = {left}) ? tmp : {right} - Generalized OR semantics. - - - - - True coalescing expression. - {result} ::= IsTrue(tmp = {left}) ? {right} : tmp - Generalized AND semantics. - - - - - False coalescing expression. - {result} ::= IsTrue(tmp = {left}) ? tmp : {right} - Generalized OR semantics. - - - - - The helper to create the AST method call node. Will add conversions (Utils.Convert) - to parameters and instance if necessary. - - - - - The helper to create the AST method call node. Will add conversions (Utils.Convert) - to parameters and instance if necessary. - - - - - The complex call helper to create the AST method call node. - Will add conversions (Expression.Convert()), deals with default parameter values and params arrays. - - - - - The number of actual arguments consumed by this builder. - - - - - Represents information about a failure to convert an argument from one - type to another. - - - - - Value of the argument or null if it is not available. - - - - - Argument actual type or its limit type if the value not known. - DynamicNull if the argument value is null. - - - - - Represents the reason why a call to a specific method could not be performed by the OverloadResolver. - - The reason for the failure is specified by the CallFailureReason property. Once this property - has been consulted the other properties can be consulted for more detailed information regarding - the failure. - - If reason is ConversionFailure the ConversionResults property will be non-null. - If reason is UnassignableKeyword the KeywordArguments property will be non-null and include - the keywords which could not be assigned. - If reason is DuplicateKeyword the KeywordArguments property will be non-null and include - the keywords which were duplicated (either by the keywords themselves or by positional - arguments). - - MethodTarget is always set and indicates the method which failed to bind. - - - - - Gets the MethodTarget which the call failed for. - - - - - Gets the reason for the call failure which determines the other - properties of the CallFailure which should be consulted. - - - - - Gets a list of ConversionResult's for each parameter indicating - whether the conversion was successful or failed and the types - being converted. - - - - - Gets the list of keyword arguments that were either dupliated or - unassignable. - - - - - Exposes a IDictionary<SymbolId, object> as a IDictionary<object, object< + Allows wrapping of proxy types (like COM RCWs) to expose their IEnumerable functionality + which is supported after casting to IEnumerable, even though Reflection will not indicate + IEnumerable as a supported interface @@ -1324,153 +590,108 @@ can be used to throw exceptions from enumerators implemented in IronPython. - + - Represents the top reflected package which contains extra information such as - all the assemblies loaded and the built-in modules. + DLR requires any Hosting API provider to implement this class and provide its instance upon Runtime initialization. + DLR calls on it to perform basic host/system dependent operations. - + - NamespaceTracker represent a CLS namespace. + Abstracts system operations that are used by DLR and could potentially be platform specific. - + - Loads all the types from all assemblies that contribute to the current namespace (but not child namespaces) + Enables an object to be serializable to an Expression tree. The expression tree can then + be emitted into an assembly enabling the de-serialization of the object. - + - Populates the tree with nodes for each part of the namespace - - - Full namespace name. It can be null (for top-level types) - - - - - As a fallback, so if the type does exist in any assembly. This would happen if a new type was added - that was not in the hardcoded list of types. - This code is not accurate because: - 1. We dont deal with generic types (TypeCollision). - 2. Previous calls to GetCustomMemberNames (eg. "from foo import *" in Python) would not have included this type. - 3. This does not deal with new namespaces added to the assembly + Provides a list of all the members of an instance. - + - This stores all the public non-nested type names in a single namespace and from a single assembly. - This allows inspection of the namespace without eagerly loading all the types. Eagerly loading - types slows down startup, increases working set, and is semantically incorrect as it can trigger - TypeLoadExceptions sooner than required. + Enables implicit Type to TypeTracker conversions accross dynamic languages. - + - returns the package associated with the specified namespace and - updates the associated module to mark the package as imported. - - - - - Ensures that the assembly is loaded - - - true if the assembly was loaded for the first time. - false if the assembly had already been loaded before - - - - When an (interop) assembly is loaded, we scan it to discover the GUIDs of COM interfaces so that we can - associate the type definition with COM objects with that GUID. - Since scanning all loaded assemblies can be expensive, in the future, we might consider a more explicit - user binder to trigger scanning of COM types. - - - - - MethodGroup's represent a unique collection of method's. Typically this - unique set is all the methods which are overloaded by the same name including - methods with different arity. These methods represent a single logically - overloaded element of a .NET type. + A TypeCollision is used when we have a collision between + two types with the same name. Currently this is only possible w/ generic + methods that should logically have arity as a portion of their name. For eg: + System.EventHandler and System.EventHandler[T] + System.Nullable and System.Nullable[T] + System.IComparable and System.IComparable[T] - The base DLR binders will produce MethodGroup's when provided with a MemberGroup - which contains only methods. The MethodGroup's will be unique instances per - each unique group of methods. + The TypeCollision provides an indexer but also is a real type. When used + as a real type it is the non-generic form of the type. + + The indexer allows the user to disambiguate between the generic and + non-generic versions. Therefore users must always provide additional + information to get the generic version. - + + The merged list so far. Could be null + The new type(s) to add to the merged list + The merged list. Could be a TypeTracker or TypeGroup + + + Gets the arity of generic parameters + + - Returns a BuiltinFunction bound to the provided type arguments. Returns null if the binding - cannot be performed. + This will throw an exception if all the colliding types are generic - + - Represents extension method. + This returns the DeclaringType of all the types in the TypeGroup - + - The declaring type of the extension (the type this extension method extends) + This returns the base name of the TypeGroup (the name shared by all types minus arity) - + - The declaring type of the extension method. Since this is an extension method, - the declaring type is in fact the type this extension method extends, - not Method.DeclaringType + This will return the result only for the non-generic type if one exists, and will throw + an exception if all types in the TypeGroup are generic - + - Core functionality to implement an interactive console. This should be derived for concrete implementations + This will return the result only for the non-generic type if one exists, and will throw + an exception if all types in the TypeGroup are generic - + - Request (from another thread) the console REPL loop to terminate - - The caller can specify the exitCode corresponding to the event triggering - the termination. This will be returned from CommandLine.Run - - - - To be called from entry point. + Represents an array that has value equality. - + - Console Host entry-point .exe name. + Handles input and output for the console. It is comparable to System.IO.TextReader, + System.IO.TextWriter, System.Console, etc - + - OperatorInfo provides a mapping from DLR ExpressionType to their associated .NET methods. - - - - - Given an operator returns the OperatorInfo associated with the operator or null - - - - - The operator the OperatorInfo provides info for. - - - - - The primary method name associated with the method. This method name is - usally in the form of op_Operator (e.g. op_Addition). - - - - - The secondary method name associated with the method. This method name is - usually a standard .NET method name with pascal casing (e.g. Add). + Read a single line of interactive input, or a block of multi-line statements. + + An event-driven GUI console can implement this method by creating a thread that + blocks and waits for an event indicating that input is available + The indentation level to be used for the current suite of a compound statement. + The console can ignore this argument if it does not want to support auto-indentation + null if the input stream has been closed. A string with a command to execute otherwise. + It can be a multi-line string which should be processed as block of statements + @@ -1717,48 +938,1690 @@ YieldReturn expressions - + - Variant is the basic COM type for late-binding. It can contain any other COM data type. - This type definition precisely matches the unmanaged data layout so that the struct can be passed - to and from COM calls. + Factory methods. - + - Primitive types are the basic COM types. It includes valuetypes like ints, but also reference types - like BStrs. It does not include composite types like arrays and user-defined COM types (IUnknown/IDispatch). + Creates a generator with type IEnumerable{T}, where T is the label.Type - - - Get the managed object representing the Variant. - - - - - - Release any unmanaged memory associated with the Variant - - - - - - MethodCandidate represents the different possible ways of calling a method or a set of method overloads. - A single method can result in multiple MethodCandidates. Some reasons include: - - Every optional parameter or parameter with a default value will result in a candidate - - The presence of ref and out parameters will add a candidate for languages which want to return the updated values as return values. - - ArgumentKind.List and ArgumentKind.Dictionary can result in a new candidate per invocation since the list might be different every time. + - Each MethodCandidate represents the parameter type for the candidate using ParameterWrapper. + + + + Creates new instance of the LambdaBuilder with the specified name and return type. + + Return type of the lambda being built. + Name for the lambda being built. + new LambdaBuilder instance + + + + Null coalescing expression + {result} ::= ((tmp = {_left}) == null) ? {right} : tmp + '??' operator in C#. + + + + + True coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? {right} : tmp + Generalized AND semantics. + + + + + False coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? tmp : {right} + Generalized OR semantics. + + + + + True coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? {right} : tmp + Generalized AND semantics. + + + + + False coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? tmp : {right} + Generalized OR semantics. + + + + + Converts an expression to a void type. + + An to convert to void. + An that has the property equal to and the and property set to void. + + + + The helper to create the AST method call node. Will add conversions (Utils.Convert) + to parameters and instance if necessary. + + + + + The helper to create the AST method call node. Will add conversions (Utils.Convert) + to parameters and instance if necessary. + + + + + The complex call helper to create the AST method call node. + Will add conversions (Expression.Convert()), deals with default parameter values and params arrays. + + + + + Wraps the given value in a WeakReference and returns a tree that will retrieve + the value from the WeakReference. + + + + + These are some generally useful helper methods. Currently the only methods are those to + cached boxed representations of commonly used primitive types so that they can be shared. + This is useful to most dynamic languages that use object as a universal type. + + The methods in RuntimeHelepers are caleld by the generated code. From here the methods may + dispatch to other parts of the runtime to get bulk of the work done, but the entry points + should be here. + + + + + Used by prologue code that is injected in lambdas to ensure that delegate signature matches what + lambda body expects. Such code typically unwraps subset of the params array manually, + but then passes the rest in bulk if lambda body also expects params array. + + This calls ArrayUtils.ShiftLeft, but performs additional checks that + ArrayUtils.ShiftLeft assumes. + + + + + A singleton boxed boolean true. + + + + + A singleton boxed boolean false. - + - Builds a new MethodCandidate which takes count arguments and the provided list of keyword arguments. + Gets a singleton boxed value for the given integer if possible, otherwise boxes the integer. + + The value to box. + The boxed value. + + + + Helper method to create an instance. Work around for Silverlight where Activator.CreateInstance + is SecuritySafeCritical. - The basic idea here is to figure out which parameters map to params or a dictionary params and - fill in those spots w/ extra ParameterWrapper's. + TODO: Why can't we just emit the right thing for default(T)? + It's always null for reference types and it's well defined for value types + + + + + EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR + This method is to get to the property without using Reflection + + + + + + + This allows the RemoteConsoleHost to abort a long-running operation. The RemoteConsoleHost itself + does not know which ThreadPool thread might be processing the remote call, and so it needs + cooperation from the remote runtime server. + + + + + Since OnOutputDataReceived is sent async, it can arrive late. The remote console + cannot know if all output from the current command has been received. So + RemoteCommandDispatcher writes out a marker to indicate the end of the output + + + + + Aborts the current active call to Execute by doing Thread.Abort + + true if a Thread.Abort was actually called. false if there is no active call to Execute + + + + SimpleArgBuilder produces the value produced by the user as the argument value. It + also tracks information about the original parameter and is used to create extended + methods for params arrays and param dictionary functions. + + + + + ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each + physical parameter defined on a method. + + Contrast this with ParameterWrapper which represents the logical argument passed to the method. + + + + + Provides the Expression which provides the value to be passed to the argument. + + + + + Provides the Expression which provides the value to be passed to the argument. + This method is called when result is intended to be used ByRef. + + + + + Provides an Expression which will update the provided value after a call to the method. + May return null if no update is required. + + + + + Exposes a IDictionary<SymbolId, object> as a IDictionary<object, object< + + + + + Marks a class in the assembly as being an extension type for another type. + + + + + Marks a type in the assembly as being an extension type for another type. + + The type which is being extended + The type which provides the extension members. + + + + The type which contains extension members which are added to the type being extended. + + + + + The type which is being extended by the extension type. + + + + + Represents the top reflected package which contains extra information such as + all the assemblies loaded and the built-in modules. + + + + + NamespaceTracker represent a CLS namespace. + + + + + Loads all the types from all assemblies that contribute to the current namespace (but not child namespaces) + + + + + Populates the tree with nodes for each part of the namespace + + + Full namespace name. It can be null (for top-level types) + + + + + As a fallback, so if the type does exist in any assembly. This would happen if a new type was added + that was not in the hardcoded list of types. + This code is not accurate because: + 1. We dont deal with generic types (TypeCollision). + 2. Previous calls to GetCustomMemberNames (eg. "from foo import *" in Python) would not have included this type. + 3. This does not deal with new namespaces added to the assembly + + + + + This stores all the public non-nested type names in a single namespace and from a single assembly. + This allows inspection of the namespace without eagerly loading all the types. Eagerly loading + types slows down startup, increases working set, and is semantically incorrect as it can trigger + TypeLoadExceptions sooner than required. + + + + + returns the package associated with the specified namespace and + updates the associated module to mark the package as imported. + + + + + Ensures that the assembly is loaded + + + true if the assembly was loaded for the first time. + false if the assembly had already been loaded before + + + + When an (interop) assembly is loaded, we scan it to discover the GUIDs of COM interfaces so that we can + associate the type definition with COM objects with that GUID. + Since scanning all loaded assemblies can be expensive, in the future, we might consider a more explicit + user binder to trigger scanning of COM types. + + + + + Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce + a TextContentProvider which reads binary data with the correct language semantics. + + + + + Used as the value for the ScriptingRuntimeHelpers.GetDelegate method caching system + + + + + Generates stub to receive the CLR call and then call the dynamic language code. + + + + + Implementation of the complex number data type. + + + + + + + + name == null means that the argument doesn't specify an option; the value contains the entire argument + name == "" means that the option name is empty (argument separator); the value is null then + + + + + Gets the Compiler associated with the Type Initializer (cctor) creating it if necessary. + + + + + An object that implements IDispatch + + This currently has the following issues: + 1. If we prefer ComObjectWithTypeInfo over IDispatchComObject, then we will often not + IDispatchComObject since implementations of IDispatch often rely on a registered type library. + If we prefer IDispatchComObject over ComObjectWithTypeInfo, users get a non-ideal experience. + 2. IDispatch cannot distinguish between properties and methods with 0 arguments (and non-0 + default arguments?). So obj.foo() is ambiguous as it could mean invoking method foo, + or it could mean invoking the function pointer returned by property foo. + We are attempting to find whether we need to call a method or a property by examining + the ITypeInfo associated with the IDispatch. ITypeInfo tell's use what parameters the method + expects, is it a method or a property, what is the default property of the object, how to + create an enumerator for collections etc. + 3. IronPython processes the signature and converts ref arguments into return values. + However, since the signature of a DispMethod is not available beforehand, this conversion + is not possible. There could be other signature conversions that may be affected. How does + VB6 deal with ref arguments and IDispatch? + + We also support events for IDispatch objects: + Background: + COM objects support events through a mechanism known as Connect Points. + Connection Points are separate objects created off the actual COM + object (this is to prevent circular references between event sink + and event source). When clients want to sink events generated by + COM object they would implement callback interfaces (aka source + interfaces) and hand it over (advise) to the Connection Point. + + Implementation details: + When IDispatchComObject.TryGetMember request is received we first check + whether the requested member is a property or a method. If this check + fails we will try to determine whether an event is requested. To do + so we will do the following set of steps: + 1. Verify the COM object implements IConnectionPointContainer + 2. Attempt to find COM object's coclass's description + a. Query the object for IProvideClassInfo interface. Go to 3, if found + b. From object's IDispatch retrieve primary interface description + c. Scan coclasses declared in object's type library. + d. Find coclass implementing this particular primary interface + 3. Scan coclass for all its source interfaces. + 4. Check whether to any of the methods on the source interfaces matches + the request name + + Once we determine that TryGetMember requests an event we will return + an instance of BoundDispEvent class. This class has InPlaceAdd and + InPlaceSubtract operators defined. Calling InPlaceAdd operator will: + 1. An instance of ComEventSinksContainer class is created (unless + RCW already had one). This instance is hanged off the RCW in attempt + to bind the lifetime of event sinks to the lifetime of the RCW itself, + meaning event sink will be collected once the RCW is collected (this + is the same way event sinks lifetime is controlled by PIAs). + Notice: ComEventSinksContainer contains a Finalizer which will go and + unadvise all event sinks. + Notice: ComEventSinksContainer is a list of ComEventSink objects. + 2. Unless we have already created a ComEventSink for the required + source interface, we will create and advise a new ComEventSink. Each + ComEventSink implements a single source interface that COM object + supports. + 3. ComEventSink contains a map between method DISPIDs to the + multicast delegate that will be invoked when the event is raised. + 4. ComEventSink implements IReflect interface which is exposed as + custom IDispatch to COM consumers. This allows us to intercept calls + to IDispatch.Invoke and apply custom logic - in particular we will + just find and invoke the multicast delegate corresponding to the invoked + dispid. + + + + + This is a helper class for runtime-callable-wrappers of COM instances. We create one instance of this type + for every generic RCW instance. + + + + + The runtime-callable wrapper + + + + + This is the factory method to get the ComObject corresponding to an RCW + + + + + + Stores information needed to emit debugging symbol information for a + source file, in particular the file name and unique language identifier + + + + + The source file name + + + + + Returns the language's unique identifier, if any + + + + + Returns the language vendor's unique identifier, if any + + + + + Returns true if the method should not be displayed in the stack frame. + + + + + Simple thread-safe SymbolDictionary used for storing collections of members. + + Like all SymbolDictionaries this supports both indexing using SymbolId's (IAttributesCollection) + and via object keys (IDictionary<object, object>). + + + + + Base class for SymbolId dictionaries. + + SymbolId dictionaries are fast dictionaries used for looking up members of classes, + function environments, function locals, and other places which are typically indexed by + string names. + + SymbolId dictionaries support both keying by SymbolId (the common case) and object keys + (supporting late bound access to the dictionary as a normal Dictionary<object, object> + when exposed directly to user code). When indexed by objects null is a valid value for the + key. + + + + + Provides hashing and equality based upon the value of the object instead of the reference. + + + + + Gets the hash code for the value of the instance. + + A hash code + The type is mutable and cannot be hashed by value + + + + Determines if two values are equal + + The object to compare the current object against. + Returns true if the objects are equal, false if they are not. + + + + Creates a new SymbolIdDictBase from the specified creating context which will be + used for comparisons. + + + + + Symbol dictionaries are usually indexed using literal strings, which is handled using the Symbols. + However, some languages allow non-string keys too. We handle this case by lazily creating an object-keyed dictionary, + and keeping it in the symbol-indexed dictionary. Such access is slower, which is acceptable. + + + + + MethodGroup's represent a unique collection of method's. Typically this + unique set is all the methods which are overloaded by the same name including + methods with different arity. These methods represent a single logically + overloaded element of a .NET type. + + The base DLR binders will produce MethodGroup's when provided with a MemberGroup + which contains only methods. The MethodGroup's will be unique instances per + each unique group of methods. + + + + + Returns a BuiltinFunction bound to the provided type arguments. Returns null if the binding + cannot be performed. + + + + + A tree rewriter which will find dynamic sites which consume dynamic sites and + turn them into a single combo dynamic site. The combo dynamic site will then run the + individual meta binders and produce the resulting code in a single dynamic site. + + + + + A reducible node which we use to generate the combo dynamic sites. Each time we encounter + a dynamic site we replace it with a ComboDynamicSiteExpression. When a child of a dynamic site + turns out to be a ComboDynamicSiteExpression we will then merge the child with the parent updating + the binding mapping info. If any of the inputs cause side effects then we'll stop the combination. + + + + + ArgBuilder which always produces null. + + + + + Binds named arguments to the parameters. Returns a permutation of indices that captures the relationship between + named arguments and their corresponding parameters. Checks for duplicate and unbound named arguments. + + Ensures that for all i: namedArgs[i] binds to parameters[args.Length + bindingPermutation[i]] + + + + + The number of arguments not counting the collapsed ones. + + + + + Gets the total number of visible arguments passed to the call site including collapsed ones. + + + + + Helper for storing information about stack frames. + + + + + Efficiently tracks (line,column) information as text is added, and + collects line mappings between the original and generated source code + so we can generate correct debugging information later + + + + + Marks the current position of the writer as corresponding to the + original location passed in + + the line pragma corresponding to the + current position in the generated code + + + + Core functionality to implement an interactive console. This should be derived for concrete implementations + + + + + Request (from another thread) the console REPL loop to terminate + + The caller can specify the exitCode corresponding to the event triggering + the termination. This will be returned from CommandLine.Run + + + + To be called from entry point. + + + + + Console Host entry-point .exe name. + + + + + Provides binding semantics for a language. This include conversions as well as support + for producing rules for actions. These optimized rules are used for calling methods, + performing operators, and getting members using the ActionBinder's conversion semantics. + + + + + Provides binding semantics for a language. This include conversions as well as support + for producing rules for actions. These optimized rules are used for calling methods, + performing operators, and getting members using the ActionBinder's conversion semantics. + + + + + Converts an object at runtime into the specified type. + + + + + Determines if a conversion exists from fromType to toType at the specified narrowing level. + toNotNullable is true if the target variable doesn't allow null values. + + + + + Provides ordering for two parameter types if there is no conversion between the two parameter types. + + + + + Converts the provided expression to the given type. The expression is safe to evaluate multiple times. + + + + + Gets the members that are visible from the provided type of the specified name. + + The default implemetnation first searches the type, then the flattened heirachy of the type, and then + registered extension methods. + + + + + Called when a set is attempting to assign to a field or property from a derived class through the base class. + + The default behavior is to allow the assignment. + + + + + Creates an ErrorInfo object when a static property is accessed from an instance member. The default behavior is throw + an exception indicating that static members properties be accessed via an instance. Languages can override this to + customize the exception, message, or to produce an ErrorInfo object which reads or writes to the property being accessed. + + The static property being accessed through an instance + True if the user is assigning to the property, false if the user is reading from the property + The parameters being used to access the property. This includes the instance as the first entry, any index parameters, and the + value being assigned as the last entry if isAssignment is true. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + Deprecated, use the non-generic version instead + + + + + Gets the extension members of the given name from the provided type. Base classes are also + searched for their extension members. Once any of the types in the inheritance hierarchy + provide an extension member the search is stopped. + + + + + Gets the extension members of the given name from the provided type. Subclasses of the + type and their extension members are not searched. + + + + + Provides an opportunity for languages to replace all MemberInfo's with their own type. + + Alternatlely a language can expose MemberInfo's directly. + + The member which is being returned to the user. + Tthe type which the memberTrack was accessed from + + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + Overload resolver factory. + A MetaObject representing the call or the error. + + + + Gets a TargetInfo object for performing a call on this object. + + If this object is a delegate we bind to the Invoke method. + If this object is a MemberGroup or MethodGroup we bind to the methods in the member group. + If this object is a BoundMemberTracker we bind to the methods with the bound instance. + If the underlying type has defined an operator Call method we'll bind to that method. + + + + + Binds to the methods in a method group. + + + + + Binds to the methods in a member group. + + TODO: We should really only have either MemberGroup or MethodGroup, not both. + + + + + Binds to the BoundMemberTracker and uses the instance in the tracker and restricts + based upon the object instance type. + + + + + Binds to the Invoke method on a delegate if this is a delegate type. + + + + + Attempts to bind to an operator Call method. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + Provides overload resolution and method binding for any calls which need to be performed for the GetMember. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + An OverloadResolverFactory which can be used for performing overload resolution and method binding. + + + True if the operation should return Operation.Failed on failure, false if it + should return the exception produced by MakeMissingMemberError. + + + The meta object to be used if the get results in an error. + + + + if a member-injector is defined-on or registered-for this type call it + + + if a member-injector is defined-on or registered-for this type call it + + + + Checks if the conversion is to object and produces a target if it is. + + + + + Checks if any conversions are available and if so builds the target for that conversion. + + + + + Checks if the conversion can be handled by a simple cast. + + + + + Checks if the conversion can be handled by calling a user-defined conversion method. + + + + + Helper that checkes both types to see if either one defines the specified conversion + method. + + + + + Checks if any of the members of the MemberGroup provide the applicable conversion and + if so uses it to build a conversion rule. + + + + + Checks if the conversion is to applicable by extracting the value from Extensible of T. + + + + + Checks if there's an implicit numeric conversion for primitive data types. + + + + + Checks if there's a conversion to/from Nullable of T. + + + + + Checks to see if there's a conversion of null to a reference type + + + + + Helper to produce an error when a conversion cannot occur + + + + + Helper to produce a rule which just boxes a value type + + + + + Helper to produce a conversion rule by calling the helper method to do the convert + + + + + Helper to produce a conversion rule by calling the helper method to do the convert + + + + + Helper to produce a conversion rule by calling the method to do the convert. This version takes the parameter + to be passed to the conversion function and we call it w/ our own value or w/ our Extensible.Value. + + + + + Helper to wrap explicit conversion call into try/catch incase it throws an exception. If + it throws the default value is returned. + + + + + Helper to produce a rule when no conversion is required (the strong type of the expression + input matches the type we're converting to or has an implicit conversion at the IL level) + + + + + Helper to produce a rule when no conversion is required from an extensible type's + underlying storage to the type we're converting to. The type of extensible type + matches the type we're converting to or has an implicit conversion at the IL level. + + + + + Helper to extract the value from an Extensible of T + + + + + Helper to convert a null value to nullable of T + + + + + Helper to produce the rule for converting T to Nullable of T + + + + + Helper to produce the rule for converting T to Nullable of T + + + + + Returns a value which indicates failure when a OldConvertToAction of ImplicitTry or + ExplicitTry. + + + + + Helper to extract the Value of an Extensible of T from the + expression being converted. + + + + + Helper that checks if fromType is an Extensible of T or a subtype of + Extensible of T and if so returns the T. Otherwise it returns fromType. + + This is used to treat extensible types the same as their underlying types. + + + + + Creates a target which returns null for a reference type. + + + + + Creates the MetaObject for indexing directly into arrays or indexing into objects which have + default members. Returns null if we're not an indexing operation. + + + + + Creates the MetaObject for indexing directly into arrays or indexing into objects which have + default members. Returns null if we're not an indexing operation. + + + + + Creates the meta object for the rest of the operations: comparisons and all other + ExpressionType. If the operation cannot be completed a MetaObject which indicates an + error will be returned. + + + + + Produces a rule for comparing a value to null - supports comparing object references and nullable types. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Called when the user is accessing a protected or private member on a get. + + The default implementation allows access to the fields or properties using reflection. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides overload resolution and method binding for any calls which need to be performed for the SetMember. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides overload resolution and method binding for any calls which need to be performed for the SetMember. + + + Provides a DynamicMetaObject that is to be used as the result if the member cannot be set. If null then then a language + specific error code is provided by ActionBinder.MakeMissingMemberErrorForAssign which can be overridden by the language. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + TODO. + TODO. + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + The resulting binding target which can be used for producing error information. + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Makes test for param arrays and param dictionary parameters. + + + + + Pulls out the right argument to build the splat test. MakeParamsTest makes the actual test. + + + + + Builds the restrictions for calling with a splatted argument array. Ensures that the + argument is still an ICollection of object and that it has the same number of arguments. + + + + + Builds the restrictions for calling with keyword arguments. The restrictions include + tests on the individual keys of the dictionary to ensure they have the same names. + + + + + Encapsulates information about the target of the call. This includes an implicit instance for the call, + the methods that we'll be calling as well as any restrictions required to perform the call. + + + + + Helper class for flowing information about the GetMember request. + + + + + Helper class for flowing information about the GetMember request. + + + + + Look for typeinfo using IDispatch.GetTypeInfo + + + + Some COM objects just dont expose typeinfo. In these cases, this method will return null. + Some COM objects do intend to expose typeinfo, but may not be able to do so if the type-library is not properly + registered. This will be considered as acceptable or as an error condition depending on throwIfMissingExpectedTypeInfo + + + + + This method should be called when typeinfo is not available for an object. The function + will check if the typeinfo is expected to be missing. This can include error cases where + the same error is guaranteed to happen all the time, on all machines, under all circumstances. + In such cases, we just have to operate without the typeinfo. + + However, if accessing the typeinfo is failing in a transient way, we might want to throw + an exception so that we will eagerly predictably indicate the problem. + + + + + This class contains methods that either cannot be expressed in C#, or which require writing unsafe code. + Callers of these methods need to use them extremely carefully as incorrect use could cause GC-holes + and other problems. + + + + + + Ensure that "value" is a local variable in some caller's frame. So converting + the byref to an IntPtr is a safe operation. Alternatively, we could also allow + allowed "value" to be a pinned object. + + + + + We will emit an indirect call to an unmanaged function pointer from the vtable of the given interface pointer. + This approach can take only ~300 instructions on x86 compared with ~900 for Marshal.Release. We are relying on + the JIT-compiler to do pinvoke-stub-inlining and calling the pinvoke target directly. + + + + + We will emit an indirect call to an unmanaged function pointer from the vtable of the given IDispatch interface pointer. + It is not possible to express this in C#. Using an indirect pinvoke call allows us to do our own marshalling. + We can allocate the Variant arguments cheaply on the stack. We are relying on the JIT-compiler to do + pinvoke-stub-inlining and calling the pinvoke target directly. + The alternative of calling via a managed interface declaration of IDispatch would have a performance + penalty of going through a CLR stub that would have to re-push the arguments on the stack, etc. + Marshal.GetDelegateForFunctionPointer could be used here, but its too expensive (~2000 instructions on x86). + + + + + Wrapping a tree in this node enables jumps from finally blocks + It does this by generating control-flow logic in the tree + + Reducing this node requires a full tree walk of its body + (but not nested lambdas) + + WARNING: this node cannot contain jumps across blocks, because it + assumes any unknown jumps are jumps to an outer scope. + + + + + Determines the result of a conversion action. The result can either result in an exception, a value that + has been successfully converted or default(T), or a true/false result indicating if the value can be converted. + + + + + Attempts to perform available implicit conversions and throws if there are no available conversions. + + + + + Attempst to perform available implicit and explicit conversions and throws if there are no available conversions. + + + + + Attempts to perform available implicit conversions and returns default(ReturnType) if no conversions can be performed. + + If the return type of the rule is a value type then the return value will be zero-initialized. If the return type + of the rule is object or another class then the return type will be null (even if the conversion is to a value type). + This enables ImplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between + null and a real value can be distinguished). + + + + + Attempts to perform available implicit and explicit conversions and returns default(ReturnType) if no conversions + can be performed. + + If the return type of the rule is a value type then the return value will be zero-initialized. If the return type + of the rule is object or another class then the return type will be null (even if the conversion is to a value type). + This enables ExplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between + null and a real value can be distinguished). + + + + + Builds a parameter for a reference argument when a StrongBox has not been provided. The + updated return value is returned as one of the resulting return values. + + + + + SimpleArgBuilder produces the value produced by the user as the argument value. It + also tracks information about the original parameter and is used to create extended + methods for params arrays and param dictionary functions. + + + + + ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each + physical parameter defined on a method. + + Contrast this with ParameterWrapper which represents the logical argument passed to the method. + + + + + Provides the Expression which provides the value to be passed to the argument. + If null is returned the argument is skipped (not passed to the callee). + + + + + Function for accessing an argument from a given index. When returned from + ToDelegate closed over the value will enable delegate invocations for argument + gets to be optimized away. + + This function is referenced via reflection and if renamed needs CALLERS UPDATED. + + + + + Provides an Expression which will update the provided value after a call to the method. May + return null if no update is required. + + + + + If the argument produces a return value (e.g. a ref or out value) this provides + the additional value to be returned. + + + + + The number of actual arguments consumed by this builder. + + + + + Returns the type required for the argument or null if the ArgBuilder + does not consume a type. + + + + + An assignable value that is passed to a byref parameter + After the call it will contain the updated value + + + + + Parameter info is not available for this argument. + + + + + Type and whether the parameter is a params-array or params-dictionary is derived from info. + + + + + Builds the argument for an out argument when not passed a StrongBox. The out parameter + is returned as an additional return value. + + + + + Represents the reason why a call to a specific method could not be performed by the OverloadResolver. + + The reason for the failure is specified by the CallFailureReason property. Once this property + has been consulted the other properties can be consulted for more detailed information regarding + the failure. + + If reason is ConversionFailure the ConversionResults property will be non-null. + If reason is UnassignableKeyword the KeywordArguments property will be non-null and include + the keywords which could not be assigned. + If reason is DuplicateKeyword the KeywordArguments property will be non-null and include + the keywords which were duplicated (either by the keywords themselves or by positional + arguments). + + MethodTarget is always set and indicates the method which failed to bind. + + + + + Gets the MethodTarget which the call failed for. + + + + + Gets the reason for the call failure which determines the other + properties of the CallFailure which should be consulted. + + + + + Gets a list of ConversionResult's for each parameter indicating + whether the conversion was successful or failed and the types + being converted. + + + + + Gets the list of keyword arguments that were either dupliated or + unassignable. + + + + + Abstract base class used for optimized thread-safe SymbolDictionaries. + + Implementers derive from this class and override the GetExtraKeys, TrySetExtraValue, + and TryGetExtraValue methods. When looking up a value first the extra keys will be + searched using the optimized Try*ExtraValue functions. If the value isn't found there + then the value is stored in the underlying .NET dictionary. + + Implementors can optionally override the object key functionality to store object keys + using their own mechanism. By default object keys are stored in their own dictionary + which is stored in the primary SymbolId dictionary under an invalid symbol id. + + + + + Gets a list of the extra keys that are cached by the the optimized implementation + of the module. + + + + + Try to set the extra value and return true if the specified key was found in the + list of extra values. + + + + + Try to get the extra value and returns true if the specified key was found in the + list of extra values. Returns true even if the value is Uninitialized. + + + + + Field dictionaries are usually indexed using literal strings, which is handled using the Symbols. + However, Python does allow non-string keys too. We handle this case by lazily creating an object-keyed dictionary, + and keeping it in the symbol-indexed dictionary. Such access is slower, which is acceptable. + + + + + Appends the object keys to the provided list. + + + + + Appends the values stored under object keys to the provided list. + + + + + Gets the count of object keys. + + + + + Gets an IDictionaryEnumerator for all of the object key/value pairs. + + + + + Stores the specified value under the specified object key. + + + + + Removes the specified object key from the dictionary. + + + + + Attemps to get the value stored under the specified object key. + + Returns true if the key was found, false if not found. + + + + + The delegate representing the DLR Main function + + + + + Serializes constants and dynamic sites so the code can be saved to disk + + + + + Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. + + Dividend. + Divisor. + The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). + is 0. + The caller must check for overflow (x = Int32.MinValue, y = -1) + + + + Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. + + Dividend. + Divisor. + The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). + is 0. + The caller must check for overflow (x = Int64.MinValue, y = -1) + + + + Calculates the remainder of floor division of two 32-bit signed integers. + + Dividend. + Divisor. + The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. + is 0. + + + + Calculates the remainder of floor division of two 32-bit signed integers. + + Dividend. + Divisor. + The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. + is 0. + + + + Behaves like Math.Round(value, MidpointRounding.AwayFromZero) + Needed because CoreCLR doesn't support this particular overload of Math.Round + + + + + Behaves like Math.Round(value, precision, MidpointRounding.AwayFromZero) + However, it works correctly on negative precisions and cases where precision is + outside of the [-15, 15] range. + + (This function is also needed because CoreCLR lacks this overload.) + + + + + Literal script command given using -c option + + + + + Filename to execute passed on the command line options. + + + + + Only print the version of the script interpreter and exit + + + + + The builder for creating the LambdaExpression node. + + Since the nodes require that parameters and variables are created + before hand and then passed to the factories creating LambdaExpression + this builder keeps track of the different pieces and at the end creates + the LambdaExpression. + + TODO: This has some functionality related to CodeContext that should be + removed, in favor of languages handling their own local scopes + + + + + Creates a parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + adds existing parameter to the lambda. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a hidden parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a params array argument on the labmda. + + The params array argument is added to the signature immediately. Before the lambda is + created, the builder validates that it is still the last (since the caller can modify + the order of parameters explicitly by maniuplating the parameter list) + + + + + Creates a local variable with specified name and type. + TODO: simplify by pushing logic into callers + + + + + Creates a local variable with specified name and type. + TODO: simplify by pushing logic into callers + + + + + Creates a temporary variable with specified name and type. + + + + + Adds the temporary variable to the list of variables maintained + by the builder. This is useful in cases where the variable is + created outside of the builder. + + + + + Creates the LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + Desired type of the lambda. + New LambdaExpression instance. + + + + Creates the LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + New LambdaExpression instance. + + + + Creates the generator LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + New LambdaExpression instance. + + + + Fixes up lambda body and parameters to match the signature of the given delegate if needed. + + + + + + Validates that the builder has enough information to create the lambda. + + + + + The name of the lambda. + Currently anonymous/unnamed lambdas are not allowed. + + + + + Return type of the lambda being created. + + + + + List of lambda's local variables for direct manipulation. + + + + + List of lambda's parameters for direct manipulation + + + + + The params array argument, if any. + + + + + The body of the lambda. This must be non-null. + + + + + The generated lambda should have dictionary of locals + instead of allocating them directly on the CLR stack. + + + + + The scope is visible (default). Invisible if false. + + + + + A simple dictionary of queues, keyed off a particular type + This is useful for storing free lists of variables + + + + + When finding a yield return or yield break, this rewriter flattens out + containing blocks, scopes, and expressions with stack state. All + scopes encountered have their variables promoted to the generator's + closure, so they survive yields. + + + + + Makes an assignment to this variable. Pushes the assignment as far + into the right side as possible, to allow jumps into it. + + + + + Returns true if the expression remains constant no matter when it is evaluated. + + + + + ConsoleHost where the ScriptRuntime is hosted in a separate process (referred to as the remote runtime server) + + The RemoteConsoleHost spawns the remote runtime server and specifies an IPC channel name to use to communicate + with each other. The remote runtime server creates and initializes a ScriptRuntime and a ScriptEngine, and publishes + it over the specified IPC channel at a well-known URI. Note that the RemoteConsoleHost cannot easily participate + in the initialization of the ScriptEngine as classes like LanguageContext are not remotable. + + The RemoteConsoleHost then starts the interactive loop and executes commands on the ScriptEngine over the remoting channel. + The RemoteConsoleHost listens to stdout of the remote runtime server and echos it locally to the user. + + + + + Allows the console to customize the environment variables, working directory, etc. + + At the least, processInfo.FileName should be initialized + + + + Aborts the current active call to Execute by doing Thread.Abort + + true if a Thread.Abort was actually called. false if there is no active call to Execute + + + + Called if the remote runtime process exits by itself. ie. without the remote console killing it. @@ -1769,6 +2632,61 @@ Strongly-typed and parameterized string factory. + + + A string like "Unexpected VarEnum {0}." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Error while invoking {0}. Named arguments are not supported." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Could not convert argument {0} for call to {1}." + + + + + A string like "Error while invoking {0}. A required parameter was omitted." + + + + + A string like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." + + + + + A string like "Could not get dispatch ID for {0} (error: {1})." + + + + + A string like "There are valid conversions from {0} to {1}." + + + + + A string like "Variant.GetAccessor cannot handle {0}." + + A string like "Cannot access member {1} declared on type {0} because the type contains generic parameters." @@ -1919,59 +2837,49 @@ A string like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" - + - A string like "Unexpected VarEnum {0}." + A string like "COM object is expected." - + - A string like "Error while invoking {0}." + A string like "Cannot perform call." - + - A string like "Error while invoking {0}." + A string like "COM object does not support events." - + - A string like "Error while invoking {0}. Named arguments are not supported." + A string like "COM object does not support specified source interface." - + - A string like "Error while invoking {0}." + A string like "Marshal.SetComObjectData failed." - + - A string like "Could not convert argument {0} for call to {1}." + A string like "This method exists only to keep the compiler happy." - + - A string like "Error while invoking {0}. A required parameter was omitted." + A string like "ResolveComReference.CannotRetrieveTypeInformation." - + - A string like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." + A string like "Attempting to wrap an unsupported enum type." - + - A string like "Could not get dispatch ID for {0} (error: {1})." - - - - - A string like "There are valid conversions from {0} to {1}." - - - - - A string like "Variant.GetAccessor cannot handle {0}." + A string like "Attempting to pass an event handler of an unsupported type." @@ -2204,51 +3112,6 @@ A string like "can't write to property" - - - A string like "COM object is expected." - - - - - A string like "Cannot perform call." - - - - - A string like "COM object does not support events." - - - - - A string like "COM object does not support specified source interface." - - - - - A string like "Marshal.SetComObjectData failed." - - - - - A string like "This method exists only to keep the compiler happy." - - - - - A string like "ResolveComReference.CannotRetrieveTypeInformation." - - - - - A string like "Attempting to wrap an unsupported enum type." - - - - - A string like "Attempting to pass an event handler of an unsupported type." - - Strongly-typed and parameterized exception factory. @@ -2257,6 +3120,96 @@ Strongly-typed and parameterized exception factory. + + + ArgumentException with message like "COM object does not support events." + + + + + ArgumentException with message like "COM object does not support specified source interface." + + + + + InvalidOperationException with message like "Marshal.SetComObjectData failed." + + + + + InvalidOperationException with message like "This method exists only to keep the compiler happy." + + + + + InvalidOperationException with message like "Unexpected VarEnum {0}." + + + + + System.Reflection.TargetParameterCountException with message like "Error while invoking {0}." + + + + + MissingMemberException with message like "Error while invoking {0}." + + + + + ArgumentException with message like "Error while invoking {0}. Named arguments are not supported." + + + + + OverflowException with message like "Error while invoking {0}." + + + + + ArgumentException with message like "Could not convert argument {0} for call to {1}." + + + + + ArgumentException with message like "Error while invoking {0}. A required parameter was omitted." + + + + + InvalidOperationException with message like "ResolveComReference.CannotRetrieveTypeInformation." + + + + + ArgumentException with message like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." + + + + + InvalidOperationException with message like "Attempting to wrap an unsupported enum type." + + + + + InvalidOperationException with message like "Attempting to pass an event handler of an unsupported type." + + + + + MissingMemberException with message like "Could not get dispatch ID for {0} (error: {1})." + + + + + System.Reflection.AmbiguousMatchException with message like "There are valid conversions from {0} to {1}." + + + + + NotImplementedException with message like "Variant.GetAccessor cannot handle {0}." + + ArgumentException with message like "Either code or target must be specified." @@ -2527,251 +3480,6 @@ System.Security.VerificationException with message like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" - - - ArgumentException with message like "COM object does not support events." - - - - - ArgumentException with message like "COM object does not support specified source interface." - - - - - InvalidOperationException with message like "Marshal.SetComObjectData failed." - - - - - InvalidOperationException with message like "This method exists only to keep the compiler happy." - - - - - InvalidOperationException with message like "Unexpected VarEnum {0}." - - - - - System.Reflection.TargetParameterCountException with message like "Error while invoking {0}." - - - - - MissingMemberException with message like "Error while invoking {0}." - - - - - ArgumentException with message like "Error while invoking {0}. Named arguments are not supported." - - - - - OverflowException with message like "Error while invoking {0}." - - - - - ArgumentException with message like "Could not convert argument {0} for call to {1}." - - - - - ArgumentException with message like "Error while invoking {0}. A required parameter was omitted." - - - - - InvalidOperationException with message like "ResolveComReference.CannotRetrieveTypeInformation." - - - - - ArgumentException with message like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." - - - - - InvalidOperationException with message like "Attempting to wrap an unsupported enum type." - - - - - InvalidOperationException with message like "Attempting to pass an event handler of an unsupported type." - - - - - MissingMemberException with message like "Could not get dispatch ID for {0} (error: {1})." - - - - - System.Reflection.AmbiguousMatchException with message like "There are valid conversions from {0} to {1}." - - - - - NotImplementedException with message like "Variant.GetAccessor cannot handle {0}." - - - - - Simple thread-safe SymbolDictionary used for storing collections of members. - - Like all SymbolDictionaries this supports both indexing using SymbolId's (IAttributesCollection) - and via object keys (IDictionary<object, object>). - - - - - Base class for SymbolId dictionaries. - - SymbolId dictionaries are fast dictionaries used for looking up members of classes, - function environments, function locals, and other places which are typically indexed by - string names. - - SymbolId dictionaries support both keying by SymbolId (the common case) and object keys - (supporting late bound access to the dictionary as a normal Dictionary<object, object> - when exposed directly to user code). When indexed by objects null is a valid value for the - key. - - - - - Creates a new SymbolIdDictBase from the specified creating context which will be - used for comparisons. - - - - - Symbol dictionaries are usually indexed using literal strings, which is handled using the Symbols. - However, some languages allow non-string keys too. We handle this case by lazily creating an object-keyed dictionary, - and keeping it in the symbol-indexed dictionary. Such access is slower, which is acceptable. - - - - - DLR requires any Hosting API provider to implement this class and provide its instance upon Runtime initialization. - DLR calls on it to perform basic host/system dependent operations. - - - - - Abstracts system operations that are used by DLR and could potentially be platform specific. - - - - - Serializes constants and dynamic sites so the code can be saved to disk - - - - - Gets the stub list for a COM Object. For COM objects we store the stub list - directly on the object using the Marshal APIs. This allows us to not have - any circular references to deal with via weak references which are challenging - in the face of COM. - - - - - Doesn't need to check PrivateBinding setting: no method that is part of the event is public the entire event is private. - If the code has already a reference to the event tracker instance for a private event its "static-ness" is not influenced - by private-binding setting. - - - - - Holds on a list of delegates hooked to the event. - We need the list because we cannot enumerate the delegates hooked to CLR event and we need to do so in - handler removal (we need to do custom delegate comparison there). If BCL enables the enumeration we could remove this. - - - - - Storage for the handlers - a key value pair of the callable object and the delegate handler. - - - - - Storage for the handlers - a key value pair of the callable object and the delegate handler. - - The delegate handler is closed over the callable object. Therefore as long as the object is alive the - delegate will stay alive and so will the callable object. That means it's fine to have a weak reference - to both of these objects. - - - - - Helper methods that calls are generated to from the default DLR binders. - - - - - Helper function to combine an object array with a sequence of additional parameters that has been splatted for a function call. - - - - - EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR - This method is to get to the property without using Reflection - - - - - - - A tree rewriter which will find dynamic sites which consume dynamic sites and - turn them into a single combo dynamic site. The combo dynamic site will then run the - individual meta binders and produce the resulting code in a single dynamic site. - - - - - A reducible node which we use to generate the combo dynamic sites. Each time we encounter - a dynamic site we replace it with a ComboDynamicSiteExpression. When a child of a dynamic site - turns out to be a ComboDynamicSiteExpression we will then merge the child with the parent updating - the binding mapping info. If any of the inputs cause side effects then we'll stop the combination. - - - - - ConsoleHost where the ScriptRuntime is hosted in a separate process (referred to as the remote runtime server) - - The RemoteConsoleHost spawns the remote runtime server and specifies an IPC channel name to use to communicate - with each other. The remote runtime server creates and initializes a ScriptRuntime and a ScriptEngine, and publishes - it over the specified IPC channel at a well-known URI. Note that the RemoteConsoleHost cannot easily participate - in the initialization of the ScriptEngine as classes like LanguageContext are not remotable. - - The RemoteConsoleHost then starts the interactive loop and executes commands on the ScriptEngine over the remoting channel. - The RemoteConsoleHost listens to stdout of the remote runtime server and echos it locally to the user. - - - - - Allows the console to customize the environment variables, working directory, etc. - - At the least, processInfo.FileName should be initialized - - - - Aborts the current active call to Execute by doing Thread.Abort - - true if a Thread.Abort was actually called. false if there is no active call to Execute - - - - Called if the remote runtime process exits by itself. ie. without the remote console killing it. - - - - - VariantBuilder handles packaging of arguments into a Variant for a call to IDispatch.Invoke - - Invokes the object. If it falls back, just produce an error. @@ -2794,285 +3502,38 @@ the type the ReturnBuilder will leave on the stack - - - Marks a class in the assembly as being an extension type for another type. - + + Specifies that the member is a constructor, representing a ConstructorTracker - - - Marks a type in the assembly as being an extension type for another type. - - The type which is being extended - The type which provides the extension members. + + Specifies that the member is an event, representing a EventTracker - - - The type which contains extension members which are added to the type being extended. - + + Specifies that the member is a field, representing a FieldTracker - - - The type which is being extended by the extension type. - + + Specifies that the member is a method, representing a MethodTracker - - - The delegate representing the DLR Main function - + + Specifies that the member is a property, representing a PropertyTracker - - - Provides fast strongly typed thread local storage. This is significantly faster than - Thread.GetData/SetData. - + + Specifies that the member is a property, representing a TypeTracker - - - True if the caller will guarantee that all cleanup happens as the thread - unwinds. - - This is typically used in a case where the thread local is surrounded by - a try/finally block. The try block pushes some state, the finally block - restores the previous state. Therefore when the thread exits the thread - local is back to it's original state. This allows the ThreadLocal object - to not check the current owning thread on retrieval. - + + Specifies that the member is a namespace, representing a NamespaceTracker - - - Gets the current value if its not == null or calls the provided function - to create a new value. - + + Specifies that the member is a group of method overloads, representing a MethodGroup - - - Calls the provided update function with the current value and - replaces the current value with the result of the function. - + + Specifies that the member is a group of types that very by arity, representing a TypeGroup - - - Replaces the current value with a new one and returns the old value. - + + Specifies that the member is a custom meber, represetning a CustomTracker - - - Gets the StorageInfo for the current thread. - - - - - Called when the fast path storage lookup fails. if we encountered the Empty storage - during the initial fast check then spin until we hit non-empty storage and try the fast - path again. - - - - - Creates the StorageInfo for the thread when one isn't already present. - - - - - Gets or sets the value for the current thread. - - - - - Helper class for storing the value. We need to track if a ManagedThreadId - has been re-used so we also store the thread which owns the value. - - - - - Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce - a TextContentProvider which reads binary data with the correct language semantics. - - - - - When finding a yield return or yield break, this rewriter flattens out - containing blocks, scopes, and expressions with stack state. All - scopes encountered have their variables promoted to the generator's - closure, so they survive yields. - - - - - Makes an assignment to this variable. Pushes the assignment as far - into the right side as possible, to allow jumps into it. - - - - - Returns true if the expression remains constant no matter when it is evaluated. - - - - - arbitrary precision integers - - - - - Create a BigInteger from a little-endian twos-complement byte array - (inverse of ToByteArray()) - - - - - Return the magnitude of this BigInteger as an array of zero or more uints. - Element zero is the value of the least significant four bytes, element one is - the value of the four next most significant bytes, etc. - - The returned data is the unsigned magnitude of the number. To determine the sign, - use GetSign(). - - It is guaranteed that the highest element of the returned array is never zero. - This means that if the value of this BigInteger is zero, a zero-length array - is returned. - - - - - Do an in-place twos complement of d and also return the result. - - - - - Calculates the natural logarithm of the BigInteger. - - - - - Calculates log base 10 of a BigInteger. - - - - - Return the value of this BigInteger as a little-endian twos-complement - byte array, using the fewest number of bytes possible. If the value is zero, - return an array of one byte whose element is 0x00. - - - - - Return the sign of this BigInteger: -1, 0, or 1. - - - - - An object that implements IDispatch - - This currently has the following issues: - 1. If we prefer ComObjectWithTypeInfo over IDispatchComObject, then we will often not - IDispatchComObject since implementations of IDispatch often rely on a registered type library. - If we prefer IDispatchComObject over ComObjectWithTypeInfo, users get a non-ideal experience. - 2. IDispatch cannot distinguish between properties and methods with 0 arguments (and non-0 - default arguments?). So obj.foo() is ambiguous as it could mean invoking method foo, - or it could mean invoking the function pointer returned by property foo. - We are attempting to find whether we need to call a method or a property by examining - the ITypeInfo associated with the IDispatch. ITypeInfo tell's use what parameters the method - expects, is it a method or a property, what is the default property of the object, how to - create an enumerator for collections etc. - 3. IronPython processes the signature and converts ref arguments into return values. - However, since the signature of a DispMethod is not available beforehand, this conversion - is not possible. There could be other signature conversions that may be affected. How does - VB6 deal with ref arguments and IDispatch? - - We also support events for IDispatch objects: - Background: - COM objects support events through a mechanism known as Connect Points. - Connection Points are separate objects created off the actual COM - object (this is to prevent circular references between event sink - and event source). When clients want to sink events generated by - COM object they would implement callback interfaces (aka source - interfaces) and hand it over (advise) to the Connection Point. - - Implementation details: - When IDispatchComObject.TryGetMember request is received we first check - whether the requested member is a property or a method. If this check - fails we will try to determine whether an event is requested. To do - so we will do the following set of steps: - 1. Verify the COM object implements IConnectionPointContainer - 2. Attempt to find COM object's coclass's description - a. Query the object for IProvideClassInfo interface. Go to 3, if found - b. From object's IDispatch retrieve primary interface description - c. Scan coclasses declared in object's type library. - d. Find coclass implementing this particular primary interface - 3. Scan coclass for all its source interfaces. - 4. Check whether to any of the methods on the source interfaces matches - the request name - - Once we determine that TryGetMember requests an event we will return - an instance of BoundDispEvent class. This class has InPlaceAdd and - InPlaceSubtract operators defined. Calling InPlaceAdd operator will: - 1. An instance of ComEventSinksContainer class is created (unless - RCW already had one). This instance is hanged off the RCW in attempt - to bind the lifetime of event sinks to the lifetime of the RCW itself, - meaning event sink will be collected once the RCW is collected (this - is the same way event sinks lifetime is controlled by PIAs). - Notice: ComEventSinksContainer contains a Finalizer which will go and - unadvise all event sinks. - Notice: ComEventSinksContainer is a list of ComEventSink objects. - 2. Unless we have already created a ComEventSink for the required - source interface, we will create and advise a new ComEventSink. Each - ComEventSink implements a single source interface that COM object - supports. - 3. ComEventSink contains a map between method DISPIDs to the - multicast delegate that will be invoked when the event is raised. - 4. ComEventSink implements IReflect interface which is exposed as - custom IDispatch to COM consumers. This allows us to intercept calls - to IDispatch.Invoke and apply custom logic - in particular we will - just find and invoke the multicast delegate corresponding to the invoked - dispid. - - - - - This is a helper class for runtime-callable-wrappers of COM instances. We create one instance of this type - for every generic RCW instance. - - - - - The runtime-callable wrapper - - - - - This is the factory method to get the ComObject corresponding to an RCW - - - - - - ComEventSinkProxy class is responsible for handling QIs for sourceIid - on instances of ComEventSink. - - Background: When a COM even sink advises to a connection point it is - supposed to hand over the dispinterface. Now, some hosts will trust - the COM client to pass the correct pointer, but some will not. - E.g. Excel's implementation of Connection Points will not cause a - QI on the pointer that has been passed, however Word will QI the - pointer to return the required interface. - - ComEventSink does not, strongly speaking, implements the interface - that it claims to implement - it is just "faking" it by using IReflect. - Thus, Word's QIs on the pointer passed to ICP::Advise would fail. To - prevent this we take advangate of RealProxy's ability of - "dressing up" like other classes and hence successfully respond to QIs - for interfaces that it does not really support( it is OK to say - "I implement this interface" for event sinks only since the common - practice is to use IDistpach.Invoke when calling into event sinks). - - - - - Builds the argument for an out argument when not passed a StrongBox. The out parameter - is returned as an additional return value. - + + Specifies that the member is a bound to an instance, representing a BoundMemberTracker @@ -3091,31 +3552,147 @@ directly. - + - Represents a logical Property as a member of a Type. This Property can either be a real - concrete Property on a type (implemented with a ReflectedPropertyTracker) or an extension - property (implemented with an ExtensionPropertyTracker). + A custom member tracker which enables languages to plug in arbitrary + members into the lookup process. - + - A simple hashset, built on Dictionary{K, V} + This class holds onto internal debugging options used in this assembly. + These options can be set via environment variables DLR_{option-name}. + Boolean options map "true" to true and other values to false. + + These options are for internal debugging only, and should not be + exposed through any public APIs. - + + On error. + + - Implements explicit casts supported by the runtime. - - - Implements explicit casts supported by the runtime. + Marks a method as not having side effects. used by the combo binder + to allow calls to methods. - + + A simple forth-style stack machine for executing Expression trees + without the need to compile to IL and then invoke the JIT. This trades + off much faster compilation time for a slower execution performance. + For code that is only run a small number of times this can be a + sweet spot. + + The core loop in the interpreter is the RunInstructions method. + + - Explicitly casts the object to a given type (and returns it as object) + Provides a simple expression which enables embedding FieldBuilder's + in an AST before the type is complete. + + + VariantBuilder handles packaging of arguments into a Variant for a call to IDispatch.Invoke + + + + + ParameterWrapper represents the logical view of a parameter. For eg. the byref-reduced signature + of a method with byref parameters will be represented using a ParameterWrapper of the underlying + element type, since the logical view of the byref-reduced signature is that the argument will be + passed by value (and the updated value is included in the return value). + + Contrast this with ArgBuilder which represents the real physical argument passed to the method. + + + + + ParameterInfo is not available. + + + + + Creates a parameter that represents an expanded item of params-array. + + + + + True if the wrapper represents a params-array parameter (false for parameters created by expansion of a params-array). + + + + + True if the wrapper represents a params-dict parameter (false for parameters created by expansion of a params-dict). + + + + + Seeks the first character of a specified line in the text stream. + + The reader. + Line number. The current position is assumed to be line #1. + + Returns true if the line is found, false otherwise. + + + + + Reads characters to a string until end position or a terminator is reached. + Doesn't include the terminator into the resulting string. + Returns null, if the reader is at the end position. + + + + + Reads characters until end position or a terminator is reached. + Returns true if the character has been found (the reader is positioned right behind the character), + false otherwise. + + + + + Provides a cache of reflection members. Only one set of values is ever handed out per a + specific request. + + + + + Gets a singleton method group from the provided type. + + The provided method group will be unique based upon the methods defined, not based upon the type/name + combination. In other words calling GetMethodGroup on a base type and a derived type that introduces + no new methods under a given name will result in the same method group for both types. + + + + + TODO: Make me private again + + + + + This helper type lets us build a fake ParameterInfo object with a specific type and name + to pass along to methods that expect ParameterInfos. This is currently found useful + for the NewTypeMaker code and may be useful in other situations as well. + + + + + Returns the list of expressions represented by the instances. + + An array of instances to extract expressions from. + The array of expressions. + + + + Creates an instance of for a runtime value and the expression that represents it during the binding process. + + The runtime value to be represented by the . + An expression to represent this during the binding process. + The new instance of . + marks a field, class, or struct as being safe to have statics which can be accessed @@ -3128,209 +3705,139 @@ in all runtimes and are immutable. - + - A simple dictionary of queues, keyed off a particular type - This is useful for storing free lists of variables + This represents a bound dispmember on a IDispatch object. - + - Provides helper methods to bind COM objects dynamically. + Indicates the specific type of failure, if any, from binding to a method. - + - Determines if an object is a COM object. - - The object to test. - true if the object is a COM object, false otherwise. - - - - Tries to perform binding of the dynamic get member operation. - - An instance of the that represents the details of the dynamic operation. - The target of the dynamic operation. - The new representing the result of the binding. - true if member evaluation may be delayed. - true if operation was bound successfully; otherwise, false. - - - - Tries to perform binding of the dynamic get member operation. - - An instance of the that represents the details of the dynamic operation. - The target of the dynamic operation. - The new representing the result of the binding. - true if operation was bound successfully; otherwise, false. - - - - Tries to perform binding of the dynamic set member operation. - - An instance of the that represents the details of the dynamic operation. - The target of the dynamic operation. - The representing the value for the set member operation. - The new representing the result of the binding. - true if operation was bound successfully; otherwise, false. - - - - Tries to perform binding of the dynamic invoke operation. - - An instance of the that represents the details of the dynamic operation. - The target of the dynamic operation. - An array of instances - arguments to the invoke member operation. - The new representing the result of the binding. - true if operation was bound successfully; otherwise, false. - - - - Tries to perform binding of the dynamic invoke member operation. - - An instance of the that represents the details of the dynamic operation. - The target of the dynamic operation. - An array of instances - arguments to the invoke member operation. - The new representing the result of the binding. - true if operation was bound successfully; otherwise, false. - - - - Tries to perform binding of the dynamic get index operation. - - An instance of the that represents the details of the dynamic operation. - The target of the dynamic operation. - An array of instances - arguments to the invoke member operation. - The new representing the result of the binding. - true if operation was bound successfully; otherwise, false. - - - - Tries to perform binding of the dynamic set index operation. - - An instance of the that represents the details of the dynamic operation. - The target of the dynamic operation. - An array of instances - arguments to the invoke member operation. - The representing the value for the set index operation. - The new representing the result of the binding. - true if operation was bound successfully; otherwise, false. - - - - Tries to perform binding of the dynamic Convert operation. - - An instance of the that represents the details of the dynamic operation. - The target of the dynamic operation. - The new representing the result of the binding. - true if operation was bound successfully; otherwise, false. - - - - Gets the member names associated with the object. - This function can operate only with objects for which returns true. - - The object for which member names are requested. - The collection of member names. - - - - Gets the member names of the data-like members associated with the object. - This function can operate only with objects for which returns true. - - The object for which member names are requested. - The collection of member names. - - - - Gets the data-like members and associated data for an object. - This function can operate only with objects for which returns true. - - The object for which data members are requested. - The enumeration of names of data members for which to retrieve values. - The collection of pairs that represent data member's names and their data. - - - - Special binder that indicates special semantics for COM GetMember operation. + The binding succeeded. Only one method was applicable or had the best conversion. - + - Binds named arguments to the parameters. Returns a permutation of indices that captures the relationship between - named arguments and their corresponding parameters. Checks for duplicate and unbound named arguments. + More than one method was applicable for the provided parameters and no method was considered the best. + + + + + There are no overloads that match the number of parameters required for the call + + + + + None of the target method(s) can successfully be called. The failure can be due to: + 1. Arguments could not be successfully converted for the call + 2. Keyword arguments could not be assigned to positional arguments + 3. Keyword arguments could be assigned but would result in an argument being assigned + multiple times (keyword and positional arguments conflit or dupliate keyword arguments). + + + + + Actual arguments cannot be constructed. + + + + + Represents a logical Property as a member of a Type. This Property can either be a real + concrete Property on a type (implemented with a ReflectedPropertyTracker) or an extension + property (implemented with an ExtensionPropertyTracker). + + + + + Encapsulates information about the result that should be produced when + a OldDynamicAction cannot be performed. The ErrorInfo can hold one of: + an expression which creates an Exception to be thrown + an expression which produces a value which should be returned + directly to the user and represents an error has occured (for + example undefined in JavaScript) + an expression which produces a value which should be returned + directly to the user but does not actually represent an error. - Ensures that for all i: namedArgs[i] binds to parameters[args.Length + bindingPermutation[i]] + ErrorInfo's are produced by an ActionBinder in response to a failed + binding. - + - The number of arguments not counting the collapsed ones. + Private constructor - consumers must use static From* factories + to create ErrorInfo objects. - + - Gets the total number of visible arguments passed to the call site including collapsed ones. + Creates a new ErrorInfo which represents an exception that should + be thrown. - + - A custom member tracker which enables languages to plug in arbitrary - members into the lookup process. + Creates a new ErrorInfo which represents a value which should be + returned to the user. - + - Returns a numerical code of the size of a type. All types get both a horizontal - and vertical code. Types that are lower in both dimensions have implicit conversions - to types that are higher in both dimensions. + Crates a new ErrorInfo which represents a value which should be returned + to the user but does not represent an error. + + + + + + + The ErrorInfo expression produces an exception - + - Thread safe dictionary that allows lazy-creation where readers will block for - the creation of the lazily created value. Call GetOrCreateValue w/ a key - and a callback function. If the value exists it is returned, if not the create - callback is called (w/o any locks held). The create call back will only be called - once for each key. + The ErrorInfo expression produces a value which represents the error (e.g. undefined) - + - Helper class which stores the published value + The ErrorInfo expression produces a value which is not an error - + - Efficiently tracks (line,column) information as text is added, and - collects line mappings between the original and generated source code - so we can generate correct debugging information later + Sets the current position inside current token or one character behind it. - + - Marks the current position of the writer as corresponding to the - original location passed in - - the line pragma corresponding to the - current position in the generated code - - - On error. - - - - This class is useful for quickly collecting performance counts for expensive - operations. Usually this means operations involving either reflection or - code gen. Long-term we need to see if this can be plugged better into the - standard performance counter architecture. + Sets the current position inside current token or one character behind it. + A relative displacement with respect to the current position in the token is specified. - + - temporary categories for quick investigation, use a custom key if you - need to track multiple items, and if you want to keep it then create - a new Categories entry and rename all your temporary entries. + Marks token end. Enables to read the current token. + + + + + Marks token start. It means the buffer can drop the current token. + Can be called even if no token has been read yet. + + + + + Reads till the end of line and returns the character that stopped the reading. + The returned character is not skipped. + + + + + Resizes an array to a speficied new size and copies a portion of the original array into its beginning. @@ -3364,91 +3871,29 @@ Adds a variable which will be scoped at the level of the final expression. - + - These are some generally useful helper methods. Currently the only methods are those to - cached boxed representations of commonly used primitive types so that they can be shared. - This is useful to most dynamic languages that use object as a universal type. + Provides support for converting objects to delegates using the DLR binders + available by the provided language context. - The methods in RuntimeHelepers are caleld by the generated code. From here the methods may - dispatch to other parts of the runtime to get bulk of the work done, but the entry points - should be here. - - - - - Used by prologue code that is injected in lambdas to ensure that delegate signature matches what - lambda body expects. Such code typically unwraps subset of the params array manually, - but then passes the rest in bulk if lambda body also expects params array. + Primarily this supports converting objects implementing IDynamicMetaObjectProvider + to the appropriate delegate type. - This calls ArrayUtils.ShiftLeft, but performs additional checks that - ArrayUtils.ShiftLeft assumes. + If the provided object is already a delegate of the appropriate type then the + delegate will simply be returned. - + + Table of dynamically generated delegates which are shared based upon method signature. + + - A singleton boxed boolean true. + Creates a delegate with a given signature that could be used to invoke this object from non-dynamic code (w/o code context). + A stub is created that makes appropriate conversions/boxing and calls the object. + The stub should be executed within a context of this object's language. - - - - A singleton boxed boolean false. - - - - - Gets a singleton boxed value for the given integer if possible, otherwise boxes the integer. - - The value to box. - The boxed value. - - - - Helper method to create an instance. Work around for Silverlight where Activator.CreateInstance - is SecuritySafeCritical. - - TODO: Why can't we just emit the right thing for default(T)? - It's always null for reference types and it's well defined for value types - - - - - EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR - This method is to get to the property without using Reflection - - - - - - - This is similar to ComTypes.EXCEPINFO, but lets us do our own custom marshaling - - - - - Cached information from a TLB. Only information that is required is saved. CoClasses are used - for event hookup. Enums are stored for accessing symbolic names from scripts. - - - - - Reads the latest registered type library for the corresponding GUID, - reads definitions of CoClass'es and Enum's from this library - and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses - and get actual values for the enums. - - Type Library Guid - ComTypeLibDesc object - - - - Gets an ITypeLib object from OLE Automation compatible RCW , - reads definitions of CoClass'es and Enum's from this library - and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses - and get actual values for the enums. - - OLE automation compatible RCW - ComTypeLibDesc object + The converted delegate. + The object is either a subclass of Delegate but not the requested type or does not implement IDynamicMetaObjectProvider. @@ -3461,6 +3906,147 @@ Gets expressions to access all the arguments. This includes the instance argument. + + + Layout of the IDispatch vtable + + + + + Interceptor prototype. The interceptor is a call site binder that wraps + a real call site binder and can perform arbitrary operations on the expression + trees that the wrapped binder produces: + * Dumping the trees + * Additional rewriting + * Static compilation + * ... + + + + + Builds the parameter for a params dictionary argument - this collects all the extra name/value + pairs provided to the function into a SymbolDictionary which is passed to the function. + + + + + ArgBuilder which provides a value for a keyword argument. + + The KeywordArgBuilder calculates its position at emit time using it's initial + offset within the keyword arguments, the number of keyword arguments, and the + total number of arguments provided by the user. It then delegates to an + underlying ArgBuilder which only receives the single correct argument. + + Delaying the calculation of the position to emit time allows the method binding to be + done without knowing the exact the number of arguments provided by the user. Hence, + the method binder can be dependent only on the set of method overloads and keyword names, + but not the user arguments. While the number of user arguments could be determined + upfront, the current MethodBinder does not have this design. + + + + + The underlying builder should expect a single parameter as KeywordArgBuilder is responsible + for calculating the correct parameter to use + + + + + + Provides binding and overload resolution to .NET methods. + + MethodBinder's can be used for: + generating new AST code for calling a method + calling a method via reflection at runtime + (not implemented) performing an abstract call + + MethodBinder's support default arguments, optional arguments, by-ref (in and out), and keyword arguments. + + Implementation Details: + + The MethodBinder works by building up a CandidateSet for each number of effective arguments that can be + passed to a set of overloads. For example a set of overloads such as: + foo(object a, object b, object c) + foo(int a, int b) + + would have 2 target sets - one for 3 parameters and one for 2 parameters. For parameter arrays + we fallback and create the appropriately sized CandidateSet on demand. + + Each CandidateSet consists of a set of MethodCandidate's. Each MethodCandidate knows the flattened + parameters that could be received. For example for a function such as: + foo(params int[] args) + + When this method is in a CandidateSet of size 3 the MethodCandidate takes 3 parameters - all of them + ints; if it's in a CandidateSet of size 4 it takes 4 parameters. Effectively a MethodCandidate is + a simplified view that allows all arguments to be treated as required positional arguments. + + Each MethodCandidate in turn refers to a MethodTarget. The MethodTarget is composed of a set + of ArgBuilder's and a ReturnBuilder which know how to consume the positional arguments and pass + them to the appropriate argument of the destination method. This includes routing keyword + arguments to the correct position, providing the default values for optional arguments, etc... + + After binding is finished the MethodCandidates are thrown away and a BindingTarget is returned. + The BindingTarget indicates whether the binding was successful and if not any additional information + that should be reported to the user about the failed binding. It also exposes the MethodTarget which + allows consumers to get the flattened list of required parameters for the call. MethodCandidates + are not exposed and are an internal implementation detail of the MethodBinder. + + + + + Resolves a method overload and returns back a BindingTarget. + + The BindingTarget can then be tested for the success or particular type of + failure that prevents the method from being called. If successfully bound the BindingTarget + contains a list of argument meta-objects with additional restrictions that ensure the selection + of the particular overload. + + + + + Checks to see if the language allows keyword arguments to be bound to instance fields or + properties and turned into sets. By default this is only allowed on contructors. + + + + + Gets an expression that evaluates to the result of GetByRefArray operation. + + + + + Called before arguments binding. + + + A bitmask that indicates (set bits) the parameters that were mapped by this method. + A default mapping will be constructed for the remaining parameters (cleared bits). + + + + + Return null if arguments cannot be constructed and overload resolution should produce an error. + + + + + Determines whether given overloads are overloaded on index-th parameter (the types of the index-th parameters are the same). + + + + + Selects the best (of two) candidates for conversion from actualType + + + + + Provides ordering for two parameter types if there is no conversion between the two parameter types. + + + + + The method is called each time an item of lazily splatted argument is needed. + + Represents a collection of MethodCandidate's which all accept the @@ -3468,100 +4054,6 @@ and a method with 3 parameters would both be a CandidateSet for 3 parameters. - - - Splits text and optionally indents first lines - breaks along words, not characters. - - - - - Abstract base class used for optimized thread-safe SymbolDictionaries. - - Implementers derive from this class and override the GetExtraKeys, TrySetExtraValue, - and TryGetExtraValue methods. When looking up a value first the extra keys will be - searched using the optimized Try*ExtraValue functions. If the value isn't found there - then the value is stored in the underlying .NET dictionary. - - Implementors can optionally override the object key functionality to store object keys - using their own mechanism. By default object keys are stored in their own dictionary - which is stored in the primary SymbolId dictionary under an invalid symbol id. - - - - - Gets a list of the extra keys that are cached by the the optimized implementation - of the module. - - - - - Try to set the extra value and return true if the specified key was found in the - list of extra values. - - - - - Try to get the extra value and returns true if the specified key was found in the - list of extra values. Returns true even if the value is Uninitialized. - - - - - Field dictionaries are usually indexed using literal strings, which is handled using the Symbols. - However, Python does allow non-string keys too. We handle this case by lazily creating an object-keyed dictionary, - and keeping it in the symbol-indexed dictionary. Such access is slower, which is acceptable. - - - - - Appends the object keys to the provided list. - - - - - Appends the values stored under object keys to the provided list. - - - - - Gets the count of object keys. - - - - - Gets an IDictionaryEnumerator for all of the object key/value pairs. - - - - - Stores the specified value under the specified object key. - - - - - Removes the specified object key from the dictionary. - - - - - Attemps to get the value stored under the specified object key. - - Returns true if the key was found, false if not found. - - - - - This helper type lets us build a fake ParameterInfo object with a specific type and name - to pass along to methods that expect ParameterInfos. This is currently found useful - for the NewTypeMaker code and may be useful in other situations as well. - - - - - Enables an object to be serializable to an Expression tree. The expression tree can then - be emitted into an assembly enabling the de-serialization of the object. - - Returns true if the specified parameter is mandatory, i.e. is not optional and doesn't have a default value. @@ -3715,221 +4207,69 @@ Removes all live objects and places them in static fields of a type. - + - A TypeCollision is used when we have a collision between - two types with the same name. Currently this is only possible w/ generic - methods that should logically have arity as a portion of their name. For eg: - System.EventHandler and System.EventHandler[T] - System.Nullable and System.Nullable[T] - System.IComparable and System.IComparable[T] + Simple class for tracking a list of items and enumerating over them. + The items are stored in weak references; if the objects are collected, + they will not be seen when enumerating. + + The type of the collection element. + + + + A helper routine to check if a type can be treated as sealed - i.e. there + can never be a subtype of this given type. This corresponds to a type + that is either declared "Sealed" or is a ValueType and thus unable to be + extended. - The TypeCollision provides an indexer but also is a real type. When used - as a real type it is the non-generic form of the type. + TODO: this should not be needed. Type.IsSealed does the right thing. + + + + + Returns true if the specified parameter is mandatory, i.e. is not optional and doesn't have a default value. + + + + + Provides a dictionary-like object used for caches which holds onto a maximum + number of elements specified at construction time. - The indexer allows the user to disambiguate between the generic and - non-generic versions. Therefore users must always provide additional - information to get the generic version. + This class is not thread safe. - - The merged list so far. Could be null - The new type(s) to add to the merged list - The merged list. Could be a TypeTracker or TypeGroup - - - Gets the arity of generic parameters - - + - This will throw an exception if all the colliding types are generic + Creates a dictionary-like object used for caches. + + The maximum number of elements to store. + + + + Tries to get the value associated with 'key', returning true if it's found and + false if it's not present. - + - This returns the DeclaringType of all the types in the TypeGroup + Adds a new element to the cache, replacing and moving it to the front if the + element is already present. - + - This returns the base name of the TypeGroup (the name shared by all types minus arity) + Returns the value associated with the given key, or throws KeyNotFoundException + if the key is not present. - + - This will return the result only for the non-generic type if one exists, and will throw - an exception if all types in the TypeGroup are generic + Creates a dictionary of locals in this scope - + - This will return the result only for the non-generic type if one exists, and will throw - an exception if all types in the TypeGroup are generic - - - - A simple forth-style stack machine for executing Expression trees - without the need to compile to IL and then invoke the JIT. This trades - off much faster compilation time for a slower execution performance. - For code that is only run a small number of times this can be a - sweet spot. - - The core loop in the interpreter is the RunInstructions method. - - - - Layout of the IDispatch vtable - - - - - Interceptor prototype. The interceptor is a call site binder that wraps - a real call site binder and can perform arbitrary operations on the expression - trees that the wrapped binder produces: - * Dumping the trees - * Additional rewriting - * Static compilation - * ... - - - - - Indicates the specific type of failure, if any, from binding to a method. - - - - - The binding succeeded. Only one method was applicable or had the best conversion. - - - - - More than one method was applicable for the provided parameters and no method was considered the best. - - - - - There are no overloads that match the number of parameters required for the call - - - - - None of the target method(s) can successfully be called. The failure can be due to: - 1. Arguments could not be successfully converted for the call - 2. Keyword arguments could not be assigned to positional arguments - 3. Keyword arguments could be assigned but would result in an argument being assigned - multiple times (keyword and positional arguments conflit or dupliate keyword arguments). - - - - - Actual arguments cannot be constructed. - - - - - Converts a generic ICollection of T into an array of T. - - If the collection is already an array of T the original collection is returned. - - - - - Provides a cache of reflection members. Only one set of values is ever handed out per a - specific request. - - - - - Gets a singleton method group from the provided type. - - The provided method group will be unique based upon the methods defined, not based upon the type/name - combination. In other words calling GetMethodGroup on a base type and a derived type that introduces - no new methods under a given name will result in the same method group for both types. - - - - - TODO: Make me private again - - - - - Convention for an individual argument at a callsite. - - Multiple different callsites can match against a single declaration. - Some argument kinds can be "unrolled" into multiple arguments, such as list and dictionary. - - - - - Simple unnamed positional argument. - In Python: foo(1,2,3) are all simple arguments. - - - - - Argument with associated name at the callsite - In Python: foo(a=1) - - - - - Argument containing a list of arguments. - In Python: foo(*(1,2*2,3)) would match 'def foo(a,b,c)' with 3 declared arguments such that (a,b,c)=(1,4,3). - it could also match 'def foo(*l)' with 1 declared argument such that l=(1,4,3) - - - - - Argument containing a dictionary of named arguments. - In Python: foo(**{'a':1, 'b':2}) - - - - - Dictionary[TKey, TValue] is not thread-safe in the face of concurrent reads and writes. SynchronizedDictionary - provides a thread-safe implementation. It holds onto a Dictionary[TKey, TValue] instead of inheriting from - it so that users who need to do manual synchronization can access the underlying Dictionary[TKey, TValue]. - - - - - This returns the raw unsynchronized Dictionary[TKey, TValue]. Users are responsible for locking - on it before accessing it. Also, it should not be arbitrarily handed out to other code since deadlocks - can be caused if other code incorrectly locks on it. - - - - - Handles input and output for the console. It is comparable to System.IO.TextReader, - System.IO.TextWriter, System.Console, etc - - - - - Read a single line of interactive input, or a block of multi-line statements. - - An event-driven GUI console can implement this method by creating a thread that - blocks and waits for an event indicating that input is available - - The indentation level to be used for the current suite of a compound statement. - The console can ignore this argument if it does not want to support auto-indentation - null if the input stream has been closed. A string with a command to execute otherwise. - It can be a multi-line string which should be processed as block of statements - - - - - Indicates that a MetaObject is already representing a restricted type. Useful - when we're already restricted to a known type but this isn't captured in - the type info (e.g. the type is not sealed). - - - - - Marks a method as not having side effects. used by the combo binder - to allow calls to methods. + Gets custom data to be serialized when saving script codes to disk. @@ -3948,235 +4288,67 @@ The constant value to check for. true/false - + - This represents a bound dispmember on a IDispatch object. + Cached information from a TLB. Only information that is required is saved. CoClasses are used + for event hookup. Enums are stored for accessing symbolic names from scripts. - + - Builds a parameter for a reference argument when a StrongBox has not been provided. The - updated return value is returned as one of the resulting return values. + Reads the latest registered type library for the corresponding GUID, + reads definitions of CoClass'es and Enum's from this library + and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses + and get actual values for the enums. + Type Library Guid + ComTypeLibDesc object - + - ParameterWrapper represents the logical view of a parameter. For eg. the byref-reduced signature - of a method with byref parameters will be represented using a ParameterWrapper of the underlying - element type, since the logical view of the byref-reduced signature is that the argument will be - passed by value (and the updated value is included in the return value). + Gets an ITypeLib object from OLE Automation compatible RCW , + reads definitions of CoClass'es and Enum's from this library + and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses + and get actual values for the enums. + + OLE automation compatible RCW + ComTypeLibDesc object + + + + ComEventSinkProxy class is responsible for handling QIs for sourceIid + on instances of ComEventSink. - Contrast this with ArgBuilder which represents the real physical argument passed to the method. - - - - - ParameterInfo is not available. - - - - - Creates a parameter that represents an expanded item of params-array. - - - - - True if the wrapper represents a params-array parameter (false for parameters created by expansion of a params-array). - - - - - True if the wrapper represents a params-dict parameter (false for parameters created by expansion of a params-dict). - - - - - Narrowing conversions are conversions that cannot be proved to always succeed, conversions that are - known to possibly lose information, and conversions across domains of types sufficiently different - to merit narrowing notation like casts. + Background: When a COM even sink advises to a connection point it is + supposed to hand over the dispinterface. Now, some hosts will trust + the COM client to pass the correct pointer, but some will not. + E.g. Excel's implementation of Connection Points will not cause a + QI on the pointer that has been passed, however Word will QI the + pointer to return the required interface. - Its upto every language to define the levels for conversions. The narrowling levels can be used by - for method overload resolution, where the overload is based on the parameter types (and not the number - of parameters). + ComEventSink does not, strongly speaking, implements the interface + that it claims to implement - it is just "faking" it by using IReflect. + Thus, Word's QIs on the pointer passed to ICP::Advise would fail. To + prevent this we take advangate of RealProxy's ability of + "dressing up" like other classes and hence successfully respond to QIs + for interfaces that it does not really support( it is OK to say + "I implement this interface" for event sinks only since the common + practice is to use IDistpach.Invoke when calling into event sinks). - + - Conversions at this level do not do any narrowing. Typically, this will include - implicit numeric conversions, Type.IsAssignableFrom, StringBuilder to string, etc. + The way in which a module has changed : Set or Delete - + - Language defined prefered narrowing conversion. First level that introduces narrowing - conversions. + A new value has been set in the module (or a previous value has changed). - + - Language defined preferred narrowing conversion. Second level that introduces narrowing - conversions and should have more conversions than One. - - - - - Language defined preferred narrowing conversion. Third level that introduces narrowing - conversions and should have more conversions that Two. - - - - - A somewhat meaningful conversion is possible, but it will quite likely be lossy. - For eg. BigInteger to an Int32, Boolean to Int32, one-char string to a char, - larger number type to a smaller numeric type (where there is no overflow), etc - - - - - ArgBuilder which provides a value for a keyword argument. - - The KeywordArgBuilder calculates its position at emit time using it's initial - offset within the keyword arguments, the number of keyword arguments, and the - total number of arguments provided by the user. It then delegates to an - underlying ArgBuilder which only receives the single correct argument. - - Delaying the calculation of the position to emit time allows the method binding to be - done without knowing the exact the number of arguments provided by the user. Hence, - the method binder can be dependent only on the set of method overloads and keyword names, - but not the user arguments. While the number of user arguments could be determined - upfront, the current MethodBinder does not have this design. - - - - - The underlying builder should expect a single parameter as KeywordArgBuilder is responsible - for calculating the correct parameter to use - - - - - - Creates a dictionary of locals in this scope - - - - - Used as the value for the ScriptingRuntimeHelpers.GetDelegate method caching system - - - - - Generates stub to receive the CLR call and then call the dynamic language code. - - - - - Sets the current position inside current token or one character behind it. - - - - - Sets the current position inside current token or one character behind it. - A relative displacement with respect to the current position in the token is specified. - - - - - Marks token end. Enables to read the current token. - - - - - Marks token start. It means the buffer can drop the current token. - Can be called even if no token has been read yet. - - - - - Reads till the end of line and returns the character that stopped the reading. - The returned character is not skipped. - - - - - Resizes an array to a speficied new size and copies a portion of the original array into its beginning. - - - - - Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, - otherwise, returns self.LimitType - - - - - Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, - otherwise, returns self.RuntimeType - - - - - A binder which can combine multiple binders into a single dynamic site. The creator - of this needs to perform the mapping of parameters, constants, and sub-site expressions - and provide a List of BinderMappingInfo representing this data. From there the ComboBinder - just processes the list to create the resulting code. - - - - - Provides a mapping for inputs of combo action expressions. The input can map - to either an input of the new dynamic site, an input of a previous DynamicExpression, - or a ConstantExpression which has been pulled out of the dynamic site arguments. - - - - - Contains the mapping information for a single Combo Binder. This includes the original - meta-binder and the mapping of parameters, sub-sites, and constants into the binding. - - - - - Gets the Compiler associated with the Type Initializer (cctor) creating it if necessary. - - - - - Provides a simple expression which enables embedding FieldBuilder's - in an AST before the type is complete. - - - - - Specifies the action for which the default binder is requesting a member. - - - - - Creates an open delegate for the given (dynamic)method. - - - - - Creates a closed delegate for the given (dynamic)method. - - - - - Like Type.GetInterfaces, but only returns the interfaces implemented by this type - and not its parents. - - - - - Gets a Func of CallSite, object * paramCnt, object delegate type - that's suitable for use in a non-strongly typed call site. - - - - - A NullTextContentProvider to be provided when we have a pre-compiled ScriptCode which doesn't - have source code associated with it. + A value has been removed from the module. @@ -4221,6 +4393,23 @@ These represent active catch blocks on the stack. + + + The MethodBinder will perform normal method binding. + + + + + The MethodBinder will return the languages definition of NotImplemented if the arguments are + incompatible with the signature. + + + + + The MethodBinder will set properties/fields for unused keyword arguments on the instance + that gets returned from the method. + + Richly represents the signature of a callsite. @@ -4252,579 +4441,30 @@ All arguments are unnamed and matched by position. - - - Wraps the provided enumerable into a ReadOnlyCollection{T} - - Copies all of the data into a new array, so the data can't be - changed after creation. The exception is if the enumerable is - already a ReadOnlyCollection{T}, in which case we just return it. - - - - - Represents a SymbolId constant - This node is reducible, and also rewritten by GlobalOptimizedRewriter - - TODO: this node exists so GlobalOptimizedRewriter can recognize and - rewrite a strongly typed node. Once that functionality is gone it - should go away. - When this type goes away, change the return type of - Microsoft.Scripting.Ast.Utils.Constant(object) from Expression to ConstantExpression. - - - - - Provides support for converting objects to delegates using the DLR binders - available by the provided language context. - - Primarily this supports converting objects implementing IDynamicMetaObjectProvider - to the appropriate delegate type. - - If the provided object is already a delegate of the appropriate type then the - delegate will simply be returned. - - - - Table of dynamically generated delegates which are shared based upon method signature. - - - - Creates a delegate with a given signature that could be used to invoke this object from non-dynamic code (w/o code context). - A stub is created that makes appropriate conversions/boxing and calls the object. - The stub should be executed within a context of this object's language. - - The converted delegate. - The object is either a subclass of Delegate but not the requested type or does not implement IDynamicMetaObjectProvider. - - - - Manages creation of interpreted delegates. These delegates will get - compiled if they are executed often enough. - - - - - Used by LightLambda to get the compiled delegate. - - - - - Create a compiled delegate for the LightLambda, and saves it so - future calls to Run will execute the compiled code instead of - interpreting. - - - - - Updates the execution count of this light delegate. If a certain - threshold is reached, it will start a background compilation. - - - - - true if the compiled delegate has the same type as the lambda; - false if the type was changed for interpretation. - - - - - Provides binding and overload resolution to .NET methods. - - MethodBinder's can be used for: - generating new AST code for calling a method - calling a method via reflection at runtime - (not implemented) performing an abstract call - - MethodBinder's support default arguments, optional arguments, by-ref (in and out), and keyword arguments. - - Implementation Details: - - The MethodBinder works by building up a CandidateSet for each number of effective arguments that can be - passed to a set of overloads. For example a set of overloads such as: - foo(object a, object b, object c) - foo(int a, int b) - - would have 2 target sets - one for 3 parameters and one for 2 parameters. For parameter arrays - we fallback and create the appropriately sized CandidateSet on demand. - - Each CandidateSet consists of a set of MethodCandidate's. Each MethodCandidate knows the flattened - parameters that could be received. For example for a function such as: - foo(params int[] args) - - When this method is in a CandidateSet of size 3 the MethodCandidate takes 3 parameters - all of them - ints; if it's in a CandidateSet of size 4 it takes 4 parameters. Effectively a MethodCandidate is - a simplified view that allows all arguments to be treated as required positional arguments. - - Each MethodCandidate in turn refers to a MethodTarget. The MethodTarget is composed of a set - of ArgBuilder's and a ReturnBuilder which know how to consume the positional arguments and pass - them to the appropriate argument of the destination method. This includes routing keyword - arguments to the correct position, providing the default values for optional arguments, etc... - - After binding is finished the MethodCandidates are thrown away and a BindingTarget is returned. - The BindingTarget indicates whether the binding was successful and if not any additional information - that should be reported to the user about the failed binding. It also exposes the MethodTarget which - allows consumers to get the flattened list of required parameters for the call. MethodCandidates - are not exposed and are an internal implementation detail of the MethodBinder. - - - - - Resolves a method overload and returns back a BindingTarget. - - The BindingTarget can then be tested for the success or particular type of - failure that prevents the method from being called. If successfully bound the BindingTarget - contains a list of argument meta-objects with additional restrictions that ensure the selection - of the particular overload. - - - - - Checks to see if the language allows keyword arguments to be bound to instance fields or - properties and turned into sets. By default this is only allowed on contructors. - - - - - Gets an expression that evaluates to the result of GetByRefArray operation. - - - - - Called before arguments binding. - - - A bitmask that indicates (set bits) the parameters that were mapped by this method. - A default mapping will be constructed for the remaining parameters (cleared bits). - - - - - Return null if arguments cannot be constructed and overload resolution should produce an error. - - - - - Determines whether given overloads are overloaded on index-th parameter (the types of the index-th parameters are the same). - - - - - Selects the best (of two) candidates for conversion from actualType - - - - - Provides ordering for two parameter types if there is no conversion between the two parameter types. - - - - - The method is called each time an item of lazily splatted argument is needed. - - - - - Fast creation works if we have a known primitive types for the entire - method siganture. If we have any non-primitive types then FastCreate - falls back to SlowCreate which works for all types. - - Fast creation is fast because it avoids using reflection (MakeGenericType - and Activator.CreateInstance) to create the types. It does this through - calling a series of generic methods picking up each strong type of the - signature along the way. When it runs out of types it news up the - appropriate ReflectedCaller with the strong-types that have been built up. - - One relaxation is that for return types which are non-primitive types - we can fallback to object due to relaxed delegates. - - - - - Creates a new ReflectedCaller which can be used to quickly invoke the provided MethodInfo. - - - - - Gets the next type or null if no more types are available. - - - - - Uses reflection to create new instance of the appropriate ReflectedCaller - - - - - The builder for creating the LambdaExpression node. - - Since the nodes require that parameters and variables are created - before hand and then passed to the factories creating LambdaExpression - this builder keeps track of the different pieces and at the end creates - the LambdaExpression. - - TODO: This has some functionality related to CodeContext that should be - removed, in favor of languages handling their own local scopes - - - - - Creates a parameter on the lambda with a given name and type. - - Parameters maintain the order in which they are created, - however custom ordering is possible via direct access to - Parameters collection. - - - - - Creates a parameter on the lambda with a given name and type. - - Parameters maintain the order in which they are created, - however custom ordering is possible via direct access to - Parameters collection. - - - - - adds existing parameter to the lambda. - - Parameters maintain the order in which they are created, - however custom ordering is possible via direct access to - Parameters collection. - - - - - Creates a hidden parameter on the lambda with a given name and type. - - Parameters maintain the order in which they are created, - however custom ordering is possible via direct access to - Parameters collection. - - - - - Creates a params array argument on the labmda. - - The params array argument is added to the signature immediately. Before the lambda is - created, the builder validates that it is still the last (since the caller can modify - the order of parameters explicitly by maniuplating the parameter list) - - - - - Creates a local variable with specified name and type. - TODO: simplify by pushing logic into callers - - - - - Creates a local variable with specified name and type. - TODO: simplify by pushing logic into callers - - - - - Creates a temporary variable with specified name and type. - - - - - Adds the temporary variable to the list of variables maintained - by the builder. This is useful in cases where the variable is - created outside of the builder. - - - - - Creates the LambdaExpression from the builder. - After this operation, the builder can no longer be used to create other instances. - - Desired type of the lambda. - New LambdaExpression instance. - - - - Creates the LambdaExpression from the builder. - After this operation, the builder can no longer be used to create other instances. - - New LambdaExpression instance. - - - - Creates the generator LambdaExpression from the builder. - After this operation, the builder can no longer be used to create other instances. - - New LambdaExpression instance. - - - - Fixes up lambda body and parameters to match the signature of the given delegate if needed. - - - - - - Validates that the builder has enough information to create the lambda. - - - - - The name of the lambda. - Currently anonymous/unnamed lambdas are not allowed. - - - - - Return type of the lambda being created. - - - - - List of lambda's local variables for direct manipulation. - - - - - List of lambda's parameters for direct manipulation - - - - - The params array argument, if any. - - - - - The body of the lambda. This must be non-null. - - - - - The generated lambda should have dictionary of locals - instead of allocating them directly on the CLR stack. - - - - - The scope is visible (default). Invisible if false. - - - - - This class implements an event sink for a particular RCW. - Unlike the implementation of events in TlbImp'd assemblies, - we will create only one event sink per RCW (theoretically RCW might have - several ComEventSink evenk sinks - but all these implement different source intefaces). - Each ComEventSink contains a list of ComEventSinkMethod objects - which represent - a single method on the source interface an a multicast delegate to redirect - the calls. Notice that we are chaining multicast delegates so that same - ComEventSinkMedhod can invoke multiple event handlers). - - ComEventSink implements an IDisposable pattern to Unadvise from the connection point. - Typically, when RCW is finalized the corresponding Dispose will be triggered by - ComEventSinksContainer finalizer. Notice that lifetime of ComEventSinksContainer - is bound to the lifetime of the RCW. - - - - - Contains a methods DISPID (in a string formatted of "[DISPID=N]" - and a chained list of delegates to invoke - - - - - The way in which a module has changed : Set or Delete - - - - - A new value has been set in the module (or a previous value has changed). - - - - - A value has been removed from the module. - - - - - TODO: Alternatively, it should be sufficient to remember indices for this, list, dict and block. - - - - - Sets the value at the given index for a tuple of the given size. This set supports - walking through nested tuples to get the correct final index. - - - - - Gets the value at the given index for a tuple of the given size. This get - supports walking through nested tuples to get the correct final index. - - - - - Gets the unbound generic Tuple type which has at lease size slots or null if a large enough tuple is not available. - - - - - Creates a generic tuple with the specified types. - - If the number of slots fits within the maximum tuple size then we simply - create a single tuple. If it's greater then we create nested tuples - (e.g. a Tuple`2 which contains a Tuple`128 and a Tuple`8 if we had a size of 136). - - - - - Gets the number of usable slots in the provided Tuple type including slots available in nested tuples. - - - - - Creates a new instance of tupleType with the specified args. If the tuple is a nested - tuple the values are added in their nested forms. - - - - - Gets the values from a tuple including unpacking nested values. - - - - - Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. - - - - - Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. - - - - - Provides an expression for creating a tuple with the specified values. - - - - - Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. - - Dividend. - Divisor. - The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). - is 0. - The caller must check for overflow (x = Int32.MinValue, y = -1) - - - - Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. - - Dividend. - Divisor. - The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). - is 0. - The caller must check for overflow (x = Int64.MinValue, y = -1) - - - - Calculates the remainder of floor division of two 32-bit signed integers. - - Dividend. - Divisor. - The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. - is 0. - - - - Calculates the remainder of floor division of two 32-bit signed integers. - - Dividend. - Divisor. - The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. - is 0. - - - - Behaves like Math.Round(value, MidpointRounding.AwayFromZero) - Needed because CoreCLR doesn't support this particular overload of Math.Round - - - - - Behaves like Math.Round(value, precision, MidpointRounding.AwayFromZero) - However, it works correctly on negative precisions and cases where precision is - outside of the [-15, 15] range. - - (This function is also needed because CoreCLR lacks this overload.) - - - - - List optimized for few writes and multiple reads. It provides thread-safe read and write access. - Iteration is not thread-safe by default, but GetCopyForRead allows for iteration - without taking a lock. - - - - - Gets a copy of the contents of the list. The copy will not change even if the original - CopyOnWriteList object is modified. This method should be used to iterate the list in - a thread-safe way if no lock is taken. Iterating on the original list is not guaranteed - to be thread-safe. - - The returned copy should not be modified by the caller. - - - - A useful interface for taking slices of numeric arrays, inspired by Python's Slice objects. - - - - - The starting index of the slice or null if no first index defined - - - - - The ending index of the slice or null if no ending index defined - - - - - The length of step to take - - - - - Gets custom data to be serialized when saving script codes to disk. - - Indicates that a DynamicMetaObject might be convertible to a CLR type. - + - Represents the type of a null value. + A binder which can combine multiple binders into a single dynamic site. The creator + of this needs to perform the mapping of parameters, constants, and sub-site expressions + and provide a List of BinderMappingInfo representing this data. From there the ComboBinder + just processes the list to create the resulting code. - + - Private constructor is never called since 'null' is the only valid instance. + Provides a mapping for inputs of combo action expressions. The input can map + to either an input of the new dynamic site, an input of a previous DynamicExpression, + or a ConstantExpression which has been pulled out of the dynamic site arguments. - + - A stack of variables that are defined in nested scopes. We search - this first when resolving a variable in case a nested scope shadows - one of our variable instances. + Contains the mapping information for a single Combo Binder. This includes the original + meta-binder and the mapping of parameters, sub-sites, and constants into the binding. @@ -4886,9 +4526,194 @@ The IPC channel that the remote console expects to use to communicate with the ScriptEngine A intialized ScriptScope that is ready to start processing script commands - + - Provides a StreamContentProvider for a stream of content backed by a file on disk. + This class implements an event sink for a particular RCW. + Unlike the implementation of events in TlbImp'd assemblies, + we will create only one event sink per RCW (theoretically RCW might have + several ComEventSink evenk sinks - but all these implement different source intefaces). + Each ComEventSink contains a list of ComEventSinkMethod objects - which represent + a single method on the source interface an a multicast delegate to redirect + the calls. Notice that we are chaining multicast delegates so that same + ComEventSinkMedhod can invoke multiple event handlers). + + ComEventSink implements an IDisposable pattern to Unadvise from the connection point. + Typically, when RCW is finalized the corresponding Dispose will be triggered by + ComEventSinksContainer finalizer. Notice that lifetime of ComEventSinksContainer + is bound to the lifetime of the RCW. + + + + + Contains a methods DISPID (in a string formatted of "[DISPID=N]" + and a chained list of delegates to invoke + + + + + Creates an open delegate for the given (dynamic)method. + + + + + Creates a closed delegate for the given (dynamic)method. + + + + + Like Type.GetInterfaces, but only returns the interfaces implemented by this type + and not its parents. + + + + + Gets a Func of CallSite, object * paramCnt, object delegate type + that's suitable for use in a non-strongly typed call site. + + + + + A NullTextContentProvider to be provided when we have a pre-compiled ScriptCode which doesn't + have source code associated with it. + + + + + Similar to Dictionary[TKey,TValue], but it also ensures that the keys will not be kept alive + if the only reference is from this collection. The value will be kept alive as long as the key + is alive. + + This currently has a limitation that the caller is responsible for ensuring that an object used as + a key is not also used as a value in *any* instance of a WeakHash. Otherwise, it will result in the + object being kept alive forever. This effectively means that the owner of the WeakHash should be the + only one who has access to the object used as a value. + + Currently, there is also no guarantee of how long the values will be kept alive even after the keys + get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection + by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). + + + + + Check if any of the keys have gotten collected + + Currently, there is also no guarantee of how long the values will be kept alive even after the keys + get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection + by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). + + + + + A simple hashset, built on Dictionary{K, V} + + + + + Fast creation works if we have a known primitive types for the entire + method siganture. If we have any non-primitive types then FastCreate + falls back to SlowCreate which works for all types. + + Fast creation is fast because it avoids using reflection (MakeGenericType + and Activator.CreateInstance) to create the types. It does this through + calling a series of generic methods picking up each strong type of the + signature along the way. When it runs out of types it news up the + appropriate ReflectedCaller with the strong-types that have been built up. + + One relaxation is that for return types which are non-primitive types + we can fallback to object due to relaxed delegates. + + + + + Creates a new ReflectedCaller which can be used to quickly invoke the provided MethodInfo. + + + + + Gets the next type or null if no more types are available. + + + + + Uses reflection to create new instance of the appropriate ReflectedCaller + + + + + Specifies the action for which the default binder is requesting a member. + + + + + Wraps the provided enumerable into a ReadOnlyCollection{T} + + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. + + + + + OperatorInfo provides a mapping from DLR ExpressionType to their associated .NET methods. + + + + + Given an operator returns the OperatorInfo associated with the operator or null + + + + + The operator the OperatorInfo provides info for. + + + + + The primary method name associated with the method. This method name is + usally in the form of op_Operator (e.g. op_Addition). + + + + + The secondary method name associated with the method. This method name is + usually a standard .NET method name with pascal casing (e.g. Add). + + + + + Provides notification that the LightLambda has been compiled. + + + + + Variant is the basic COM type for late-binding. It can contain any other COM data type. + This type definition precisely matches the unmanaged data layout so that the struct can be passed + to and from COM calls. + + + + + Primitive types are the basic COM types. It includes valuetypes like ints, but also reference types + like BStrs. It does not include composite types like arrays and user-defined COM types (IUnknown/IDispatch). + + + + + Get the managed object representing the Variant. + + + + + + Release any unmanaged memory associated with the Variant + + + + + + ComEventSinksContainer is just a regular list with a finalizer. + This list is usually attached as a custom data for RCW object and + is finalized whenever RCW is finalized. @@ -4896,122 +4721,273 @@ Presents a flat enumerable view of multiple dictionaries + + + Converts a generic ICollection of T into an array of T. + + If the collection is already an array of T the original collection is returned. + + + + + Singleton instance returned from an operator method when the operator method cannot provide a value. + + + + + Gets the stub list for a COM Object. For COM objects we store the stub list + directly on the object using the Marshal APIs. This allows us to not have + any circular references to deal with via weak references which are challenging + in the face of COM. + + + + + Doesn't need to check PrivateBinding setting: no method that is part of the event is public the entire event is private. + If the code has already a reference to the event tracker instance for a private event its "static-ness" is not influenced + by private-binding setting. + + + + + Holds on a list of delegates hooked to the event. + We need the list because we cannot enumerate the delegates hooked to CLR event and we need to do so in + handler removal (we need to do custom delegate comparison there). If BCL enables the enumeration we could remove this. + + + + + Storage for the handlers - a key value pair of the callable object and the delegate handler. + + + + + Storage for the handlers - a key value pair of the callable object and the delegate handler. + + The delegate handler is closed over the callable object. Therefore as long as the object is alive the + delegate will stay alive and so will the callable object. That means it's fine to have a weak reference + to both of these objects. + + + + + Dictionary[TKey, TValue] is not thread-safe in the face of concurrent reads and writes. SynchronizedDictionary + provides a thread-safe implementation. It holds onto a Dictionary[TKey, TValue] instead of inheriting from + it so that users who need to do manual synchronization can access the underlying Dictionary[TKey, TValue]. + + + + + This returns the raw unsynchronized Dictionary[TKey, TValue]. Users are responsible for locking + on it before accessing it. Also, it should not be arbitrarily handed out to other code since deadlocks + can be caused if other code incorrectly locks on it. + + + + + List optimized for few writes and multiple reads. It provides thread-safe read and write access. + Iteration is not thread-safe by default, but GetCopyForRead allows for iteration + without taking a lock. + + + + + Gets a copy of the contents of the list. The copy will not change even if the original + CopyOnWriteList object is modified. This method should be used to iterate the list in + a thread-safe way if no lock is taken. Iterating on the original list is not guaranteed + to be thread-safe. + + The returned copy should not be modified by the caller. + + + + Helper class to remove methods w/ identical signatures. Used for GetDefaultMembers + which returns members from all types in the hierarchy. + + + + + This class is useful for quickly collecting performance counts for expensive + operations. Usually this means operations involving either reflection or + code gen. Long-term we need to see if this can be plugged better into the + standard performance counter architecture. + + + + + temporary categories for quick investigation, use a custom key if you + need to track multiple items, and if you want to keep it then create + a new Categories entry and rename all your temporary entries. + + + + + Represents the type of a null value. + + + + + Private constructor is never called since 'null' is the only valid instance. + + + + + True if there are restrictions beyond just simple type restrictions + + Indicates an extension method should be added as a static method, not a instance method. - + - Encapsulates information about the result that should be produced when - a OldDynamicAction cannot be performed. The ErrorInfo can hold one of: - an expression which creates an Exception to be thrown - an expression which produces a value which should be returned - directly to the user and represents an error has occured (for - example undefined in JavaScript) - an expression which produces a value which should be returned - directly to the user but does not actually represent an error. + Represents an ops-extension method which is used to implement a property. + + + + + Represents an ops-extension method which is added as an operator. - ErrorInfo's are produced by an ActionBinder in response to a failed - binding. + The name must be a well-formed name such as "Add" that matches the CLS + naming conventions for adding overloads associated with op_* methods. - + - Private constructor - consumers must use static From* factories - to create ErrorInfo objects. + Event args for when a ScriptScope has had its contents changed. - + - Creates a new ErrorInfo which represents an exception that should - be thrown. + Creates a new ModuleChangeEventArgs object with the specified name and type. - + - Creates a new ErrorInfo which represents a value which should be - returned to the user. + Creates a nwe ModuleChangeEventArgs with the specified name, type, and changed value. - + - Crates a new ErrorInfo which represents a value which should be returned - to the user but does not represent an error. - - - - - - - The ErrorInfo expression produces an exception + Gets the name of the symbol that has changed. - + - The ErrorInfo expression produces a value which represents the error (e.g. undefined) + Gets the way in which the symbol has changed: Set or Delete. - + - The ErrorInfo expression produces a value which is not an error + The the symbol has been set provides the new value. - + + + Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, + otherwise, returns self.LimitType + + + + + Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, + otherwise, returns self.RuntimeType + + + - If a managed user type (as opposed to a primitive type or a COM object) is passed as an argument to a COM call, we need - to determine the VarEnum type we will marshal it as. We have the following options: - 1. Raise an exception. Languages with their own version of primitive types would not be able to call - COM methods using the language's types (for eg. strings in IronRuby are not System.String). An explicit - cast would be needed. - 2. We could marshal it as VT_DISPATCH. Then COM code will be able to access all the APIs in a late-bound manner, - but old COM components will probably malfunction if they expect a primitive type. - 3. We could guess which primitive type is the closest match. This will make COM components be as easily - accessible as .NET methods. - 4. We could use the type library to check what the expected type is. However, the type library may not be available. + Manages creation of interpreted delegates. These delegates will get + compiled if they are executed often enough. + + + + + Used by LightLambda to get the compiled delegate. + + + + + Create a compiled delegate for the LightLambda, and saves it so + future calls to Run will execute the compiled code instead of + interpreting. + + + + + Updates the execution count of this light delegate. If a certain + threshold is reached, it will start a background compilation. + + + + + true if the compiled delegate has the same type as the lambda; + false if the type was changed for interpretation. + + + + + We don't need to insert code to track lines in adaptive mode as the + interpreter does that for us. TODO: improve the adaptive compiler so we + don't need to do this, and can just remove line tracking from languages + + + + + An argument that the user wants to explicitly pass by-reference (with copy-in copy-out semantics). + The user passes a StrongBox[T] object whose value will get updated when the call returns. + + + + + Narrowing conversions are conversions that cannot be proved to always succeed, conversions that are + known to possibly lose information, and conversions across domains of types sufficiently different + to merit narrowing notation like casts. - VarEnumSelector implements option # 3 + Its upto every language to define the levels for conversions. The narrowling levels can be used by + for method overload resolution, where the overload is based on the parameter types (and not the number + of parameters). - + - Gets the managed type that an object needs to be coverted to in order for it to be able - to be represented as a Variant. - - In general, there is a many-to-many mapping between Type and VarEnum. However, this method - returns a simple mapping that is needed for the current implementation. The reason for the - many-to-many relation is: - 1. Int32 maps to VT_I4 as well as VT_ERROR, and Decimal maps to VT_DECIMAL and VT_CY. However, - this changes if you throw the wrapper types into the mix. - 2. There is no Type to represent COM types. __ComObject is a private type, and Object is too - general. + Conversions at this level do not do any narrowing. Typically, this will include + implicit numeric conversions, Type.IsAssignableFrom, StringBuilder to string, etc. - + - Creates a family of COM types such that within each family, there is a completely non-lossy - conversion from a type to an earlier type in the family. + Language defined prefered narrowing conversion. First level that introduces narrowing + conversions. - + - Get the (one representative type for each) primitive type families that the argument can be converted to + Language defined preferred narrowing conversion. Second level that introduces narrowing + conversions and should have more conversions than One. - + - If there is more than one type family that the argument can be converted to, we will throw a - AmbiguousMatchException instead of randomly picking a winner. + Language defined preferred narrowing conversion. Third level that introduces narrowing + conversions and should have more conversions that Two. - + - Is there a unique primitive type that has the best conversion for the argument + A somewhat meaningful conversion is possible, but it will quite likely be lossy. + For eg. BigInteger to an Int32, Boolean to Int32, one-char string to a char, + larger number type to a smaller numeric type (where there is no overflow), etc - + - Get the COM Variant type that argument should be marshaled as for a call to COM + ArgBuilder which provides a default parameter value for a method call. + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. @@ -5077,72 +5053,365 @@ Requires the enumerable collection and all its items to be non-null. - + - Represents an ops-extension method which is used to implement a property. + Provides fast strongly typed thread local storage. This is significantly faster than + Thread.GetData/SetData. - + - Singleton instance returned from an operator method when the operator method cannot provide a value. + True if the caller will guarantee that all cleanup happens as the thread + unwinds. + + This is typically used in a case where the thread local is surrounded by + a try/finally block. The try block pushes some state, the finally block + restores the previous state. Therefore when the thread exits the thread + local is back to it's original state. This allows the ThreadLocal object + to not check the current owning thread on retrieval. - - Specifies that the member is a constructor, representing a ConstructorTracker - - - Specifies that the member is an event, representing a EventTracker - - - Specifies that the member is a field, representing a FieldTracker - - - Specifies that the member is a method, representing a MethodTracker - - - Specifies that the member is a property, representing a PropertyTracker - - - Specifies that the member is a property, representing a TypeTracker - - - Specifies that the member is a namespace, representing a NamespaceTracker - - - Specifies that the member is a group of method overloads, representing a MethodGroup - - - Specifies that the member is a group of types that very by arity, representing a TypeGroup - - - Specifies that the member is a custom meber, represetning a CustomTracker - - - Specifies that the member is a bound to an instance, representing a BoundMemberTracker - - + - Represents an array that has value equality. + Gets the current value if its not == null or calls the provided function + to create a new value. - + - Returns the list of expressions represented by the instances. + Calls the provided update function with the current value and + replaces the current value with the result of the function. - An array of instances to extract expressions from. - The array of expressions. - + - Creates an instance of for a runtime value and the expression that represents it during the binding process. + Replaces the current value with a new one and returns the old value. - The runtime value to be represented by the . - An expression to represent this during the binding process. - The new instance of . - + - Implementation of the complex number data type. + Gets the StorageInfo for the current thread. + + + + + Called when the fast path storage lookup fails. if we encountered the Empty storage + during the initial fast check then spin until we hit non-empty storage and try the fast + path again. + + + + + Creates the StorageInfo for the thread when one isn't already present. + + + + + Gets or sets the value for the current thread. + + + + + Helper class for storing the value. We need to track if a ManagedThreadId + has been re-used so we also store the thread which owns the value. + + + + + Used as the key for the LanguageContext.GetDelegate method caching system + + + + + Helper methods that calls are generated to from the default DLR binders. + + + + + Helper function to combine an object array with a sequence of additional parameters that has been splatted for a function call. + + + + + EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR + This method is to get to the property without using Reflection + + + + + + + Represents a SymbolId constant + This node is reducible, and also rewritten by GlobalOptimizedRewriter + + TODO: this node exists so GlobalOptimizedRewriter can recognize and + rewrite a strongly typed node. Once that functionality is gone it + should go away. + When this type goes away, change the return type of + Microsoft.Scripting.Ast.Utils.Constant(object) from Expression to ConstantExpression. + + + + + A stack of variables that are defined in nested scopes. We search + this first when resolving a variable in case a nested scope shadows + one of our variable instances. + + + + + This is similar to ComTypes.EXCEPINFO, but lets us do our own custom marshaling + + + + + The parameter description of a method defined in a type library + + + + + Creates a representation for the paramter of a COM method + + + + + Creates a representation for the return value of a COM method + TODO: Return values should be represented by a different type + + + + + DBNull.Value if there is no default value + + + + + Provides helper methods to bind COM objects dynamically. + + + + + Determines if an object is a COM object. + + The object to test. + true if the object is a COM object, false otherwise. + + + + Tries to perform binding of the dynamic get member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if member evaluation may be delayed. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic get member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic set member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The representing the value for the set member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic invoke operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic invoke member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic get index operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic set index operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The representing the value for the set index operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic Convert operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Gets the member names associated with the object. + This function can operate only with objects for which returns true. + + The object for which member names are requested. + The collection of member names. + + + + Gets the member names of the data-like members associated with the object. + This function can operate only with objects for which returns true. + + The object for which member names are requested. + The collection of member names. + + + + Gets the data-like members and associated data for an object. + This function can operate only with objects for which returns true. + + The object for which data members are requested. + The enumeration of names of data members for which to retrieve values. + The collection of pairs that represent data member's names and their data. + + + + Special binder that indicates special semantics for COM GetMember operation. + + + + + The number of actual arguments consumed by this builder. + + + + + Default value, their was no CallFailure. + + + + + One of more parameters failed to be converted + + + + + One or more keyword arguments could not be successfully assigned to a positional argument + + + + + One or more keyword arguments were duplicated or would have taken the spot of a + provided positional argument. + + + + + Type arguments could not be inferred + + + + + Provides a mechanism for providing documentation stored in an assembly as metadata. + + Applying this attribute will enable documentation to be provided to the user at run-time + even if XML Docuementation files are unavailable. + + + + + An attribute that is applied to saved ScriptCode's to be used to re-create the ScriptCode + from disk. + + + + + Gets names stored in optimized scope. + + + + + Returns a numerical code of the size of a type. All types get both a horizontal + and vertical code. Types that are lower in both dimensions have implicit conversions + to types that are higher in both dimensions. + + + + + Thread safe dictionary that allows lazy-creation where readers will block for + the creation of the lazily created value. Call GetOrCreateValue w/ a key + and a callback function. If the value exists it is returned, if not the create + callback is called (w/o any locks held). The create call back will only be called + once for each key. + + + + + Helper class which stores the published value + + + + + Given an ID returns the object associated with that ID. + + + + + Gets a unique ID for an object + + + + + Goes over the hashtable and removes empty entries + + + + + Weak-ref wrapper caches the weak reference, our hash code, and the object ID. + + + + + WrapperComparer treats Wrapper as transparent envelope + + + + + Implements explicit casts supported by the runtime. + + + Implements explicit casts supported by the runtime. + + + + + Explicitly casts the object to a given type (and returns it as object) @@ -5226,34 +5495,167 @@ Beginning position of the cursor - left coordinate. - + - ScriptCode is an instance of compiled code that is bound to a specific LanguageContext - but not a specific ScriptScope. The code can be re-executed multiple times in different - scopes. Hosting API counterpart for this class is CompiledCode. + Directory where snippet assembly will be saved if SaveSnippets is set. - + - This takes an assembly name including extension and saves the provided ScriptCode objects into the assembly. - - The provided script codes can constitute code from multiple languages. The assemblyName can be either a fully qualified - or a relative path. The DLR will simply save the assembly to the desired location. The assembly is created by the DLR and - if a file already exists than an exception is raised. - - The DLR determines the internal format of the ScriptCode and the DLR can feel free to rev this as appropriate. + Save snippets to an assembly (see also SnippetsDirectory, SnippetsFileName). - + - This will take an assembly object which the user has loaded and return a new set of ScriptCode�s which have - been loaded into the provided ScriptDomainManager. + Represents either a YieldBreak or YieldReturn in a GeneratorExpression + If Value is non-null, it's a YieldReturn; otherwise it's a YieldBreak + and executing it will stop enumeration of the generator, causing + MoveNext to return false. + + + + + The value yieled from this expression, if it is a yield return + + + + + The label used to yield from this generator + + + + + arbitrary precision integers + + + + + Create a BigInteger from a little-endian twos-complement byte array + (inverse of ToByteArray()) + + + + + Return the magnitude of this BigInteger as an array of zero or more uints. + Element zero is the value of the least significant four bytes, element one is + the value of the four next most significant bytes, etc. - If the language associated with the ScriptCode�s has not already been loaded the DLR will load the - LanguageContext into the ScriptDomainManager based upon the saved LanguageContext type. + The returned data is the unsigned magnitude of the number. To determine the sign, + use GetSign(). - If the LanguageContext or the version of the DLR the language was compiled against is unavailable a - TypeLoadException will be raised unless policy has been applied by the administrator to redirect bindings. + It is guaranteed that the highest element of the returned array is never zero. + This means that if the value of this BigInteger is zero, a zero-length array + is returned. + + + + + Do an in-place twos complement of d and also return the result. + + + + + Calculates the natural logarithm of the BigInteger. + + + + + Calculates log base 10 of a BigInteger. + + + + + Return the value of this BigInteger as a little-endian twos-complement + byte array, using the fewest number of bytes possible. If the value is zero, + return an array of one byte whose element is 0x00. + + + + + Return the sign of this BigInteger: -1, 0, or 1. + + + + + This instruction implements a goto expression that can jump out of any expression. + It pops values (arguments) from the evaluation stack that the expression tree nodes in between + the goto expression and the target label node pushed and not consumed yet. + A goto expression can jump into a node that evaluates arguments only if it carries + a value and jumps right after the first argument (the carried value will be used as the first argument). + Goto can jump into an arbitrary child of a BlockExpression since the block doesn�t accumulate values + on evaluation stack as its child expressions are being evaluated. + + Goto needs to execute any finally blocks on the way to the target label. + + { + f(1, 2, try { g(3, 4, try { goto L } finally { ... }, 6) } finally { ... }, 7, 8) + L: ... + } + + The goto expression here jumps to label L while having 4 items on evaluation stack (1, 2, 3 and 4). + The jump needs to execute both finally blocks, the first one on stack level 4 the + second one on stack level 2. So, it needs to jump the first finally block, pop 2 items from the stack, + run second finally block and pop another 2 items from the stack and set instruction pointer to label L. + + Goto also needs to rethrow ThreadAbortException iff it jumps out of a catch handler and + the current thread is in "abort requested" state. + + + + + If a managed user type (as opposed to a primitive type or a COM object) is passed as an argument to a COM call, we need + to determine the VarEnum type we will marshal it as. We have the following options: + 1. Raise an exception. Languages with their own version of primitive types would not be able to call + COM methods using the language's types (for eg. strings in IronRuby are not System.String). An explicit + cast would be needed. + 2. We could marshal it as VT_DISPATCH. Then COM code will be able to access all the APIs in a late-bound manner, + but old COM components will probably malfunction if they expect a primitive type. + 3. We could guess which primitive type is the closest match. This will make COM components be as easily + accessible as .NET methods. + 4. We could use the type library to check what the expected type is. However, the type library may not be available. + + VarEnumSelector implements option # 3 + + + + + Gets the managed type that an object needs to be coverted to in order for it to be able + to be represented as a Variant. + + In general, there is a many-to-many mapping between Type and VarEnum. However, this method + returns a simple mapping that is needed for the current implementation. The reason for the + many-to-many relation is: + 1. Int32 maps to VT_I4 as well as VT_ERROR, and Decimal maps to VT_DECIMAL and VT_CY. However, + this changes if you throw the wrapper types into the mix. + 2. There is no Type to represent COM types. __ComObject is a private type, and Object is too + general. + + + + + Creates a family of COM types such that within each family, there is a completely non-lossy + conversion from a type to an earlier type in the family. + + + + + Get the (one representative type for each) primitive type families that the argument can be converted to + + + + + If there is more than one type family that the argument can be converted to, we will throw a + AmbiguousMatchException instead of randomly picking a winner. + + + + + Is there a unique primitive type that has the best conversion for the argument + + + + + Get the COM Variant type that argument should be marshaled as for a call to COM @@ -5279,11 +5681,51 @@ The handler to be removed. The original event with handler removed. - + - We don't need to insert code to track lines in adaptive mode as the - interpreter does that for us. TODO: improve the adaptive compiler so we - don't need to do this, and can just remove line tracking from languages + The purpose of this rewriter is simple: ETs do not allow jumps (break, continue, return, goto) + that would go through a finally/fault. So we replace them with code that instead stores a flag, + and then jumps to the end of the finally/fault. At the end of the try-finally, we emit a switch + that then jumps to the correct label. + + A few things that make this more complicated: + + 1. If a finally contains a jump out, then jumps in the try/catch need to be replaced as well. + It's to support cases like this: + # returns 234 + def foo(): + try: return 123 + finally: return 234 + + We need to replace the "return 123" because after it jumps, we'll go to the finally, which + might decide to jump again, but once the IL finally exits, it ignores the finally jump and + keeps going with the original jump. The moral of the story is: if any jumps in finally are + rewritten, try/catch jumps must be also. + + 2. To generate better code, we only have one state variable, so if we have to jump out of + multiple finallys we just keep jumping. It looks sort of like this: + foo: + try { ... } finally { + try { ... } finally { + ... + if (...) { + // was: goto foo; + $flow = 1; goto endInnerFinally; + } + ... + endInnerFinally: + } + switch ($flow) { + case 1: goto endOuterFinally; + } + ... + endOuterFinally: + } + switch ($flow) { + case 1: $flow = 0; goto foo; + } + ... + @@ -5431,482 +5873,40 @@ type. - - - Builds the parameter for a params dictionary argument - this collects all the extra name/value - pairs provided to the function into a SymbolDictionary which is passed to the function. - - - - - ArgBuilder which provides a default parameter value for a method call. - - - - - Given an ID returns the object associated with that ID. - - - - - Gets a unique ID for an object - - - - - Goes over the hashtable and removes empty entries - - - - - Weak-ref wrapper caches the weak reference, our hash code, and the object ID. - - - - - WrapperComparer treats Wrapper as transparent envelope - - - - - Helper class to remove methods w/ identical signatures. Used for GetDefaultMembers - which returns members from all types in the hierarchy. - - - - - Directory where snippet assembly will be saved if SaveSnippets is set. - - - - - Save snippets to an assembly (see also SnippetsDirectory, SnippetsFileName). - - - - - Represents either a YieldBreak or YieldReturn in a GeneratorExpression - If Value is non-null, it's a YieldReturn; otherwise it's a YieldBreak - and executing it will stop enumeration of the generator, causing - MoveNext to return false. - - - - - The value yieled from this expression, if it is a yield return - - - - - The label used to yield from this generator - - - - - Provides notification that the LightLambda has been compiled. - - - - - Customize the CommandLine for remote scenarios - - - - - CommandDispatcher to ensure synchronize output from the remote runtime - - - + - Supports detecting the remote runtime being killed, and starting up a new one. - - Threading model: - - ConsoleRestartManager creates a separate thread on which to create and execute the consoles. - There are usually atleast three threads involved: - - 1. Main app thread: Instantiates ConsoleRestartManager and accesses its APIs. This thread has to stay - responsive to user input and so the ConsoleRestartManager APIs cannot be long-running or blocking. - Since the remote runtime process can terminate asynchronously, the current RemoteConsoleHost can - change at any time (if auto-restart is enabled). The app should typically not care which instance of - RemoteConsoleHost is currently being used. The flowchart of this thread is: - Create ConsoleRestartManager - ConsoleRestartManager.Start - Loop: - Respond to user input | Send user input to console for execution | BreakExecution | RestartConsole | GetMemberNames - ConsoleRestartManager.Terminate - TODO: Currently, BreakExecution and GetMemberNames are called by the main thread synchronously. - Since they execute code in the remote runtime, they could take arbitrarily long. We should change - this so that the main app thread can never be blocked indefinitely. + MethodCandidate represents the different possible ways of calling a method or a set of method overloads. + A single method can result in multiple MethodCandidates. Some reasons include: + - Every optional parameter or parameter with a default value will result in a candidate + - The presence of ref and out parameters will add a candidate for languages which want to return the updated values as return values. + - ArgumentKind.List and ArgumentKind.Dictionary can result in a new candidate per invocation since the list might be different every time. - 2. Console thread: Dedicated thread for creating RemoteConsoleHosts and executing code (which could - take a long time or block indefinitely). - Wait for ConsoleRestartManager.Start to be called - Loop: - Create RemoteConsoleHost - Wait for signal for: - Execute code | RestartConsole | Process.Exited - - 3. CompletionPort async callbacks: - Process.Exited | Process.OutputDataReceived | Process.ErrorDataReceived - - 4. Finalizer thred - Some objects may have a Finalize method (which possibly calls Dispose). Not many (if any) types - should have a Finalize method. - + Each MethodCandidate represents the parameter type for the candidate using ParameterWrapper. - + - Accessing _remoteConsoleHost from a thread other than console thread can result in race. - If _remoteConsoleHost is accessed while holding _accessLock, it is guaranteed to be - null or non-disposed. - - - - - This is created on the "creating thread", and goes on standby. Start needs to be called for activation. - - A host might want one of two behaviors: - 1. Keep the REPL loop alive indefinitely, even when a specific instance of the RemoteConsoleHost terminates normally - 2. Close the REPL loop when an instance of the RemoteConsoleHost terminates normally, and restart the loop - only if the instance terminates abnormally. - - - - Needs to be called for activation. - - - - - Request (from another thread) the console REPL loop to terminate - - - - - ComEventSinksContainer is just a regular list with a finalizer. - This list is usually attached as a custom data for RCW object and - is finalized whenever RCW is finalized. - - - - - True if there are restrictions beyond just simple type restrictions - - - - - Default value, their was no CallFailure. - - - - - One of more parameters failed to be converted - - - - - One or more keyword arguments could not be successfully assigned to a positional argument - - - - - One or more keyword arguments were duplicated or would have taken the spot of a - provided positional argument. - - - - - Type arguments could not be inferred - - - - - Simple class for tracking a list of items and enumerating over them. - The items are stored in weak references; if the objects are collected, - they will not be seen when enumerating. - - The type of the collection element. - - - - Provides a dictionary-like object used for caches which holds onto a maximum - number of elements specified at construction time. + Builds a new MethodCandidate which takes count arguments and the provided list of keyword arguments. - This class is not thread safe. + The basic idea here is to figure out which parameters map to params or a dictionary params and + fill in those spots w/ extra ParameterWrapper's. - + - Creates a dictionary-like object used for caches. - - The maximum number of elements to store. - - - - Tries to get the value associated with 'key', returning true if it's found and - false if it's not present. + Represents information about a failure to convert an argument from one + type to another. - + - Adds a new element to the cache, replacing and moving it to the front if the - element is already present. + Value of the argument or null if it is not available. - + - Returns the value associated with the given key, or throws KeyNotFoundException - if the key is not present. - - - - - This allows the RemoteConsoleHost to abort a long-running operation. The RemoteConsoleHost itself - does not know which ThreadPool thread might be processing the remote call, and so it needs - cooperation from the remote runtime server. - - - - - Since OnOutputDataReceived is sent async, it can arrive late. The remote console - cannot know if all output from the current command has been received. So - RemoteCommandDispatcher writes out a marker to indicate the end of the output - - - - - Aborts the current active call to Execute by doing Thread.Abort - - true if a Thread.Abort was actually called. false if there is no active call to Execute - - - - Look for typeinfo using IDispatch.GetTypeInfo - - - - Some COM objects just dont expose typeinfo. In these cases, this method will return null. - Some COM objects do intend to expose typeinfo, but may not be able to do so if the type-library is not properly - registered. This will be considered as acceptable or as an error condition depending on throwIfMissingExpectedTypeInfo - - - - - This method should be called when typeinfo is not available for an object. The function - will check if the typeinfo is expected to be missing. This can include error cases where - the same error is guaranteed to happen all the time, on all machines, under all circumstances. - In such cases, we just have to operate without the typeinfo. - - However, if accessing the typeinfo is failing in a transient way, we might want to throw - an exception so that we will eagerly predictably indicate the problem. - - - - - This class contains methods that either cannot be expressed in C#, or which require writing unsafe code. - Callers of these methods need to use them extremely carefully as incorrect use could cause GC-holes - and other problems. - - - - - - Ensure that "value" is a local variable in some caller's frame. So converting - the byref to an IntPtr is a safe operation. Alternatively, we could also allow - allowed "value" to be a pinned object. - - - - - We will emit an indirect call to an unmanaged function pointer from the vtable of the given interface pointer. - This approach can take only ~300 instructions on x86 compared with ~900 for Marshal.Release. We are relying on - the JIT-compiler to do pinvoke-stub-inlining and calling the pinvoke target directly. - - - - - We will emit an indirect call to an unmanaged function pointer from the vtable of the given IDispatch interface pointer. - It is not possible to express this in C#. Using an indirect pinvoke call allows us to do our own marshalling. - We can allocate the Variant arguments cheaply on the stack. We are relying on the JIT-compiler to do - pinvoke-stub-inlining and calling the pinvoke target directly. - The alternative of calling via a managed interface declaration of IDispatch would have a performance - penalty of going through a CLR stub that would have to re-push the arguments on the stack, etc. - Marshal.GetDelegateForFunctionPointer could be used here, but its too expensive (~2000 instructions on x86). - - - - - The parameter description of a method defined in a type library - - - - - Creates a representation for the paramter of a COM method - - - - - Creates a representation for the return value of a COM method - TODO: Return values should be represented by a different type - - - - - DBNull.Value if there is no default value - - - - - Returns true if the method should not be displayed in the stack frame. - - - - - Determines the result of a conversion action. The result can either result in an exception, a value that - has been successfully converted or default(T), or a true/false result indicating if the value can be converted. - - - - - Attempts to perform available implicit conversions and throws if there are no available conversions. - - - - - Attempst to perform available implicit and explicit conversions and throws if there are no available conversions. - - - - - Attempts to perform available implicit conversions and returns default(ReturnType) if no conversions can be performed. - - If the return type of the rule is a value type then the return value will be zero-initialized. If the return type - of the rule is object or another class then the return type will be null (even if the conversion is to a value type). - This enables ImplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between - null and a real value can be distinguished). - - - - - Attempts to perform available implicit and explicit conversions and returns default(ReturnType) if no conversions - can be performed. - - If the return type of the rule is a value type then the return value will be zero-initialized. If the return type - of the rule is object or another class then the return type will be null (even if the conversion is to a value type). - This enables ExplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between - null and a real value can be distinguished). - - - - - Encapsulates the result of an attempt to bind to one or methods using the OverloadResolver. - - Users should first check the Result property to see if the binding was successful or - to determine the specific type of failure that occured. If the binding was successful - MakeExpression can then be called to create an expression which calls the method. - If the binding was a failure callers can then create a custom error message based upon - the reason the call failed. - - - - - Creates a new BindingTarget when the method binding has succeeded. - - - - - Creates a new BindingTarget when the method binding has failed due to an incorrect argument count - - - - - Creates a new BindingTarget when the method binding has failued due to - one or more parameters which could not be converted. - - - - - Creates a new BindingTarget when the match was ambiguous - - - - - Other failure. - - - - - Gets an Expression which calls the binding target if the method binding succeeded. - - Throws InvalidOperationException if the binding failed. - - - - - Gets the result of the attempt to bind. - - - - - Returns the method if the binding succeeded, or null if no method was applicable. - - - - - Gets the name of the method as supplied to the OverloadResolver. - - - - - Returns the MethodTarget if the binding succeeded, or null if no method was applicable. - - - - - Returns the methods which don't have any matches or null if Result == BindingResult.AmbiguousMatch - - - - - Returns the methods and their associated conversion failures if Result == BindingResult.CallFailure. - - - - - Returns the acceptable number of arguments which can be passed to the method if Result == BindingResult.IncorrectArgumentCount. - - - - - Returns the total number of arguments provided to the call. 0 if the call succeeded or failed for a reason other - than argument count mismatch. - - - - - Gets the MetaObjects which we originally did binding against in their restricted form. - - The members of the array correspond to each of the arguments. All members of the array - have a value. - - - - - Returns the return type of the binding, or null if no method was applicable. - - - - - Returns the NarrowingLevel of the method if the call succeeded. If the call - failed returns NarrowingLevel.None. - - - - - Returns true if the binding was succesful, false if it failed. - - This is an alias for BindingTarget.Result == BindingResult.Success. + Argument actual type or its limit type if the value not known. + DynamicNull if the argument value is null. diff --git a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.dll b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.dll index 27f24fe..e192ea6 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.dll and b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.dll differ diff --git a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.pdb b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.pdb index c20802c..7d3f9b9 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.pdb and b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.pdb differ diff --git a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.xml b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.xml index c9ad511..734398e 100644 --- a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.xml +++ b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.Core.xml @@ -4,281 +4,56 @@ Microsoft.Scripting.Core - + - An interface to represent values of runtime variables. - - - - - Count of the variables. - - - - - An indexer to get/set the values of the runtime variables. - - An index of the runtime variable. - The value of the runtime variable. - - - - Generates debug information for lambdas in an expression tree. - - - - - Creates PDB symbol generator. - - PDB symbol generator. - - - - Marks a sequence point. - - The lambda being generated. - IL offset where to mark the sequence point. - Debug informaton corresponding to the sequence point. - - - - Dynamic Language Runtime Compiler. - This part compiles lambdas. - - - LambdaCompiler is responsible for compiling individual lambda (LambdaExpression). The complete tree may - contain multiple lambdas, the Compiler class is reponsible for compiling the whole tree, individual - lambdas are then compiled by the LambdaCompiler. - - - - - returns true if the expression is not empty, otherwise false. - - - - - returns true if the expression is NOT empty and is not debug info, - or a block that contains only insignificant expressions. - - - - - Emits the expression and then either brtrue/brfalse to the label. - - True for brtrue, false for brfalse. - The expression to emit. - The label to conditionally branch to. - - This function optimizes equality and short circuiting logical - operators to avoid double-branching, minimize instruction count, - and generate similar IL to the C# compiler. This is important for - the JIT to optimize patterns like: - x != null AndAlso x.GetType() == typeof(SomeType) - - One optimization we don't do: we always emits at least one - conditional branch to the label, and always possibly falls through, - even if we know if the branch will always succeed or always fail. - We do this to avoid generating unreachable code, which is fine for - the CLR JIT, but doesn't verify with peverify. + Wraps the provided enumerable into a ReadOnlyCollection{T} - This kind of optimization could be implemented safely, by doing - constant folding over conditionals and logical expressions at the - tree level. - - - - - Update the flag with a new EmitAsTailCall flag + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. - + - Update the flag with a new EmitExpressionStart flag + Represents a catch statement in a try block. + This must have the same return type (i.e., the type of ) as the try block it is associated with. - - - Update the flag with a new EmitAsType flag - - - - - Generates code for this expression in a value position. - This method will leave the value of the expression - on the top of the stack typed as Type. - - - - - Emits an expression and discards the result. For some nodes this emits - more optimial code then EmitExpression/Pop - - - - - Emits arguments to a call, and returns an array of writebacks that - should happen after the call. - - - - - Emits arguments to a call, and returns an array of writebacks that - should happen after the call. For emitting dynamic expressions, we - need to skip the first parameter of the method (the call site). - - - - - Emits code which creates new instance of the delegateType delegate. - - Since the delegate is getting closed over the "Closure" argument, this - cannot be used with virtual/instance methods (inner must be static method) - - - - - Emits a delegate to the method generated for the LambdaExpression. - May end up creating a wrapper to match the requested delegate type. - - Lambda for which to generate a delegate - - - - - Emits the lambda body. If inlined, the parameters should already be - pushed onto the IL stack. - - The parent scope. - true if the lambda is inlined; false otherwise. - - The emum to specify if the lambda is compiled with the tail call optimization. - - - - - Gets the common test test value type of the SwitchExpression. - - - - - Creates the label for this case. - Optimization: if the body is just a goto, and we can branch - to it, put the goto target directly in the jump table. - - - - - Emits the start of a catch block. The exception value that is provided by the - CLR is stored in the variable specified by the catch block or popped if no - variable is provided. - - - - - The value is true if a clearance was emitted and no new sequence point - has been emitted since that. - - - - - Creates a lambda compiler that will compile to a dynamic method - - - - - Creates a lambda compiler that will compile into the provided Methodbuilder - - - - - Creates a lambda compiler for an inlined lambda - - - - - Compiler entry point - - LambdaExpression to compile. - Debug info generator. - The compiled delegate. - - - - Mutates the MethodBuilder parameter, filling in IL, parameters, - and return type. - - (probably shouldn't be modifying parameters/return type...) - - - - - Gets the argument slot corresponding to the parameter at the given - index. Assumes that the method takes a certain number of prefix - arguments, followed by the real parameters stored in Parameters - - - - - Returns the index-th argument. This method provides access to the actual arguments - defined on the lambda itself, and excludes the possible 0-th closure argument. - - - - - Creates an unitialized field suitible for private implementation details - Works with DynamicMethods or TypeBuilders. - - - - - Searches for an operator method on the type. The method must have - the specified signature, no generic arguments, and have the - SpecialName bit set. Also searches inherited operator methods. - - NOTE: This was designed to satisfy the needs of op_True and - op_False, because we have to do runtime lookup for those. It may - not work right for unary operators in general. - - - - - We can cache references to types, as long as they aren't in - collectable assemblies. Unfortunately, we can't really distinguish - between different flavors of assemblies. But, we can at least - create a whitelist for types in mscorlib (so we get the primitives) - and System.Core (so we find Func/Action overloads, etc). - - - - - Represents one case of a . - - - + Returns a that represents the current . A that represents the current . - + Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression. - The property of the result. - The property of the result. + The property of the result. + The property of the result. + The property of the result. This expression if no children changed, or an expression with the updated children. - + - Gets the values of this case. This case is selected for execution when the matches any of these values. + Gets a reference to the object caught by this handler. - + - Gets the body of this case. + Gets the type of this handler catches. + + + + + Gets the body of the catch block. + + + + + Gets the body of the 's filter. @@ -286,6 +61,55 @@ The base type for all nodes in Expression Trees. + + + Creates a representing a catch statement. + The of object to be caught can be specified but no reference to the object + will be available for use in the . + + The of this will handle. + The body of the catch statement. + The created . + + + + Creates a representing a catch statement with a reference to the caught object for use in the handler body. + + A representing a reference to the object caught by this handler. + The body of the catch statement. + The created . + + + + Creates a representing a catch statement with + an filter but no reference to the caught object. + + The of this will handle. + The body of the catch statement. + The body of the filter. + The created . + + + + Creates a representing a catch statement with + an filter and a reference to the caught object. + + A representing a reference to the object caught by this handler. + The body of the catch statement. + The body of the filter. + The created . + + + + Creates a representing a catch statement with the specified elements. + + The of this will handle. + A representing a reference to the object caught by this handler. + The body of the catch statement. + The body of the filter. + The created . + must be non-null and match the type of (if it is supplied). + Creates a SwitchCase for use in a . @@ -302,6 +126,294 @@ The test values of the case. The created SwitchCase. + + + Creates a with the given body. + + The body of the loop. + The created . + + + + Creates a with the given body and break target. + + The body of the loop. + The break target used by the loop body. + The created . + + + + Creates a with the given body. + + The body of the loop. + The break target used by the loop body. + The continue target used by the loop body. + The created . + + + + Creates an empty expression that has type. + + + A that has the property equal to + and the property set to . + + + + + Creates a that has the property set to the specified type. + + A to set the property equal to. + + A that has the property equal to + and the property set to the specified type. + + + + + Creates a representing a break statement. + + The that the will jump to. + + A with equal to Break, + the property set to , and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a break statement. The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + + A with equal to Break, + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a break statement with the specified type. + + The that the will jump to. + An to set the property equal to. + + A with equal to Break, + the property set to , + and the property set to . + + + + + Creates a representing a break statement with the specified type. + The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + An to set the property equal to. + + A with equal to Break, + the property set to , + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a continue statement. + + The that the will jump to. + + A with equal to Continue, + the property set to , + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a continue statement with the specified type. + + The that the will jump to. + An to set the property equal to. + + A with equal to Continue, + the property set to , + the property set to , + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a return statement. + + The that the will jump to. + + A with equal to Return, + the property set to , + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a return statement with the specified type. + + The that the will jump to. + An to set the property equal to. + + A with equal to Return, + the property set to , + the property set to , + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a return statement. The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + + A with equal to Continue, + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a return statement with the specified type. + The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + An to set the property equal to. + + A with equal to Continue, + the property set to , + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a goto. + + The that the will jump to. + + A with equal to Goto, + the property set to the specified value, + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a goto with the specified type. + + The that the will jump to. + An to set the property equal to. + + A with equal to Goto, + the property set to the specified value, + the property set to , + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a goto. The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + + A with equal to Goto, + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a goto with the specified type. + The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + An to set the property equal to. + + A with equal to Goto, + the property set to , + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a jump of the specified . + The value passed to the label upon jumping can also be specified. + + The of the . + The that the will jump to. + The value that will be passed to the associated label upon jumping. + An to set the property equal to. + + A with equal to , + the property set to , + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates an that + applies a delegate or lambda expression to a list of argument expressions. + + + An that + applies the specified delegate or lambda expression to the provided arguments. + + + An that represents the delegate + or lambda expression to be applied. + + + An array of objects + that represent the arguments that the delegate or lambda expression is applied to. + + + is null. + + .Type does not represent a delegate type or an .-or-The property of an element of is not assignable to the type of the corresponding parameter of the delegate represented by . + + does not contain the same number of elements as the list of parameters for the delegate represented by . + + + + Creates an that + applies a delegate or lambda expression to a list of argument expressions. + + + An that + applies the specified delegate or lambda expression to the provided arguments. + + + An that represents the delegate + or lambda expression to be applied. + + + An of objects + that represent the arguments that the delegate or lambda expression is applied to. + + + is null. + + .Type does not represent a delegate type or an .-or-The property of an element of is not assignable to the type of the corresponding parameter of the delegate represented by . + + does not contain the same number of elements as the list of parameters for the delegate represented by . + + + + Gets the delegate's Invoke method; used by InvocationExpression. + + The expression to be invoked. + Creates a that contains two expressions and has no variables. @@ -404,109 +516,6 @@ The expressions in the block. The created . - - - Creates a . - - An to set the property equal to. - An to set the property equal to. - An to set the property equal to. - A that has the property equal to - and the , , - and properties set to the specified values. - - - - Creates a . - - An to set the property equal to. - An to set the property equal to. - An to set the property equal to. - A to set the property equal to. - A that has the property equal to - and the , , - and properties set to the specified values. - This method allows explicitly unifying the result type of the conditional expression in cases where the types of - and expressions are not equal. Types of both and must be implicitly - reference assignable to the result type. The is allowed to be . - - - - Creates a . - - An to set the property equal to. - An to set the property equal to. - A that has the property equal to - and the , , - properties set to the specified values. The property is set to default expression and - the type of the resulting returned by this method is . - - - - Creates a . - - An to set the property equal to. - An to set the property equal to. - An to set the property equal to. - A that has the property equal to - and the , , - and properties set to the specified values. The type of the resulting - returned by this method is . - - - - Creates an that - applies a delegate or lambda expression to a list of argument expressions. - - - An that - applies the specified delegate or lambda expression to the provided arguments. - - - An that represents the delegate - or lambda expression to be applied. - - - An array of objects - that represent the arguments that the delegate or lambda expression is applied to. - - - is null. - - .Type does not represent a delegate type or an .-or-The property of an element of is not assignable to the type of the corresponding parameter of the delegate represented by . - - does not contain the same number of elements as the list of parameters for the delegate represented by . - - - - Creates an that - applies a delegate or lambda expression to a list of argument expressions. - - - An that - applies the specified delegate or lambda expression to the provided arguments. - - - An that represents the delegate - or lambda expression to be applied. - - - An of objects - that represent the arguments that the delegate or lambda expression is applied to. - - - is null. - - .Type does not represent a delegate type or an .-or-The property of an element of is not assignable to the type of the corresponding parameter of the delegate represented by . - - does not contain the same number of elements as the list of parameters for the delegate represented by . - - - - Gets the delegate's Invoke method; used by InvocationExpression. - - The expression to be invoked. - Creates a accessing a field. @@ -581,33 +590,66 @@ The member to be accessed. The created . - + - Creates a representing a label with void type and no name. + Creates a that uses a method named "Add" to add elements to a collection. - The new . + A to set the property equal to. + An array of objects to use to populate the collection. + A that has the property equal to ListInit and the property set to the specified value. - + - Creates a representing a label with void type and the given name. + Creates a that uses a method named "Add" to add elements to a collection. - The name of the label. - The new . + A to set the property equal to. + An that contains objects to use to populate the collection. + A that has the property equal to ListInit and the property set to the specified value. - + - Creates a representing a label with the given type. + Creates a that uses a specified method to add elements to a collection. - The type of value that is passed when jumping to the label. - The new . + A to set the property equal to. + A that represents an instance method named "Add" (case insensitive), that adds an element to a collection. + An array of objects to use to populate the collection. + A that has the property equal to ListInit and the property set to the specified value. - + - Creates a representing a label with the given type and name. + Creates a that uses a specified method to add elements to a collection. - The type of value that is passed when jumping to the label. - The name of the label. - The new . + A to set the property equal to. + A that represents an instance method named "Add" (case insensitive), that adds an element to a collection. + An that contains objects to use to populate the Initializers collection. + A that has the property equal to ListInit and the property set to the specified value. + + + + Creates a that uses specified objects to initialize a collection. + + A to set the property equal to. + An array that contains objects to use to populate the collection. + + A that has the property equal to ListInit + and the and properties set to the specified values. + + + The property of must represent a type that implements . + The property of the resulting is equal to newExpression.Type. + + + + + Creates a that uses specified objects to initialize a collection. + + A to set the property equal to. + An that contains objects to use to populate the collection. + An that contains objects to use to populate the collection. + + The property of must represent a type that implements . + The property of the resulting is equal to newExpression.Type. + @@ -653,70 +695,45 @@ A collection of s representing the catch statements to be associated with the try block. The created . - + - Creates a . + Creates a that represents the recursive initialization of members of a field or property. - The value to be tested against each case. - The valid cases for this switch. - The created . + The to set the property equal to. + An array of objects to use to populate the collection. + A that has the property equal to and the and properties set to the specified values. - + - Creates a . + Creates a that represents the recursive initialization of members of a field or property. - The value to be tested against each case. - The result of the switch if no cases are matched. - The valid cases for this switch. - The created . + The to set the property equal to. + An that contains objects to use to populate the collection. + A that has the property equal to and the and properties set to the specified values. - + - Creates a . + Creates a that represents the recursive initialization of members of a member that is accessed by using a property accessor method. - The value to be tested against each case. - The result of the switch if no cases are matched. - The equality comparison method to use. - The valid cases for this switch. - The created . + The that represents a property accessor method. + An that contains objects to use to populate the collection. + + A that has the property equal to , + the Member property set to the that represents the property accessed in , + and properties set to the specified values. + - + - Creates a . - - The result type of the switch. - The value to be tested against each case. - The result of the switch if no cases are matched. - The equality comparison method to use. - The valid cases for this switch. - The created . - - - - Creates a . - - The value to be tested against each case. - The result of the switch if no cases are matched. - The equality comparison method to use. - The valid cases for this switch. - The created . - - - - Creates a . - - The result type of the switch. - The value to be tested against each case. - The result of the switch if no cases are matched. - The equality comparison method to use. - The valid cases for this switch. - The created . - - - - If custom type is provided, all branches must be reference assignable to the result type. - If no custom type is provided, all branches must have the same type - resultType. + Creates a that represents the recursive initialization of members of a member that is accessed by using a property accessor method. + The that represents a property accessor method. + An that contains objects to use to populate the collection. + + A that has the property equal to , + the Member property set to the that represents the property accessed in , + and properties set to the specified values. + Creates a . @@ -973,231 +990,160 @@ As with Func, the last argument is the return type. It can be set to System.Void to produce an Action. - + - Creates an ElementInit expression that represents the initialization of a list. + Creates a . - The for the list's Add method. - An array containing the Expressions to be used to initialize the list. - The created ElementInit expression. + An to set the property equal to. + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the , , + and properties set to the specified values. - + - Creates an ElementInit expression that represents the initialization of a list. + Creates a . - The for the list's Add method. - An containing elements to initialize the list. - The created ElementInit expression. + An to set the property equal to. + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , + and properties set to the specified values. + This method allows explicitly unifying the result type of the conditional expression in cases where the types of + and expressions are not equal. Types of both and must be implicitly + reference assignable to the result type. The is allowed to be . - + - Creates a that represents a dynamic operation bound by the provided . + Creates a . - The type of the delegate used by the . - The runtime binder for the dynamic operation. - The arguments to the dynamic operation. + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the , , + properties set to the specified values. The property is set to default expression and + the type of the resulting returned by this method is . + + + + Creates a . + + An to set the property equal to. + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the , , + and properties set to the specified values. The type of the resulting + returned by this method is . + + + + Creates a . + + The value to be tested against each case. + The valid cases for this switch. + The created . + + + + Creates a . + + The value to be tested against each case. + The result of the switch if no cases are matched. + The valid cases for this switch. + The created . + + + + Creates a . + + The value to be tested against each case. + The result of the switch if no cases are matched. + The equality comparison method to use. + The valid cases for this switch. + The created . + + + + Creates a . + + The result type of the switch. + The value to be tested against each case. + The result of the switch if no cases are matched. + The equality comparison method to use. + The valid cases for this switch. + The created . + + + + Creates a . + + The value to be tested against each case. + The result of the switch if no cases are matched. + The equality comparison method to use. + The valid cases for this switch. + The created . + + + + Creates a . + + The result type of the switch. + The value to be tested against each case. + The result of the switch if no cases are matched. + The equality comparison method to use. + The valid cases for this switch. + The created . + + + + If custom type is provided, all branches must be reference assignable to the result type. + If no custom type is provided, all branches must have the same type - resultType. + + + + + Creates a that has the property set to the specified value. . + + An to set the property equal to. - A that has equal to - Dynamic and has the - DelegateType, - Binder, and - Arguments set to the specified values. + A that has the property equal to + and the property set to the specified value. - + - Creates a that represents a dynamic operation bound by the provided . + Creates a that has the + and properties set to the specified values. . - The type of the delegate used by the . - The runtime binder for the dynamic operation. - The arguments to the dynamic operation. + An to set the property equal to. + A to set the property equal to. - A that has equal to - Dynamic and has the - DelegateType, - Binder, and - Arguments set to the specified values. + A that has the property equal to + and the and + properties set to the specified values. - + - Creates a that represents a dynamic operation bound by the provided and one argument. + Creates a with the specified span. - The type of the delegate used by the . - The runtime binder for the dynamic operation. - The argument to the dynamic operation. - - A that has equal to - Dynamic and has the - DelegateType, - Binder, and - Arguments set to the specified values. - + The that represents the source file. + The start line of this . Must be greater than 0. + The start column of this . Must be greater than 0. + The end line of this . Must be greater or equal than the start line. + The end column of this . If the end line is the same as the start line, it must be greater or equal than the start column. In any case, must be greater than 0. + An instance of . - + - Creates a that represents a dynamic operation bound by the provided and two arguments. + Creates a for clearing a sequence point. - The type of the delegate used by the . - The runtime binder for the dynamic operation. - The first argument to the dynamic operation. - The second argument to the dynamic operation. - - A that has equal to - Dynamic and has the - DelegateType, - Binder, and - Arguments set to the specified values. - - - - - Creates a that represents a dynamic operation bound by the provided and three arguments. - - The type of the delegate used by the . - The runtime binder for the dynamic operation. - The first argument to the dynamic operation. - The second argument to the dynamic operation. - The third argument to the dynamic operation. - - A that has equal to - Dynamic and has the - DelegateType, - Binder, and - Arguments set to the specified values. - - - - - Creates a that represents a dynamic operation bound by the provided and four arguments. - - The type of the delegate used by the . - The runtime binder for the dynamic operation. - The first argument to the dynamic operation. - The second argument to the dynamic operation. - The third argument to the dynamic operation. - The fourth argument to the dynamic operation. - - A that has equal to - Dynamic and has the - DelegateType, - Binder, and - Arguments set to the specified values. - - - - - Creates a that represents a dynamic operation bound by the provided . - - The runtime binder for the dynamic operation. - The result type of the dynamic expression. - The arguments to the dynamic operation. - - A that has equal to - Dynamic and has the - Binder and - Arguments set to the specified values. - - - The DelegateType property of the - result will be inferred from the types of the arguments and the specified return type. - - - - - Creates a that represents a dynamic operation bound by the provided . - - The runtime binder for the dynamic operation. - The result type of the dynamic expression. - The first argument to the dynamic operation. - - A that has equal to - Dynamic and has the - Binder and - Arguments set to the specified values. - - - The DelegateType property of the - result will be inferred from the types of the arguments and the specified return type. - - - - - Creates a that represents a dynamic operation bound by the provided . - - The runtime binder for the dynamic operation. - The result type of the dynamic expression. - The first argument to the dynamic operation. - The second argument to the dynamic operation. - - A that has equal to - Dynamic and has the - Binder and - Arguments set to the specified values. - - - The DelegateType property of the - result will be inferred from the types of the arguments and the specified return type. - - - - - Creates a that represents a dynamic operation bound by the provided . - - The runtime binder for the dynamic operation. - The result type of the dynamic expression. - The first argument to the dynamic operation. - The second argument to the dynamic operation. - The third argument to the dynamic operation. - - A that has equal to - Dynamic and has the - Binder and - Arguments set to the specified values. - - - The DelegateType property of the - result will be inferred from the types of the arguments and the specified return type. - - - - - Creates a that represents a dynamic operation bound by the provided . - - The runtime binder for the dynamic operation. - The result type of the dynamic expression. - The first argument to the dynamic operation. - The second argument to the dynamic operation. - The third argument to the dynamic operation. - The fourth argument to the dynamic operation. - - A that has equal to - Dynamic and has the - Binder and - Arguments set to the specified values. - - - The DelegateType property of the - result will be inferred from the types of the arguments and the specified return type. - - - - - Creates a that represents a dynamic operation bound by the provided . - - The runtime binder for the dynamic operation. - The result type of the dynamic expression. - The arguments to the dynamic operation. - - A that has equal to - Dynamic and has the - Binder and - Arguments set to the specified values. - - - The DelegateType property of the - result will be inferred from the types of the arguments and the specified return type. - + The that represents the source file. + An instance of for clearning a sequence point. @@ -1247,107 +1193,6 @@ A that has a constructor that takes no arguments. A that has the property equal to New and the Constructor property set to the ConstructorInfo that represents the parameterless constructor of the specified type. - - - Creates a that represents the recursive initialization of members of a field or property. - - The to set the property equal to. - An array of objects to use to populate the collection. - A that has the property equal to and the and properties set to the specified values. - - - - Creates a that represents the recursive initialization of members of a field or property. - - The to set the property equal to. - An that contains objects to use to populate the collection. - A that has the property equal to and the and properties set to the specified values. - - - - Creates a that represents the recursive initialization of members of a member that is accessed by using a property accessor method. - - The that represents a property accessor method. - An that contains objects to use to populate the collection. - - A that has the property equal to , - the Member property set to the that represents the property accessed in , - and properties set to the specified values. - - - - - Creates a that represents the recursive initialization of members of a member that is accessed by using a property accessor method. - - The that represents a property accessor method. - An that contains objects to use to populate the collection. - - A that has the property equal to , - the Member property set to the that represents the property accessed in , - and properties set to the specified values. - - - - - Creates a that uses a method named "Add" to add elements to a collection. - - A to set the property equal to. - An array of objects to use to populate the collection. - A that has the property equal to ListInit and the property set to the specified value. - - - - Creates a that uses a method named "Add" to add elements to a collection. - - A to set the property equal to. - An that contains objects to use to populate the collection. - A that has the property equal to ListInit and the property set to the specified value. - - - - Creates a that uses a specified method to add elements to a collection. - - A to set the property equal to. - A that represents an instance method named "Add" (case insensitive), that adds an element to a collection. - An array of objects to use to populate the collection. - A that has the property equal to ListInit and the property set to the specified value. - - - - Creates a that uses a specified method to add elements to a collection. - - A to set the property equal to. - A that represents an instance method named "Add" (case insensitive), that adds an element to a collection. - An that contains objects to use to populate the Initializers collection. - A that has the property equal to ListInit and the property set to the specified value. - - - - Creates a that uses specified objects to initialize a collection. - - A to set the property equal to. - An array that contains objects to use to populate the collection. - - A that has the property equal to ListInit - and the and properties set to the specified values. - - - The property of must represent a type that implements . - The property of the resulting is equal to newExpression.Type. - - - - - Creates a that uses specified objects to initialize a collection. - - A to set the property equal to. - An that contains objects to use to populate the collection. - An that contains objects to use to populate the collection. - - The property of must represent a type that implements . - The property of the resulting is equal to newExpression.Type. - - Creates a representing a label with no default value. @@ -1363,597 +1208,6 @@ The value of this when the label is reached through normal control flow. A with the given default value. - - - Creates a that has the property set to the specified value. . - - An to set the property equal to. - - A that has the property equal to - and the property set to the specified value. - - - - - Creates a that has the - and properties set to the specified values. . - - An to set the property equal to. - A to set the property equal to. - - A that has the property equal to - and the and - properties set to the specified values. - - - - - Creates a with the specified span. - - The that represents the source file. - The start line of this . Must be greater than 0. - The start column of this . Must be greater than 0. - The end line of this . Must be greater or equal than the start line. - The end column of this . If the end line is the same as the start line, it must be greater or equal than the start column. In any case, must be greater than 0. - An instance of . - - - - Creates a for clearing a sequence point. - - The that represents the source file. - An instance of for clearning a sequence point. - - - - Creates a , given an operand, by calling the appropriate factory method. - - The that specifies the type of unary operation. - An that represents the operand. - The that specifies the type to be converted to (pass null if not applicable). - The that results from calling the appropriate factory method. - Thrown when does not correspond to a unary expression. - Thrown when is null. - - - - Creates a , given an operand and implementing method, by calling the appropriate factory method. - - The that specifies the type of unary operation. - An that represents the operand. - The that specifies the type to be converted to (pass null if not applicable). - The that represents the implementing method. - The that results from calling the appropriate factory method. - Thrown when does not correspond to a unary expression. - Thrown when is null. - - - - Creates a that represents an arithmetic negation operation. - - An to set the property equal to. - A that has the property equal to and the properties set to the specified value. - Thrown when is null. - Thrown when the unary minus operator is not defined for - - - - Creates a that represents an arithmetic negation operation. - - An to set the property equal to. - A to set the property equal to. - A that has the property equal to and the and properties set to the specified value. - Thrown when is null. - Thrown when is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. - Thown when is null and the unary minus operator is not defined for expression.Type or expression.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by method. - - - - Creates a that represents a unary plus operation. - - An to set the property equal to. - A that has the property equal to and the property set to the specified value. - Thrown when is null. - Thown when the unary minus operator is not defined for expression.Type. - - - - Creates a that represents a unary plus operation. - - An to set the property equal to. - A to set the property equal to. - A that has the property equal to and the and property set to the specified value. - Thrown when is null. - Thrown when is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. - Thown when is null and the unary minus operator is not defined for expression.Type or expression.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by method. - - - Creates a that represents an arithmetic negation operation that has overflow checking. - A that has the property equal to and the property set to the specified value. - An to set the property equal to. - - Thrown when is null. - Thrown when the unary minus operator is not defined for .Type. - - - Creates a that represents an arithmetic negation operation that has overflow checking. The implementing method can be specified. - A that has the property equal to and the and properties set to the specified values. - An to set the property equal to. - A to set the property equal to. - - is null. - - is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. - - is null and the unary minus operator is not defined for .Type.-or-.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by . - - - Creates a that represents a bitwise complement operation. - A that has the property equal to and the property set to the specified value. - An to set the property equal to. - - is null. - The unary not operator is not defined for .Type. - - - Creates a that represents a bitwise complement operation. The implementing method can be specified. - A that has the property equal to and the and properties set to the specified values. - An to set the property equal to. - A to set the property equal to. - - is null. - - is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. - - is null and the unary not operator is not defined for .Type.-or-.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by . - - - - Returns whether the expression evaluates to false. - - An to evaluate. - An instance of . - - - - Returns whether the expression evaluates to false. - - An to evaluate. - A that represents the implementing method. - An instance of . - - - - Returns whether the expression evaluates to true. - - An to evaluate. - An instance of . - - - - Returns whether the expression evaluates to true. - - An to evaluate. - A that represents the implementing method. - An instance of . - - - - Returns the expression representing the ones complement. - - An . - An instance of . - - - - Returns the expression representing the ones complement. - - An . - A that represents the implementing method. - An instance of . - - - Creates a that represents an explicit reference or boxing conversion where null is supplied if the conversion fails. - A that has the property equal to and the and properties set to the specified values. - An to set the property equal to. - A to set the property equal to. - - or is null. - - - - Creates a that represents an explicit unboxing. - - An to unbox. - The new of the expression. - An instance of . - - - Creates a that represents a conversion operation. - A that has the property equal to and the and properties set to the specified values. - An to set the property equal to. - A to set the property equal to. - - or is null. - No conversion operator is defined between .Type and . - - - Creates a that represents a conversion operation for which the implementing method is specified. - A that has the property equal to and the , , and properties set to the specified values. - An to set the property equal to. - A to set the property equal to. - A to set the property equal to. - - or is null. - - is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. - More than one method that matches the description was found. - No conversion operator is defined between .Type and .-or-.Type is not assignable to the argument type of the method represented by .-or-The return type of the method represented by is not assignable to .-or-.Type or is a nullable value type and the corresponding non-nullable value type does not equal the argument type or the return type, respectively, of the method represented by . - - - Creates a that represents a conversion operation that throws an exception if the target type is overflowed. - A that has the property equal to and the and properties set to the specified values. - An to set the property equal to. - A to set the property equal to. - - or is null. - No conversion operator is defined between .Type and . - - - Creates a that represents a conversion operation that throws an exception if the target type is overflowed and for which the implementing method is specified. - A that has the property equal to and the , , and properties set to the specified values. - An to set the property equal to. - A to set the property equal to. - A to set the property equal to. - - or is null. - - is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. - More than one method that matches the description was found. - No conversion operator is defined between .Type and .-or-.Type is not assignable to the argument type of the method represented by .-or-The return type of the method represented by is not assignable to .-or-.Type or is a nullable value type and the corresponding non-nullable value type does not equal the argument type or the return type, respectively, of the method represented by . - - - Creates a that represents getting the length of a one-dimensional array. - A that has the property equal to and the property equal to . - An to set the property equal to. - - is null. - - .Type does not represent an array type. - - - Creates a that represents an expression that has a constant value of type . - A that has the property equal to and the property set to the specified value. - An to set the property equal to. - - is null. - - - - Creates a that represents a rethrowing of an exception. - - A that represents a rethrowing of an exception. - - - - Creates a that represents a rethrowing of an exception with a given type. - - The new of the expression. - A that represents a rethrowing of an exception. - - - - Creates a that represents a throwing of an exception. - - An . - A that represents the exception. - - - - Creates a that represents a throwing of a value with a given type. - - An . - The new of the expression. - A that represents the exception. - - - - Creates a that represents the incrementing of the expression by 1. - - An to increment. - A that represents the incremented expression. - - - - Creates a that represents the incrementing of the expression by 1. - - An to increment. - A that represents the implementing method. - A that represents the incremented expression. - - - - Creates a that represents the decrementing of the expression by 1. - - An to decrement. - A that represents the decremented expression. - - - - Creates a that represents the decrementing of the expression by 1. - - An to decrement. - A that represents the implementing method. - A that represents the decremented expression. - - - - Creates a that increments the expression by 1 - and assigns the result back to the expression. - - An to apply the operations on. - A that represents the resultant expression. - - - - Creates a that increments the expression by 1 - and assigns the result back to the expression. - - An to apply the operations on. - A that represents the implementing method. - A that represents the resultant expression. - - - - Creates a that decrements the expression by 1 - and assigns the result back to the expression. - - An to apply the operations on. - A that represents the resultant expression. - - - - Creates a that decrements the expression by 1 - and assigns the result back to the expression. - - An to apply the operations on. - A that represents the implementing method. - A that represents the resultant expression. - - - - Creates a that represents the assignment of the expression - followed by a subsequent increment by 1 of the original expression. - - An to apply the operations on. - A that represents the resultant expression. - - - - Creates a that represents the assignment of the expression - followed by a subsequent increment by 1 of the original expression. - - An to apply the operations on. - A that represents the implementing method. - A that represents the resultant expression. - - - - Creates a that represents the assignment of the expression - followed by a subsequent decrement by 1 of the original expression. - - An to apply the operations on. - A that represents the resultant expression. - - - - Creates a that represents the assignment of the expression - followed by a subsequent decrement by 1 of the original expression. - - An to apply the operations on. - A that represents the implementing method. - A that represents the resultant expression. - - - Creates a that represents a call to a static method that takes one argument. - A that has the property equal to and the and properties set to the specified values. - A to set the property equal to. - The that represents the first argument. - - is null. - - - Creates a that represents a call to a static method that takes two arguments. - A that has the property equal to and the and properties set to the specified values. - A to set the property equal to. - The that represents the first argument. - The that represents the second argument. - - is null. - - - Creates a that represents a call to a static method that takes three arguments. - A that has the property equal to and the and properties set to the specified values. - A to set the property equal to. - The that represents the first argument. - The that represents the second argument. - The that represents the third argument. - - is null. - - - Creates a that represents a call to a static method that takes four arguments. - A that has the property equal to and the and properties set to the specified values. - A to set the property equal to. - The that represents the first argument. - The that represents the second argument. - The that represents the third argument. - The that represents the fourth argument. - - is null. - - - Creates a that represents a call to a static method that takes five arguments. - A that has the property equal to and the and properties set to the specified values. - A to set the property equal to. - The that represents the first argument. - The that represents the second argument. - The that represents the third argument. - The that represents the fourth argument. - The that represents the fifth argument. - - is null. - A that has the property equal to and the and properties set to the specified values. - - - - Creates a that represents a call to a static (Shared in Visual Basic) method. - - The that represents the target method. - The array of one or more of that represents the call arguments. - A that has the property equal to and the and properties set to the specified values. - - - - Creates a that represents a call to a static (Shared in Visual Basic) method. - - The that represents the target method. - A collection of that represents the call arguments. - A that has the property equal to and the and properties set to the specified values. - - - - Creates a that represents a call to a method that takes no arguments. - - An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). - The that represents the target method. - A that has the property equal to and the and properties set to the specified values. - - - - Creates a that represents a method call. - - An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). - The that represents the target method. - An array of one or more of that represents the call arguments. - A that has the property equal to and the and properties set to the specified values. - - - - Creates a that represents a call to a method that takes two arguments. - - An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). - The that represents the target method. - The that represents the first argument. - The that represents the second argument. - A that has the property equal to and the and properties set to the specified values. - - - - Creates a that represents a call to a method that takes three arguments. - - An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). - The that represents the target method. - The that represents the first argument. - The that represents the second argument. - The that represents the third argument. - A that has the property equal to and the and properties set to the specified values. - - - Creates a that represents a call to an instance method by calling the appropriate factory method. - A that has the property equal to , the property equal to , set to the that represents the specified instance method, and set to the specified arguments. - An whose property value will be searched for a specific method. - The name of the method. - - An array of objects that specify the type parameters of the generic method. - This argument should be null when specifies a non-generic method. - - An array of objects that represents the arguments to the method. - - or is null. - No method whose name is , whose type parameters match , and whose parameter types match is found in .Type or its base types.-or-More than one method whose name is , whose type parameters match , and whose parameter types match is found in .Type or its base types. - - - Creates a that represents a call to a static (Shared in Visual Basic) method by calling the appropriate factory method. - A that has the property equal to , the property set to the that represents the specified static (Shared in Visual Basic) method, and the property set to the specified arguments. - The that specifies the type that contains the specified static (Shared in Visual Basic) method. - The name of the method. - - An array of objects that specify the type parameters of the generic method. - This argument should be null when specifies a non-generic method. - - An array of objects that represent the arguments to the method. - - or is null. - No method whose name is , whose type parameters match , and whose parameter types match is found in or its base types.-or-More than one method whose name is , whose type parameters match , and whose parameter types match is found in or its base types. - - - Creates a that represents a method call. - A that has the property equal to and the , , and properties set to the specified values. - An to set the property equal to (pass null for a static (Shared in Visual Basic) method). - A to set the property equal to. - An that contains objects to use to populate the collection. - - is null.-or- is null and represents an instance method. - - .Type is not assignable to the declaring type of the method represented by .-or-The number of elements in does not equal the number of parameters for the method represented by .-or-One or more of the elements of is not assignable to the corresponding parameter for the method represented by . - - - Creates a that represents applying an array index operator to a multi-dimensional array. - A that has the property equal to and the and properties set to the specified values. - An array of instances - indexes for the array index operation. - An array that contains objects to use to populate the collection. - - - Creates a that represents applying an array index operator to an array of rank more than one. - A that has the property equal to and the and properties set to the specified values. - An to set the property equal to. - An that contains objects to use to populate the collection. - - or is null. - - .Type does not represent an array type.-or-The rank of .Type does not match the number of elements in .-or-The property of one or more elements of does not represent the type. - - - Creates a where the member is a field or property. - A that has the property equal to and the and properties set to the specified values. - A that represents a field or property to set the property equal to. - An array of objects to use to populate the collection. - - is null. -or-One or more elements of is null. - - does not represent a field or property.-or-The or of the field or property that represents does not implement . - - - Creates a where the member is a field or property. - A that has the property equal to and the and properties set to the specified values. - A that represents a field or property to set the property equal to. - An that contains objects to use to populate the collection. - - is null. -or-One or more elements of is null. - - does not represent a field or property.-or-The or of the field or property that represents does not implement . - - - Creates a object based on a specified property accessor method. - A that has the property equal to , the property set to the that represents the property accessed in , and populated with the elements of . - A that represents a property accessor method. - An array of objects to use to populate the collection. - - is null. -or-One or more elements of is null. - - does not represent a property accessor method.-or-The of the property that the method represented by accesses does not implement . - - - Creates a based on a specified property accessor method. - A that has the property equal to , the property set to the that represents the property accessed in , and populated with the elements of . - A that represents a property accessor method. - An that contains objects to use to populate the collection. - - is null. -or-One or more elements of are null. - - does not represent a property accessor method.-or-The of the property that the method represented by accesses does not implement . - Creates a that represents an assignment operation. @@ -2953,67 +2207,769 @@ An Expression to set the Right property equal to. A BinaryExpression that has the NodeType property equal to ArrayIndex and the Left and Right properties set to the specified values. - + - Creates an that represents accessing an indexed property in an object. + Creates a node that can be used to identify a parameter or a variable in an expression tree. - The object to which the property belongs. Should be null if the property is static(shared). - An representing the property to index. - An IEnumerable{Expression} contaning the arguments to be used to index the property. - The created . + The type of the parameter or variable. + A node with the specified name and type. - + - Creates an to access an array. + Creates a node that can be used to identify a parameter or a variable in an expression tree. - An expression representing the array to index. - An array containing expressions used to index the array. - The expression representing the array can be obtained by using the MakeMemberAccess method, - or through NewArrayBounds or NewArrayInit. - The created . + The type of the parameter or variable. + A node with the specified name and type. - + - Creates an to access an array. + Creates a node that can be used to identify a parameter or a variable in an expression tree. - An expression representing the array to index. - An containing expressions used to index the array. - The expression representing the array can be obtained by using the MakeMemberAccess method, - or through NewArrayBounds or NewArrayInit. - The created . + The type of the parameter or variable. + The name of the parameter or variable, used for debugging or pretty printing purpose only. + A node with the specified name and type. - + - Creates an representing the access to an indexed property. + Creates a node that can be used to identify a parameter or a variable in an expression tree. - The object to which the property belongs. If the property is static/shared, it must be null. - The name of the indexer. - An array of objects that are used to index the property. - The created . + The type of the parameter or variable. + The name of the parameter or variable, used for debugging or pretty printing purpose only. + A node with the specified name and type. - - - The method finds the instance property with the specified name in a type. The property's type signature needs to be compatible with - the arguments if it is a indexer. If the arguments is null or empty, we get a normal property. - + + Creates a that represents a call to a static method that takes one argument. + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + The that represents the first argument. + + is null. - - - Creates an representing the access to an indexed property. - - The object to which the property belongs. If the property is static/shared, it must be null. - The that represents the property to index. - An array of objects that are used to index the property. - The created . + + Creates a that represents a call to a static method that takes two arguments. + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + The that represents the first argument. + The that represents the second argument. + + is null. - + + Creates a that represents a call to a static method that takes three arguments. + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + The that represents the first argument. + The that represents the second argument. + The that represents the third argument. + + is null. + + + Creates a that represents a call to a static method that takes four arguments. + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + The that represents the first argument. + The that represents the second argument. + The that represents the third argument. + The that represents the fourth argument. + + is null. + + + Creates a that represents a call to a static method that takes five arguments. + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + The that represents the first argument. + The that represents the second argument. + The that represents the third argument. + The that represents the fourth argument. + The that represents the fifth argument. + + is null. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a call to a static (Shared in Visual Basic) method. + + The that represents the target method. + The array of one or more of that represents the call arguments. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a call to a static (Shared in Visual Basic) method. + + The that represents the target method. + A collection of that represents the call arguments. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a call to a method that takes no arguments. + + An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). + The that represents the target method. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a method call. + + An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). + The that represents the target method. + An array of one or more of that represents the call arguments. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a call to a method that takes two arguments. + + An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). + The that represents the target method. + The that represents the first argument. + The that represents the second argument. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a call to a method that takes three arguments. + + An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). + The that represents the target method. + The that represents the first argument. + The that represents the second argument. + The that represents the third argument. + A that has the property equal to and the and properties set to the specified values. + + + Creates a that represents a call to an instance method by calling the appropriate factory method. + A that has the property equal to , the property equal to , set to the that represents the specified instance method, and set to the specified arguments. + An whose property value will be searched for a specific method. + The name of the method. + + An array of objects that specify the type parameters of the generic method. + This argument should be null when specifies a non-generic method. + + An array of objects that represents the arguments to the method. + + or is null. + No method whose name is , whose type parameters match , and whose parameter types match is found in .Type or its base types.-or-More than one method whose name is , whose type parameters match , and whose parameter types match is found in .Type or its base types. + + + Creates a that represents a call to a static (Shared in Visual Basic) method by calling the appropriate factory method. + A that has the property equal to , the property set to the that represents the specified static (Shared in Visual Basic) method, and the property set to the specified arguments. + The that specifies the type that contains the specified static (Shared in Visual Basic) method. + The name of the method. + + An array of objects that specify the type parameters of the generic method. + This argument should be null when specifies a non-generic method. + + An array of objects that represent the arguments to the method. + + or is null. + No method whose name is , whose type parameters match , and whose parameter types match is found in or its base types.-or-More than one method whose name is , whose type parameters match , and whose parameter types match is found in or its base types. + + + Creates a that represents a method call. + A that has the property equal to and the , , and properties set to the specified values. + An to set the property equal to (pass null for a static (Shared in Visual Basic) method). + A to set the property equal to. + An that contains objects to use to populate the collection. + + is null.-or- is null and represents an instance method. + + .Type is not assignable to the declaring type of the method represented by .-or-The number of elements in does not equal the number of parameters for the method represented by .-or-One or more of the elements of is not assignable to the corresponding parameter for the method represented by . + + + Creates a that represents applying an array index operator to a multi-dimensional array. + A that has the property equal to and the and properties set to the specified values. + An array of instances - indexes for the array index operation. + An array that contains objects to use to populate the collection. + + + Creates a that represents applying an array index operator to an array of rank more than one. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + An that contains objects to use to populate the collection. + + or is null. + + .Type does not represent an array type.-or-The rank of .Type does not match the number of elements in .-or-The property of one or more elements of does not represent the type. + + - Creates an representing the access to an indexed property. + Creates a that represents a dynamic operation bound by the provided . - The object to which the property belongs. If the property is static/shared, it must be null. - The that represents the property to index. - An of objects that are used to index the property. - The created . + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The arguments to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The arguments to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided and one argument. + + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The argument to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided and two arguments. + + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided and three arguments. + + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + The third argument to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided and four arguments. + + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + The third argument to the dynamic operation. + The fourth argument to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The arguments to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The first argument to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + The third argument to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + The third argument to the dynamic operation. + The fourth argument to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The arguments to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a , given an operand, by calling the appropriate factory method. + + The that specifies the type of unary operation. + An that represents the operand. + The that specifies the type to be converted to (pass null if not applicable). + The that results from calling the appropriate factory method. + Thrown when does not correspond to a unary expression. + Thrown when is null. + + + + Creates a , given an operand and implementing method, by calling the appropriate factory method. + + The that specifies the type of unary operation. + An that represents the operand. + The that specifies the type to be converted to (pass null if not applicable). + The that represents the implementing method. + The that results from calling the appropriate factory method. + Thrown when does not correspond to a unary expression. + Thrown when is null. + + + + Creates a that represents an arithmetic negation operation. + + An to set the property equal to. + A that has the property equal to and the properties set to the specified value. + Thrown when is null. + Thrown when the unary minus operator is not defined for + + + + Creates a that represents an arithmetic negation operation. + + An to set the property equal to. + A to set the property equal to. + A that has the property equal to and the and properties set to the specified value. + Thrown when is null. + Thrown when is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + Thown when is null and the unary minus operator is not defined for expression.Type or expression.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by method. + + + + Creates a that represents a unary plus operation. + + An to set the property equal to. + A that has the property equal to and the property set to the specified value. + Thrown when is null. + Thown when the unary minus operator is not defined for expression.Type. + + + + Creates a that represents a unary plus operation. + + An to set the property equal to. + A to set the property equal to. + A that has the property equal to and the and property set to the specified value. + Thrown when is null. + Thrown when is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + Thown when is null and the unary minus operator is not defined for expression.Type or expression.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by method. + + + Creates a that represents an arithmetic negation operation that has overflow checking. + A that has the property equal to and the property set to the specified value. + An to set the property equal to. + + Thrown when is null. + Thrown when the unary minus operator is not defined for .Type. + + + Creates a that represents an arithmetic negation operation that has overflow checking. The implementing method can be specified. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + + is null. + + is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + + is null and the unary minus operator is not defined for .Type.-or-.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by . + + + Creates a that represents a bitwise complement operation. + A that has the property equal to and the property set to the specified value. + An to set the property equal to. + + is null. + The unary not operator is not defined for .Type. + + + Creates a that represents a bitwise complement operation. The implementing method can be specified. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + + is null. + + is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + + is null and the unary not operator is not defined for .Type.-or-.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by . + + + + Returns whether the expression evaluates to false. + + An to evaluate. + An instance of . + + + + Returns whether the expression evaluates to false. + + An to evaluate. + A that represents the implementing method. + An instance of . + + + + Returns whether the expression evaluates to true. + + An to evaluate. + An instance of . + + + + Returns whether the expression evaluates to true. + + An to evaluate. + A that represents the implementing method. + An instance of . + + + + Returns the expression representing the ones complement. + + An . + An instance of . + + + + Returns the expression representing the ones complement. + + An . + A that represents the implementing method. + An instance of . + + + Creates a that represents an explicit reference or boxing conversion where null is supplied if the conversion fails. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + + or is null. + + + + Creates a that represents an explicit unboxing. + + An to unbox. + The new of the expression. + An instance of . + + + Creates a that represents a conversion operation. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + + or is null. + No conversion operator is defined between .Type and . + + + Creates a that represents a conversion operation for which the implementing method is specified. + A that has the property equal to and the , , and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + + or is null. + + is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + More than one method that matches the description was found. + No conversion operator is defined between .Type and .-or-.Type is not assignable to the argument type of the method represented by .-or-The return type of the method represented by is not assignable to .-or-.Type or is a nullable value type and the corresponding non-nullable value type does not equal the argument type or the return type, respectively, of the method represented by . + + + Creates a that represents a conversion operation that throws an exception if the target type is overflowed. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + + or is null. + No conversion operator is defined between .Type and . + + + Creates a that represents a conversion operation that throws an exception if the target type is overflowed and for which the implementing method is specified. + A that has the property equal to and the , , and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + + or is null. + + is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + More than one method that matches the description was found. + No conversion operator is defined between .Type and .-or-.Type is not assignable to the argument type of the method represented by .-or-The return type of the method represented by is not assignable to .-or-.Type or is a nullable value type and the corresponding non-nullable value type does not equal the argument type or the return type, respectively, of the method represented by . + + + Creates a that represents getting the length of a one-dimensional array. + A that has the property equal to and the property equal to . + An to set the property equal to. + + is null. + + .Type does not represent an array type. + + + Creates a that represents an expression that has a constant value of type . + A that has the property equal to and the property set to the specified value. + An to set the property equal to. + + is null. + + + + Creates a that represents a rethrowing of an exception. + + A that represents a rethrowing of an exception. + + + + Creates a that represents a rethrowing of an exception with a given type. + + The new of the expression. + A that represents a rethrowing of an exception. + + + + Creates a that represents a throwing of an exception. + + An . + A that represents the exception. + + + + Creates a that represents a throwing of a value with a given type. + + An . + The new of the expression. + A that represents the exception. + + + + Creates a that represents the incrementing of the expression by 1. + + An to increment. + A that represents the incremented expression. + + + + Creates a that represents the incrementing of the expression by 1. + + An to increment. + A that represents the implementing method. + A that represents the incremented expression. + + + + Creates a that represents the decrementing of the expression by 1. + + An to decrement. + A that represents the decremented expression. + + + + Creates a that represents the decrementing of the expression by 1. + + An to decrement. + A that represents the implementing method. + A that represents the decremented expression. + + + + Creates a that increments the expression by 1 + and assigns the result back to the expression. + + An to apply the operations on. + A that represents the resultant expression. + + + + Creates a that increments the expression by 1 + and assigns the result back to the expression. + + An to apply the operations on. + A that represents the implementing method. + A that represents the resultant expression. + + + + Creates a that decrements the expression by 1 + and assigns the result back to the expression. + + An to apply the operations on. + A that represents the resultant expression. + + + + Creates a that decrements the expression by 1 + and assigns the result back to the expression. + + An to apply the operations on. + A that represents the implementing method. + A that represents the resultant expression. + + + + Creates a that represents the assignment of the expression + followed by a subsequent increment by 1 of the original expression. + + An to apply the operations on. + A that represents the resultant expression. + + + + Creates a that represents the assignment of the expression + followed by a subsequent increment by 1 of the original expression. + + An to apply the operations on. + A that represents the implementing method. + A that represents the resultant expression. + + + + Creates a that represents the assignment of the expression + followed by a subsequent decrement by 1 of the original expression. + + An to apply the operations on. + A that represents the resultant expression. + + + + Creates a that represents the assignment of the expression + followed by a subsequent decrement by 1 of the original expression. + + An to apply the operations on. + A that represents the implementing method. + A that represents the resultant expression. + + + + Creates an instance of . + + An array of objects to use to populate the collection. + An instance of that has the property equal to and the property set to the specified value. + + + + Creates an instance of . + + A collection of objects to use to populate the collection. + An instance of that has the property equal to and the property set to the specified value. @@ -3128,381 +3084,6 @@ present we return that, otherwise we return the 1st element of the ReadOnlyCollection. - - - Creates a node that can be used to identify a parameter or a variable in an expression tree. - - The type of the parameter or variable. - A node with the specified name and type. - - - - Creates a node that can be used to identify a parameter or a variable in an expression tree. - - The type of the parameter or variable. - A node with the specified name and type. - - - - Creates a node that can be used to identify a parameter or a variable in an expression tree. - - The type of the parameter or variable. - The name of the parameter or variable, used for debugging or pretty printing purpose only. - A node with the specified name and type. - - - - Creates a node that can be used to identify a parameter or a variable in an expression tree. - - The type of the parameter or variable. - The name of the parameter or variable, used for debugging or pretty printing purpose only. - A node with the specified name and type. - - - - Creates a . - - An to set the property equal to. - A to set the property equal to. - A for which the property is equal to and for which the and properties are set to the specified values. - - - - Creates a that compares run-time type identity. - - An to set the property equal to. - A to set the property equal to. - A for which the property is equal to and for which the and properties are set to the specified values. - - - - Creates an instance of . - - An array of objects to use to populate the collection. - An instance of that has the property equal to and the property set to the specified value. - - - - Creates an instance of . - - A collection of objects to use to populate the collection. - An instance of that has the property equal to and the property set to the specified value. - - - - Creates an empty expression that has type. - - - A that has the property equal to - and the property set to . - - - - - Creates a that has the property set to the specified type. - - A to set the property equal to. - - A that has the property equal to - and the property set to the specified type. - - - - - Creates a with the given body. - - The body of the loop. - The created . - - - - Creates a with the given body and break target. - - The body of the loop. - The break target used by the loop body. - The created . - - - - Creates a with the given body. - - The body of the loop. - The break target used by the loop body. - The continue target used by the loop body. - The created . - - - - Creates a new array expression of the specified type from the provided initializers. - - A Type that represents the element type of the array. - The expressions used to create the array elements. - An instance of the . - - - - Creates a new array expression of the specified type from the provided initializers. - - A Type that represents the element type of the array. - The expressions used to create the array elements. - An instance of the . - - - - Creates a that represents creating an array that has a specified rank. - - A that represents the element type of the array. - An array that contains Expression objects to use to populate the Expressions collection. - A that has the property equal to type and the property set to the specified value. - - - - Creates a that represents creating an array that has a specified rank. - - A that represents the element type of the array. - An IEnumerable{T} that contains Expression objects to use to populate the Expressions collection. - A that has the property equal to type and the property set to the specified value. - - - - Creates a representing a catch statement. - The of object to be caught can be specified but no reference to the object - will be available for use in the . - - The of this will handle. - The body of the catch statement. - The created . - - - - Creates a representing a catch statement with a reference to the caught object for use in the handler body. - - A representing a reference to the object caught by this handler. - The body of the catch statement. - The created . - - - - Creates a representing a catch statement with - an filter but no reference to the caught object. - - The of this will handle. - The body of the catch statement. - The body of the filter. - The created . - - - - Creates a representing a catch statement with - an filter and a reference to the caught object. - - A representing a reference to the object caught by this handler. - The body of the catch statement. - The body of the filter. - The created . - - - - Creates a representing a catch statement with the specified elements. - - The of this will handle. - A representing a reference to the object caught by this handler. - The body of the catch statement. - The body of the filter. - The created . - must be non-null and match the type of (if it is supplied). - - - - Creates a representing a break statement. - - The that the will jump to. - - A with equal to Break, - the property set to , and a null value to be passed to the target label upon jumping. - - - - - Creates a representing a break statement. The value passed to the label upon jumping can be specified. - - The that the will jump to. - The value that will be passed to the associated label upon jumping. - - A with equal to Break, - the property set to , - and to be passed to the target label upon jumping. - - - - - Creates a representing a break statement with the specified type. - - The that the will jump to. - An to set the property equal to. - - A with equal to Break, - the property set to , - and the property set to . - - - - - Creates a representing a break statement with the specified type. - The value passed to the label upon jumping can be specified. - - The that the will jump to. - The value that will be passed to the associated label upon jumping. - An to set the property equal to. - - A with equal to Break, - the property set to , - the property set to , - and to be passed to the target label upon jumping. - - - - - Creates a representing a continue statement. - - The that the will jump to. - - A with equal to Continue, - the property set to , - and a null value to be passed to the target label upon jumping. - - - - - Creates a representing a continue statement with the specified type. - - The that the will jump to. - An to set the property equal to. - - A with equal to Continue, - the property set to , - the property set to , - and a null value to be passed to the target label upon jumping. - - - - - Creates a representing a return statement. - - The that the will jump to. - - A with equal to Return, - the property set to , - and a null value to be passed to the target label upon jumping. - - - - - Creates a representing a return statement with the specified type. - - The that the will jump to. - An to set the property equal to. - - A with equal to Return, - the property set to , - the property set to , - and a null value to be passed to the target label upon jumping. - - - - - Creates a representing a return statement. The value passed to the label upon jumping can be specified. - - The that the will jump to. - The value that will be passed to the associated label upon jumping. - - A with equal to Continue, - the property set to , - and to be passed to the target label upon jumping. - - - - - Creates a representing a return statement with the specified type. - The value passed to the label upon jumping can be specified. - - The that the will jump to. - The value that will be passed to the associated label upon jumping. - An to set the property equal to. - - A with equal to Continue, - the property set to , - the property set to , - and to be passed to the target label upon jumping. - - - - - Creates a representing a goto. - - The that the will jump to. - - A with equal to Goto, - the property set to the specified value, - and a null value to be passed to the target label upon jumping. - - - - - Creates a representing a goto with the specified type. - - The that the will jump to. - An to set the property equal to. - - A with equal to Goto, - the property set to the specified value, - the property set to , - and a null value to be passed to the target label upon jumping. - - - - - Creates a representing a goto. The value passed to the label upon jumping can be specified. - - The that the will jump to. - The value that will be passed to the associated label upon jumping. - - A with equal to Goto, - the property set to , - and to be passed to the target label upon jumping. - - - - - Creates a representing a goto with the specified type. - The value passed to the label upon jumping can be specified. - - The that the will jump to. - The value that will be passed to the associated label upon jumping. - An to set the property equal to. - - A with equal to Goto, - the property set to , - the property set to , - and to be passed to the target label upon jumping. - - - - - Creates a representing a jump of the specified . - The value passed to the label upon jumping can also be specified. - - The of the . - The that the will jump to. - The value that will be passed to the associated label upon jumping. - An to set the property equal to. - - A with equal to , - the property set to , - the property set to , - and to be passed to the target label upon jumping. - - Creates an instance of . @@ -3543,6 +3124,200 @@ and and properties set to the specified value. + + + Creates a . + + An to set the property equal to. + A to set the property equal to. + A for which the property is equal to and for which the and properties are set to the specified values. + + + + Creates a that compares run-time type identity. + + An to set the property equal to. + A to set the property equal to. + A for which the property is equal to and for which the and properties are set to the specified values. + + + + Creates a new array expression of the specified type from the provided initializers. + + A Type that represents the element type of the array. + The expressions used to create the array elements. + An instance of the . + + + + Creates a new array expression of the specified type from the provided initializers. + + A Type that represents the element type of the array. + The expressions used to create the array elements. + An instance of the . + + + + Creates a that represents creating an array that has a specified rank. + + A that represents the element type of the array. + An array that contains Expression objects to use to populate the Expressions collection. + A that has the property equal to type and the property set to the specified value. + + + + Creates a that represents creating an array that has a specified rank. + + A that represents the element type of the array. + An IEnumerable{T} that contains Expression objects to use to populate the Expressions collection. + A that has the property equal to type and the property set to the specified value. + + + + Creates an that represents accessing an indexed property in an object. + + The object to which the property belongs. Should be null if the property is static(shared). + An representing the property to index. + An IEnumerable{Expression} contaning the arguments to be used to index the property. + The created . + + + + Creates an to access an array. + + An expression representing the array to index. + An array containing expressions used to index the array. + The expression representing the array can be obtained by using the MakeMemberAccess method, + or through NewArrayBounds or NewArrayInit. + The created . + + + + Creates an to access an array. + + An expression representing the array to index. + An containing expressions used to index the array. + The expression representing the array can be obtained by using the MakeMemberAccess method, + or through NewArrayBounds or NewArrayInit. + The created . + + + + Creates an representing the access to an indexed property. + + The object to which the property belongs. If the property is static/shared, it must be null. + The name of the indexer. + An array of objects that are used to index the property. + The created . + + + + The method finds the instance property with the specified name in a type. The property's type signature needs to be compatible with + the arguments if it is a indexer. If the arguments is null or empty, we get a normal property. + + + + + Creates an representing the access to an indexed property. + + The object to which the property belongs. If the property is static/shared, it must be null. + The that represents the property to index. + An array of objects that are used to index the property. + The created . + + + + Creates an representing the access to an indexed property. + + The object to which the property belongs. If the property is static/shared, it must be null. + The that represents the property to index. + An of objects that are used to index the property. + The created . + + + Creates a where the member is a field or property. + A that has the property equal to and the and properties set to the specified values. + A that represents a field or property to set the property equal to. + An array of objects to use to populate the collection. + + is null. -or-One or more elements of is null. + + does not represent a field or property.-or-The or of the field or property that represents does not implement . + + + Creates a where the member is a field or property. + A that has the property equal to and the and properties set to the specified values. + A that represents a field or property to set the property equal to. + An that contains objects to use to populate the collection. + + is null. -or-One or more elements of is null. + + does not represent a field or property.-or-The or of the field or property that represents does not implement . + + + Creates a object based on a specified property accessor method. + A that has the property equal to , the property set to the that represents the property accessed in , and populated with the elements of . + A that represents a property accessor method. + An array of objects to use to populate the collection. + + is null. -or-One or more elements of is null. + + does not represent a property accessor method.-or-The of the property that the method represented by accesses does not implement . + + + Creates a based on a specified property accessor method. + A that has the property equal to , the property set to the that represents the property accessed in , and populated with the elements of . + A that represents a property accessor method. + An that contains objects to use to populate the collection. + + is null. -or-One or more elements of are null. + + does not represent a property accessor method.-or-The of the property that the method represented by accesses does not implement . + + + + Creates a representing a label with void type and no name. + + The new . + + + + Creates a representing a label with void type and the given name. + + The name of the label. + The new . + + + + Creates a representing a label with the given type. + + The type of value that is passed when jumping to the label. + The new . + + + + Creates a representing a label with the given type and name. + + The type of value that is passed when jumping to the label. + The name of the label. + The new . + + + + Creates an ElementInit expression that represents the initialization of a list. + + The for the list's Add method. + An array containing the Expressions to be used to initialize the list. + The created ElementInit expression. + + + + Creates an ElementInit expression that represents the initialization of a list. + + The for the list's Add method. + An containing elements to initialize the list. + The created ElementInit expression. + The of the . @@ -3565,26 +3340,76 @@ A representation of the Expression. - + - Wraps ILGenerator with code that tracks the current IL offset as instructions are emitted into the IL stream. + Represents a set of binding restrictions on the under which the dynamic binding is valid. - + - Represents the dynamic set index operation at the call site, providing the binding semantic and the details about the operation. + Represents an empty set of binding restrictions. This field is read only. - + - The dynamic call site binder that participates in the binding protocol. + Merges the set of binding restrictions with the current binding restrictions. + The set of restrictions with which to merge the current binding restrictions. + The new set of binding restrictions. + + + + Creates the binding restriction that check the expression for runtime type identity. + + The expression to test. + The exact type to test. + The new binding restrictions. + + + + The method takes a DynamicMetaObject, and returns an instance restriction for testing null if the object + holds a null value, otherwise returns a type restriction. + + + + + Creates the binding restriction that checks the expression for object instance identity. + + The expression to test. + The exact object instance to test. + The new binding restrictions. + + + + Creates the binding restriction that checks the expression for arbitrary immutable properties. + + The expression expression the restrictions. + The new binding restrictions. - The performs the binding of the dynamic operation using the runtime values - as input. On the other hand, the participates in the - binding protocol. + By convention, the general restrictions created by this method must only test + immutable object properties. + + + Combines binding restrictions from the list of instances into one set of restrictions. + + The list of instances from which to combine restrictions. + The new set of binding restrictions. + + + + Creates the representing the binding restrictions. + + The expression tree representing the restrictions. + + + + Builds a balanced tree of AndAlso nodes. + We do this so the compiler won't stack overflow if we have many + restrictions. + + Class responsible for runtime binding of the dynamic operations on the dynamic call site. @@ -3641,273 +3466,764 @@ changed. - + - Initializes a new instance of the class. + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Array is null. + Offset or count are out of range. + + + + Requires the array and all its items to be non-null. - + - Performs the runtime binding of the dynamic operation on a set of arguments. + Generator of PDB debugging information for expression trees. - An array of arguments to the dynamic operation. - The array of instances that represent the parameters of the call site in the binding process. - A LabelTarget used to return the result of the dynamic binding. + + + + Generates debug information for lambdas in an expression tree. + + + + + Creates PDB symbol generator. + + PDB symbol generator. + + + + Marks a sequence point. + + The lambda being generated. + IL offset where to mark the sequence point. + Debug informaton corresponding to the sequence point. + + + + Expression rewriting to spill the CLR stack into temporary variables + in order to guarantee some properties of code generation, for + example that we always enter try block on empty stack. + + + + + The source of temporary variables + + + + + Initial stack state. Normally empty, but when inlining the lambda + we might have a non-empty starting stack state. + + + + + Lambda rewrite result. We need this for inlined lambdas to figure + out whether we need to guarentee it an empty stack. + + + + + Analyzes a lambda, producing a new one that has correct invariants + for codegen. In particular, it spills the IL stack to temps in + places where it's invalid to have a non-empty stack (for example, + entering a try statement). + + + + + Will clone an IList into an array of the same size, and copy + all vaues up to (and NOT including) the max index + + The cloned array. + + + + If we are spilling, requires that there are no byref arguments to + the method call. + + Used for: + NewExpression, + MethodCallExpression, + InvocationExpression, + DynamicExpression, + UnaryExpression, + BinaryExpression. + + + We could support this if spilling happened later in the compiler. + Other expressions that can emit calls with arguments (such as + ListInitExpression and IndexExpression) don't allow byref arguments. + + + + + Requires that the instance is not a value type (primitive types are + okay because they're immutable). + + Used for: + MethodCallExpression, + MemberExpression (for properties), + IndexExpression, + ListInitExpression, + MemberInitExpression, + assign to MemberExpression, + assign to IndexExpression. + + + We could support this if spilling happened later in the compiler. + + + + + Will perform: + save: temp = expression + return value: temp + + + + + Creates a special block that is marked as not allowing jumps in. + This should not be used for rewriting BlockExpression itself, or + anything else that supports jumping. + + + + + Creates a special block that is marked as not allowing jumps in. + This should not be used for rewriting BlockExpression itself, or + anything else that supports jumping. + + + + + Rewrite the expression + + + Expression to rewrite + State of the stack before the expression is emitted. + Rewritten expression. + + + + Current temporary variable + + + + + List of free temporary variables. These can be recycled for new temps. + + + + + Stack of currently active temporary variables. + + + + + List of all temps created by stackspiller for this rule/lambda + + + + + Rewrites child expressions, spilling them into temps if needed. The + stack starts in the inital state, and after the first subexpression + is added it is change to non-empty. This behavior can be overridden + by setting the stack manually between adds. + + When all children have been added, the caller should rewrite the + node if Rewrite is true. Then, it should call Finish with etiher + the orignal expression or the rewritten expression. Finish will call + Expression.Comma if necessary and return a new Result. + + + + + Represents a visitor or rewriter for expression trees. + + + This class is designed to be inherited to create more specialized + classes whose functionality requires traversing, examining or copying + an expression tree. + + + + + Initializes a new instance of . + + + + + Dispatches the expression to one of the more specialized visit methods in this class. + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Dispatches the list of expressions to one of the more specialized visit methods in this class. + + The expressions to visit. + The modified expression list, if any of the elements were modified; + otherwise, returns the original expression list. + + + + Visits all nodes in the collection using a specified element visitor. + + The type of the nodes. + The nodes to visit. + A delegate that visits a single element, + optionally replacing it with a new element. + The modified node list, if any of the elements were modified; + otherwise, returns the original node list. + + + + Visits an expression, casting the result back to the original expression type. + + The type of the expression. + The expression to visit. + The name of the calling method; used to report to report a better error message. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + The visit method for this node returned a different type. + + + + Visits an expression, casting the result back to the original expression type. + + The type of the expression. + The expression to visit. + The name of the calling method; used to report to report a better error message. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + The visit method for this node returned a different type. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the extension expression. + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + This can be overridden to visit or rewrite specific extension nodes. + If it is not overridden, this method will call , + which gives the node a chance to walk its children. By default, + will try to reduce the node. + + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The type of the delegate. + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Write out the given AST + + + + + Return true if the input string contains any whitespace character. + Otherwise false. + + + + + Represents one case of a . + + + + + Returns a that represents the current . + + A that represents the current . + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the values of this case. This case is selected for execution when the matches any of these values. + + + + + Gets the body of this case. + + + + + Represents an infinite loop. It can be exited with "break". + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the that is the body of the loop. + + + + + Gets the that is used by the loop body as a break statement target. + + + + + Gets the that is used by the loop body as a continue statement target. + + + + + This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. + Contains helper methods called from dynamically generated methods. + + + + + Creates an interface that can be used to modify closed over variables at runtime. + + The closure array. + An array of indicies into the closure array where variables are found. + An interface to access variables. + + + + Creates an interface that can be used to modify closed over variables at runtime. + + An interface to access variables. + + + + Gets the value of an item in an expando object. + + The expando object. + The class of the expando object. + The index of the member. + The name of the member. + true if the name should be matched ignoring case; false otherwise. + The out parameter containing the value of the member. + True if the member exists in the expando object, otherwise false. + + + + Sets the value of an item in an expando object. + + The expando object. + The class of the expando object. + The index of the member. + The value of the member. + The name of the member. + true if the name should be matched ignoring case; false otherwise. - An Expression that performs tests on the dynamic operation arguments, and - performs the dynamic operation if hte tests are valid. If the tests fail on - subsequent occurrences of the dynamic operation, Bind will be called again - to produce a new for the new argument types. + Returns the index for the set member. - + - When overridden in the derived class, performs the binding of the dynamic operation. + Deletes the value of an item in an expando object. - The target of the dynamic operation. - An array of arguments of the dynamic operation. - The representing the result of the binding. + The expando object. + The class of the expando object. + The index of the member. + The name of the member. + true if the name should be matched ignoring case; false otherwise. + true if the item was successfully removed; otherwise, false. - + - Gets an expression that will cause the binding to be updated. It - indicates that the expression's binding is no longer valid. - This is typically used when the "version" of a dynamic object has - changed. + Checks the version of the expando object. - The Type property of the resulting expression; any type is allowed. - The update expression. + The expando object. + The version to check. + true if the version is equal; otherwise, false. - + - Defers the binding of the operation until later time when the runtime values of all dynamic operation arguments have been computed. + Promotes an expando object from one class to a new class. - The target of the dynamic operation. - An array of arguments of the dynamic operation. - The representing the result of the binding. + The expando object. + The old class of the expando object. + The new class of the expando object. - + - Defers the binding of the operation until later time when the runtime values of all dynamic operation arguments have been computed. + Quotes the provided expression tree. - An array of arguments of the dynamic operation. - The representing the result of the binding. + The expression to quote. + The hoisted local state provided by the compiler. + The actual hoisted local values. + The quoted expression. - + - The result type of the operation. + Combines two runtime variable lists and returns a new list. + + The first list. + The second list. + The index array indicating which list to get variables from. + The merged runtime variables. + + + + An interface to represent values of runtime variables. - + - Initializes a new instance of the . - - The signature of the arguments at the call site. - - - - Performs the binding of the dynamic set index operation. - - The target of the dynamic set index operation. - An array of arguments of the dynamic set index operation. - The representing the result of the binding. - - - - Performs the binding of the dynamic set index operation if the target dynamic object cannot bind. - - The target of the dynamic set index operation. - The arguments of the dynamic set index operation. - The value to set to the collection. - The representing the result of the binding. - - - - When overridden in the derived class, performs the binding of the dynamic set index operation if the target dynamic object cannot bind. - - The target of the dynamic set index operation. - The arguments of the dynamic set index operation. - The value to set to the collection. - The binding result to use if binding fails, or null. - The representing the result of the binding. - - - - The result type of the operation. + Count of the variables. - + - Gets the signature of the arguments at the call site. + An indexer to get/set the values of the runtime variables. + + An index of the runtime variable. + The value of the runtime variable. + + + + Provides a list of variables, supporing read/write of the values + Exposed via RuntimeVariablesExpression - + - Creates instnace of TrueReadOnlyCollection, wrapping passed in array. - !!! DOES NOT COPY THE ARRAY !!! + Provides a list of variables, supporing read/write of the values + Exposed via RuntimeVariablesExpression - + - Holds a reference to a value. - - The type of the value that the references. - - - - Defines a property for accessing the value that an object references. + Finds a delegate type using the types in the array. + We use the cache to avoid copying the array, and to cache the + created delegate type - + - Gets or sets the value the object references. + Finds a delegate type for a CallSite using the types in the ReadOnlyCollection of Expression. + + We take the readonly collection of Expression explicitly to avoid allocating memory (an array + of types) on lookup of delegate types. - + - Gets the strongly typed value associated with the - This is explicitly exposed as a field instead of a property to enable loading the address of the field. + Finds a delegate type for a CallSite using the MetaObject array. + + We take the array of MetaObject explicitly to avoid allocating memory (an array of types) on + lookup of delegate types. - + - Initializes a new StrongBox which can receive a value when used in a reference call. + Creates a new delegate, or uses a func/action + Note: this method does not cache - - - Initializes a new with the specified value. - - A value that the will reference. - - - - The builder for read only collection. - - The type of the collection element. - - - - Constructs a ReadOnlyCollectionBuilder. - - - - - Constructs a ReadOnlyCollectionBuilder with a given initial capacity. - The contents are empty but builder will have reserved room for the given - number of elements before any reallocations are required. - - - - - Constructs a ReadOnlyCollectionBuilder, copying contents of the given collection. - - - - - - Returns the index of the first occurrence of a given value in the builder. - - An item to search for. - The index of the first occurrence of an item. - - - - Inserts an item to the at the specified index. - - The zero-based index at which item should be inserted. - The object to insert into the . - - - - Removes the item at the specified index. - - The zero-based index of the item to remove. - - - - Adds an item to the . - - The object to add to the . - - - - Removes all items from the . - - - - - Determines whether the contains a specific value - - the object to locate in the . - true if item is found in the ; otherwise, false. - - - - Copies the elements of the to an , - starting at particular index. - - The one-dimensional that is the destination of the elements copied from . - The zero-based index in array at which copying begins. - - - - Removes the first occurrence of a specific object from the . - - The object to remove from the . - true if item was successfully removed from the ; - otherwise, false. This method also returns false if item is not found in the original . - - - - - Returns an enumerator that iterates through the collection. - - A that can be used to iterate through the collection. - - - - Reverses the order of the elements in the entire . - - - - - Reverses the order of the elements in the specified range. - - The zero-based starting index of the range to reverse. - The number of elements in the range to reverse. - - - - Copies the elements of the to a new array. - - An array containing copies of the elements of the . - - - - Creates a containing all of the the elements of the , - avoiding copying the elements to the new array if possible. Resets the after the - has been created. - - A new instance of . - - - - Gets and sets the capacity of this ReadOnlyCollectionBuilder - - - - - Returns number of elements in the ReadOnlyCollectionBuilder. - - - - - Gets or sets the element at the specified index. - - The zero-based index of the element to get or set. - The element at the specified index. - Encapsulates a method that has no parameters and returns a value of the type specified by the TResult parameter. @@ -4299,283 +4615,42 @@ The sixteenth parameter of the method that this delegate encapsulates. The return value of the method that this delegate encapsulates. - + - Expression rewriting to spill the CLR stack into temporary variables - in order to guarantee some properties of code generation, for - example that we always enter try block on empty stack. - - - - - Will perform: - save: temp = expression - return value: temp - - - - - Creates a special block that is marked as not allowing jumps in. - This should not be used for rewriting BlockExpression itself, or - anything else that supports jumping. - - - - - Creates a special block that is marked as not allowing jumps in. - This should not be used for rewriting BlockExpression itself, or - anything else that supports jumping. - - - - - Rewrite the expression - + Provides a dictionary-like object used for caches which holds onto a maximum + number of elements specified at construction time. - Expression to rewrite - State of the stack before the expression is emitted. - Rewritten expression. - - - - The source of temporary variables + This class is not thread safe. - + - Initial stack state. Normally empty, but when inlining the lambda - we might have a non-empty starting stack state. + Creates a dictionary-like object used for caches. + + The maximum number of elements to store. + + + + Tries to get the value associated with 'key', returning true if it's found and + false if it's not present. - + - Lambda rewrite result. We need this for inlined lambdas to figure - out whether we need to guarentee it an empty stack. + Adds a new element to the cache, replacing and moving it to the front if the + element is already present. - + - Analyzes a lambda, producing a new one that has correct invariants - for codegen. In particular, it spills the IL stack to temps in - places where it's invalid to have a non-empty stack (for example, - entering a try statement). + Returns the value associated with the given key, or throws KeyNotFoundException + if the key is not present. - + - Will clone an IList into an array of the same size, and copy - all vaues up to (and NOT including) the max index - - The cloned array. - - - - If we are spilling, requires that there are no byref arguments to - the method call. - - Used for: - NewExpression, - MethodCallExpression, - InvocationExpression, - DynamicExpression, - UnaryExpression, - BinaryExpression. - - - We could support this if spilling happened later in the compiler. - Other expressions that can emit calls with arguments (such as - ListInitExpression and IndexExpression) don't allow byref arguments. - - - - - Requires that the instance is not a value type (primitive types are - okay because they're immutable). - - Used for: - MethodCallExpression, - MemberExpression (for properties), - IndexExpression, - ListInitExpression, - MemberInitExpression, - assign to MemberExpression, - assign to IndexExpression. - - - We could support this if spilling happened later in the compiler. - - - - - Current temporary variable - - - - - List of free temporary variables. These can be recycled for new temps. - - - - - Stack of currently active temporary variables. - - - - - List of all temps created by stackspiller for this rule/lambda - - - - - Rewrites child expressions, spilling them into temps if needed. The - stack starts in the inital state, and after the first subexpression - is added it is change to non-empty. This behavior can be overridden - by setting the stack manually between adds. - - When all children have been added, the caller should rewrite the - node if Rewrite is true. Then, it should call Finish with etiher - the orignal expression or the rewritten expression. Finish will call - Expression.Comma if necessary and return a new Result. - - - - - A special subtype of BlockExpression that indicates to the compiler - that this block is a spilled expression and should not allow jumps in. - - - - - Represents a block that contains a sequence of expressions where variables can be defined. - - - - - Dispatches to the specific visit method for this node type. - - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Makes a copy of this node replacing the parameters/args with the provided values. The - shape of the parameters/args needs to match the shape of the current block - in other - words there should be the same # of parameters and args. - - parameters can be null in which case the existing parameters are used. - - This helper is provided to allow re-writing of nodes to not depend on the specific optimized - subclass of BlockExpression which is being used. - - - - - Helper used for ensuring we only return 1 instance of a ReadOnlyCollection of T. - - This is similar to the ReturnReadOnly which only takes a single argument. This version - supports nodes which hold onto 5 Expressions and puts all of the arguments into the - ReadOnlyCollection. - - Ultimately this means if we create the readonly collection we will be slightly more wasteful as we'll - have a readonly collection + some fields in the type. The DLR internally avoids accessing anything - which would force the readonly collection to be created. - - This is used by BlockExpression5 and MethodCallExpression5. - - - - - Gets the expressions in this block. - - - - - Gets the variables defined in this block. - - - - - Gets the last expression in this block. - - - - - Returns the node type of this Expression. Extension nodes should return - ExpressionType.Extension when overriding this method. - - The of the expression. - - - - Gets the static type of the expression that this represents. - - The that represents the static type of the expression. - - - - Provides a wrapper around an IArgumentProvider which exposes the argument providers - members out as an IList of Expression. This is used to avoid allocating an array - which needs to be stored inside of a ReadOnlyCollection. Instead this type has - the same amount of overhead as an array without duplicating the storage of the - elements. This ensures that internally we can avoid creating and copying arrays - while users of the Expression trees also don't pay a size penalty for this internal - optimization. See IArgumentProvider for more general information on the Expression - tree optimizations being used here. - - - - - Contains compiler state corresponding to a LabelTarget - See also LabelScopeInfo. - - - - - Indicates if it is legal to emit a "branch" instruction based on - currently available information. Call the Reference method before - using this property. - - - - - Returns true if we can jump into this node - - - - - Finds a delegate type using the types in the array. - We use the cache to avoid copying the array, and to cache the - created delegate type - - - - - Finds a delegate type for a CallSite using the types in the ReadOnlyCollection of Expression. - - We take the readonly collection of Expression explicitly to avoid allocating memory (an array - of types) on lookup of delegate types. - - - - - Finds a delegate type for a CallSite using the MetaObject array. - - We take the array of MetaObject explicitly to avoid allocating memory (an array of types) on - lookup of delegate types. - - - - - Creates a new delegate, or uses a func/action - Note: this method does not cache + Determines if variables are closed over in nested lambdas and need to + be hoisted. @@ -4583,402 +4658,301 @@ A simple hashset, built on Dictionary{K, V} - + - A simple dictionary of queues, keyed off a particular type - This is useful for storing free lists of variables + Dynamic Language Runtime Compiler. + This part compiles lambdas. + + + LambdaCompiler is responsible for compiling individual lambda (LambdaExpression). The complete tree may + contain multiple lambdas, the Compiler class is reponsible for compiling the whole tree, individual + lambdas are then compiled by the LambdaCompiler. - + - Represents a visitor or rewriter for expression trees. + returns true if the expression is not empty, otherwise false. + + + + returns true if the expression is NOT empty and is not debug info, + or a block that contains only insignificant expressions. + + + + + Emits the expression and then either brtrue/brfalse to the label. + + True for brtrue, false for brfalse. + The expression to emit. + The label to conditionally branch to. - This class is designed to be inherited to create more specialized - classes whose functionality requires traversing, examining or copying - an expression tree. + This function optimizes equality and short circuiting logical + operators to avoid double-branching, minimize instruction count, + and generate similar IL to the C# compiler. This is important for + the JIT to optimize patterns like: + x != null AndAlso x.GetType() == typeof(SomeType) + + One optimization we don't do: we always emits at least one + conditional branch to the label, and always possibly falls through, + even if we know if the branch will always succeed or always fail. + We do this to avoid generating unreachable code, which is fine for + the CLR JIT, but doesn't verify with peverify. + + This kind of optimization could be implemented safely, by doing + constant folding over conditionals and logical expressions at the + tree level. - + - Initializes a new instance of . + Gets the common test test value type of the SwitchExpression. - + - Dispatches the expression to one of the more specialized visit methods in this class. - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Dispatches the list of expressions to one of the more specialized visit methods in this class. - - The expressions to visit. - The modified expression list, if any of the elements were modified; - otherwise, returns the original expression list. - - - - Visits all nodes in the collection using a specified element visitor. - - The type of the nodes. - The nodes to visit. - A delegate that visits a single element, - optionally replacing it with a new element. - The modified node list, if any of the elements were modified; - otherwise, returns the original node list. - - - - Visits an expression, casting the result back to the original expression type. - - The type of the expression. - The expression to visit. - The name of the calling method; used to report to report a better error message. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - The visit method for this node returned a different type. - - - - Visits an expression, casting the result back to the original expression type. - - The type of the expression. - The expression to visit. - The name of the calling method; used to report to report a better error message. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - The visit method for this node returned a different type. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the extension expression. - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - This can be overridden to visit or rewrite specific extension nodes. - If it is not overridden, this method will call , - which gives the node a chance to walk its children. By default, - will try to reduce the node. - - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The type of the delegate. - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Visits the children of the . - - The expression to visit. - The modified expression, if it or any subexpression was modified; - otherwise, returns the original expression. - - - - Represents an expression that has a conditional operator. + Creates the label for this case. + Optimization: if the body is just a goto, and we can branch + to it, put the goto target directly in the jump table. - + + + Emits the start of a catch block. The exception value that is provided by the + CLR is stored in the variable specified by the catch block or popped if no + variable is provided. + + + + + Emits code which creates new instance of the delegateType delegate. + + Since the delegate is getting closed over the "Closure" argument, this + cannot be used with virtual/instance methods (inner must be static method) + + + + + Emits a delegate to the method generated for the LambdaExpression. + May end up creating a wrapper to match the requested delegate type. + + Lambda for which to generate a delegate + + + + + Emits the lambda body. If inlined, the parameters should already be + pushed onto the IL stack. + + The parent scope. + true if the lambda is inlined; false otherwise. + + The emum to specify if the lambda is compiled with the tail call optimization. + + + + + Update the flag with a new EmitAsTailCall flag + + + + + Update the flag with a new EmitExpressionStart flag + + + + + Update the flag with a new EmitAsType flag + + + + + Generates code for this expression in a value position. + This method will leave the value of the expression + on the top of the stack typed as Type. + + + + + Emits an expression and discards the result. For some nodes this emits + more optimial code then EmitExpression/Pop + + + + + Emits arguments to a call, and returns an array of writebacks that + should happen after the call. + + + + + Emits arguments to a call, and returns an array of writebacks that + should happen after the call. For emitting dynamic expressions, we + need to skip the first parameter of the method (the call site). + + + + + The value is true if a clearance was emitted and no new sequence point + has been emitted since that. + + + + + Creates a lambda compiler that will compile to a dynamic method + + + + + Creates a lambda compiler that will compile into the provided Methodbuilder + + + + + Creates a lambda compiler for an inlined lambda + + + + + Compiler entry point + + LambdaExpression to compile. + Debug info generator. + The compiled delegate. + + + + Mutates the MethodBuilder parameter, filling in IL, parameters, + and return type. + + (probably shouldn't be modifying parameters/return type...) + + + + + Gets the argument slot corresponding to the parameter at the given + index. Assumes that the method takes a certain number of prefix + arguments, followed by the real parameters stored in Parameters + + + + + Returns the index-th argument. This method provides access to the actual arguments + defined on the lambda itself, and excludes the possible 0-th closure argument. + + + + + Creates an unitialized field suitible for private implementation details + Works with DynamicMethods or TypeBuilders. + + + + + Stores information about locals and arguments that are hoisted into + the closure array because they're referenced in an inner lambda. + + This class is sometimes emitted as a runtime constant for internal + use to hoist variables/parameters in quoted expressions + + Invariant: this class stores no mutable state + + + + + Represents the default value of a type or an empty expression. + + + Dispatches to the specific visit method for this node type. - + - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. + Gets the static type of the expression that this represents. - The property of the result. - The property of the result. - The property of the result. - This expression if no children changed, or an expression with the updated children. + The that represents the static type of the expression. - + Returns the node type of this Expression. Extension nodes should return ExpressionType.Extension when overriding this method. The of the expression. - + - Gets the static type of the expression that this represents. - - The that represents the static type of the expression. - - - - Gets the test of the conditional operation. + Specifies what kind of jump this represents. - + - Gets the expression to execute if the test evaluates to true. + A that represents a jump to some location. - + - Gets the expression to execute if the test evaluates to false. + A that represents a return statement. + + + + + A that represents a break statement. + + + + + A that represents a continue statement. + + + + + Represents an unconditional jump. This includes return statements, break and continue statements, and other jumps. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + The value passed to the target, or null if the target is of type + System.Void. + + + + + The target label where this node jumps to. + + + + + The kind of the goto. For information purposes only. @@ -4986,6 +4960,73 @@ Represents the invoke dynamic operation at the call site, providing the binding semantic and the details about the operation. + + + The dynamic call site binder that participates in the binding protocol. + + + The performs the binding of the dynamic operation using the runtime values + as input. On the other hand, the participates in the + binding protocol. + + + + + Initializes a new instance of the class. + + + + + Performs the runtime binding of the dynamic operation on a set of arguments. + + An array of arguments to the dynamic operation. + The array of instances that represent the parameters of the call site in the binding process. + A LabelTarget used to return the result of the dynamic binding. + + An Expression that performs tests on the dynamic operation arguments, and + performs the dynamic operation if the tests are valid. If the tests fail on + subsequent occurrences of the dynamic operation, Bind will be called again + to produce a new for the new argument types. + + + + + When overridden in the derived class, performs the binding of the dynamic operation. + + The target of the dynamic operation. + An array of arguments of the dynamic operation. + The representing the result of the binding. + + + + Gets an expression that will cause the binding to be updated. It + indicates that the expression's binding is no longer valid. + This is typically used when the "version" of a dynamic object has + changed. + + The Type property of the resulting expression; any type is allowed. + The update expression. + + + + Defers the binding of the operation until later time when the runtime values of all dynamic operation arguments have been computed. + + The target of the dynamic operation. + An array of arguments of the dynamic operation. + The representing the result of the binding. + + + + Defers the binding of the operation until later time when the runtime values of all dynamic operation arguments have been computed. + + An array of arguments of the dynamic operation. + The representing the result of the binding. + + + + The result type of the operation. + + Initializes a new instance of the . @@ -5027,14 +5068,156 @@ Gets the signature of the arguments at the call site. - + - Wraps the provided enumerable into a ReadOnlyCollection{T} - - Copies all of the data into a new array, so the data can't be - changed after creation. The exception is if the enumerable is - already a ReadOnlyCollection{T}, in which case we just return it. + The builder for read only collection. + The type of the collection element. + + + + Constructs a ReadOnlyCollectionBuilder. + + + + + Constructs a ReadOnlyCollectionBuilder with a given initial capacity. + The contents are empty but builder will have reserved room for the given + number of elements before any reallocations are required. + + + + + Constructs a ReadOnlyCollectionBuilder, copying contents of the given collection. + + + + + + Returns the index of the first occurrence of a given value in the builder. + + An item to search for. + The index of the first occurrence of an item. + + + + Inserts an item to the at the specified index. + + The zero-based index at which item should be inserted. + The object to insert into the . + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + + + + Adds an item to the . + + The object to add to the . + + + + Removes all items from the . + + + + + Determines whether the contains a specific value + + the object to locate in the . + true if item is found in the ; otherwise, false. + + + + Copies the elements of the to an , + starting at particular index. + + The one-dimensional that is the destination of the elements copied from . + The zero-based index in array at which copying begins. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + true if item was successfully removed from the ; + otherwise, false. This method also returns false if item is not found in the original . + + + + + Returns an enumerator that iterates through the collection. + + A that can be used to iterate through the collection. + + + + Reverses the order of the elements in the entire . + + + + + Reverses the order of the elements in the specified range. + + The zero-based starting index of the range to reverse. + The number of elements in the range to reverse. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Creates a containing all of the the elements of the , + avoiding copying the elements to the new array if possible. Resets the after the + has been created. + + A new instance of . + + + + Gets and sets the capacity of this ReadOnlyCollectionBuilder + + + + + Returns number of elements in the ReadOnlyCollectionBuilder. + + + + + Gets or sets the element at the specified index. + + The zero-based index of the element to get or set. + The element at the specified index. + + + + This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. + Represents the runtime state of a dynamically generated method. + + + + + Represents the non-trivial constants and locally executable expressions that are referenced by a dynamically generated method. + + + + + Represents the hoisted local variables from the parent context. + + + + + Creates an object to hold state of a dynamically generated method. + + The constant values used by the method. + The hoisted local variables from the parent context. @@ -5161,9 +5344,242 @@ Gets the arguments that the delegate or lambda expression is applied to. - + - Represents an object with members that can be dynamically added and removed at runtime. + Represents a block that contains a sequence of expressions where variables can be defined. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Makes a copy of this node replacing the parameters/args with the provided values. The + shape of the parameters/args needs to match the shape of the current block - in other + words there should be the same # of parameters and args. + + parameters can be null in which case the existing parameters are used. + + This helper is provided to allow re-writing of nodes to not depend on the specific optimized + subclass of BlockExpression which is being used. + + + + + Helper used for ensuring we only return 1 instance of a ReadOnlyCollection of T. + + This is similar to the ReturnReadOnly which only takes a single argument. This version + supports nodes which hold onto 5 Expressions and puts all of the arguments into the + ReadOnlyCollection. + + Ultimately this means if we create the readonly collection we will be slightly more wasteful as we'll + have a readonly collection + some fields in the type. The DLR internally avoids accessing anything + which would force the readonly collection to be created. + + This is used by BlockExpression5 and MethodCallExpression5. + + + + + Gets the expressions in this block. + + + + + Gets the variables defined in this block. + + + + + Gets the last expression in this block. + + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Provides a wrapper around an IArgumentProvider which exposes the argument providers + members out as an IList of Expression. This is used to avoid allocating an array + which needs to be stored inside of a ReadOnlyCollection. Instead this type has + the same amount of overhead as an array without duplicating the storage of the + elements. This ensures that internally we can avoid creating and copying arrays + while users of the Expression trees also don't pay a size penalty for this internal + optimization. See IArgumentProvider for more general information on the Expression + tree optimizations being used here. + + + + + A simple dictionary of queues, keyed off a particular type + This is useful for storing free lists of variables + + + + + Represents accessing a field or property. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the field or property to be accessed. + + + + + Gets the containing object of the field or property. + + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Represents a constructor call that has a collection initializer. + + + Use the factory methods to create a ListInitExpression. + The value of the NodeType property of a ListInitExpression is ListInit. + + + + + Dispatches to the specific visit method for this node type. + + + + + Reduces the binary expression node to a simpler expression. + If CanReduce returns true, this should return a valid expression. + This method is allowed to return another node which itself + must be reduced. + + The reduced expression. + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Gets a value that indicates whether the expression tree node can be reduced. + + + + + Gets the expression that contains a call to the constructor of a collection type. + + + + + Gets the element initializers that are used to initialize a collection. + + + + + Contains compiler state corresponding to a LabelTarget + See also LabelScopeInfo. + + + + + Indicates if it is legal to emit a "branch" instruction based on + currently available information. Call the Reference method before + using this property. + + + + + Returns true if we can jump into this node + + + + + Output a given expression tree to a string. + + + + + Output a given member binding to a string. + + + + + Output a given ElementInit to a string. + + + + + This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. + Represents a cache of runtime binding rules. + + The delegate type. + + + + Provides a simple class that can be inherited from to create an object with dynamic behavior + at runtime. Subclasses can override the various binder methods (GetMember, SetMember, Call, etc...) + to provide custom behavior that will be invoked at runtime. + + If a method is not overridden then the DynamicObject does not directly support that behavior and + the call site will determine how the binding should be performed. @@ -5182,54 +5598,148 @@ The expression tree representation of the runtime value. The to bind this object. - + - Creates a new ExpandoObject with no members. + Enables derived types to create a new instance of DynamicObject. DynamicObject instances cannot be + directly instantiated because they have no implementation of dynamic behavior. - + - Try to get the data stored for the specified class at the specified index. If the - class has changed a full lookup for the slot will be performed and the correct - value will be retrieved. + Provides the implementation of getting a member. Derived classes can override + this method to customize behavior. When not overridden the call site requesting the + binder determines the behavior. + The binder provided by the call site. + The result of the get operation. + true if the operation is complete, false if the call site should determine behavior. - + - Sets the data for the specified class at the specified index. If the class has - changed then a full look for the slot will be performed. If the new class does - not have the provided slot then the Expando's class will change. Only case sensitive - setter is supported in ExpandoObject. + Provides the implementation of setting a member. Derived classes can override + this method to customize behavior. When not overridden the call site requesting the + binder determines the behavior. + The binder provided by the call site. + The value to set. + true if the operation is complete, false if the call site should determine behavior. - + - Deletes the data stored for the specified class at the specified index. + Provides the implementation of deleting a member. Derived classes can override + this method to customize behavior. When not overridden the call site requesting the + binder determines the behavior. + The binder provided by the call site. + true if the operation is complete, false if the call site should determine behavior. - + - Returns true if the member at the specified index has been deleted, - otherwise false. Call this function holding the lock. + Provides the implementation of calling a member. Derived classes can override + this method to customize behavior. When not overridden the call site requesting the + binder determines the behavior. + The binder provided by the call site. + The arguments to be used for the invocation. + The result of the invocation. + true if the operation is complete, false if the call site should determine behavior. - + - Promotes the class from the old type to the new type and returns the new - ExpandoData object. + Provides the implementation of converting the DynamicObject to another type. Derived classes + can override this method to customize behavior. When not overridden the call site + requesting the binder determines the behavior. + The binder provided by the call site. + The result of the conversion. + true if the operation is complete, false if the call site should determine behavior. - + - Internal helper to promote a class. Called from our RuntimeOps helper. This - version simply doesn't expose the ExpandoData object which is a private - data structure. + Provides the implementation of creating an instance of the DynamicObject. Derived classes + can override this method to customize behavior. When not overridden the call site requesting + the binder determines the behavior. + The binder provided by the call site. + The arguments used for creation. + The created instance. + true if the operation is complete, false if the call site should determine behavior. - + - Exposes the ExpandoClass which we've associated with this - Expando object. Used for type checks in rules. + Provides the implementation of invoking the DynamicObject. Derived classes can + override this method to customize behavior. When not overridden the call site requesting + the binder determines the behavior. + + The binder provided by the call site. + The arguments to be used for the invocation. + The result of the invocation. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of performing a binary operation. Derived classes can + override this method to customize behavior. When not overridden the call site requesting + the binder determines the behavior. + + The binder provided by the call site. + The right operand for the operation. + The result of the operation. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of performing a unary operation. Derived classes can + override this method to customize behavior. When not overridden the call site requesting + the binder determines the behavior. + + The binder provided by the call site. + The result of the operation. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of performing a get index operation. Derived classes can + override this method to customize behavior. When not overridden the call site requesting + the binder determines the behavior. + + The binder provided by the call site. + The indexes to be used. + The result of the operation. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of performing a set index operation. Derived classes can + override this method to custmize behavior. When not overridden the call site requesting + the binder determines the behavior. + + The binder provided by the call site. + The indexes to be used. + The value to set. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of performing a delete index operation. Derived classes + can override this method to custmize behavior. When not overridden the call site + requesting the binder determines the behavior. + + The binder provided by the call site. + The indexes to be deleted. + true if the operation is complete, false if the call site should determine behavior. + + + + Returns the enumeration of all dynamic member names. + + The list of dynamic member names. + + + + The provided MetaObject will dispatch to the Dynamic virtual methods. + The object can be encapsulated inside of another MetaObject to + provide custom behavior for individual actions. @@ -5406,337 +5916,98 @@ Represents the most specific type known about the object represented by the . if runtime value is available, a type of the otherwise. - + - Adds a dynamic test which checks if the version has changed. The test is only necessary for - performance as the methods will do the correct thing if called with an incorrect version. + Helper method for generating a MetaObject which calls a + specific method on Dynamic that returns a result - + - Gets the class and the index associated with the given name. Does not update the expando object. Instead - this returns both the original and desired new class. A rule is created which includes the test for the - original class, the promotion to the new class, and the set/delete based on the class post-promotion. + Helper method for generating a MetaObject which calls a + specific method on Dynamic that returns a result - + - Returns our Expression converted to our known LimitType + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. - + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + + + + Checks if the derived type has overridden the specified method. If there is no + implementation for the method provided then Dynamic falls back to the base class + behavior which lets the call site determine how the binder is performed. + + + Returns a Restrictions object which includes our current restrictions merged with a restriction limiting our type - + - Stores the class and the data associated with the class as one atomic - pair. This enables us to do a class check in a thread safe manner w/o - requiring locks. + Returns our Expression converted to DynamicObject - + - the dynamically assigned class associated with the Expando object + Represents the dynamic get member operation at the call site, providing the binding semantic and the details about the operation. - + - data stored in the expando object, key names are stored in the class. - - Expando._data must be locked when mutating the value. Otherwise a copy of it - could be made and lose values. + Initializes a new instance of the . - - - - Constructs an empty ExpandoData object with the empty class and no data. - - - - - the version of the ExpandoObject that tracks set and delete operations - - - - - Constructs a new ExpandoData object with the specified class and data. - - - - - Update the associated class and increases the storage for the data array if needed. - - - - - - Indexer for getting/setting the data - - - - - This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. - Contains helper methods called from dynamically generated methods. - - - - - Gets the value of an item in an expando object. - - The expando object. - The class of the expando object. - The index of the member. - The name of the member. + The name of the member to get. true if the name should be matched ignoring case; false otherwise. - The out parameter containing the value of the member. - True if the member exists in the expando object, otherwise false. - + - Sets the value of an item in an expando object. + Performs the binding of the dynamic get member operation if the target dynamic object cannot bind. - The expando object. - The class of the expando object. - The index of the member. - The value of the member. - The name of the member. - true if the name should be matched ignoring case; false otherwise. - - Returns the index for the set member. - - - - - Deletes the value of an item in an expando object. - - The expando object. - The class of the expando object. - The index of the member. - The name of the member. - true if the name should be matched ignoring case; false otherwise. - true if the item was successfully removed; otherwise, false. - - - - Checks the version of the expando object. - - The expando object. - The version to check. - true if the version is equal; otherwise, false. - - - - Promotes an expando object from one class to a new class. - - The expando object. - The old class of the expando object. - The new class of the expando object. - - - - Quotes the provided expression tree. - - The expression to quote. - The hoisted local state provided by the compiler. - The actual hoisted local values. - The quoted expression. - - - - Combines two runtime variable lists and returns a new list. - - The first list. - The second list. - The index array indicating which list to get variables from. - The merged runtime variables. - - - - Creates an interface that can be used to modify closed over variables at runtime. - - The closure array. - An array of indicies into the closure array where variables are found. - An interface to access variables. - - - - Creates an interface that can be used to modify closed over variables at runtime. - - An interface to access variables. - - - - Provides a list of variables, supporing read/write of the values - Exposed via RuntimeVariablesExpression - - - - - Provides a list of variables, supporing read/write of the values - Exposed via RuntimeVariablesExpression - - - - - This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. - Represents the runtime state of a dynamically generated method. - - - - - Represents the non-trivial constants and locally executable expressions that are referenced by a dynamically generated method. - - - - - Represents the hoisted local variables from the parent context. - - - - - Creates an object to hold state of a dynamically generated method. - - The constant values used by the method. - The hoisted local variables from the parent context. - - - - Represents accessing a field or property. - - - - - Dispatches to the specific visit method for this node type. - - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Gets the field or property to be accessed. - - - - - Gets the containing object of the field or property. - - - - - Returns the node type of this . (Inherited from .) - - The that represents this expression. - - - - Used to denote the target of a . - - - - - Returns a that represents the current . - - A that represents the current . - - - - Gets the name of the label. - - The label's name is provided for information purposes only. - - - - The type of value that is passed when jumping to the label - (or System.Void if no value should be passed). - - - - - This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. - Represents a cache of runtime binding rules. - - The delegate type. - - - - Represents the convert dynamic operation at the call site, providing the binding semantic and the details about the operation. - - - - - Initializes a new intsance of the . - - The type to convert to. - true if the conversion should consider explicit conversions; otherwise, false. - - - - Performs the binding of the dynamic convert operation if the target dynamic object cannot bind. - - The target of the dynamic convert operation. + The target of the dynamic get member operation. The representing the result of the binding. - + - When overridden in the derived class, performs the binding of the dynamic convert operation if the target dynamic object cannot bind. + When overridden in the derived class, performs the binding of the dynamic get member operation if the target dynamic object cannot bind. - The target of the dynamic convert operation. + The target of the dynamic get member operation. The binding result to use if binding fails, or null. The representing the result of the binding. - + - Performs the binding of the dynamic convert operation. + Performs the binding of the dynamic get member operation. - The target of the dynamic convert operation. - An array of arguments of the dynamic convert operation. + The target of the dynamic get member operation. + An array of arguments of the dynamic get member operation. The representing the result of the binding. - - - The type to convert to. - - - - - Gets the value indicating if the conversion should consider explicit conversions. - - - + The result type of the operation. - + - Determines if variables are closed over in nested lambdas and need to - be hoisted. + Gets the name of the member to get. - + - Generator of PDB debugging information for expression trees. - - - - - Stores information about locals and arguments that are hoisted into - the closure array because they're referenced in an inner lambda. - - This class is sometimes emitted as a runtime constant for internal - use to hoist variables/parameters in quoted expressions - - Invariant: this class stores no mutable state + Gets the value indicating if the string comparison should ignore the case of the member name. @@ -5800,58 +6071,27 @@ Gets the representing the fault block. - + - Represents a control expression that handles multiple selections by passing control to a . + Represents initializing members of a member of a newly created object. + + Use the factory methods to create a . + The value of the property of a object is . + - - - Dispatches to the specific visit method for this node type. - - - + Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression. - The property of the result. - The property of the result. - The property of the result. + The property of the result. This expression if no children changed, or an expression with the updated children. - + - Gets the static type of the expression that this represents. - - The that represents the static type of the expression. - - - - Returns the node type of this Expression. Extension nodes should return - ExpressionType.Extension when overriding this method. - - The of the expression. - - - - Gets the test for the switch. - - - - - Gets the collection of objects for the switch. - - - - - Gets the test for the switch. - - - - - Gets the equality comparison method, if any. + Gets the bindings that describe how to initialize the members of a member. @@ -6040,927 +6280,53 @@ Dispatches to the specific visit method for this node type. - + - Represents the initialization of a list. + Represents an expression that has a conditional operator. - - - Creates a representation of the node. - - A representation of the node. - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Gets the used to add elements to the object. - - - - - Gets the list of elements to be added to the object. - - - - - Represents a dynamic operation. - - - + Dispatches to the specific visit method for this node type. - - - Makes a copy of this node replacing the args with the provided values. The - number of the args needs to match the number of the current block. - - This helper is provided to allow re-writing of nodes to not depend on the specific optimized - subclass of DynamicExpression which is being used. - - - + Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression. - The property of the result. + The property of the result. + The property of the result. + The property of the result. This expression if no children changed, or an expression with the updated children. - - - Gets the static type of the expression that this represents. - - The that represents the static type of the expression. - - + Returns the node type of this Expression. Extension nodes should return ExpressionType.Extension when overriding this method. The of the expression. - - - Gets the , which determines the runtime behavior of the - dynamic site. - - - - - Gets the type of the delegate used by the . - - - - - Gets the arguments to the dynamic operation. - - - - - Provides a wrapper around an IArgumentProvider which exposes the argument providers - members out as an IList of Expression. This is used to avoid allocating an array - which needs to be stored inside of a ReadOnlyCollection. Instead this type has - the same amount of overhead as an array without duplicating the storage of the - elements. This ensures that internally we can avoid creating and copying arrays - while users of the Expression trees also don't pay a size penalty for this internal - optimization. See IArgumentProvider for more general information on the Expression - tree optimizations being used here. - - - - - Represents a set of binding restrictions on the under which the dynamic binding is valid. - - - - - Represents an empty set of binding restrictions. This field is read only. - - - - - Merges the set of binding restrictions with the current binding restrictions. - - The set of restrictions with which to merge the current binding restrictions. - The new set of binding restrictions. - - - - Creates the binding restriction that check the expression for runtime type identity. - - The expression to test. - The exact type to test. - The new binding restrictions. - - - - The method takes a DynamicMetaObject, and returns an instance restriction for testing null if the object - holds a null value, otherwise returns a type restriction. - - - - - Creates the binding restriction that checks the expression for object instance identity. - - The expression to test. - The exact object instance to test. - The new binding restrictions. - - - - Creates the binding restriction that checks the expression for arbitrary immutable properties. - - The expression expression the restrictions. - The new binding restrictions. - - By convention, the general restrictions created by this method must only test - immutable object properties. - - - - - Combines binding restrictions from the list of instances into one set of restrictions. - - The list of instances from which to combine restrictions. - The new set of binding restrictions. - - - - Creates the representing the binding restrictions. - - The expression tree representing the restrictions. - - - - Builds a balanced tree of AndAlso nodes. - We do this so the compiler won't stack overflow if we have many - restrictions. - - - - - Represents a constructor call. - - - - - Dispatches to the specific visit method for this node type. - - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Gets the static type of the expression that this represents. (Inherited from .) - - The that represents the static type of the expression. - - - - Returns the node type of this . (Inherited from .) - - The that represents this expression. - - - - Gets the called constructor. - - - - - Gets the arguments to the constructor. - - - - - Gets the members that can retrieve the values of the fields that were initialized with constructor arguments. - - - - - Represents initializing members of a member of a newly created object. - - - Use the factory methods to create a . - The value of the property of a object is . - - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Gets the bindings that describe how to initialize the members of a member. - - - - - Represents a constructor call that has a collection initializer. - - - Use the factory methods to create a ListInitExpression. - The value of the NodeType property of a ListInitExpression is ListInit. - - - - - Dispatches to the specific visit method for this node type. - - - - - Reduces the binary expression node to a simpler expression. - If CanReduce returns true, this should return a valid expression. - This method is allowed to return another node which itself - must be reduced. - - The reduced expression. - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Returns the node type of this . (Inherited from .) - - The that represents this expression. - - - - Gets the static type of the expression that this represents. (Inherited from .) - - The that represents the static type of the expression. - - - - Gets a value that indicates whether the expression tree node can be reduced. - - - - - Gets the expression that contains a call to the constructor of a collection type. - - - - - Gets the element initializers that are used to initialize a collection. - - - - - Represents a dynamically assigned class. Expando objects which share the same - members will share the same class. Classes are dynamically assigned as the - expando object gains members. - - - - - Constructs the empty ExpandoClass. This is the class used when an - empty Expando object is initially constructed. - - - - - Constructs a new ExpandoClass that can hold onto the specified keys. The - keys must be sorted ordinally. The hash code must be precalculated for - the keys. - - - - - Finds or creates a new ExpandoClass given the existing set of keys - in this ExpandoClass plus the new key to be added. Members in an - ExpandoClass are always stored case sensitively. - - - - - Gets the lists of transitions that are valid from this ExpandoClass - to an ExpandoClass whos keys hash to the apporopriate hash code. - - - - - Gets the index at which the value should be stored for the specified name. - - - - - Gets the index at which the value should be stored for the specified name - case sensitively. Returns the index even if the member is marked as deleted. - - - - - Gets the index at which the value should be stored for the specified name, - the method is only used in the case-insensitive case. - - the name of the member - The ExpandoObject associated with the class - that is used to check if a member has been deleted. - - the exact match if there is one - if there is exactly one member with case insensitive match, return it - otherwise we throw AmbiguousMatchException. - - - - - Gets the names of the keys that can be stored in the Expando class. The - list is sorted ordinally. - - - - - Represents the binary dynamic operation at the call site, providing the binding semantic and the details about the operation. - - - - - Initializes a new instance of the class. - - The binary operation kind. - - - - Performs the binding of the binary dynamic operation if the target dynamic object cannot bind. - - The target of the dynamic binary operation. - The right hand side operand of the dynamic binary operation. - The representing the result of the binding. - - - - When overridden in the derived class, performs the binding of the binary dynamic operation if the target dynamic object cannot bind. - - The target of the dynamic binary operation. - The right hand side operand of the dynamic binary operation. - The binding result in case the binding fails, or null. - The representing the result of the binding. - - - - Performs the binding of the dynamic binary operation. - - The target of the dynamic operation. - An array of arguments of the dynamic operation. - The representing the result of the binding. - - - - The result type of the operation. - - - - - The binary operation kind. - - - - - Represents a label, which can be placed in any context. If - it is jumped to, it will get the value provided by the corresponding - . Otherwise, it gets the value in . If the - equals System.Void, no value should be provided. - - - - - Dispatches to the specific visit method for this node type. - - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Gets the static type of the expression that this represents. (Inherited from .) - - The that represents the static type of the expression. - - - - Returns the node type of this . (Inherited from .) - - The that represents this expression. - - - - The which this label is associated with. - - - - - The value of the when the label is reached through - normal control flow (e.g. is not jumped to). - - - - - Provides a dictionary-like object used for caches which holds onto a maximum - number of elements specified at construction time. - - This class is not thread safe. - - - - - Creates a dictionary-like object used for caches. - - The maximum number of elements to store. - - - - Tries to get the value associated with 'key', returning true if it's found and - false if it's not present. - - - - - Adds a new element to the cache, replacing and moving it to the front if the - element is already present. - - - - - Returns the value associated with the given key, or throws KeyNotFoundException - if the key is not present. - - - - - Represents an expression that has a constant value. - - - - - Dispatches to the specific visit method for this node type. - - - + Gets the static type of the expression that this represents. - The that represents the static type of the expression. + The that represents the static type of the expression. - + - Returns the node type of this Expression. Extension nodes should return - ExpressionType.Extension when overriding this method. - - The of the expression. - - - - Gets the value of the constant expression. + Gets the test of the conditional operation. - + - Emits or clears a sequence point for debug information. - - This allows the debugger to highlight the correct source code when - debugging. + Gets the expression to execute if the test evaluates to true. - + - Dispatches to the specific visit method for this node type. - - - - - Gets the static type of the expression that this represents. (Inherited from .) - - The that represents the static type of the expression. - - - - Returns the node type of this . (Inherited from .) - - The that represents this expression. - - - - Gets the start line of this . - - - - - Gets the start column of this . - - - - - Gets the end line of this . - - - - - Gets the end column of this . - - - - - Gets the that represents the source file. - - - - - Gets the value to indicate if the is for clearing a sequence point. - - - - - Describes arguments in the dynamic binding process. - - - ArgumentCount - all inclusive number of arguments. - ArgumentNames - names for those arguments that are named. - - Argument names match to the argument values in left to right order - and last name corresponds to the last argument. - - Example: - Foo(arg1, arg2, arg3, name1 = arg4, name2 = arg5, name3 = arg6) - - will correspond to: - ArgumentCount: 6 - ArgumentNames: {"name1", "name2", "name3"} - - - - - Creates a new PositionalArgumentInfo. - - The number of arguments. - The argument names. - The new CallInfo - - - - Creates a new CallInfo that represents arguments in the dynamic binding process. - - The number of arguments. - The argument names. - The new CallInfo - - - - Serves as a hash function for the current CallInfo. - - A hash code for the current CallInfo. - - - - Determines whether the specified CallInfo instance is considered equal to the current. - - The instance of CallInfo to compare with the current instance. - true if the specified instance is equal to the current one otherwise, false. - - - - The number of arguments. - - - - - The argument names. - - - - - Emits a Ldind* instruction for the appropriate type - - - - - Emits a Stind* instruction for the appropriate type. - - - - - Emits a Stelem* instruction for the appropriate type. - - - - - Emits an array of constant values provided in the given list. - The array is strongly typed. - - - - - Emits an array of values of count size. The items are emitted via the callback - which is provided with the current item index to emit. - - - - - Emits an array construction code. - The code assumes that bounds for all dimensions - are already emitted. - - - - - Emits default(T) - Semantics match C# compiler behavior - - - - - If the result of a TypeBinaryExpression is known statically, this - returns the result, otherwise it returns null, meaning we'll need - to perform the IsInst instruction at runtime. - - The result of this function must be equivalent to IsInst, or - null. - - - - - If the result of a unary TypeAs expression is known statically, this - returns the result, otherwise it returns null, meaning we'll need - to perform the IsInst instruction at runtime. - - The result of this function must be equivalent to IsInst, or - null. - - - - - If the result of an isinst opcode is known statically, this - returns the result, otherwise it returns null, meaning we'll need - to perform the IsInst instruction at runtime. - - The result of this function must be equivalent to IsInst, or - null. - - - - - Represents an expression that has a unary operator. - - - - - Dispatches to the specific visit method for this node type. - - - - - Reduces the expression node to a simpler expression. - If CanReduce returns true, this should return a valid expression. - This method is allowed to return another node which itself - must be reduced. - - The reduced expression. - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Gets the static type of the expression that this represents. (Inherited from .) - - The that represents the static type of the expression. - - - - Returns the node type of this . (Inherited from .) - - The that represents this expression. - - - - Gets the operand of the unary operation. - - An that represents the operand of the unary operation. - - - - Gets the implementing method for the unary operation. - - The that represents the implementing method. - - - - Gets a value that indicates whether the expression tree node represents a lifted call to an operator. - - true if the node represents a lifted call; otherwise, false. - - - - Gets a value that indicates whether the expression tree node represents a lifted call to an operator whose return type is lifted to a nullable type. - - true if the operator's return type is lifted to a nullable type; otherwise, false. - - - - Gets a value that indicates whether the expression tree node can be reduced. - - - - - Represents a call to either static or an instance method. - - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Dispatches to the specific visit method for this node type. - - - - - Returns a new MethodCallExpression replacing the existing instance/args with the - newly provided instance and args. Arguments can be null to use the existing - arguments. - - This helper is provided to allow re-writing of nodes to not depend on the specific optimized - subclass of MethodCallExpression which is being used. - - - - - Returns the node type of this . (Inherited from .) - - The that represents this expression. - - - - Gets the static type of the expression that this represents. (Inherited from .) - - The that represents the static type of the expression. - - - - Gets the for the method to be called. - - - - - Gets the that represents the instance - for instance method calls or null for static method cals. - - - - - Gets a collection of expressions that represent arguments to the method call. - - - - - Represents initializing the elements of a collection member of a newly created object. - - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Gets the element initializers for initializing a collection member of a newly created object. - - - - - Represents an expression that has a binary operator. - - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - The property of the result. - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Reduces the binary expression node to a simpler expression. - If CanReduce returns true, this should return a valid expression. - This method is allowed to return another node which itself - must be reduced. - - The reduced expression. - - - - Dispatches to the specific visit method for this node type. - - - - - Gets a value that indicates whether the expression tree node can be reduced. - - - - - Gets the right operand of the binary operation. - - - - - Gets the left operand of the binary operation. - - - - - Gets the implementing method for the binary operation. - - - - - Gets the type conversion function that is used by a coalescing or compound assignment operation. - - - - - Gets a value that indicates whether the expression tree node represents a lifted call to an operator. - - - - - Gets a value that indicates whether the expression tree node represents a lifted call to an operator whose return type is lifted to a nullable type. - - - - - Output a given expression tree to a string. - - - - - Output a given member binding to a string. - - - - - Output a given ElementInit to a string. + Gets the expression to execute if the test evaluates to false. @@ -7053,67 +6419,184 @@ Gets the signature of the arguments at the call site. - + - Represents the dynamic delete index operation at the call site, providing the binding semantic and the details about the operation. + Represents a control expression that handles multiple selections by passing control to a . - + - Initializes a new instance of the . - - The signature of the arguments at the call site. - - - - Performs the binding of the dynamic delete index operation. - - The target of the dynamic delete index operation. - An array of arguments of the dynamic delete index operation. - The representing the result of the binding. - - - - Performs the binding of the dynamic delete index operation if the target dynamic object cannot bind. - - The target of the dynamic delete index operation. - The arguments of the dynamic delete index operation. - The representing the result of the binding. - - - - When overridden in the derived class, performs the binding of the dynamic delete index operation if the target dynamic object cannot bind. - - The target of the dynamic delete index operation. - The arguments of the dynamic delete index operation. - The binding result to use if binding fails, or null. - The representing the result of the binding. - - - - The result type of the operation. + Dispatches to the specific visit method for this node type. - + - Gets the signature of the arguments at the call site. + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the test for the switch. - + - Class that contains helper methods for DLR CallSites. + Gets the collection of objects for the switch. - + - Checks if a is internally used by DLR and should not - be displayed on the language code's stack. + Gets the test for the switch. + + + + + Gets the equality comparison method, if any. + + + + + Represents an expression that has a constant value. + + + + + Dispatches to the specific visit method for this node type. + + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the value of the constant expression. + + + + + Provides a wrapper around an IArgumentProvider which exposes the argument providers + members out as an IList of Expression. This is used to avoid allocating an array + which needs to be stored inside of a ReadOnlyCollection. Instead this type has + the same amount of overhead as an array without duplicating the storage of the + elements. This ensures that internally we can avoid creating and copying arrays + while users of the Expression trees also don't pay a size penalty for this internal + optimization. See IArgumentProvider for more general information on the Expression + tree optimizations being used here. + + + + + If the result of a TypeBinaryExpression is known statically, this + returns the result, otherwise it returns null, meaning we'll need + to perform the IsInst instruction at runtime. + + The result of this function must be equivalent to IsInst, or + null. + + + + + If the result of a unary TypeAs expression is known statically, this + returns the result, otherwise it returns null, meaning we'll need + to perform the IsInst instruction at runtime. + + The result of this function must be equivalent to IsInst, or + null. + + + + + If the result of an isinst opcode is known statically, this + returns the result, otherwise it returns null, meaning we'll need + to perform the IsInst instruction at runtime. + + The result of this function must be equivalent to IsInst, or + null. + + + + + Emits or clears a sequence point for debug information. + + This allows the debugger to highlight the correct source code when + debugging. + + + + + Dispatches to the specific visit method for this node type. + + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the start line of this . + + + + + Gets the start column of this . + + + + + Gets the end line of this . + + + + + Gets the end column of this . + + + + + Gets the that represents the source file. + + + + + Gets the value to indicate if the is for clearing a sequence point. - The input - - True if the input is internally used by DLR and should not - be displayed on the language code's stack. Otherwise, false. - @@ -7217,6 +6700,52 @@ Equivalent to: _hoistedLocals ?? _closureHoistedLocals + + + Represents a constructor call. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the called constructor. + + + + + Gets the arguments to the constructor. + + + + + Gets the members that can retrieve the values of the fields that were initialized with constructor arguments. + + Represents the dynamic delete member operation at the call site, providing the binding semantic and the details about the operation. @@ -7267,72 +6796,210 @@ The result type of the operation. - + - A Dynamic Call Site base class. This type is used as a parameter type to the - dynamic site targets. The first parameter of the delegate (T) below must be - of this type. + Represents a dynamically assigned class. Expando objects which share the same + members will share the same class. Classes are dynamically assigned as the + expando object gains members. - + - The Binder responsible for binding operations at this call site. - This binder is invoked by the UpdateAndExecute below if all Level 0, - Level 1 and Level 2 caches experience cache miss. + Constructs the empty ExpandoClass. This is the class used when an + empty Expando object is initially constructed. - + - used by Matchmaker sites to indicate rule match. + Constructs a new ExpandoClass that can hold onto the specified keys. The + keys must be sorted ordinally. The hash code must be precalculated for + the keys. - + - Creates a CallSite with the given delegate type and binder. - - The CallSite delegate type. - The CallSite binder. - The new CallSite. - - - - Class responsible for binding dynamic operations on the dynamic site. + Finds or creates a new ExpandoClass given the existing set of keys + in this ExpandoClass plus the new key to be added. Members in an + ExpandoClass are always stored case sensitively. - + - Dynamic site type. - - The delegate type. - - - - The Level 0 cache - a delegate specialized based on the site history. + Gets the lists of transitions that are valid from this ExpandoClass + to an ExpandoClass whos keys hash to the apporopriate hash code. - + - The Level 1 cache - a history of the dynamic site. + Gets the index at which the value should be stored for the specified name. - + - Creates an instance of the dynamic call site, initialized with the binder responsible for the - runtime binding of the dynamic operations at this call site. - - The binder responsible for the runtime binding of the dynamic operations at this call site. - The new instance of dynamic call site. - - - - Clears the rule cache ... used by the call site tests. + Gets the index at which the value should be stored for the specified name + case sensitively. Returns the index even if the member is marked as deleted. - + - The update delegate. Called when the dynamic site experiences cache miss. + Gets the index at which the value should be stored for the specified name, + the method is only used in the case-insensitive case. - The update delegate. + the name of the member + The ExpandoObject associated with the class + that is used to check if a member has been deleted. + + the exact match if there is one + if there is exactly one member with case insensitive match, return it + otherwise we throw AmbiguousMatchException. + + + + + Gets the names of the keys that can be stored in the Expando class. The + list is sorted ordinally. + + + + + Represents an object with members that can be dynamically added and removed at runtime. + + + + + Creates a new ExpandoObject with no members. + + + + + Try to get the data stored for the specified class at the specified index. If the + class has changed a full lookup for the slot will be performed and the correct + value will be retrieved. + + + + + Sets the data for the specified class at the specified index. If the class has + changed then a full look for the slot will be performed. If the new class does + not have the provided slot then the Expando's class will change. Only case sensitive + setter is supported in ExpandoObject. + + + + + Deletes the data stored for the specified class at the specified index. + + + + + Returns true if the member at the specified index has been deleted, + otherwise false. Call this function holding the lock. + + + + + Promotes the class from the old type to the new type and returns the new + ExpandoData object. + + + + + Internal helper to promote a class. Called from our RuntimeOps helper. This + version simply doesn't expose the ExpandoData object which is a private + data structure. + + + + + Exposes the ExpandoClass which we've associated with this + Expando object. Used for type checks in rules. + + + + + Adds a dynamic test which checks if the version has changed. The test is only necessary for + performance as the methods will do the correct thing if called with an incorrect version. + + + + + Gets the class and the index associated with the given name. Does not update the expando object. Instead + this returns both the original and desired new class. A rule is created which includes the test for the + original class, the promotion to the new class, and the set/delete based on the class post-promotion. + + + + + Returns our Expression converted to our known LimitType + + + + + Returns a Restrictions object which includes our current restrictions merged + with a restriction limiting our type + + + + + Stores the class and the data associated with the class as one atomic + pair. This enables us to do a class check in a thread safe manner w/o + requiring locks. + + + + + the dynamically assigned class associated with the Expando object + + + + + data stored in the expando object, key names are stored in the class. + + Expando._data must be locked when mutating the value. Otherwise a copy of it + could be made and lose values. + + + + + Constructs an empty ExpandoData object with the empty class and no data. + + + + + the version of the ExpandoObject that tracks set and delete operations + + + + + Constructs a new ExpandoData object with the specified class and data. + + + + + Update the associated class and increases the storage for the data array if needed. + + + + + + Indexer for getting/setting the data + + + + + Class that contains helper methods for DLR CallSites. + + + + + Checks if a is internally used by DLR and should not + be displayed on the language code's stack. + + The input + + True if the input is internally used by DLR and should not + be displayed on the language code's stack. Otherwise, false. + @@ -7407,1150 +7074,384 @@ Gets the signature of the arguments at the call site. - - - This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. - - - - - Creates an instance of a dynamic call site used for cache lookup. - - The type of the delegate of the . - The new call site. - - - - Checks if a dynamic site requires an update. - - An instance of the dynamic call site. - true if rule does not need updating, false otherwise. - - - - Checks whether the executed rule matched - - An instance of the dynamic call site. - true if rule matched, false otherwise. - - - - Clears the match flag on the matchmaker call site. - - An instance of the dynamic call site. - - - - Adds a rule to the cache maintained on the dynamic call site. - - The type of the delegate of the . - An instance of the dynamic call site. - An instance of the call site rule. - - - - Updates rules in the cache. - - The type of the delegate of the . - An instance of the dynamic call site. - The matched rule index. - - - - Gets the dynamic binding rules from the call site. - - The type of the delegate of the . - An instance of the dynamic call site. - An array of dynamic binding rules. - - - - Retrieves binding rule cache. - - The type of the delegate of the . - An instance of the dynamic call site. - The cache. - - - - Moves the binding rule within the cache. - - The type of the delegate of the . - The call site rule cache. - An instance of the call site rule. - An index of the call site rule. - - - - Searches the dynamic rule cache for rules applicable to the dynamic operation. - - The type of the delegate of the . - The cache. - The collection of applicable rules. - - - - Updates the call site target with a new rule based on the arguments. - - The type of the delegate of the . - The call site binder. - An instance of the dynamic call site. - Arguments to the call site. - The new call site target. - - - - Represents indexing a property or array. - - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Dispatches to the specific visit method for this node type. - - - - - Returns the node type of this . (Inherited from .) - - The that represents this expression. - - - - Gets the static type of the expression that this represents. (Inherited from .) - - The that represents the static type of the expression. - - - - An object to index. - - - - - Gets the for the property if the expression represents an indexed property, returns null otherwise. - - - - - Gets the arguments to be used to index the property or array. - - - - - Describes the node types for the nodes of an expression tree. - - - - - A node that represents arithmetic addition without overflow checking. - - - - - A node that represents arithmetic addition with overflow checking. - - - - - A node that represents a bitwise AND operation. - - - - - A node that represents a short-circuiting conditional AND operation. - - - - - A node that represents getting the length of a one-dimensional array. - - - - - A node that represents indexing into a one-dimensional array. - - - - - A node that represents represents a method call. - - - - - A node that represents a null coalescing operation. - - - - - A node that represents a conditional operation. - - - - - A node that represents an expression that has a constant value. - - - - - A node that represents a cast or conversion operation. If the operation is a numeric conversion, it overflows silently if the converted value does not fit the target type. - - - - - A node that represents a cast or conversion operation. If the operation is a numeric conversion, an exception is thrown if the converted value does not fit the target type. - - - - - A node that represents arithmetic division. - - - - - A node that represents an equality comparison. - - - - - A node that represents a bitwise XOR operation. - - - - - A node that represents a "greater than" numeric comparison. - - - - - A node that represents a "greater than or equal" numeric comparison. - - - - - A node that represents applying a delegate or lambda expression to a list of argument expressions. - - - - - A node that represents a lambda expression. - - - - - A node that represents a bitwise left-shift operation. - - - - - A node that represents a "less than" numeric comparison. - - - - - A node that represents a "less than or equal" numeric comparison. - - - - - A node that represents creating a new IEnumerable object and initializing it from a list of elements. - - - - - A node that represents reading from a field or property. - - - - - A node that represents creating a new object and initializing one or more of its members. - - - - - A node that represents an arithmetic remainder operation. - - - - - A node that represents arithmetic multiplication without overflow checking. - - - - - A node that represents arithmetic multiplication with overflow checking. - - - - - A node that represents an arithmetic negation operation. - - - - - A node that represents a unary plus operation. The result of a predefined unary plus operation is simply the value of the operand, but user-defined implementations may have non-trivial results. - - - - - A node that represents an arithmetic negation operation that has overflow checking. - - - - - A node that represents calling a constructor to create a new object. - - - - - A node that represents creating a new one-dimensional array and initializing it from a list of elements. - - - - - A node that represents creating a new array where the bounds for each dimension are specified. - - - - - A node that represents a bitwise complement operation. - - - - - A node that represents an inequality comparison. - - - - - A node that represents a bitwise OR operation. - - - - - A node that represents a short-circuiting conditional OR operation. - - - - - A node that represents a reference to a parameter or variable defined in the context of the expression. - - - - - A node that represents raising a number to a power. - - - - - A node that represents an expression that has a constant value of type Expression. A Quote node can contain references to parameters defined in the context of the expression it represents. - - - - - A node that represents a bitwise right-shift operation. - - - - - A node that represents arithmetic subtraction without overflow checking. - - - - - A node that represents arithmetic subtraction with overflow checking. - - - - - A node that represents an explicit reference or boxing conversion where null reference (Nothing in Visual Basic) is supplied if the conversion fails. - - - - - A node that represents a type test. - - - - - A node that represents an assignment. - - - - - A node that represents a block of expressions. - - - - - A node that represents a debugging information. - - - - - A node that represents a unary decrement. - - - - - A node that represents a dynamic operation. - - - - - A node that represents a default value. - - - - - A node that represents an extension expression. - - - - - A node that represents a goto. - - - - - A node that represents a unary increment. - - - - - A node that represents an index operation. - - - - - A node that represents a label. - - - - - A node that represents a list of runtime variables. - - - - - A node that represents a loop. - - - - - A node that represents a switch operation. - - - - - A node that represents a throwing of an exception. - - - - - A node that represents a try-catch expression. - - - - - A node that represents an unbox value type operation. - - - - - A node that represents an arithmetic addition compound assignment without overflow checking. - - - - - A node that represents a bitwise AND compound assignment. - - - - - A node that represents an arithmetic division compound assignment . - - - - - A node that represents a bitwise XOR compound assignment. - - - - - A node that represents a bitwise left-shift compound assignment. - - - - - A node that represents an arithmetic remainder compound assignment. - - - - - A node that represents arithmetic multiplication compound assignment without overflow checking. - - - - - A node that represents a bitwise OR compound assignment. - - - - - A node that represents raising a number to a power compound assignment. - - - - - A node that represents a bitwise right-shift compound assignment. - - - - - A node that represents arithmetic subtraction compound assignment without overflow checking. - - - - - A node that represents an arithmetic addition compound assignment with overflow checking. - - - - - A node that represents arithmetic multiplication compound assignment with overflow checking. - - - - - A node that represents arithmetic subtraction compound assignment with overflow checking. - - - - - A node that represents an unary prefix increment. - - - - - A node that represents an unary prefix decrement. - + + + Describes arguments in the dynamic binding process. + + + ArgumentCount - all inclusive number of arguments. + ArgumentNames - names for those arguments that are named. + + Argument names match to the argument values in left to right order + and last name corresponds to the last argument. + + Example: + Foo(arg1, arg2, arg3, name1 = arg4, name2 = arg5, name3 = arg6) + + will correspond to: + ArgumentCount: 6 + ArgumentNames: {"name1", "name2", "name3"} + - + - A node that represents an unary postfix increment. + Creates a new PositionalArgumentInfo. + The number of arguments. + The argument names. + The new CallInfo - + - A node that represents an unary postfix decrement. + Creates a new CallInfo that represents arguments in the dynamic binding process. + The number of arguments. + The argument names. + The new CallInfo - + - A node that represents a exact type test. + Serves as a hash function for the current CallInfo. + A hash code for the current CallInfo. - + - A node that represents a ones complement. + Determines whether the specified CallInfo instance is considered equal to the current. + The instance of CallInfo to compare with the current instance. + true if the specified instance is equal to the current one otherwise, false. - + - A node that represents a true condition value. + The number of arguments. - + - A node that represents a false condition value. + The argument names. - + - Represents the dynamic get member operation at the call site, providing the binding semantic and the details about the operation. + Represents the convert dynamic operation at the call site, providing the binding semantic and the details about the operation. - + - Initializes a new instance of the . + Initializes a new intsance of the . - The name of the member to get. - true if the name should be matched ignoring case; false otherwise. + The type to convert to. + true if the conversion should consider explicit conversions; otherwise, false. - + - Performs the binding of the dynamic get member operation if the target dynamic object cannot bind. + Performs the binding of the dynamic convert operation if the target dynamic object cannot bind. - The target of the dynamic get member operation. + The target of the dynamic convert operation. The representing the result of the binding. - + - When overridden in the derived class, performs the binding of the dynamic get member operation if the target dynamic object cannot bind. + When overridden in the derived class, performs the binding of the dynamic convert operation if the target dynamic object cannot bind. - The target of the dynamic get member operation. + The target of the dynamic convert operation. The binding result to use if binding fails, or null. The representing the result of the binding. - + - Performs the binding of the dynamic get member operation. + Performs the binding of the dynamic convert operation. - The target of the dynamic get member operation. - An array of arguments of the dynamic get member operation. + The target of the dynamic convert operation. + An array of arguments of the dynamic convert operation. The representing the result of the binding. - + + + The type to convert to. + + + + + Gets the value indicating if the conversion should consider explicit conversions. + + + The result type of the operation. - + - Gets the name of the member to get. + Emits a Ldind* instruction for the appropriate type - + - Gets the value indicating if the string comparison should ignore the case of the member name. + Emits a Stind* instruction for the appropriate type. - + - Encapsulates a method that takes no parameters and does not return a value. + Emits a Stelem* instruction for the appropriate type. - + - Encapsulates a method that takes two parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes three parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes four parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes five parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes six parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes seven parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes eight parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes nine parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the ninth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The ninth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes ten parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the ninth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The ninth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes eleven parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the ninth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The ninth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes twelve parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the ninth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The ninth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes thirteen parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the ninth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The ninth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes fourteen parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the ninth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The type of the fourteenth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The ninth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - The fourteenth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes fifteen parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the ninth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The type of the fourteenth parameter of the method that this delegate encapsulates. - The type of the fifteenth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The ninth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - The fourteenth parameter of the method that this delegate encapsulates. - The fifteenth parameter of the method that this delegate encapsulates. - - - - Encapsulates a method that takes sixteen parameters and does not return a value. - - The type of the first parameter of the method that this delegate encapsulates. - The type of the second parameter of the method that this delegate encapsulates. - The type of the third parameter of the method that this delegate encapsulates. - The type of the fourth parameter of the method that this delegate encapsulates. - The type of the fifth parameter of the method that this delegate encapsulates. - The type of the sixth parameter of the method that this delegate encapsulates. - The type of the seventh parameter of the method that this delegate encapsulates. - The type of the eighth parameter of the method that this delegate encapsulates. - The type of the ninth parameter of the method that this delegate encapsulates. - The type of the tenth parameter of the method that this delegate encapsulates. - The type of the eleventh parameter of the method that this delegate encapsulates. - The type of the twelfth parameter of the method that this delegate encapsulates. - The type of the thirteenth parameter of the method that this delegate encapsulates. - The type of the fourteenth parameter of the method that this delegate encapsulates. - The type of the fifteenth parameter of the method that this delegate encapsulates. - The type of the sixteenth parameter of the method that this delegate encapsulates. - The first parameter of the method that this delegate encapsulates. - The second parameter of the method that this delegate encapsulates. - The third parameter of the method that this delegate encapsulates. - The fourth parameter of the method that this delegate encapsulates. - The fifth parameter of the method that this delegate encapsulates. - The sixth parameter of the method that this delegate encapsulates. - The seventh parameter of the method that this delegate encapsulates. - The eighth parameter of the method that this delegate encapsulates. - The ninth parameter of the method that this delegate encapsulates. - The tenth parameter of the method that this delegate encapsulates. - The eleventh parameter of the method that this delegate encapsulates. - The twelfth parameter of the method that this delegate encapsulates. - The thirteenth parameter of the method that this delegate encapsulates. - The fourteenth parameter of the method that this delegate encapsulates. - The fifteenth parameter of the method that this delegate encapsulates. - The sixteenth parameter of the method that this delegate encapsulates. - - - - Represents a named parameter expression. + Emits an array of constant values provided in the given list. + The array is strongly typed. - + + + Emits an array of values of count size. The items are emitted via the callback + which is provided with the current item index to emit. + + + + + Emits an array construction code. + The code assumes that bounds for all dimensions + are already emitted. + + + + + Emits default(T) + Semantics match C# compiler behavior + + + + + Searches for an operator method on the type. The method must have + the specified signature, no generic arguments, and have the + SpecialName bit set. Also searches inherited operator methods. + + NOTE: This was designed to satisfy the needs of op_True and + op_False, because we have to do runtime lookup for those. It may + not work right for unary operators in general. + + + + + We can cache references to types, as long as they aren't in + collectable assemblies. Unfortunately, we can't really distinguish + between different flavors of assemblies. But, we can at least + create a whitelist for types in mscorlib (so we get the primitives) + and System.Core (so we find Func/Action overloads, etc). + + + + + Represents a label, which can be placed in any context. If + it is jumped to, it will get the value provided by the corresponding + . Otherwise, it gets the value in . If the + equals System.Void, no value should be provided. + + + Dispatches to the specific visit method for this node type. - + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + Gets the static type of the expression that this represents. (Inherited from .) - The that represents the static type of the expression. + The that represents the static type of the expression. - + Returns the node type of this . (Inherited from .) The that represents this expression. - + - The Name of the parameter or variable. + The which this label is associated with. - + - Indicates that this ParameterExpression is to be treated as a ByRef parameter. + The value of the when the label is reached through + normal control flow (e.g. is not jumped to). - + - Specialized subclass to avoid holding onto the byref flag in a - parameter expression. This version always holds onto the expression - type explicitly and therefore derives from TypedParameterExpression. + Represents an expression that has a binary operator. - - - Specialized subclass which holds onto the type of the expression for - uncommon types. - - - - - Generic type to avoid needing explicit storage for primitive data types - which are commonly used. - - - - - Creates an open delegate for the given (dynamic)method. - - - - - Creates a closed delegate for the given (dynamic)method. - - - - - Returns true if the method's parameter types are reference assignable from - the argument types, otherwise false. - - An example that can make the method return false is that - typeof(double).GetMethod("op_Equality", ..., new[] { typeof(double), typeof(int) }) - returns a method with two double parameters, which doesn't match the provided - argument types. - - - - - - Represents an operation between an expression and a type. - - - - - Dispatches to the specific visit method for this node type. - - - + Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression. - The property of the result. + The property of the result. + The property of the result. + The property of the result. This expression if no children changed, or an expression with the updated children. - + - Gets the static type of the expression that this represents. + Reduces the binary expression node to a simpler expression. + If CanReduce returns true, this should return a valid expression. + This method is allowed to return another node which itself + must be reduced. - The that represents the static type of the expression. + The reduced expression. - - - Returns the node type of this Expression. Extension nodes should return - ExpressionType.Extension when overriding this method. - - The of the expression. - - - - Gets the expression operand of a type test operation. - - - - - Gets the type operand of a type test operation. - - - - - An expression that provides runtime read/write access to variables. - Needed to implement "eval" in some dynamic languages. - Evaluates to an instance of when executed. - - - + Dispatches to the specific visit method for this node type. - + - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Gets the static type of the expression that this represents. - - The that represents the static type of the expression. - - - - Returns the node type of this Expression. Extension nodes should return - ExpressionType.Extension when overriding this method. - - The of the expression. - - - - The variables or parameters to which to provide runtime access. + Gets a value that indicates whether the expression tree node can be reduced. - + - Represents the default value of a type or an empty expression. + Gets the right operand of the binary operation. - + - Dispatches to the specific visit method for this node type. + Gets the left operand of the binary operation. - + - Gets the static type of the expression that this represents. + Gets the implementing method for the binary operation. - The that represents the static type of the expression. - + - Returns the node type of this Expression. Extension nodes should return - ExpressionType.Extension when overriding this method. + Gets the type conversion function that is used by a coalescing or compound assignment operation. - The of the expression. + + + + Gets a value that indicates whether the expression tree node represents a lifted call to an operator. + + + + + Gets a value that indicates whether the expression tree node represents a lifted call to an operator whose return type is lifted to a nullable type. + + + + + A Dynamic Call Site base class. This type is used as a parameter type to the + dynamic site targets. The first parameter of the delegate (T) below must be + of this type. + + + + + The Binder responsible for binding operations at this call site. + This binder is invoked by the UpdateAndExecute below if all Level 0, + Level 1 and Level 2 caches experience cache miss. + + + + + used by Matchmaker sites to indicate rule match. + + + + + Creates a CallSite with the given delegate type and binder. + + The CallSite delegate type. + The CallSite binder. + The new CallSite. + + + + Class responsible for binding dynamic operations on the dynamic site. + + + + + Dynamic site type. + + The delegate type. + + + + The Level 0 cache - a delegate specialized based on the site history. + + + + + The Level 1 cache - a history of the dynamic site. + + + + + Creates an instance of the dynamic call site, initialized with the binder responsible for the + runtime binding of the dynamic operations at this call site. + + The binder responsible for the runtime binding of the dynamic operations at this call site. + The new instance of dynamic call site. + + + + Clears the rule cache ... used by the call site tests. + + + + + The update delegate. Called when the dynamic site experiences cache miss. + + The update delegate. + + + + Holds a reference to a value. + + The type of the value that the references. + + + + Defines a property for accessing the value that an object references. + + + + + Gets or sets the value the object references. + + + + + Gets the strongly typed value associated with the + This is explicitly exposed as a field instead of a property to enable loading the address of the field. + + + + + Initializes a new StrongBox which can receive a value when used in a reference call. + + + + + Initializes a new with the specified value. + + A value that the will reference. @@ -9482,6 +8383,151 @@ Strongly-typed and parameterized exception factory. + + + ArgumentException with message like "Argument count must be greater than number of named arguments." + + + + + ArgumentException with message like "reducible nodes must override Expression.Reduce()" + + + + + ArgumentException with message like "node cannot reduce to itself or null" + + + + + ArgumentException with message like "cannot assign from the reduced node type to the original node type" + + + + + ArgumentException with message like "Setter must have parameters." + + + + + ArgumentException with message like "Property cannot have a managed pointer type." + + + + + ArgumentException with message like "Indexing parameters of getter and setter must match." + + + + + ArgumentException with message like "Accessor method should not have VarArgs." + + + + + ArgumentException with message like "Accessor indexes cannot be passed ByRef." + + + + + ArgumentException with message like "Bounds count cannot be less than 1" + + + + + ArgumentException with message like "type must not be ByRef" + + + + + ArgumentException with message like "Type doesn't have constructor with a given signature" + + + + + ArgumentException with message like "Count must be non-negative." + + + + + ArgumentException with message like "arrayType must be an array type" + + + + + ArgumentException with message like "Setter should have void type." + + + + + ArgumentException with message like "Property type must match the value type of setter" + + + + + ArgumentException with message like "Both accessors must be static." + + + + + ArgumentException with message like "Static method requires null instance, non-static method requires non-null instance." + + + + + ArgumentException with message like "Property cannot have a void type." + + + + + ArgumentException with message like "Can only unbox from an object or interface type to a value type." + + + + + ArgumentException with message like "Argument must not have a value type." + + + + + ArgumentException with message like "must be reducible node" + + + + + ArgumentException with message like "Default body must be supplied if case bodies are not System.Void." + + + + + ArgumentException with message like "MethodBuilder does not have a valid TypeBuilder" + + + + + ArgumentException with message like "Type must be derived from System.Delegate" + + + + + ArgumentException with message like "Argument type cannot be void" + + + + + ArgumentException with message like "Label type must be System.Void if an expression is not supplied" + + + + + ArgumentException with message like "Type must be System.Void for this label argument" + + + + + ArgumentException with message like "Quoted expression must be a lambda" + + ArgumentException with message like "Variable '{0}' uses unsupported type '{1}'. Reference types are not supported for variables." @@ -10157,16 +9203,6 @@ InvalidOperationException with message like "Rewritten expression calls operator method '{0}', but the original node had no operator method. If this is is intentional, override '{1}' and change it to allow this rewrite." - - - ArgumentNullException with message like "The value null is not of type '{0}' and cannot be used in this collection." - - - - - ArgumentException with message like "The value '{0}' is not of type '{1}' and cannot be used in this collection." - - NotSupportedException with message like "TryExpression is not supported as an argument to method '{0}' because it has an argument with by-ref type. Construct the tree so the TryExpression is not nested inside of this expression." @@ -10212,53 +9248,672 @@ NotSupportedException with message like "DebugInfoGenerator created by CreatePdbGenerator can only be used with LambdaExpression.CompileToMethod." - + - Represents an infinite loop. It can be exited with "break". + Represents a named parameter expression. - + Dispatches to the specific visit method for this node type. - + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + The Name of the parameter or variable. + + + + + Indicates that this ParameterExpression is to be treated as a ByRef parameter. + + + + + Specialized subclass to avoid holding onto the byref flag in a + parameter expression. This version always holds onto the expression + type explicitly and therefore derives from TypedParameterExpression. + + + + + Specialized subclass which holds onto the type of the expression for + uncommon types. + + + + + Generic type to avoid needing explicit storage for primitive data types + which are commonly used. + + + + + Represents a call to either static or an instance method. + + + Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression. - The property of the result. - The property of the result. - The property of the result. + The property of the result. + The property of the result. This expression if no children changed, or an expression with the updated children. - + + + Dispatches to the specific visit method for this node type. + + + + + Returns a new MethodCallExpression replacing the existing instance/args with the + newly provided instance and args. Arguments can be null to use the existing + arguments. + + This helper is provided to allow re-writing of nodes to not depend on the specific optimized + subclass of MethodCallExpression which is being used. + + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Gets the for the method to be called. + + + + + Gets the that represents the instance + for instance method calls or null for static method cals. + + + + + Gets a collection of expressions that represent arguments to the method call. + + + + + Represents a dynamic operation. + + + + + Dispatches to the specific visit method for this node type. + + + + + Makes a copy of this node replacing the args with the provided values. The + number of the args needs to match the number of the current block. + + This helper is provided to allow re-writing of nodes to not depend on the specific optimized + subclass of DynamicExpression which is being used. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + Gets the static type of the expression that this represents. - The that represents the static type of the expression. + The that represents the static type of the expression. - + Returns the node type of this Expression. Extension nodes should return ExpressionType.Extension when overriding this method. The of the expression. - + - Gets the that is the body of the loop. + Gets the , which determines the runtime behavior of the + dynamic site. - + - Gets the that is used by the loop body as a break statement target. + Gets the type of the delegate used by the . - + - Gets the that is used by the loop body as a continue statement target. + Gets the arguments to the dynamic operation. + + + + + A special subtype of BlockExpression that indicates to the compiler + that this block is a spilled expression and should not allow jumps in. + + + + + Represents an expression that has a unary operator. + + + + + Dispatches to the specific visit method for this node type. + + + + + Reduces the expression node to a simpler expression. + If CanReduce returns true, this should return a valid expression. + This method is allowed to return another node which itself + must be reduced. + + The reduced expression. + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the operand of the unary operation. + + An that represents the operand of the unary operation. + + + + Gets the implementing method for the unary operation. + + The that represents the implementing method. + + + + Gets a value that indicates whether the expression tree node represents a lifted call to an operator. + + true if the node represents a lifted call; otherwise, false. + + + + Gets a value that indicates whether the expression tree node represents a lifted call to an operator whose return type is lifted to a nullable type. + + true if the operator's return type is lifted to a nullable type; otherwise, false. + + + + Gets a value that indicates whether the expression tree node can be reduced. + + + + + An expression that provides runtime read/write access to variables. + Needed to implement "eval" in some dynamic languages. + Evaluates to an instance of when executed. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + The variables or parameters to which to provide runtime access. + + + + + Wraps ILGenerator with code that tracks the current IL offset as instructions are emitted into the IL stream. + + + + + Creates instnace of TrueReadOnlyCollection, wrapping passed in array. + !!! DOES NOT COPY THE ARRAY !!! + + + + + Encapsulates a method that takes no parameters and does not return a value. + + + + + Encapsulates a method that takes two parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes three parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes four parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes five parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes six parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes seven parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes eight parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes nine parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes ten parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes eleven parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes twelve parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes thirteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes fourteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes fifteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the fifteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The fifteenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes sixteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the fifteenth parameter of the method that this delegate encapsulates. + The type of the sixteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The fifteenth parameter of the method that this delegate encapsulates. + The sixteenth parameter of the method that this delegate encapsulates. + + + + Stores information needed to emit debugging symbol information for a + source file, in particular the file name and unique language identifier. + + + + + The source file name. + + + + + Returns the language's unique identifier, if any. + + + + + Returns the language vendor's unique identifier, if any. + + + + + Returns the document type's unique identifier, if any. + Defaults to the guid for a text file. @@ -10365,214 +10020,6 @@ Gets the value indicating if the string comparison should ignore the case of the member name. - - - Requires the range [offset, offset + count] to be a subset of [0, array.Count]. - - Array is null. - Offset or count are out of range. - - - - Requires the array and all its items to be non-null. - - - - - Write out the given AST - - - - - Return true if the input string contains any whitespace character. - Otherwise false. - - - - - Represents creating a new array and possibly initializing the elements of the new array. - - - - - Dispatches to the specific visit method for this node type. - - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Gets the static type of the expression that this represents. (Inherited from .) - - The that represents the static type of the expression. - - - - Gets the bounds of the array if the value of the property is NewArrayBounds, or the values to initialize the elements of the new array if the value of the property is NewArrayInit. - - - - - Returns the node type of this . (Inherited from .) - - The that represents this expression. - - - - Returns the node type of this . (Inherited from .) - - The that represents this expression. - - - - Represents a catch statement in a try block. - This must have the same return type (i.e., the type of ) as the try block it is associated with. - - - - - Returns a that represents the current . - - A that represents the current . - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - The property of the result. - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Gets a reference to the object caught by this handler. - - - - - Gets the type of this handler catches. - - - - - Gets the body of the catch block. - - - - - Gets the body of the 's filter. - - - - - Specifies what kind of jump this represents. - - - - - A that represents a jump to some location. - - - - - A that represents a return statement. - - - - - A that represents a break statement. - - - - - A that represents a continue statement. - - - - - Represents an unconditional jump. This includes return statements, break and continue statements, and other jumps. - - - - - Dispatches to the specific visit method for this node type. - - - - - Creates a new expression that is like this one, but using the - supplied children. If all of the children are the same, it will - return this expression. - - The property of the result. - The property of the result. - This expression if no children changed, or an expression with the updated children. - - - - Gets the static type of the expression that this represents. (Inherited from .) - - The that represents the static type of the expression. - - - - Returns the node type of this . (Inherited from .) - - The that represents this expression. - - - - The value passed to the target, or null if the target is of type - System.Void. - - - - - The target label where this node jumps to. - - - - - The kind of the goto. For information purposes only. - - - - - Stores information needed to emit debugging symbol information for a - source file, in particular the file name and unique language identifier. - - - - - The source file name. - - - - - Returns the language's unique identifier, if any. - - - - - Returns the language vendor's unique identifier, if any. - - - - - Returns the document type's unique identifier, if any. - Defaults to the guid for a text file. - - Represents the dynamic get index operation at the call site, providing the binding semantic and the details about the operation. @@ -10619,202 +10066,890 @@ Gets the signature of the arguments at the call site. - + - Provides a simple class that can be inherited from to create an object with dynamic behavior - at runtime. Subclasses can override the various binder methods (GetMember, SetMember, Call, etc...) - to provide custom behavior that will be invoked at runtime. + This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. + + + + + Creates an instance of a dynamic call site used for cache lookup. + + The type of the delegate of the . + The new call site. + + + + Checks if a dynamic site requires an update. + + An instance of the dynamic call site. + true if rule does not need updating, false otherwise. + + + + Checks whether the executed rule matched + + An instance of the dynamic call site. + true if rule matched, false otherwise. + + + + Clears the match flag on the matchmaker call site. + + An instance of the dynamic call site. + + + + Adds a rule to the cache maintained on the dynamic call site. + + The type of the delegate of the . + An instance of the dynamic call site. + An instance of the call site rule. + + + + Updates rules in the cache. + + The type of the delegate of the . + An instance of the dynamic call site. + The matched rule index. + + + + Gets the dynamic binding rules from the call site. + + The type of the delegate of the . + An instance of the dynamic call site. + An array of dynamic binding rules. + + + + Retrieves binding rule cache. + + The type of the delegate of the . + An instance of the dynamic call site. + The cache. + + + + Moves the binding rule within the cache. + + The type of the delegate of the . + The call site rule cache. + An instance of the call site rule. + An index of the call site rule. + + + + Searches the dynamic rule cache for rules applicable to the dynamic operation. + + The type of the delegate of the . + The cache. + The collection of applicable rules. + + + + Updates the call site target with a new rule based on the arguments. + + The type of the delegate of the . + The call site binder. + An instance of the dynamic call site. + Arguments to the call site. + The new call site target. + + + + Creates an open delegate for the given (dynamic)method. + + + + + Creates a closed delegate for the given (dynamic)method. + + + + + Returns true if the method's parameter types are reference assignable from + the argument types, otherwise false. - If a method is not overridden then the DynamicObject does not directly support that behavior and - the call site will determine how the binding should be performed. + An example that can make the method return false is that + typeof(double).GetMethod("op_Equality", ..., new[] { typeof(double), typeof(int) }) + returns a method with two double parameters, which doesn't match the provided + argument types. + + + + + + Represents an operation between an expression and a type. - + - Enables derived types to create a new instance of DynamicObject. DynamicObject instances cannot be - directly instantiated because they have no implementation of dynamic behavior. + Dispatches to the specific visit method for this node type. - + - Provides the implementation of getting a member. Derived classes can override - this method to customize behavior. When not overridden the call site requesting the - binder determines the behavior. + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. - The binder provided by the call site. - The result of the get operation. - true if the operation is complete, false if the call site should determine behavior. + The property of the result. + This expression if no children changed, or an expression with the updated children. - + - Provides the implementation of setting a member. Derived classes can override - this method to customize behavior. When not overridden the call site requesting the - binder determines the behavior. + Gets the static type of the expression that this represents. - The binder provided by the call site. - The value to set. - true if the operation is complete, false if the call site should determine behavior. + The that represents the static type of the expression. - + - Provides the implementation of deleting a member. Derived classes can override - this method to customize behavior. When not overridden the call site requesting the - binder determines the behavior. + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. - The binder provided by the call site. - true if the operation is complete, false if the call site should determine behavior. + The of the expression. - + - Provides the implementation of calling a member. Derived classes can override - this method to customize behavior. When not overridden the call site requesting the - binder determines the behavior. - - The binder provided by the call site. - The arguments to be used for the invocation. - The result of the invocation. - true if the operation is complete, false if the call site should determine behavior. - - - - Provides the implementation of converting the DynamicObject to another type. Derived classes - can override this method to customize behavior. When not overridden the call site - requesting the binder determines the behavior. - - The binder provided by the call site. - The result of the conversion. - true if the operation is complete, false if the call site should determine behavior. - - - - Provides the implementation of creating an instance of the DynamicObject. Derived classes - can override this method to customize behavior. When not overridden the call site requesting - the binder determines the behavior. - - The binder provided by the call site. - The arguments used for creation. - The created instance. - true if the operation is complete, false if the call site should determine behavior. - - - - Provides the implementation of invoking the DynamicObject. Derived classes can - override this method to customize behavior. When not overridden the call site requesting - the binder determines the behavior. - - The binder provided by the call site. - The arguments to be used for the invocation. - The result of the invocation. - true if the operation is complete, false if the call site should determine behavior. - - - - Provides the implementation of performing a binary operation. Derived classes can - override this method to customize behavior. When not overridden the call site requesting - the binder determines the behavior. - - The binder provided by the call site. - The right operand for the operation. - The result of the operation. - true if the operation is complete, false if the call site should determine behavior. - - - - Provides the implementation of performing a unary operation. Derived classes can - override this method to customize behavior. When not overridden the call site requesting - the binder determines the behavior. - - The binder provided by the call site. - The result of the operation. - true if the operation is complete, false if the call site should determine behavior. - - - - Provides the implementation of performing a get index operation. Derived classes can - override this method to customize behavior. When not overridden the call site requesting - the binder determines the behavior. - - The binder provided by the call site. - The indexes to be used. - The result of the operation. - true if the operation is complete, false if the call site should determine behavior. - - - - Provides the implementation of performing a set index operation. Derived classes can - override this method to custmize behavior. When not overridden the call site requesting - the binder determines the behavior. - - The binder provided by the call site. - The indexes to be used. - The value to set. - true if the operation is complete, false if the call site should determine behavior. - - - - Provides the implementation of performing a delete index operation. Derived classes - can override this method to custmize behavior. When not overridden the call site - requesting the binder determines the behavior. - - The binder provided by the call site. - The indexes to be deleted. - true if the operation is complete, false if the call site should determine behavior. - - - - Returns the enumeration of all dynamic member names. - - The list of dynamic member names. - - - - The provided MetaObject will dispatch to the Dynamic virtual methods. - The object can be encapsulated inside of another MetaObject to - provide custom behavior for individual actions. + Gets the expression operand of a type test operation. - + - Helper method for generating a MetaObject which calls a - specific method on Dynamic that returns a result + Gets the type operand of a type test operation. - + - Helper method for generating a MetaObject which calls a - specific method on Dynamic that returns a result + Represents creating a new array and possibly initializing the elements of the new array. - + - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. + Dispatches to the specific visit method for this node type. - + - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Gets the bounds of the array if the value of the property is NewArrayBounds, or the values to initialize the elements of the new array if the value of the property is NewArrayInit. - + - Checks if the derived type has overridden the specified method. If there is no - implementation for the method provided then Dynamic falls back to the base class - behavior which lets the call site determine how the binder is performed. + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Represents indexing a property or array. - + - Returns a Restrictions object which includes our current restrictions merged - with a restriction limiting our type + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Dispatches to the specific visit method for this node type. - + - Returns our Expression converted to our known LimitType + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + An object to index. + + + + + Gets the for the property if the expression represents an indexed property, returns null otherwise. + + + + + Gets the arguments to be used to index the property or array. + + + + + Describes the node types for the nodes of an expression tree. + + + + + A node that represents arithmetic addition without overflow checking. + + + + + A node that represents arithmetic addition with overflow checking. + + + + + A node that represents a bitwise AND operation. + + + + + A node that represents a short-circuiting conditional AND operation. + + + + + A node that represents getting the length of a one-dimensional array. + + + + + A node that represents indexing into a one-dimensional array. + + + + + A node that represents represents a method call. + + + + + A node that represents a null coalescing operation. + + + + + A node that represents a conditional operation. + + + + + A node that represents an expression that has a constant value. + + + + + A node that represents a cast or conversion operation. If the operation is a numeric conversion, it overflows silently if the converted value does not fit the target type. + + + + + A node that represents a cast or conversion operation. If the operation is a numeric conversion, an exception is thrown if the converted value does not fit the target type. + + + + + A node that represents arithmetic division. + + + + + A node that represents an equality comparison. + + + + + A node that represents a bitwise XOR operation. + + + + + A node that represents a "greater than" numeric comparison. + + + + + A node that represents a "greater than or equal" numeric comparison. + + + + + A node that represents applying a delegate or lambda expression to a list of argument expressions. + + + + + A node that represents a lambda expression. + + + + + A node that represents a bitwise left-shift operation. + + + + + A node that represents a "less than" numeric comparison. + + + + + A node that represents a "less than or equal" numeric comparison. + + + + + A node that represents creating a new IEnumerable object and initializing it from a list of elements. + + + + + A node that represents reading from a field or property. + + + + + A node that represents creating a new object and initializing one or more of its members. + + + + + A node that represents an arithmetic remainder operation. + + + + + A node that represents arithmetic multiplication without overflow checking. + + + + + A node that represents arithmetic multiplication with overflow checking. + + + + + A node that represents an arithmetic negation operation. + + + + + A node that represents a unary plus operation. The result of a predefined unary plus operation is simply the value of the operand, but user-defined implementations may have non-trivial results. + + + + + A node that represents an arithmetic negation operation that has overflow checking. + + + + + A node that represents calling a constructor to create a new object. + + + + + A node that represents creating a new one-dimensional array and initializing it from a list of elements. + + + + + A node that represents creating a new array where the bounds for each dimension are specified. + + + + + A node that represents a bitwise complement operation. + + + + + A node that represents an inequality comparison. + + + + + A node that represents a bitwise OR operation. + + + + + A node that represents a short-circuiting conditional OR operation. + + + + + A node that represents a reference to a parameter or variable defined in the context of the expression. + + + + + A node that represents raising a number to a power. + + + + + A node that represents an expression that has a constant value of type Expression. A Quote node can contain references to parameters defined in the context of the expression it represents. + + + + + A node that represents a bitwise right-shift operation. + + + + + A node that represents arithmetic subtraction without overflow checking. + + + + + A node that represents arithmetic subtraction with overflow checking. + + + + + A node that represents an explicit reference or boxing conversion where null reference (Nothing in Visual Basic) is supplied if the conversion fails. + + + + + A node that represents a type test. + + + + + A node that represents an assignment. + + + + + A node that represents a block of expressions. + + + + + A node that represents a debugging information. + + + + + A node that represents a unary decrement. + + + + + A node that represents a dynamic operation. + + + + + A node that represents a default value. + + + + + A node that represents an extension expression. + + + + + A node that represents a goto. + + + + + A node that represents a unary increment. + + + + + A node that represents an index operation. + + + + + A node that represents a label. + + + + + A node that represents a list of runtime variables. + + + + + A node that represents a loop. + + + + + A node that represents a switch operation. + + + + + A node that represents a throwing of an exception. + + + + + A node that represents a try-catch expression. + + + + + A node that represents an unbox value type operation. + + + + + A node that represents an arithmetic addition compound assignment without overflow checking. + + + + + A node that represents a bitwise AND compound assignment. + + + + + A node that represents an arithmetic division compound assignment . + + + + + A node that represents a bitwise XOR compound assignment. + + + + + A node that represents a bitwise left-shift compound assignment. + + + + + A node that represents an arithmetic remainder compound assignment. + + + + + A node that represents arithmetic multiplication compound assignment without overflow checking. + + + + + A node that represents a bitwise OR compound assignment. + + + + + A node that represents raising a number to a power compound assignment. + + + + + A node that represents a bitwise right-shift compound assignment. + + + + + A node that represents arithmetic subtraction compound assignment without overflow checking. + + + + + A node that represents an arithmetic addition compound assignment with overflow checking. + + + + + A node that represents arithmetic multiplication compound assignment with overflow checking. + + + + + A node that represents arithmetic subtraction compound assignment with overflow checking. + + + + + A node that represents an unary prefix increment. + + + + + A node that represents an unary prefix decrement. + + + + + A node that represents an unary postfix increment. + + + + + A node that represents an unary postfix decrement. + + + + + A node that represents a exact type test. + + + + + A node that represents a ones complement. + + + + + A node that represents a true condition value. + + + + + A node that represents a false condition value. + + + + + Represents the dynamic set index operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the . + + The signature of the arguments at the call site. + + + + Performs the binding of the dynamic set index operation. + + The target of the dynamic set index operation. + An array of arguments of the dynamic set index operation. + The representing the result of the binding. + + + + Performs the binding of the dynamic set index operation if the target dynamic object cannot bind. + + The target of the dynamic set index operation. + The arguments of the dynamic set index operation. + The value to set to the collection. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the dynamic set index operation if the target dynamic object cannot bind. + + The target of the dynamic set index operation. + The arguments of the dynamic set index operation. + The value to set to the collection. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + The result type of the operation. + + + + + Gets the signature of the arguments at the call site. + + + + + Represents the dynamic delete index operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the . + + The signature of the arguments at the call site. + + + + Performs the binding of the dynamic delete index operation. + + The target of the dynamic delete index operation. + An array of arguments of the dynamic delete index operation. + The representing the result of the binding. + + + + Performs the binding of the dynamic delete index operation if the target dynamic object cannot bind. + + The target of the dynamic delete index operation. + The arguments of the dynamic delete index operation. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the dynamic delete index operation if the target dynamic object cannot bind. + + The target of the dynamic delete index operation. + The arguments of the dynamic delete index operation. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + The result type of the operation. + + + + + Gets the signature of the arguments at the call site. + + + + + Represents initializing the elements of a collection member of a newly created object. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the element initializers for initializing a collection member of a newly created object. + + + + + Used to denote the target of a . + + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the name of the label. + + The label's name is provided for information purposes only. + + + + The type of value that is passed when jumping to the label + (or System.Void if no value should be passed). + + + + + Represents the initialization of a list. + + + + + Creates a representation of the node. + + A representation of the node. + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the used to add elements to the object. + + + + + Gets the list of elements to be added to the object. + + + + + Represents the binary dynamic operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the class. + + The binary operation kind. + + + + Performs the binding of the binary dynamic operation if the target dynamic object cannot bind. + + The target of the dynamic binary operation. + The right hand side operand of the dynamic binary operation. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the binary dynamic operation if the target dynamic object cannot bind. + + The target of the dynamic binary operation. + The right hand side operand of the dynamic binary operation. + The binding result in case the binding fails, or null. + The representing the result of the binding. + + + + Performs the binding of the dynamic binary operation. + + The target of the dynamic operation. + An array of arguments of the dynamic operation. + The representing the result of the binding. + + + + The result type of the operation. + + + + + The binary operation kind. diff --git a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.ExtensionAttribute.dll b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.ExtensionAttribute.dll index 3042aea..c893242 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.ExtensionAttribute.dll and b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.ExtensionAttribute.dll differ diff --git a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.ExtensionAttribute.pdb b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.ExtensionAttribute.pdb index dce62e7..745833a 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.ExtensionAttribute.pdb and b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.ExtensionAttribute.pdb differ diff --git a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.dll b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.dll index 25d772b..d376251 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.dll and b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.dll differ diff --git a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.pdb b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.pdb index ccdc5f0..bdcb32a 100644 Binary files a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.pdb and b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.pdb differ diff --git a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.xml b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.xml index 45b52f7..363ecd9 100644 --- a/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.xml +++ b/aspclassiccompiler/AspWebApp/bin/Microsoft.Scripting.xml @@ -4,23 +4,628 @@ Microsoft.Scripting - + - Wraps the provided enumerable into a ReadOnlyCollection{T} + Enum representing different types of operators. - Copies all of the data into a new array, so the data can't be - changed after creation. The exception is if the enumerable is - already a ReadOnlyCollection{T}, in which case we just return it. + Operators can be Unary, Binary, or Ternary. An individual operator can have one or + more arity. + + Each operator is associated with a standard name. If a method is named using the standard + name and is marked with OperatorMethodAttribute then the method will automatically be + detected as an operator. - + - Unmapped span. + Binary operator. + + Attempt to call the object. Arguments are the object and the arguments for the call. The + arguments for the call can either be an object array (normal call) or a KwCallInfo class for + performing a keyword based call. + + The standard name for this operator is "Call". - + - Only host should redirect I/O. + Unary operator. + + Returns a string which defines the object in code or a language specific format for + objects which cannot be represented in code. This operator generally is not used in + a non-language specific scenario. + + + + + Unary operator. + + Gets the list of members that belong to the current object returned as an IList of string + + + + + Unary operator. + + Gets various documentation about the object returned as a string + + + + + Unary operator. + + Gets information about the type of parameters, returned as a string. + + + + + Unary operator. + + Checks whether the object is callable or not, returns true if it is. + + + + Operator for performing add + + + Operator for performing sub + + + Operator for performing pow + + + Operator for performing mul + + + Operator for performing floordiv + + + Operator for performing div + + + Operator for performing truediv + + + Operator for performing mod + + + Operator for performing lshift + + + Operator for performing rshift + + + Operator for performing and + + + Operator for performing or + + + Operator for performing xor + + + Operator for performing lt + + + Operator for performing gt + + + Operator for performing le + + + Operator for performing ge + + + Operator for performing eq + + + Operator for performing ne + + + Operator for performing lg + + + Operator for performing in-place add + + + Operator for performing in-place sub + + + Operator for performing in-place pow + + + Operator for performing in-place mul + + + Operator for performing in-place floordiv + + + Operator for performing in-place div + + + Operator for performing in-place truediv + + + Operator for performing in-place mod + + + Operator for performing in-place lshift + + + Operator for performing in-place rshift + + + Operator for performing in-place and + + + Operator for performing in-place or + + + Operator for performing in-place xor + + + Operator for performing reverse add + + + Operator for performing reverse sub + + + Operator for performing reverse pow + + + Operator for performing reverse mul + + + Operator for performing reverse floordiv + + + Operator for performing reverse div + + + Operator for performing reverse truediv + + + Operator for performing reverse mod + + + Operator for performing reverse lshift + + + Operator for performing reverse rshift + + + Operator for performing reverse and + + + Operator for performing reverse or + + + Operator for performing reverse xor + + + + Binary operator. + + Checks to see if the instance contains another object. Returns true or false. + + The standard name for this operator is "Contains". + + + + + n-ary operator. + + Gets the value at the specified index from the instance. + + One or more indexes can be provided as individual arguments. + Obsolete: Use GetIndexAction instead + + + + + n-ary operator. + + Sets the value at the specified index in the instance. + + One or more indexes can be provided as individual arguments. The last value provided is the value to be set. + Obsolete: Use SetIndexAction instead + + + + + n-ary operator. + + Removes the item from the specified index in the instance. + + One or more indexes can be provided as individual arguments. + Obsolete: Use DeleteIndexAction instead + + + + + Binary or Ternary operator. + + Gets the specified range of elements (slice) from the instance. + + The slice parameters may include the start index, the end index, and the step value. The step value is optional. + + A value of Type.Missing may be provided if no parameter was explicitly provided for a start, stop or step parameter. + + + + + n-ary operator. + + Sets the specified range of elements in the instance. + + The slice parameters may include the start index, the end index, and the step value. The step + value is optional. The last parameter is the value to be assigned. + + A value of Type.Missing may be provided if no parameter was explicitly provided for a start, stop or step parameter. + + + + + n-ary operator. + + Removes the specified range of elements from the instance. + + The slice parameters may include the start index, the end index, and the step value. The step value is + optional. + + A value of Type.Missing may be provided if no parameter was explicitly provided for a start, stop or step parameter. + + + + + Unary operator. + + Returns the number of items stored in the object. + + + + + Binary operator. + + Compares two instances returning an integer indicating the relationship between them. May + throw if the object types are uncomparable. + + The standard name for this operator is "Compare". + + + + + Binary operator. + + Returns both the dividend and quotioent of x / y. + + + + + Binary operator. + + Returns both the dividend and quotient of y / x. + + + + + Member lookup customization (called after type lookup). + + Arguments are the instance to get the member from and a SymbolId which represents the member. + + The return value is the member. + + The standard name for this operator is "GetMember". + + + + + Member lookup customization for bound attributes + + Arguments are the instance to get the member from and a SymbolId which represents the bound member. + + The return value is the bound member. + + /// The standard name for this operator is "GetBoundMember". + + + + + Member set customization. + + Arguments are the instance, the SymbolId to get, and the new value for the member. + + The return value is ignored. + + The standard name for this operator is "SetMember". + + + + + Member delete customization. + + Arguments are the instance and the SymbolId for the member to delete. + + The return value is ignored. + + The standard name for this operator is "DeleteMember". + + + + + Attribute customization operator. Returns a list of names that should be displayed as + being part of the object. + + Arguments are the instance to get the list of member names from. + + Return value is IList<SymbolId>. + + /// The standard name for this operator is "GetMemberNames". + + + + + Unary operator. + + Get the absolute value of the instance. + + + + + Unary operator. + + Gets the positive value of the instance. + + + + + Unary operator. + + Negates the instance and return the new value. + + + + + Unary operator. + + Returns the ones complement of the instance. + + + + + Stores information needed to setup a language + + + + + Creates a new LanguageSetup + + assembly qualified type name of the language + provider + + + + Creates a new LanguageSetup with the provided options + TODO: remove this overload? + + + + + Creates a new LanguageSetup with the provided options + + + + + Gets an option as a strongly typed value. + + + + + The assembly qualified type name of the language provider + + + + + Display name of the language. If empty, it will be set to the first + name in the Names list. + + + + + Case-insensitive language names. + + + + + Case-insensitive file extension, optionally starts with a dot. + + + + + Option names are case-sensitive. + + + + + Hosting API counterpart for . + + + + + Executes code in a default scope. + + + + + Execute code within a given scope and returns the result. + + + + + Executes code in in a default scope and converts to a given type. + + + + + Execute code within a given scope and converts result to a given type. + + + + + Engine that compiled this code. + + + + + Default scope for this code. + + + + + Provides a factory to create TextReader's over one source of textual content. + + TextContentProvider's are used when reading from a source which is already decoded + or has a known specific decoding. + + For example a text editor might provide a TextContentProvider whose backing is + an in-memory text buffer that the user can actively edit. + + + + + Creates a new TextReader which is backed by the content the TextContentProvider was created for. + + This method may be called multiple times. For example once to compile the code and again to get + the source code to display error messages. + + + + + This interface represents a dictionary that can be accessed using symbols and also arbitrary objects. + This should conceptually inherit from IDictionary<object, object>, but we do not do that as we want the default indexer + property to be indexed by SymbolId, not by object. + + + + + Access using SymbolId keys + + + + + Presents a flat enumerable view of multiple dictionaries + + + + + Not all .NET enumerators throw exceptions if accessed in an invalid state. This type + can be used to throw exceptions from enumerators implemented in IronPython. + + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the array and all its items to be non-null. + + + + + Requires the enumerable collection and all its items to be non-null. + + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Array is null. + Offset or count are out of range. + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + Provides a factory to create streams over one source of binary content. + + StreamContentProvider's are used when opening a file of an unknown encoding. The + StreamContentProvider will be wrapped in a TextContentProvider provided by the language + which can support a language specific way of interpreting the binary data into text. + + For example some languages allow a marker at the beginning of the file which specifies + the encoding of the rest of the file. + + + + + Creates a new Stream which is backed by the content the StreamContentProvider was created for. + + For example if the StreamContentProvider was backing a file then GetStream re-opens the file and returns + the new stream. + + This method may be called multiple times. For example once to compile the code and again to get + the source code to display error messages. + + + + + Represents a host-provided variables for executable code. The variables are + typically backed by a host-provided dictionary. Languages can also associate per-language + information with the context by using scope extensions. This can be used for tracking + state which is used across multiple executions, for providing custom forms of + storage (for example object keyed access), or other language specific semantics. + + Scope objects are thread-safe as long as their underlying storage is thread safe. + + Script hosts can choose to use thread safe or thread unsafe modules but must be sure + to constrain the code they right to be single-threaded if using thread unsafe + storage. + + + + + Creates a new scope with a new empty thread-safe dictionary. + + + + + Creates a new scope with the provided dictionary. + + + + + Creates a new scope which is backed by an arbitrary object for it's storage. + + + + + + Gets the ScopeExtension associated with the provided ContextId. + + + + + Sets the ScopeExtension to the provided value for the given ContextId. + + The extension can only be set once. The returned value is either the new ScopeExtension + if no value was previously set or the previous value. + + + + + Singleton LanguageContext which represents a language-neutral LanguageContext @@ -99,414 +704,312 @@ Whether the language can parse code and create source units. - + - Singleton LanguageContext which represents a language-neutral LanguageContext + Gets a Func of CallSite, object * paramCnt, object delegate type + that's suitable for use in a non-strongly typed call site. - + - Requires the range [offset, offset + count] to be a subset of [0, array.Count]. - - Offset or count are out of range. - - - - Requires the range [offset, offset + count] to be a subset of [0, array.Count]. - - Offset or count are out of range. - - - - Requires the array and all its items to be non-null. + A token marking an end of stream. - + - Requires the enumerable collection and all its items to be non-null. + A space, tab, or newline. - + - Requires the range [offset, offset + count] to be a subset of [0, array.Count]. - - Array is null. - Offset or count are out of range. - - - - Represents a location in source code. + A block comment. - + - Creates a new source location. - - The index in the source stream the location represents (0-based). - The line in the source stream the location represents (1-based). - The column in the source stream the location represents (1-based). - - - - Compares two specified location values to see if they are equal. - - One location to compare. - The other location to compare. - True if the locations are the same, False otherwise. - - - - Compares two specified location values to see if they are not equal. - - One location to compare. - The other location to compare. - True if the locations are not the same, False otherwise. - - - - Compares two specified location values to see if one is before the other. - - One location to compare. - The other location to compare. - True if the first location is before the other location, False otherwise. - - - - Compares two specified location values to see if one is after the other. - - One location to compare. - The other location to compare. - True if the first location is after the other location, False otherwise. - - - - Compares two specified location values to see if one is before or the same as the other. - - One location to compare. - The other location to compare. - True if the first location is before or the same as the other location, False otherwise. - - - - Compares two specified location values to see if one is after or the same as the other. - - One location to compare. - The other location to compare. - True if the first location is after or the same as the other location, False otherwise. - - - - Compares two specified location values. - - One location to compare. - The other location to compare. - 0 if the locations are equal, -1 if the left one is less than the right one, 1 otherwise. - - - - A location that is valid but represents no location at all. + A single line comment. - + - An invalid location. + A documentation comment. - + - A minimal valid location. + A numeric literal. - + - The index in the source stream the location represents (0-based). + A character literal. - + - The line in the source stream the location represents (1-based). + A string literal. - + - The column in the source stream the location represents (1-based). + A regular expression literal. - + - Whether the location is a valid location. - - True if the location is valid, False otherwise. - - - - Stores information needed to setup a language + A keyword. - + - Creates a new LanguageSetup - - assembly qualified type name of the language - provider - - - - Creates a new LanguageSetup with the provided options - TODO: remove this overload? + A directive (e.g. #line). - + - Creates a new LanguageSetup with the provided options + A punctuation character that has a specific meaning in a language. - + - Gets an option as a strongly typed value. + A token that operates as a separator between two language elements. - + - The assembly qualified type name of the language provider + An identifier (variable, $variable, @variable, @@variable, $variable$, function!, function?, [variable], i'variable', ...) - + - Display name of the language. If empty, it will be set to the first - name in the Names list. + Braces, parenthesis, brackets. - - - Case-insensitive language names. - - - - - Case-insensitive file extension, optionally starts with a dot. - - - - - Option names are case-sensitive. - - - + - Not all .NET enumerators throw exceptions if accessed in an invalid state. This type - can be used to throw exceptions from enumerators implemented in IronPython. + Errors. - - - Provides a StreamContentProvider for a stream of content backed by a file on disk. - - - - - Provides a factory to create streams over one source of binary content. - - StreamContentProvider's are used when opening a file of an unknown encoding. The - StreamContentProvider will be wrapped in a TextContentProvider provided by the language - which can support a language specific way of interpreting the binary data into text. - - For example some languages allow a marker at the beginning of the file which specifies - the encoding of the rest of the file. - - - - - Creates a new Stream which is backed by the content the StreamContentProvider was created for. - - For example if the StreamContentProvider was backing a file then GetStream re-opens the file and returns - the new stream. - - This method may be called multiple times. For example once to compile the code and again to get - the source code to display error messages. - - - - - This attribute is used to mark a parameter that can accept any keyword parameters that - are not bound to normal arguments. The extra keyword parameters will be - passed in a dictionary which is created for the call. - - Most languages which support params dictionaries will support the following types: - IDictionary<string, anything> - IDictionary<object, anything> - Dictionary<string, anything> - Dictionary<object, anything> - IDictionary - IAttributesCollection (deprecated) - - For languages which don't have language level support the user will be required to - create and populate the dictionary by hand. - - This attribute is the dictionary equivalent of the System.ParamArrayAttribute. - - - public static void KeywordArgFunction([ParamsDictionary]IDictionary<string, object> dict) { - foreach (var v in dict) { - Console.WriteLine("Key: {0} Value: {1}", v.Key, v.Value); - } - } - - Called from Python: - - KeywordArgFunction(a = 2, b = "abc") - - will print: - Key: a Value = 2 - Key: b Value = abc - - - - - Hosting counterpart for . - - - - - Compile the ScriptSource into CompileCode object that can be executed - repeatedly in its default scope or in other scopes without having to recompile the code. - - Code cannot be compiled. - - - - Errors are reported to the specified listener. - Returns null if the parser cannot compile the code due to errors. - - - - - Errors are reported to the specified listener. - Returns null if the parser cannot compile the code due to error(s). - - - - - Errors are reported to the specified listener. - Returns null if the parser cannot compile the code due to error(s). - - - - - Executes the code in the specified scope. - Returns an object that is the resulting value of running the code. - - When the ScriptSource is a file or statement, the engine decides what is - an appropriate value to return. Some languages return the value produced - by the last expression or statement, but languages that are not expression - based may return null. - - Code cannot be compiled. - - - - Executes the source code. The execution is not bound to any particular scope. - - - - - Executes the code in a specified scope and converts the result to the specified type. - The conversion is language specific. - - - - - Executes the code in an empty scope and converts the result to the specified type. - The conversion is language specific. - - - - - Executes the code in the specified scope and return a result. - Returns an ObjectHandle wrapping the resulting value of running the code. - - - - - Executes the code in an empty scope. - Returns an ObjectHandle wrapping the resulting value of running the code. - - - - - Runs a specified code as if it was a program launched from OS command shell. - and returns a process exit code indicating the success or error condition - of executing the code. - - Exact behavior depends on the language. Some languages have a dedicated "exit" exception that - carries the exit code, in which case the exception is cought and the exit code is returned. - The default behavior returns the result of program's execution converted to an integer - using a language specific conversion. - - Code cannot be compiled. - - - - Detects the encoding of the content. - - - An encoding that is used by the reader of the script source to transcode its content to Unicode text. - Null if the content is already textual and no transcoding is performed. - - - Note that the default encoding specified when the script source is created could be overridden by - an encoding that is found in the content preamble (Unicode BOM or a language specific encoding preamble). - In that case the preamble encoding is returned. Otherwise, the default encoding is returned. - - An I/O error occurs. - - + Reads specified range of lines (or less) from the source unit. + Line numbers starts with 1. - 1-based number of the first line to fetch. - The number of lines to fetch. - - Which character sequences are considered line separators is language specific. - If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. - - An I/O error occurs. - + - Reads a specified line. + Errors are reported to the specified sink. + Returns null if the parser cannot compile the code due to error(s). - 1-based line number. - Line content. Line separator is not included. - An I/O error occurs. - - Which character sequences are considered line separators is language specific. - If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. - - + - Gets script source content. + Executes against a specified scope. - Entire content. - An I/O error occurs. - - The result includes language specific preambles (e.g. "#coding:UTF-8" encoding preamble recognized by Ruby), - but not the preamble defined by the content encoding (e.g. BOM). - The entire content of the source unit is encoded by single encoding (if it is read from binary stream). - - + + + Executes against a specified scope and reports errors to the given error sink. + + + + + Executes in a new scope created by the language. + + + + + Executes in a new scope created by the language. + + + + + Executes in a new scope created by the language. + + + Identification of the source unit. Assigned by the host. The format and semantics is host dependent (could be a path on file system or URL). - null for anonymous script source. - Cannot be an empty string. + Empty string for anonymous source units. - + - Provides hosting to DLR. Forwards DLR requests to the ScriptHost. + LanguageContext of the language of the unit. + + + + + Provides optimized and cachable support for scope storage. + + This is the default object used for storing values in a scope. + + + + The implementation uses a case-insensitive dictionary which holds + onto ScopeVariableIgnoreCase objects. The SVIC's hold onto ScopeVariable + objects for each possible casing. + + + + + Gets the named value from the scope optionally ignoring case. + + If the named value is not present an InvalidOperationException is raised. + + + + + Attempts to get the named value from the scope optionally ignoring the case. + + Returns true if the value is present, false if it is not. + + + + + Sets the named value in the scope optionally ignoring the case. + + + + + Deletes the named value from the scope optionally ignoring the case. + + + + + Checks if the named value is present in the scope optionally ignoring the case. + + + + + Gets the IScopeVariable for the scope optionally ignoring case. + + The IScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Gets the ScopeVariable for the scope in a case-sensitive manner. + + The ScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Gets the ScopeVariableIgnoreCase for the scope in a case-insensitive manner. + + The ScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Returns all of the member names which currently have values in the scope. + + The list contains all available casings. + + + + + Returns all of the member names and their associated values from the scope. + + The list contains all available casings. + + + + + Provides convenient case-sensitive value access. + + + + + Provides a common interface for accessing both case sensitive and + case insensitive variable storage. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + Boxes the value for storage in a scope. Languages or consumers of the scope + can save this value and use it to get/set the current value in the scope for + commonly accessed values. + + ScopeVariables are case sensitive and will only refer to a single value. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + Boxes the value for storage in a scope. Languages or consumers of the scope + can save this value and use it to get/set the current value in the scope for + commonly accessed values. + + ScopeVariablesIgnoreCase are case insensitive and may access different casings + depending on how other gets/sets occur in the scope. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. @@ -520,37 +1023,6 @@ Abstracts system operations that are used by DLR and could potentially be platform specific. - - - This interface represents a dictionary that can be accessed using symbols and also arbitrary objects. - This should conceptually inherit from IDictionary<object, object>, but we do not do that as we want the default indexer - property to be indexed by SymbolId, not by object. - - - - - Access using SymbolId keys - - - - - Provides a factory to create TextReader's over one source of textual content. - - TextContentProvider's are used when reading from a source which is already decoded - or has a known specific decoding. - - For example a text editor might provide a TextContentProvider whose backing is - an in-memory text buffer that the user can actively edit. - - - - - Creates a new TextReader which is backed by the content the TextContentProvider was created for. - - This method may be called multiple times. For example once to compile the code and again to get - the source code to display error messages. - - ObjectOperations provide a large catalogue of object operations such as member access, conversions, @@ -839,1352 +1311,36 @@ store it in a dictionary. - + - Represents a language in Hosting API. - Hosting API counterpart for . + Stores information needed to setup a ScriptRuntime - + - Returns a new ObjectOperations object. See the Operations property for why you might want to call this. + Reads setup from .NET configuration system (.config files). + If there is no configuration available returns an empty setup. - + - Returns a new ObjectOperations object that inherits any semantics particular to the provided ScriptScope. - - See the Operations property for why you might want to call this. + Reads setup from a specified XML stream. - + - Executes an expression. The execution is not bound to any particular scope. + Reads setup from a specified XML file. - The engine doesn't support code execution. - is a null reference. - + - Executes an expression within the specified scope. + The list of language setup information for languages to load into + the runtime - The engine doesn't support code execution. - is a null reference. - is a null reference. - + - Executes an expression within a new scope and converts result to the given type. - - The engine doesn't support code execution. - is a null reference. - - - - Executes an expression within the specified scope and converts result to the given type. - - The engine doesn't support code execution. - is a null reference. - is a null reference. - - - - Executes content of the specified file in a new scope and returns that scope. - - The engine doesn't support code execution. - is a null reference. - - - - Executes content of the specified file against the given scope. - - The . - The engine doesn't support code execution. - is a null reference. - is a null reference. - - - - Executes the expression in the specified scope and return a result. - Returns an ObjectHandle wrapping the resulting value of running the code. - - - - - Executes the code in an empty scope. - Returns an ObjectHandle wrapping the resulting value of running the code. - - - - - Creates a new ScriptScope whose storage is an arbitrary object. - - Accesses to the ScriptScope will turn into get, set, and delete members against the object. - - - - - This method returns the ScriptScope in which a ScriptSource of given path was executed. - - The ScriptSource.Path property is the key to finding the ScriptScope. Hosts need - to make sure they create a ScriptSource and set its Path property appropriately. - - GetScope is primarily useful for tools that need to map files to their execution scopes. For example, - an editor and interpreter tool might run a file Foo that imports or requires a file Bar. - - The editor's user might later open the file Bar and want to execute expressions in its context. - The tool would need to find Bar's ScriptScope for setting the appropriate context in its interpreter window. - This method helps with this scenario. - - - - - Return a ScriptSource object from string contents with the current engine as the language binding. - - The default SourceCodeKind is AutoDetect. - - The ScriptSource's Path property defaults to null. - - - - - Return a ScriptSource object from string contents with the current engine as the language binding. - - The ScriptSource's Path property defaults to null. - - - - - Return a ScriptSource object from string contents with the current engine as the language binding. - - The default SourceCodeKind is AutoDetect. - - - - - Return a ScriptSource object from string contents. These are helpers for creating ScriptSources' with the right language binding. - - - - - Return a ScriptSource object from file contents with the current engine as the language binding. - - The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions - or map to this language engine with ScriptRuntime.GetEngineByFileExtension. - - The default SourceCodeKind is File. - - The ScriptSource's Path property will be the path argument. - - The encoding defaults to System.Text.Encoding.Default. - - - - - Return a ScriptSource object from file contents with the current engine as the language binding. - - The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions - or map to this language engine with ScriptRuntime.GetEngineByFileExtension. - - The default SourceCodeKind is File. - - The ScriptSource's Path property will be the path argument. - - - - - Return a ScriptSource object from file contents with the current engine as the language binding. - - The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions - or map to this language engine with ScriptRuntime.GetEngineByFileExtension. - - The ScriptSource's Path property will be the path argument. - - - - - This method returns a ScriptSource object from a System.CodeDom.CodeObject. - This is a factory method for creating a ScriptSources with this language binding. - - The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. - - Languages may do more, but hosts should only expect CodeMemberMethod support, - and only sub nodes consisting of the following: - CodeSnippetStatement - CodeSnippetExpression - CodePrimitiveExpression - CodeMethodInvokeExpression - CodeExpressionStatement (for holding MethodInvoke) - - - - - This method returns a ScriptSource object from a System.CodeDom.CodeObject. - This is a factory method for creating a ScriptSources with this language binding. - - The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. - - Languages may do more, but hosts should only expect CodeMemberMethod support, - and only sub nodes consisting of the following: - CodeSnippetStatement - CodeSnippetExpression - CodePrimitiveExpression - CodeMethodInvokeExpression - CodeExpressionStatement (for holding MethodInvoke) - - - - - This method returns a ScriptSource object from a System.CodeDom.CodeObject. - This is a factory method for creating a ScriptSources with this language binding. - - The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. - - Languages may do more, but hosts should only expect CodeMemberMethod support, - and only sub nodes consisting of the following: - CodeSnippetStatement - CodeSnippetExpression - CodePrimitiveExpression - CodeMethodInvokeExpression - CodeExpressionStatement (for holding MethodInvoke) - - - - - This method returns a ScriptSource object from a System.CodeDom.CodeObject. - This is a factory method for creating a ScriptSources with this language binding. - - The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. - - Languages may do more, but hosts should only expect CodeMemberMethod support, - and only sub nodes consisting of the following: - CodeSnippetStatement - CodeSnippetExpression - CodePrimitiveExpression - CodeMethodInvokeExpression - CodeExpressionStatement (for holding MethodInvoke) - - - - - These methods return ScriptSource objects from stream contents with the current engine as the language binding. - - The default SourceCodeKind is File. - - The encoding defaults to Encoding.Default. - - - - - These methods return ScriptSource objects from stream contents with the current engine as the language binding. - - The default SourceCodeKind is File. - - - - - These methods return ScriptSource objects from stream contents with the current engine as the language binding. - - The encoding defaults to Encoding.Default. - - - - - This method returns a ScriptSource with the content provider supplied with the current engine as the language binding. - - This helper lets you own the content provider so that you can implement a stream over internal host data structures, such as an editor's text representation. - - - - - Fetches the value of a variable stored in the scope. - - If there is no engine associated with the scope (see ScriptRuntime.CreateScope), then the name lookup is - a literal lookup of the name in the scope's dictionary. Therefore, it is case-sensitive for example. - - If there is a default engine, then the name lookup uses that language's semantics. - - - - - This method removes the variable name and returns whether - the variable was bound in the scope when you called this method. - - If there is no engine associated with the scope (see ScriptRuntime.CreateScope), - then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, - it is case-sensitive for example. If there is a default engine, then the name lookup uses that language's semantics. - - Some languages may refuse to remove some variables. If the scope has a default language that has bound - variables that cannot be removed, the language engine throws an exception. - - - - - Assigns a value to a variable in the scope, overwriting any previous value. - - If there is no engine associated with the scope (see ScriptRuntime.CreateScope), - then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, - it is case-sensitive for example. - - If there is a default engine, then the name lookup uses that language's semantics. - - - - - Fetches the value of a variable stored in the scope and returns - a Boolean indicating success of the lookup. - - When the method's result is false, then it assigns null to value. - - If there is no engine associated with the scope (see ScriptRuntime.CreateScope), - then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, - it is case-sensitive for example. - - If there is a default engine, then the name lookup uses that language's semantics. - - - - - Fetches the value of a variable stored in the scope. - - If there is no engine associated with the scope (see ScriptRuntime.CreateScope), then the name lookup is - a literal lookup of the name in the scope's dictionary. Therefore, it is case-sensitive for example. - - If there is a default engine, then the name lookup uses that language's semantics. - - Throws an exception if the engine cannot perform the requested type conversion. - - - - - Fetches the value of a variable stored in the scope and returns - a Boolean indicating success of the lookup. - - When the method's result is false, then it assigns default(T) to value. - - If there is no engine associated with the scope (see ScriptRuntime.CreateScope), - then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, - it is case-sensitive for example. - - If there is a default engine, then the name lookup uses that language's semantics. - - Throws an exception if the engine cannot perform the requested type conversion, - then it return false and assigns value to default(T). - - - - - This method returns whether the variable is bound in this scope. - - If there is no engine associated with the scope (see ScriptRuntime.CreateScope), - then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, - it is case-sensitive for example. - - If there is a default engine, then the name lookup uses that language's semantics. - - - - - Fetches the value of a variable stored in the scope and returns an the wrapped object as an ObjectHandle. - - If there is no engine associated with the scope (see ScriptRuntime.CreateScope), then the name lookup is - a literal lookup of the name in the scope's dictionary. Therefore, it is case-sensitive for example. - - If there is a default engine, then the name lookup uses that language's semantics. - - - - - Assigns a value to a variable in the scope, overwriting any previous value. - - The ObjectHandle value is unwrapped before performing the assignment. - - If there is no engine associated with the scope (see ScriptRuntime.CreateScope), - then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, - it is case-sensitive for example. - - If there is a default engine, then the name lookup uses that language's semantics. - - - - - Fetches the value of a variable stored in the scope and returns - a Boolean indicating success of the lookup. - - When the method's result is false, then it assigns null to the value. Otherwise - an ObjectHandle wrapping the object is assigned to value. - - If there is no engine associated with the scope (see ScriptRuntime.CreateScope), - then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, - it is case-sensitive for example. - - If there is a default engine, then the name lookup uses that language's semantics. - - - - - This method returns a language-specific service. - - It provides a point of extensibility for a language implementation - to offer more functionality than the standard engine members discussed here. - - - - - Sets the search paths used by the engine for loading files when a script wants - to import or require another file of code. - - The language doesn't allow to set search paths. - - - - Gets the search paths used by the engine for loading files when a script wants - to import or require another file of code. - - - - - Returns a default ObjectOperations for the engine. - - Because an ObjectOperations object caches rules for the types of - objects and operations it processes, using the default ObjectOperations for - many objects could degrade the caching benefits. Eventually the cache for - some operations could degrade to a point where ObjectOperations stops caching and - does a full search for an implementation of the requested operation for the given objects. - - Another reason to create a new ObjectOperations instance is to have it bound - to the specific view of a ScriptScope. Languages may attach per-language - behavior to a ScriptScope which would alter how the operations are performed. - - For simple hosting situations, this is sufficient behavior. - - - - - - - This property returns readon-only LanguageOptions this engine is using. - - - The values are determined during runtime initialization and read-only afterwards. - You can change the settings via a configuration file or explicitly using ScriptRuntimeSetup class. - - - - - This property returns the ScriptRuntime for the context in which this engine executes. - - - - - This property returns the engine's version as a string. The format is language-dependent. - - - - - Reads an option whose value is expected to be a collection of non-null strings. - Reaturns a read-only copy of the option's value. - - - - - Dynamically choose between interpreting, simple compilation and compilation - that takes advantage of runtime history. - - - - - Display exception detail (callstack) when exception gets caught - - - - - Whether to gather performance statistics. - - - - - Initial file search paths provided by the host. - - - - - Gets a Func of CallSite, object * paramCnt, object delegate type - that's suitable for use in a non-strongly typed call site. - - - - - Presents a flat enumerable view of multiple dictionaries - - - - - Converts a generic ICollection of T into an array of T. - - If the collection is already an array of T the original collection is returned. - - - - - Provides a common table of all SymbolId's in the system. - - Implementation details: - - The case insensitive lookups are implemented by using the top 8 bits for - storing information about multiple casings. These bits are zero for a case insensitive - identifier or specify the casing version for case sensitive lookups. Because of this - there can be at most 255 variations of casing for each identifier. - - Two dictionaries are used to track both the case sensitive and case insensitive versions. - - For the case insensitive versions this is just a normal dictionary keyed from string to - the ID for that specific version. For the case sensitive version a case insensitive - dictionary is used. The value in this case is the last case insensitive version that - we handed out. - - When we hand out an ID we first do a lookup in the normal dictionary. If this succeeds - then we have the ID and we're done. If this fails we then need to consult the case - insensitive dictionary. If the entry exists there then we just need to bump the invariant - version, store that back into the invariant dictionary, and then update the normal dictionary - with the newly produced version. If teh entry wasn't in the case insensitive dictionary - then we need to create a new entry in both tables. - - - - - Source code is a syntactically correct. - - - - - Source code represents an empty statement/expression. - - - - - Source code is already invalid and no suffix can make it syntactically correct. - - - - - Last token is incomplete. Source code can still be completed correctly. - - - - - Last statement is incomplete. Source code can still be completed correctly. - - - - - Move the tokenizer past the next token and return its category. - - The token information associated with the token just scanned. - - - - Move the tokenizer past the next token. - - False if the end of stream has been reached, true otherwise. - - - - Get all tokens over a block of the stream. - - - - The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token - should be returned. - - s - The mininum number of characters to process while getting tokens. - A enumeration of tokens. - - - - Scan from startLocation to at least startLocation + length. - - The mininum number of characters to process while getting tokens. - - This method is used to determine state at arbitrary startLocation. - - False if the end of stream has been reached, true otherwise. - - - - The current internal state of the scanner. - - - - - The current startLocation of the scanner. - - - - - ObjectOperations provide a large catalogue of object operations such as member access, conversions, - indexing, and things like addition. There are several introspection and tool support services available - for more advanced hosts. - - You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics - of the operations. There is a default instance of ObjectOperations you can share across all uses of the - engine. However, very advanced hosts can create new instances. - - - - - Returns true if the object can be called, false if it cannot. - - Even if an object is callable Call may still fail if an incorrect number of arguments or type of arguments are provided. - - - - - Invokes the provided object with the given parameters and returns the result. - - The prefered way of calling objects is to convert the object to a strongly typed delegate - using the ConvertTo methods and then invoking that delegate. - - - - - Invokes a member on the provided object with the given parameters and returns the result. - - - - - Creates a new instance from the provided object using the given parameters, and returns the result. - - - - - Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. - - - - - Gets the member name from the object obj and converts it to the type T. Throws an exception if the - member does not exist, is write-only, or cannot be converted. - - - - - Gets the member name from the object obj. Returns true if the member is successfully retrieved and - stores the value in the value out param. - - - - - Returns true if the object has a member named name, false if the member does not exist. - - - - - Removes the member name from the object obj. - - - - - Sets the member name on object obj to value. - - - - - Sets the member name on object obj to value. This overload can be used to avoid - boxing and casting of strongly typed members. - - - - - Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. - - - - - Gets the member name from the object obj and converts it to the type T. Throws an exception if the - member does not exist, is write-only, or cannot be converted. - - - - - Gets the member name from the object obj. Returns true if the member is successfully retrieved and - stores the value in the value out param. - - - - - Returns true if the object has a member named name, false if the member does not exist. - - - - - Removes the member name from the object obj. - - - - - Sets the member name on object obj to value. - - - - - Sets the member name on object obj to value. This overload can be used to avoid - boxing and casting of strongly typed members. - - - - - Converts the object obj to the type T. The conversion will be explicit or implicit depending on - what the langauge prefers. - - - - - Converts the object obj to the type type. The conversion will be explicit or implicit depending on - what the langauge prefers. - - - - - Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. - - The conversion will be explicit or implicit depending on what the langauge prefers. - - - - - Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot. - - The conversion will be explicit or implicit depending on what the langauge prefers. - - - - - Converts the object obj to the type T including explicit conversions which may lose information. - - - - - Converts the object obj to the type type including explicit conversions which may lose information. - - - - - Converts the object obj to the type T including explicit conversions which may lose information. - - Returns true if the value can be converted, false if it cannot. - - - - - Converts the object obj to the type type including explicit conversions which may lose information. - - Returns true if the value can be converted, false if it cannot. - - - - - Converts the object obj to the type T including implicit conversions. - - - - - Converts the object obj to the type type including implicit conversions. - - - - - Converts the object obj to the type T including implicit conversions. - - Returns true if the value can be converted, false if it cannot. - - - - - Converts the object obj to the type type including implicit conversions. - - Returns true if the value can be converted, false if it cannot. - - - - - Performs a generic unary operation on the specified target and returns the result. - - - - - Performs a generic unary operation on the strongly typed target and returns the value as the specified type - - - - - Performs the generic binary operation on the specified targets and returns the result. - - - - - Peforms the generic binary operation on the specified strongly typed targets and returns - the strongly typed result. - - - - - Performs addition on the specified targets and returns the result. Throws an exception - if the operation cannot be performed. - - - - - Performs subtraction on the specified targets and returns the result. Throws an exception - if the operation cannot be performed. - - - - - Raises the first object to the power of the second object. Throws an exception - if the operation cannot be performed. - - - - - Multiplies the two objects. Throws an exception - if the operation cannot be performed. - - - - - Divides the first object by the second object. Throws an exception - if the operation cannot be performed. - - - - - Performs modulus of the 1st object by the second object. Throws an exception - if the operation cannot be performed. - - - - - Shifts the left object left by the right object. Throws an exception if the - operation cannot be performed. - - - - - Shifts the left object right by the right object. Throws an exception if the - operation cannot be performed. - - - - - Performs a bitwise-and of the two operands. Throws an exception if the operation - cannot be performed. - - - - - Performs a bitwise-or of the two operands. Throws an exception if the operation - cannot be performed. - - - - - Performs a exclusive-or of the two operands. Throws an exception if the operation - cannot be performed. - - - - - Compares the two objects and returns true if the left object is less than the right object. - Throws an exception if hte comparison cannot be performed. - - - - - Compares the two objects and returns true if the left object is greater than the right object. - Throws an exception if hte comparison cannot be performed. - - - - - Compares the two objects and returns true if the left object is less than or equal to the right object. - Throws an exception if hte comparison cannot be performed. - - - - - Compares the two objects and returns true if the left object is greater than or equal to the right object. - Throws an exception if hte comparison cannot be performed. - - - - - Compares the two objects and returns true if the left object is equal to the right object. - Throws an exception if the comparison cannot be performed. - - - - - Compares the two objects and returns true if the left object is not equal to the right object. - Throws an exception if hte comparison cannot be performed. - - - - - Returns a string which describes the object as it appears in source code - - - - - Returns a string representation of the object in a language specific object display format. - - - - - Returns a list of strings which contain the known members of the object. - - - - - Returns a string providing documentation for the specified object. - - - - - Returns a list of signatures applicable for calling the specified object in a form displayable to the user. - - - - - Calls the provided object with the given parameters and returns the result. - - The prefered way of calling objects is to convert the object to a strongly typed delegate - using the ConvertTo methods and then invoking that delegate. - - - - - Performs a generic unary operation on the specified target and returns the result. - - - - - Performs a generic unary operation on the strongly typed target and returns the value as the specified type - - - - - Performs modulus of the 1st object by the second object. Throws an exception - if the operation cannot be performed. - - - - - Performs the generic binary operation on the specified targets and returns the result. - - - - - Peforms the generic binary operation on the specified strongly typed targets and returns - the strongly typed result. - - - - - Calls the specified remote object with the specified remote parameters. - - Though delegates are preferable for calls they may not always be usable for remote objects. - - - - - Calls the specified remote object with the local parameters which will be serialized - to the remote app domain. - - - - - Performs the specified unary operator on the remote object. - - - - - Performs the specified binary operator on the remote object. - - - - - Performs modulus on the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. - - - - - Returns true if the remote object is callable. - - - - - Invokes the specified remote object with the specified remote parameters. - - Though delegates are preferable for calls they may not always be usable for remote objects. - - - - - Invokes the specified remote object with the local parameters which will be serialized - to the remote app domain. - - - - - Sets the remote object as a member on the provided remote object. - - - - - Sets the member name on the remote object obj to value. This overload can be used to avoid - boxing and casting of strongly typed members. - - - - - Gets the member name on the remote object. Throws an exception if the member is not defined or - is write-only. - - - - - Gets the member name on the remote object. Throws an exception if the member is not defined or - is write-only. - - - - - Gets the member name on the remote object. Returns false if the member is not defined or - is write-only. - - - - - Tests to see if the member name is defined on the remote object. - - - - - Removes the member from the remote object - - - - - Converts the remote object into the specified type returning a handle to - the new remote object. - - - - - Converts the remote object into the specified type returning a handle to - the new remote object. - - - - - Converts the remote object into the specified type returning a handle to - the new remote object. Returns true if the value can be converted, - false if it cannot. - - - - - Converts the remote object into the specified type returning a handle to - the new remote object. Returns true if the value can be converted, - false if it cannot. - - - - - Converts the object obj to the type T including explicit conversions which may lose information. - - - - - Converts the object obj to the type type including explicit conversions which may lose information. - - - - - Converts the object obj to the type T including explicit conversions which may lose information. - - Returns true if the value can be converted, false if it cannot. - - - - - Converts the object obj to the type type including explicit conversions which may lose information. - - Returns true if the value can be converted, false if it cannot. - - - - - Unwraps the remote object and converts it into the specified type before - returning it. - - - - - Performs the specified unary operator on the remote object. - - - - - Performs the specified binary operator on the remote object. - - - - - Adds the two remote objects. Throws an exception if the operation cannot be performed. - - - - - Subtracts the 1st remote object from the second. Throws an exception if the operation cannot be performed. - - - - - Raises the 1st remote object to the power of the 2nd. Throws an exception if the operation cannot be performed. - - - - - Multiplies the two remote objects. Throws an exception if the operation cannot be performed. - - - - - Divides the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. - - - - - Performs modulus on the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. - - - - - Shifts the 1st remote object left by the 2nd remote object. Throws an exception if the operation cannot be performed. - - - - - Shifts the 1st remote object right by the 2nd remote object. Throws an exception if the operation cannot be performed. - - - - - Performs bitwise-and on the two remote objects. Throws an exception if the operation cannot be performed. - - - - - Performs bitwise-or on the two remote objects. Throws an exception if the operation cannot be performed. - - - - - Performs exclusive-or on the two remote objects. Throws an exception if the operation cannot be performed. - - - - - Compares the two remote objects and returns true if the 1st is less than the 2nd. Throws an exception if the operation cannot be performed. - - - - - Compares the two remote objects and returns true if the 1st is greater than the 2nd. Throws an exception if the operation cannot be performed. - - - - - Compares the two remote objects and returns true if the 1st is less than or equal to the 2nd. Throws an exception if the operation cannot be performed. - - - - - Compares the two remote objects and returns true if the 1st is greater than or equal to than the 2nd. Throws an exception if the operation cannot be performed. - - - - - Compares the two remote objects and returns true if the 1st is equal to the 2nd. Throws an exception if the operation cannot be performed. - - - - - Compares the two remote objects and returns true if the 1st is not equal to the 2nd. Throws an exception if the operation cannot be performed. - - - - - Returns a string representation of the object in a langauge specific object display format. - - - - - Returns a list of strings which contain the known members of the remote object. - - - - - Returns a string providing documentation for the specified remote object. - - - - - Returns a list of signatures applicable for calling the specified object in a form displayable to the user. - - - - - Helper to unwrap an object - in the future maybe we should validate the current app domain. - - - - - Helper to unwrap multiple objects - - - - - Defines a kind of the source code. The parser sets its initial state accordingly. - - - - - The code is an expression. - - - - - The code is a sequence of statements. - - - - - The code is a single statement. - - - - - The code is a content of a file. - - - - - The code is an interactive command. - - - - - The language parser auto-detects the kind. A syntax error is reported if it is not able to do so. - - - - - Move the tokenizer past the next token and return its category. - - The token information associated with the token just scanned. - - - - Move the tokenizer past the next token. - - False if the end of stream has been reached, true otherwise. - - - - Get all tokens over a block of the stream. - - - - The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token - should be returned. - - - The mininum number of characters to process while getting tokens. - A enumeration of tokens. - - - - Scan from startLocation to at least startLocation + length. - - The mininum number of characters to process while getting tokens. - - This method is used to determine state at arbitrary startLocation. - - False if the end of stream has been reached, true otherwise. - - - - The current internal state of the scanner. - - - - - The current startLocation of the scanner. - - - - - Simple thread-safe SymbolDictionary used for storing collections of members. - - Like all SymbolDictionaries this supports both indexing using SymbolId's (IAttributesCollection) - and via object keys (IDictionary<object, object>). - - - - - Base class for SymbolId dictionaries. - - SymbolId dictionaries are fast dictionaries used for looking up members of classes, - function environments, function locals, and other places which are typically indexed by - string names. - - SymbolId dictionaries support both keying by SymbolId (the common case) and object keys - (supporting late bound access to the dictionary as a normal Dictionary<object, object> - when exposed directly to user code). When indexed by objects null is a valid value for the - key. - - - - - Creates a new SymbolIdDictBase from the specified creating context which will be - used for comparisons. - - - - - Symbol dictionaries are usually indexed using literal strings, which is handled using the Symbols. - However, some languages allow non-string keys too. We handle this case by lazily creating an object-keyed dictionary, - and keeping it in the symbol-indexed dictionary. Such access is slower, which is acceptable. - - - - - Singleton for each language. - - - - - Must not be called under a lock as it can potentially call a user code. - - The language context's implementation failed to instantiate. - - - - Whether the application is in debug mode. + Indicates that the script runtime is in debug mode. This means: 1) Symbols are emitted for debuggable methods (methods associated with SourceUnit). @@ -2193,270 +1349,25 @@ 4) Languages may disable optimizations based on this value. - + - Ignore CLR visibility checks. + Ignore CLR visibility checks - + - Hosting API counterpart for . + Can be any derived class of ScriptHost. When set, it allows the + host to override certain methods to control behavior of the runtime - - - Executes code in a default scope. - + + + Option names are case-sensitive. + - + - Execute code within a given scope and returns the result. - - - - - Executes code in in a default scope and converts to a given type. - - - - - Execute code within a given scope and converts result to a given type. - - - - - Engine that compiled this code. - - - - - Default scope for this code. - - - - - Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce - a TextContentProvider which reads binary data with the correct language semantics. - - - - - A ScriptScope is a unit of execution for code. It consists of a global Scope which - all code executes in. A ScriptScope can have an arbitrary initializer and arbitrary - reloader. - - ScriptScope is not thread safe. Host should either lock when multiple threads could - access the same module or should make a copy for each thread. - - Hosting API counterpart for . - - - - - Gets a value stored in the scope under the given name. - - The specified name is not defined in the scope. - is a null reference. - - - - Gets a value stored in the scope under the given name. - Converts the result to the specified type using the conversion that the language associated with the scope defines. - If no language is associated with the scope, the default CLR conversion is attempted. - - The specified name is not defined in the scope. - is a null reference. - - - - Tries to get a value stored in the scope under the given name. - - is a null reference. - - - - Tries to get a value stored in the scope under the given name. - Converts the result to the specified type using the conversion that the language associated with the scope defines. - If no language is associated with the scope, the default CLR conversion is attempted. - - is a null reference. - - - - Sets the name to the specified value. - - is a null reference. - - - - Gets a handle for a value stored in the scope under the given name. - - The specified name is not defined in the scope. - is a null reference. - - - - Tries to get a handle for a value stored in the scope under the given name. - Returns true if there is such name, false otherwise. - - is a null reference. - - - - Sets the name to the specified value. - - - The value held by the handle isn't from the scope's app-domain and isn't serializable or MarshalByRefObject. - - or is a null reference. - - - - Determines if this context or any outer scope contains the defined name. - - is a null reference. - - - - Removes the variable of the given name from this scope. - - true if the value existed in the scope before it has been removed. - is a null reference. - - - - Gets a list of variable names stored in the scope. - - - - - Gets an array of variable names and their values stored in the scope. - - - - - Gets an engine for the language associated with this scope. - Returns invariant engine if the scope is language agnostic. - - - - - This overload will be called when a SourceUnit is not available. This can happen if the code is being executed remotely, - since SourceUnit cannot be marshaled across AppDomains. - - - - - Console input stream (Console.OpenStandardInput) has a bug that manifests itself if reading small amounts of data. - This class wraps the standard input stream with a buffer that ensures that enough data are read from the underlying stream. - - - - - Stores the location of a span of text in a source file. - - - - - Constructs a new span with a specific start and end location. - - The beginning of the span. - The end of the span. - - - - A valid span that represents no location. - - - - - An invalid span. - - - - - Compares two specified Span values to see if they are equal. - - One span to compare. - The other span to compare. - True if the spans are the same, False otherwise. - - - - Compares two specified Span values to see if they are not equal. - - One span to compare. - The other span to compare. - True if the spans are not the same, False otherwise. - - - - The start location of the span. - - - - - The end location of the span. Location of the first character behind the span. - - - - - Length of the span (number of characters inside the span). - - - - - Whether the locations in the span are valid. - - - - - Represents a host-provided variables for executable code. The variables are - typically backed by a host-provided dictionary. Languages can also associate per-language - information with the context by using scope extensions. This can be used for tracking - state which is used across multiple executions, for providing custom forms of - storage (for example object keyed access), or other language specific semantics. - - Scope objects are thread-safe as long as their underlying storage is thread safe. - - Script hosts can choose to use thread safe or thread unsafe modules but must be sure - to constrain the code they right to be single-threaded if using thread unsafe - storage. - - - - - Creates a new scope with a new empty thread-safe dictionary. - - - - - Creates a new scope with the provided dictionary. - - - - - Creates a new scope which is backed by an arbitrary object for it's storage. - - - - - - Gets the ScopeExtension associated with the provided ContextId. - - - - - Sets the ScopeExtension to the provided value for the given ContextId. - - The extension can only be set once. The returned value is either the new ScopeExtension - if no value was previously set or the previous value. - - - - - Class that represents compiler options. - Note that this class is likely to change when hosting API becomes part of .Net + Arguments passed to the host type when it is constructed @@ -3119,94 +2030,255 @@ System.Security.VerificationException with message like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" - + - A token marking an end of stream. + Provides hosting to DLR. Forwards DLR requests to the ScriptHost. - + - A space, tab, or newline. + Advanced APIs for HAPI providers. These methods should not be used by hosts. + They are provided for other hosting API implementers that would like to leverage existing HAPI and + extend it with language specific functionality, for example. - + - A block comment. + Performs a callback in the ScriptEngine's app domain and returns the result. - + - A single line comment. + Bridges ErrorSink and ErrorListener. + Errors reported by language compilers to ErrorSink are forwarded to the ErrorListener provided by the host. + + + This proxy is created in the scenario when the compiler is processing a single SourceUnit. + Therefore it could maintain one to one mapping from SourceUnit to ScriptSource. + In a case, which shouldn't happen, that the compiler reports an error in a different SourceUnit we just create + a new instance of the ScriptSource each time. + + TODO: Consider compilation of multiple source units and creating a hashtable mapping SourceUnits to ScriptSources + within the context of compilation unit. + + + + + This overload will be called when a SourceUnit is not available. This can happen if the code is being executed remotely, + since SourceUnit cannot be marshaled across AppDomains. - + - A documentation comment. + Class that represents compiler options. + Note that this class is likely to change when hosting API becomes part of .Net - + - A numeric literal. + Wraps the provided enumerable into a ReadOnlyCollection{T} + + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. - + - A character literal. + Source code is a syntactically correct. - + - A string literal. + Source code represents an empty statement/expression. - + - A regular expression literal. + Source code is already invalid and no suffix can make it syntactically correct. - + - A keyword. + Last token is incomplete. Source code can still be completed correctly. - + - A directive (e.g. #line). + Last statement is incomplete. Source code can still be completed correctly. - + + + ScriptHost is collocated with ScriptRuntime in the same app-domain. + The host can implement a derived class to consume some notifications and/or + customize operations like TryGetSourceUnit,ResolveSourceUnit, etc. + + The areguments to the the constructor of the derived class are specified in ScriptRuntimeSetup + instance that enters ScriptRuntime initialization. + + If the host is remote with respect to DLR (i.e. also with respect to ScriptHost) + and needs to access objects living in its app-domain it can pass MarshalByRefObject + as an argument to its ScriptHost subclass constructor. + + + - A punctuation character that has a specific meaning in a language. + The runtime the host is attached to. - + - A token that operates as a separator between two language elements. + Invoked after the initialization of the associated Runtime is finished. + The host can override this method to perform additional initialization of runtime (like loading assemblies etc.). - + - An identifier (variable, $variable, @variable, @@variable, $variable$, function!, function?, [variable], i'variable', ...) + Invoked after a new language is loaded into the Runtime. + The host can override this method to perform additional initialization of language engines. - + - Braces, parenthesis, brackets. + Represents a location in source code. - + - Errors. + Creates a new source location. + + The index in the source stream the location represents (0-based). + The line in the source stream the location represents (1-based). + The column in the source stream the location represents (1-based). + + + + Compares two specified location values to see if they are equal. + + One location to compare. + The other location to compare. + True if the locations are the same, False otherwise. + + + + Compares two specified location values to see if they are not equal. + + One location to compare. + The other location to compare. + True if the locations are not the same, False otherwise. + + + + Compares two specified location values to see if one is before the other. + + One location to compare. + The other location to compare. + True if the first location is before the other location, False otherwise. + + + + Compares two specified location values to see if one is after the other. + + One location to compare. + The other location to compare. + True if the first location is after the other location, False otherwise. + + + + Compares two specified location values to see if one is before or the same as the other. + + One location to compare. + The other location to compare. + True if the first location is before or the same as the other location, False otherwise. + + + + Compares two specified location values to see if one is after or the same as the other. + + One location to compare. + The other location to compare. + True if the first location is after or the same as the other location, False otherwise. + + + + Compares two specified location values. + + One location to compare. + The other location to compare. + 0 if the locations are equal, -1 if the left one is less than the right one, 1 otherwise. + + + + A location that is valid but represents no location at all. - + - Exposes a IDictionary<SymbolId, object> as a IDictionary<object, object< + An invalid location. - + - See also Microsoft.VisualStudio.Package.TokenTriggers. + A minimal valid location. + + + + + The index in the source stream the location represents (0-based). + + + + + The line in the source stream the location represents (1-based). + + + + + The column in the source stream the location represents (1-based). + + + + + Whether the location is a valid location. + + True if the location is valid, False otherwise. + + + + Provides host-redirectable IO streams used by DLR languages for default IO. + + + + + Used if the host stores the output as binary data. + + Binary stream to write data to. + Encoding used to convert textual data written to the output by the script. + + + + Used if the host handles both kinds of data (textual and binary) by itself. + + + + + Source code reader. + + + + + Seeks the first character of a specified line in the text stream. + + Line number. The current position is assumed to be line #1. + + Returns true if the line is found, false otherwise. + + + + + Encoding that is used by the reader to convert binary data read from an underlying binary stream. + Null if the reader is reading from a textual source (not performing any byte to character transcoding). @@ -3222,177 +2294,909 @@ loaded. - + - Provides optimized and cachable support for scope storage. + Exposes a IDictionary<SymbolId, object> as a IDictionary<object, object< + + + + + Base class for SymbolId dictionaries. - This is the default object used for storing values in a scope. + SymbolId dictionaries are fast dictionaries used for looking up members of classes, + function environments, function locals, and other places which are typically indexed by + string names. + SymbolId dictionaries support both keying by SymbolId (the common case) and object keys + (supporting late bound access to the dictionary as a normal Dictionary<object, object> + when exposed directly to user code). When indexed by objects null is a valid value for the + key. + + + + + Creates a new SymbolIdDictBase from the specified creating context which will be + used for comparisons. + + + + + Move the tokenizer past the next token and return its category. + + The token information associated with the token just scanned. + + + + Move the tokenizer past the next token. + + False if the end of stream has been reached, true otherwise. + + + + Get all tokens over a block of the stream. - The implementation uses a case-insensitive dictionary which holds - onto ScopeVariableIgnoreCase objects. The SVIC's hold onto ScopeVariable - objects for each possible casing. + + The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token + should be returned. + + s + The mininum number of characters to process while getting tokens. + A enumeration of tokens. + + + + Scan from startLocation to at least startLocation + length. + + The mininum number of characters to process while getting tokens. + + This method is used to determine state at arbitrary startLocation. + False if the end of stream has been reached, true otherwise. - + - Gets the named value from the scope optionally ignoring case. + The current internal state of the scanner. + + + + + The current startLocation of the scanner. + + + + + A ScriptScope is a unit of execution for code. It consists of a global Scope which + all code executes in. A ScriptScope can have an arbitrary initializer and arbitrary + reloader. + + ScriptScope is not thread safe. Host should either lock when multiple threads could + access the same module or should make a copy for each thread. - If the named value is not present an InvalidOperationException is raised. + Hosting API counterpart for . + + + + + Gets a value stored in the scope under the given name. + + The specified name is not defined in the scope. + is a null reference. + + + + Gets a value stored in the scope under the given name. + Converts the result to the specified type using the conversion that the language associated with the scope defines. + If no language is associated with the scope, the default CLR conversion is attempted. + + The specified name is not defined in the scope. + is a null reference. + + + + Tries to get a value stored in the scope under the given name. + + is a null reference. + + + + Tries to get a value stored in the scope under the given name. + Converts the result to the specified type using the conversion that the language associated with the scope defines. + If no language is associated with the scope, the default CLR conversion is attempted. + + is a null reference. + + + + Sets the name to the specified value. + + is a null reference. + + + + Gets a handle for a value stored in the scope under the given name. + + The specified name is not defined in the scope. + is a null reference. + + + + Tries to get a handle for a value stored in the scope under the given name. + Returns true if there is such name, false otherwise. + + is a null reference. + + + + Sets the name to the specified value. + + + The value held by the handle isn't from the scope's app-domain and isn't serializable or MarshalByRefObject. + + or is a null reference. + + + + Determines if this context or any outer scope contains the defined name. + + is a null reference. + + + + Removes the variable of the given name from this scope. + + true if the value existed in the scope before it has been removed. + is a null reference. + + + + Gets a list of variable names stored in the scope. - + - Attempts to get the named value from the scope optionally ignoring the case. + Gets an array of variable names and their values stored in the scope. + + + + + Gets an engine for the language associated with this scope. + Returns invariant engine if the scope is language agnostic. + + + + + ObjectOperations provide a large catalogue of object operations such as member access, conversions, + indexing, and things like addition. There are several introspection and tool support services available + for more advanced hosts. - Returns true if the value is present, false if it is not. + You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics + of the operations. There is a default instance of ObjectOperations you can share across all uses of the + engine. However, very advanced hosts can create new instances. - + - Sets the named value in the scope optionally ignoring the case. - - - - - Deletes the named value from the scope optionally ignoring the case. - - - - - Checks if the named value is present in the scope optionally ignoring the case. - - - - - Gets the IScopeVariable for the scope optionally ignoring case. + Returns true if the object can be called, false if it cannot. - The IScopeVariable can be held onto and get/set/deleted without performing - a dictionary lookup on subsequent accesses. + Even if an object is callable Call may still fail if an incorrect number of arguments or type of arguments are provided. - + - Gets the ScopeVariable for the scope in a case-sensitive manner. + Invokes the provided object with the given parameters and returns the result. - The ScopeVariable can be held onto and get/set/deleted without performing - a dictionary lookup on subsequent accesses. + The prefered way of calling objects is to convert the object to a strongly typed delegate + using the ConvertTo methods and then invoking that delegate. - + - Gets the ScopeVariableIgnoreCase for the scope in a case-insensitive manner. + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Creates a new instance from the provided object using the given parameters, and returns the result. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Converts the object obj to the type T. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type type. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. - The ScopeVariable can be held onto and get/set/deleted without performing - a dictionary lookup on subsequent accesses. + The conversion will be explicit or implicit depending on what the langauge prefers. - + - Returns all of the member names which currently have values in the scope. + Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot. - The list contains all available casings. + The conversion will be explicit or implicit depending on what the langauge prefers. - + - Returns all of the member names and their associated values from the scope. + Converts the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. - The list contains all available casings. + Returns true if the value can be converted, false if it cannot. - + - Provides convenient case-sensitive value access. - - - - - Provides a common interface for accessing both case sensitive and - case insensitive variable storage. - - - - - Atempts to get the value. If a value is assigned it returns true otherwise - it returns false. - - - - - Sets the current value in the scope. - - - - - Removes the current value from the scope. - - - - - True if the scope has a value, false if it does not. - - - - - Boxes the value for storage in a scope. Languages or consumers of the scope - can save this value and use it to get/set the current value in the scope for - commonly accessed values. + Converts the object obj to the type type including explicit conversions which may lose information. - ScopeVariables are case sensitive and will only refer to a single value. + Returns true if the value can be converted, false if it cannot. - + - Atempts to get the value. If a value is assigned it returns true otherwise - it returns false. + Converts the object obj to the type T including implicit conversions. - + - Sets the current value in the scope. + Converts the object obj to the type type including implicit conversions. - + - Removes the current value from the scope. - - - - - True if the scope has a value, false if it does not. - - - - - Boxes the value for storage in a scope. Languages or consumers of the scope - can save this value and use it to get/set the current value in the scope for - commonly accessed values. + Converts the object obj to the type T including implicit conversions. - ScopeVariablesIgnoreCase are case insensitive and may access different casings - depending on how other gets/sets occur in the scope. + Returns true if the value can be converted, false if it cannot. - + - Atempts to get the value. If a value is assigned it returns true otherwise - it returns false. + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. - + - Sets the current value in the scope. + Performs a generic unary operation on the specified target and returns the result. - + - Removes the current value from the scope. + Performs a generic unary operation on the strongly typed target and returns the value as the specified type - + - True if the scope has a value, false if it does not. + Performs the generic binary operation on the specified targets and returns the result. + + + + + Peforms the generic binary operation on the specified strongly typed targets and returns + the strongly typed result. + + + + + Performs addition on the specified targets and returns the result. Throws an exception + if the operation cannot be performed. + + + + + Performs subtraction on the specified targets and returns the result. Throws an exception + if the operation cannot be performed. + + + + + Raises the first object to the power of the second object. Throws an exception + if the operation cannot be performed. + + + + + Multiplies the two objects. Throws an exception + if the operation cannot be performed. + + + + + Divides the first object by the second object. Throws an exception + if the operation cannot be performed. + + + + + Performs modulus of the 1st object by the second object. Throws an exception + if the operation cannot be performed. + + + + + Shifts the left object left by the right object. Throws an exception if the + operation cannot be performed. + + + + + Shifts the left object right by the right object. Throws an exception if the + operation cannot be performed. + + + + + Performs a bitwise-and of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Performs a bitwise-or of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Performs a exclusive-or of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Compares the two objects and returns true if the left object is less than the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is greater than the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is less than or equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is greater than or equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is equal to the right object. + Throws an exception if the comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is not equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Returns a string which describes the object as it appears in source code + + + + + Returns a string representation of the object in a language specific object display format. + + + + + Returns a list of strings which contain the known members of the object. + + + + + Returns a string providing documentation for the specified object. + + + + + Returns a list of signatures applicable for calling the specified object in a form displayable to the user. + + + + + Calls the provided object with the given parameters and returns the result. + + The prefered way of calling objects is to convert the object to a strongly typed delegate + using the ConvertTo methods and then invoking that delegate. + + + + + Performs a generic unary operation on the specified target and returns the result. + + + + + Performs a generic unary operation on the strongly typed target and returns the value as the specified type + + + + + Performs modulus of the 1st object by the second object. Throws an exception + if the operation cannot be performed. + + + + + Performs the generic binary operation on the specified targets and returns the result. + + + + + Peforms the generic binary operation on the specified strongly typed targets and returns + the strongly typed result. + + + + + Calls the specified remote object with the specified remote parameters. + + Though delegates are preferable for calls they may not always be usable for remote objects. + + + + + Calls the specified remote object with the local parameters which will be serialized + to the remote app domain. + + + + + Performs the specified unary operator on the remote object. + + + + + Performs the specified binary operator on the remote object. + + + + + Performs modulus on the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. + + + + + Returns true if the remote object is callable. + + + + + Invokes the specified remote object with the specified remote parameters. + + Though delegates are preferable for calls they may not always be usable for remote objects. + + + + + Invokes the specified remote object with the local parameters which will be serialized + to the remote app domain. + + + + + Sets the remote object as a member on the provided remote object. + + + + + Sets the member name on the remote object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name on the remote object. Throws an exception if the member is not defined or + is write-only. + + + + + Gets the member name on the remote object. Throws an exception if the member is not defined or + is write-only. + + + + + Gets the member name on the remote object. Returns false if the member is not defined or + is write-only. + + + + + Tests to see if the member name is defined on the remote object. + + + + + Removes the member from the remote object + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. Returns true if the value can be converted, + false if it cannot. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. Returns true if the value can be converted, + false if it cannot. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type T including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Unwraps the remote object and converts it into the specified type before + returning it. + + + + + Performs the specified unary operator on the remote object. + + + + + Performs the specified binary operator on the remote object. + + + + + Adds the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Subtracts the 1st remote object from the second. Throws an exception if the operation cannot be performed. + + + + + Raises the 1st remote object to the power of the 2nd. Throws an exception if the operation cannot be performed. + + + + + Multiplies the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Divides the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. + + + + + Performs modulus on the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. + + + + + Shifts the 1st remote object left by the 2nd remote object. Throws an exception if the operation cannot be performed. + + + + + Shifts the 1st remote object right by the 2nd remote object. Throws an exception if the operation cannot be performed. + + + + + Performs bitwise-and on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Performs bitwise-or on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Performs exclusive-or on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is less than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is greater than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is less than or equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is greater than or equal to than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is not equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Returns a string representation of the object in a langauge specific object display format. + + + + + Returns a list of strings which contain the known members of the remote object. + + + + + Returns a string providing documentation for the specified remote object. + + + + + Returns a list of signatures applicable for calling the specified object in a form displayable to the user. + + + + + Helper to unwrap an object - in the future maybe we should validate the current app domain. + + + + + Helper to unwrap multiple objects + + + + + See also Microsoft.VisualStudio.Package.TokenTriggers. + + + + + Move the tokenizer past the next token and return its category. + + The token information associated with the token just scanned. + + + + Move the tokenizer past the next token. + + False if the end of stream has been reached, true otherwise. + + + + Get all tokens over a block of the stream. + + + + The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token + should be returned. + + + The mininum number of characters to process while getting tokens. + A enumeration of tokens. + + + + Scan from startLocation to at least startLocation + length. + + The mininum number of characters to process while getting tokens. + + This method is used to determine state at arbitrary startLocation. + + False if the end of stream has been reached, true otherwise. + + + + The current internal state of the scanner. + + + + + The current startLocation of the scanner. + + + + + Simple thread-safe SymbolDictionary used for storing collections of members. + + Like all SymbolDictionaries this supports both indexing using SymbolId's (IAttributesCollection) + and via object keys (IDictionary<object, object>). + + + + + Symbol dictionaries are usually indexed using literal strings, which is handled using the Symbols. + However, some languages allow non-string keys too. We handle this case by lazily creating an object-keyed dictionary, + and keeping it in the symbol-indexed dictionary. Such access is slower, which is acceptable. + + + + + ScriptCode is an instance of compiled code that is bound to a specific LanguageContext + but not a specific ScriptScope. The code can be re-executed multiple times in different + scopes. Hosting API counterpart for this class is CompiledCode. @@ -3466,22 +3270,47 @@ IAttributesCollection so that your host could late bind names. - + - Abstracts system operations that are used by DLR and could potentially be platform specific. - The host can implement its PAL to adapt DLR to the platform it is running on. - For example, the Silverlight host adapts some file operations to work against files on the server. + Unmapped span. - - Invalid path. - - - Invalid path. - - + - Bridges ErrorListener and ErrorSink. It provides the reverse functionality as ErrorSinkProxyListener + Only host should redirect I/O. + + + + + Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce + a TextContentProvider which reads binary data with the correct language semantics. + + + + + Singleton for each language. + + + + + Must not be called under a lock as it can potentially call a user code. + + The language context's implementation failed to instantiate. + + + + Whether the application is in debug mode. + This means: + + 1) Symbols are emitted for debuggable methods (methods associated with SourceUnit). + 2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging). + 3) JIT optimization is disabled for all methods + 4) Languages may disable optimizations based on this value. + + + + + Ignore CLR visibility checks. @@ -3490,16 +3319,249 @@ Hosting API counterpart for . - + - Advanced APIs for HAPI providers. These methods should not be used by hosts. - They are provided for other hosting API implementers that would like to leverage existing HAPI and - extend it with language specific functionality, for example. + Defines a kind of the source code. The parser sets its initial state accordingly. - + - Performs a callback in the ScriptEngine's app domain and returns the result. + The code is an expression. + + + + + The code is a sequence of statements. + + + + + The code is a single statement. + + + + + The code is a content of a file. + + + + + The code is an interactive command. + + + + + The language parser auto-detects the kind. A syntax error is reported if it is not able to do so. + + + + + Console input stream (Console.OpenStandardInput) has a bug that manifests itself if reading small amounts of data. + This class wraps the standard input stream with a buffer that ensures that enough data are read from the underlying stream. + + + + + This attribute is used to mark a parameter that can accept any keyword parameters that + are not bound to normal arguments. The extra keyword parameters will be + passed in a dictionary which is created for the call. + + Most languages which support params dictionaries will support the following types: + IDictionary<string, anything> + IDictionary<object, anything> + Dictionary<string, anything> + Dictionary<object, anything> + IDictionary + IAttributesCollection (deprecated) + + For languages which don't have language level support the user will be required to + create and populate the dictionary by hand. + + This attribute is the dictionary equivalent of the System.ParamArrayAttribute. + + + public static void KeywordArgFunction([ParamsDictionary]IDictionary<string, object> dict) { + foreach (var v in dict) { + Console.WriteLine("Key: {0} Value: {1}", v.Key, v.Value); + } + } + + Called from Python: + + KeywordArgFunction(a = 2, b = "abc") + + will print: + Key: a Value = 2 + Key: b Value = abc + + + + + Hosting counterpart for . + + + + + Compile the ScriptSource into CompileCode object that can be executed + repeatedly in its default scope or in other scopes without having to recompile the code. + + Code cannot be compiled. + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to errors. + + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to error(s). + + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to error(s). + + + + + Executes the code in the specified scope. + Returns an object that is the resulting value of running the code. + + When the ScriptSource is a file or statement, the engine decides what is + an appropriate value to return. Some languages return the value produced + by the last expression or statement, but languages that are not expression + based may return null. + + Code cannot be compiled. + + + + Executes the source code. The execution is not bound to any particular scope. + + + + + Executes the code in a specified scope and converts the result to the specified type. + The conversion is language specific. + + + + + Executes the code in an empty scope and converts the result to the specified type. + The conversion is language specific. + + + + + Executes the code in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Runs a specified code as if it was a program launched from OS command shell. + and returns a process exit code indicating the success or error condition + of executing the code. + + Exact behavior depends on the language. Some languages have a dedicated "exit" exception that + carries the exit code, in which case the exception is cought and the exit code is returned. + The default behavior returns the result of program's execution converted to an integer + using a language specific conversion. + + Code cannot be compiled. + + + + Detects the encoding of the content. + + + An encoding that is used by the reader of the script source to transcode its content to Unicode text. + Null if the content is already textual and no transcoding is performed. + + + Note that the default encoding specified when the script source is created could be overridden by + an encoding that is found in the content preamble (Unicode BOM or a language specific encoding preamble). + In that case the preamble encoding is returned. Otherwise, the default encoding is returned. + + An I/O error occurs. + + + + Reads specified range of lines (or less) from the source unit. + + 1-based number of the first line to fetch. + The number of lines to fetch. + + Which character sequences are considered line separators is language specific. + If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. + + An I/O error occurs. + + + + Reads a specified line. + + 1-based line number. + Line content. Line separator is not included. + An I/O error occurs. + + Which character sequences are considered line separators is language specific. + If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. + + + + + Gets script source content. + + Entire content. + An I/O error occurs. + + The result includes language specific preambles (e.g. "#coding:UTF-8" encoding preamble recognized by Ruby), + but not the preamble defined by the content encoding (e.g. BOM). + The entire content of the source unit is encoded by single encoding (if it is read from binary stream). + + + + + Identification of the source unit. Assigned by the host. + The format and semantics is host dependent (could be a path on file system or URL). + null for anonymous script source. + Cannot be an empty string. + + + + + Provides a common table of all SymbolId's in the system. + + Implementation details: + + The case insensitive lookups are implemented by using the top 8 bits for + storing information about multiple casings. These bits are zero for a case insensitive + identifier or specify the casing version for case sensitive lookups. Because of this + there can be at most 255 variations of casing for each identifier. + + Two dictionaries are used to track both the case sensitive and case insensitive versions. + + For the case insensitive versions this is just a normal dictionary keyed from string to + the ID for that specific version. For the case sensitive version a case insensitive + dictionary is used. The value in this case is the last case insensitive version that + we handed out. + + When we hand out an ID we first do a lookup in the normal dictionary. If this succeeds + then we have the ID and we're done. If this fails we then need to consult the case + insensitive dictionary. If the entry exists there then we just need to bump the invariant + version, store that back into the invariant dictionary, and then update the normal dictionary + with the newly produced version. If teh entry wasn't in the case insensitive dictionary + then we need to create a new entry in both tables. @@ -3525,6 +3587,467 @@ SymbolId to represent invalid value + + + Represents a language in Hosting API. + Hosting API counterpart for . + + + + + Returns a new ObjectOperations object. See the Operations property for why you might want to call this. + + + + + Returns a new ObjectOperations object that inherits any semantics particular to the provided ScriptScope. + + See the Operations property for why you might want to call this. + + + + + Executes an expression. The execution is not bound to any particular scope. + + The engine doesn't support code execution. + is a null reference. + + + + Executes an expression within the specified scope. + + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes an expression within a new scope and converts result to the given type. + + The engine doesn't support code execution. + is a null reference. + + + + Executes an expression within the specified scope and converts result to the given type. + + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes content of the specified file in a new scope and returns that scope. + + The engine doesn't support code execution. + is a null reference. + + + + Executes content of the specified file against the given scope. + + The . + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Creates a new ScriptScope whose storage is an arbitrary object. + + Accesses to the ScriptScope will turn into get, set, and delete members against the object. + + + + + This method returns the ScriptScope in which a ScriptSource of given path was executed. + + The ScriptSource.Path property is the key to finding the ScriptScope. Hosts need + to make sure they create a ScriptSource and set its Path property appropriately. + + GetScope is primarily useful for tools that need to map files to their execution scopes. For example, + an editor and interpreter tool might run a file Foo that imports or requires a file Bar. + + The editor's user might later open the file Bar and want to execute expressions in its context. + The tool would need to find Bar's ScriptScope for setting the appropriate context in its interpreter window. + This method helps with this scenario. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The default SourceCodeKind is AutoDetect. + + The ScriptSource's Path property defaults to null. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The ScriptSource's Path property defaults to null. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The default SourceCodeKind is AutoDetect. + + + + + Return a ScriptSource object from string contents. These are helpers for creating ScriptSources' with the right language binding. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The default SourceCodeKind is File. + + The ScriptSource's Path property will be the path argument. + + The encoding defaults to System.Text.Encoding.Default. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The default SourceCodeKind is File. + + The ScriptSource's Path property will be the path argument. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The ScriptSource's Path property will be the path argument. + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The default SourceCodeKind is File. + + The encoding defaults to Encoding.Default. + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The default SourceCodeKind is File. + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The encoding defaults to Encoding.Default. + + + + + This method returns a ScriptSource with the content provider supplied with the current engine as the language binding. + + This helper lets you own the content provider so that you can implement a stream over internal host data structures, such as an editor's text representation. + + + + + Fetches the value of a variable stored in the scope. + + If there is no engine associated with the scope (see ScriptRuntime.CreateScope), then the name lookup is + a literal lookup of the name in the scope's dictionary. Therefore, it is case-sensitive for example. + + If there is a default engine, then the name lookup uses that language's semantics. + + + + + This method removes the variable name and returns whether + the variable was bound in the scope when you called this method. + + If there is no engine associated with the scope (see ScriptRuntime.CreateScope), + then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, + it is case-sensitive for example. If there is a default engine, then the name lookup uses that language's semantics. + + Some languages may refuse to remove some variables. If the scope has a default language that has bound + variables that cannot be removed, the language engine throws an exception. + + + + + Assigns a value to a variable in the scope, overwriting any previous value. + + If there is no engine associated with the scope (see ScriptRuntime.CreateScope), + then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, + it is case-sensitive for example. + + If there is a default engine, then the name lookup uses that language's semantics. + + + + + Fetches the value of a variable stored in the scope and returns + a Boolean indicating success of the lookup. + + When the method's result is false, then it assigns null to value. + + If there is no engine associated with the scope (see ScriptRuntime.CreateScope), + then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, + it is case-sensitive for example. + + If there is a default engine, then the name lookup uses that language's semantics. + + + + + Fetches the value of a variable stored in the scope. + + If there is no engine associated with the scope (see ScriptRuntime.CreateScope), then the name lookup is + a literal lookup of the name in the scope's dictionary. Therefore, it is case-sensitive for example. + + If there is a default engine, then the name lookup uses that language's semantics. + + Throws an exception if the engine cannot perform the requested type conversion. + + + + + Fetches the value of a variable stored in the scope and returns + a Boolean indicating success of the lookup. + + When the method's result is false, then it assigns default(T) to value. + + If there is no engine associated with the scope (see ScriptRuntime.CreateScope), + then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, + it is case-sensitive for example. + + If there is a default engine, then the name lookup uses that language's semantics. + + Throws an exception if the engine cannot perform the requested type conversion, + then it return false and assigns value to default(T). + + + + + This method returns whether the variable is bound in this scope. + + If there is no engine associated with the scope (see ScriptRuntime.CreateScope), + then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, + it is case-sensitive for example. + + If there is a default engine, then the name lookup uses that language's semantics. + + + + + Fetches the value of a variable stored in the scope and returns an the wrapped object as an ObjectHandle. + + If there is no engine associated with the scope (see ScriptRuntime.CreateScope), then the name lookup is + a literal lookup of the name in the scope's dictionary. Therefore, it is case-sensitive for example. + + If there is a default engine, then the name lookup uses that language's semantics. + + + + + Assigns a value to a variable in the scope, overwriting any previous value. + + The ObjectHandle value is unwrapped before performing the assignment. + + If there is no engine associated with the scope (see ScriptRuntime.CreateScope), + then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, + it is case-sensitive for example. + + If there is a default engine, then the name lookup uses that language's semantics. + + + + + Fetches the value of a variable stored in the scope and returns + a Boolean indicating success of the lookup. + + When the method's result is false, then it assigns null to the value. Otherwise + an ObjectHandle wrapping the object is assigned to value. + + If there is no engine associated with the scope (see ScriptRuntime.CreateScope), + then the name lookup is a literal lookup of the name in the scope's dictionary. Therefore, + it is case-sensitive for example. + + If there is a default engine, then the name lookup uses that language's semantics. + + + + + This method returns a language-specific service. + + It provides a point of extensibility for a language implementation + to offer more functionality than the standard engine members discussed here. + + + + + Sets the search paths used by the engine for loading files when a script wants + to import or require another file of code. + + The language doesn't allow to set search paths. + + + + Gets the search paths used by the engine for loading files when a script wants + to import or require another file of code. + + + + + Returns a default ObjectOperations for the engine. + + Because an ObjectOperations object caches rules for the types of + objects and operations it processes, using the default ObjectOperations for + many objects could degrade the caching benefits. Eventually the cache for + some operations could degrade to a point where ObjectOperations stops caching and + does a full search for an implementation of the requested operation for the given objects. + + Another reason to create a new ObjectOperations instance is to have it bound + to the specific view of a ScriptScope. Languages may attach per-language + behavior to a ScriptScope which would alter how the operations are performed. + + For simple hosting situations, this is sufficient behavior. + + + + + + + This property returns readon-only LanguageOptions this engine is using. + + + The values are determined during runtime initialization and read-only afterwards. + You can change the settings via a configuration file or explicitly using ScriptRuntimeSetup class. + + + + + This property returns the ScriptRuntime for the context in which this engine executes. + + + + + This property returns the engine's version as a string. The format is language-dependent. + + + + + Abstracts system operations that are used by DLR and could potentially be platform specific. + The host can implement its PAL to adapt DLR to the platform it is running on. + For example, the Silverlight host adapts some file operations to work against files on the server. + + + + Invalid path. + + + Invalid path. + + + + Converts a generic ICollection of T into an array of T. + + If the collection is already an array of T the original collection is returned. + + Represents a language context. Typically there is at most 1 context @@ -3543,72 +4066,94 @@ Looks up the context ID for the specified context identifier - + - Provides host-redirectable IO streams used by DLR languages for default IO. + Bridges ErrorListener and ErrorSink. It provides the reverse functionality as ErrorSinkProxyListener - + - Used if the host stores the output as binary data. - - Binary stream to write data to. - Encoding used to convert textual data written to the output by the script. - - - - Used if the host handles both kinds of data (textual and binary) by itself. + Stores the location of a span of text in a source file. - - - ScriptHost is collocated with ScriptRuntime in the same app-domain. - The host can implement a derived class to consume some notifications and/or - customize operations like TryGetSourceUnit,ResolveSourceUnit, etc. - - The areguments to the the constructor of the derived class are specified in ScriptRuntimeSetup - instance that enters ScriptRuntime initialization. - - If the host is remote with respect to DLR (i.e. also with respect to ScriptHost) - and needs to access objects living in its app-domain it can pass MarshalByRefObject - as an argument to its ScriptHost subclass constructor. - - - + - The runtime the host is attached to. + Constructs a new span with a specific start and end location. + + The beginning of the span. + The end of the span. + + + + A valid span that represents no location. - + - Invoked after the initialization of the associated Runtime is finished. - The host can override this method to perform additional initialization of runtime (like loading assemblies etc.). + An invalid span. - + - Invoked after a new language is loaded into the Runtime. - The host can override this method to perform additional initialization of language engines. + Compares two specified Span values to see if they are equal. + + One span to compare. + The other span to compare. + True if the spans are the same, False otherwise. + + + + Compares two specified Span values to see if they are not equal. + + One span to compare. + The other span to compare. + True if the spans are not the same, False otherwise. + + + + The start location of the span. - + - Source code reader. - - - - - Seeks the first character of a specified line in the text stream. + The end location of the span. Location of the first character behind the span. - Line number. The current position is assumed to be line #1. - - Returns true if the line is found, false otherwise. - - + - Encoding that is used by the reader to convert binary data read from an underlying binary stream. - Null if the reader is reading from a textual source (not performing any byte to character transcoding). + Length of the span (number of characters inside the span). + + + + + Whether the locations in the span are valid. + + + + + Reads an option whose value is expected to be a collection of non-null strings. + Reaturns a read-only copy of the option's value. + + + + + Dynamically choose between interpreting, simple compilation and compilation + that takes advantage of runtime history. + + + + + Display exception detail (callstack) when exception gets caught + + + + + Whether to gather performance statistics. + + + + + Initial file search paths provided by the host. @@ -3625,522 +4170,5 @@ messages and method selection. - - - Reads specified range of lines (or less) from the source unit. - Line numbers starts with 1. - - - - - Errors are reported to the specified sink. - Returns null if the parser cannot compile the code due to error(s). - - - - - Executes against a specified scope. - - - - - Executes against a specified scope and reports errors to the given error sink. - - - - - Executes in a new scope created by the language. - - - - - Executes in a new scope created by the language. - - - - - Executes in a new scope created by the language. - - - - - Identification of the source unit. Assigned by the host. - The format and semantics is host dependent (could be a path on file system or URL). - Empty string for anonymous source units. - - - - - LanguageContext of the language of the unit. - - - - - Stores information needed to setup a ScriptRuntime - - - - - Reads setup from .NET configuration system (.config files). - If there is no configuration available returns an empty setup. - - - - - Reads setup from a specified XML stream. - - - - - Reads setup from a specified XML file. - - - - - The list of language setup information for languages to load into - the runtime - - - - - Indicates that the script runtime is in debug mode. - This means: - - 1) Symbols are emitted for debuggable methods (methods associated with SourceUnit). - 2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging). - 3) JIT optimization is disabled for all methods - 4) Languages may disable optimizations based on this value. - - - - - Ignore CLR visibility checks - - - - - Can be any derived class of ScriptHost. When set, it allows the - host to override certain methods to control behavior of the runtime - - - - - Option names are case-sensitive. - - - - - Arguments passed to the host type when it is constructed - - - - - ScriptCode is an instance of compiled code that is bound to a specific LanguageContext - but not a specific ScriptScope. The code can be re-executed multiple times in different - scopes. Hosting API counterpart for this class is CompiledCode. - - - - - Enum representing different types of operators. - - Operators can be Unary, Binary, or Ternary. An individual operator can have one or - more arity. - - Each operator is associated with a standard name. If a method is named using the standard - name and is marked with OperatorMethodAttribute then the method will automatically be - detected as an operator. - - - - - Binary operator. - - Attempt to call the object. Arguments are the object and the arguments for the call. The - arguments for the call can either be an object array (normal call) or a KwCallInfo class for - performing a keyword based call. - - The standard name for this operator is "Call". - - - - - Unary operator. - - Returns a string which defines the object in code or a language specific format for - objects which cannot be represented in code. This operator generally is not used in - a non-language specific scenario. - - - - - Unary operator. - - Gets the list of members that belong to the current object returned as an IList of string - - - - - Unary operator. - - Gets various documentation about the object returned as a string - - - - - Unary operator. - - Gets information about the type of parameters, returned as a string. - - - - - Unary operator. - - Checks whether the object is callable or not, returns true if it is. - - - - Operator for performing add - - - Operator for performing sub - - - Operator for performing pow - - - Operator for performing mul - - - Operator for performing floordiv - - - Operator for performing div - - - Operator for performing truediv - - - Operator for performing mod - - - Operator for performing lshift - - - Operator for performing rshift - - - Operator for performing and - - - Operator for performing or - - - Operator for performing xor - - - Operator for performing lt - - - Operator for performing gt - - - Operator for performing le - - - Operator for performing ge - - - Operator for performing eq - - - Operator for performing ne - - - Operator for performing lg - - - Operator for performing in-place add - - - Operator for performing in-place sub - - - Operator for performing in-place pow - - - Operator for performing in-place mul - - - Operator for performing in-place floordiv - - - Operator for performing in-place div - - - Operator for performing in-place truediv - - - Operator for performing in-place mod - - - Operator for performing in-place lshift - - - Operator for performing in-place rshift - - - Operator for performing in-place and - - - Operator for performing in-place or - - - Operator for performing in-place xor - - - Operator for performing reverse add - - - Operator for performing reverse sub - - - Operator for performing reverse pow - - - Operator for performing reverse mul - - - Operator for performing reverse floordiv - - - Operator for performing reverse div - - - Operator for performing reverse truediv - - - Operator for performing reverse mod - - - Operator for performing reverse lshift - - - Operator for performing reverse rshift - - - Operator for performing reverse and - - - Operator for performing reverse or - - - Operator for performing reverse xor - - - - Binary operator. - - Checks to see if the instance contains another object. Returns true or false. - - The standard name for this operator is "Contains". - - - - - n-ary operator. - - Gets the value at the specified index from the instance. - - One or more indexes can be provided as individual arguments. - Obsolete: Use GetIndexAction instead - - - - - n-ary operator. - - Sets the value at the specified index in the instance. - - One or more indexes can be provided as individual arguments. The last value provided is the value to be set. - Obsolete: Use SetIndexAction instead - - - - - n-ary operator. - - Removes the item from the specified index in the instance. - - One or more indexes can be provided as individual arguments. - Obsolete: Use DeleteIndexAction instead - - - - - Binary or Ternary operator. - - Gets the specified range of elements (slice) from the instance. - - The slice parameters may include the start index, the end index, and the step value. The step value is optional. - - A value of Type.Missing may be provided if no parameter was explicitly provided for a start, stop or step parameter. - - - - - n-ary operator. - - Sets the specified range of elements in the instance. - - The slice parameters may include the start index, the end index, and the step value. The step - value is optional. The last parameter is the value to be assigned. - - A value of Type.Missing may be provided if no parameter was explicitly provided for a start, stop or step parameter. - - - - - n-ary operator. - - Removes the specified range of elements from the instance. - - The slice parameters may include the start index, the end index, and the step value. The step value is - optional. - - A value of Type.Missing may be provided if no parameter was explicitly provided for a start, stop or step parameter. - - - - - Unary operator. - - Returns the number of items stored in the object. - - - - - Binary operator. - - Compares two instances returning an integer indicating the relationship between them. May - throw if the object types are uncomparable. - - The standard name for this operator is "Compare". - - - - - Binary operator. - - Returns both the dividend and quotioent of x / y. - - - - - Binary operator. - - Returns both the dividend and quotient of y / x. - - - - - Member lookup customization (called after type lookup). - - Arguments are the instance to get the member from and a SymbolId which represents the member. - - The return value is the member. - - The standard name for this operator is "GetMember". - - - - - Member lookup customization for bound attributes - - Arguments are the instance to get the member from and a SymbolId which represents the bound member. - - The return value is the bound member. - - /// The standard name for this operator is "GetBoundMember". - - - - - Member set customization. - - Arguments are the instance, the SymbolId to get, and the new value for the member. - - The return value is ignored. - - The standard name for this operator is "SetMember". - - - - - Member delete customization. - - Arguments are the instance and the SymbolId for the member to delete. - - The return value is ignored. - - The standard name for this operator is "DeleteMember". - - - - - Attribute customization operator. Returns a list of names that should be displayed as - being part of the object. - - Arguments are the instance to get the list of member names from. - - Return value is IList<SymbolId>. - - /// The standard name for this operator is "GetMemberNames". - - - - - Unary operator. - - Get the absolute value of the instance. - - - - - Unary operator. - - Gets the positive value of the instance. - - - - - Unary operator. - - Negates the instance and return the new value. - - - - - Unary operator. - - Returns the ones complement of the instance. - - - - - Bridges ErrorSink and ErrorListener. - Errors reported by language compilers to ErrorSink are forwarded to the ErrorListener provided by the host. - - - This proxy is created in the scenario when the compiler is processing a single SourceUnit. - Therefore it could maintain one to one mapping from SourceUnit to ScriptSource. - In a case, which shouldn't happen, that the compiler reports an error in a different SourceUnit we just create - a new instance of the ScriptSource each time. - - TODO: Consider compilation of multiple source units and creating a hashtable mapping SourceUnits to ScriptSources - within the context of compilation unit. - - diff --git a/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.csproj.FileListAbsolute.txt b/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.csproj.FileListAbsolute.txt index 714b19d..af301f7 100644 --- a/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.csproj.FileListAbsolute.txt +++ b/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.csproj.FileListAbsolute.txt @@ -5,7 +5,6 @@ F:\projects\dotnet35\VBParser80\AspWebApp\bin\Microsoft.Scripting.ExtensionAttri F:\projects\dotnet35\VBParser80\AspWebApp\bin\Microsoft.Dynamic.dll F:\projects\dotnet35\VBParser80\AspWebApp\bin\Dlrsoft.VBScript.dll F:\projects\dotnet35\VBParser80\AspWebApp\bin\Microsoft.Scripting.Core.dll -F:\projects\dotnet35\VBParser80\AspWebApp\bin\Interop.ASPTypeLibrary.dll F:\projects\dotnet35\VBParser80\AspWebApp\bin\Microsoft.Scripting.dll F:\projects\dotnet35\VBParser80\AspWebApp\bin\Dlrsoft.VBParser.dll F:\projects\dotnet35\VBParser80\AspWebApp\bin\Microsoft.Scripting.ExtensionAttribute.pdb @@ -14,10 +13,12 @@ F:\projects\dotnet35\VBParser80\AspWebApp\bin\Microsoft.Dynamic.xml F:\projects\dotnet35\VBParser80\AspWebApp\bin\Dlrsoft.VBScript.pdb F:\projects\dotnet35\VBParser80\AspWebApp\bin\Microsoft.Scripting.Core.pdb F:\projects\dotnet35\VBParser80\AspWebApp\bin\Microsoft.Scripting.Core.xml -F:\projects\dotnet35\VBParser80\AspWebApp\bin\Dlrsoft.Asp.pdb F:\projects\dotnet35\VBParser80\AspWebApp\bin\Microsoft.Scripting.pdb F:\projects\dotnet35\VBParser80\AspWebApp\bin\Microsoft.Scripting.xml F:\projects\dotnet35\VBParser80\AspWebApp\bin\Dlrsoft.VBParser.pdb F:\projects\dotnet35\VBParser80\AspWebApp\bin\Dlrsoft.VBParser.xml F:\projects\dotnet35\VBParser80\AspWebApp\obj\Release\AspWebApp.dll F:\projects\dotnet35\VBParser80\AspWebApp\obj\Release\AspWebApp.pdb +F:\projects\dotnet35\VBParser80\AspWebApp\bin\Dlrsoft.Asp.dll +F:\projects\dotnet35\VBParser80\AspWebApp\bin\Interop.ASPTypeLibrary.dll +F:\projects\dotnet35\VBParser80\AspWebApp\bin\Dlrsoft.Asp.pdb diff --git a/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.dll b/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.dll index 5054aa6..af1dff6 100644 Binary files a/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.dll and b/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.dll differ diff --git a/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.pdb b/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.pdb index c48249c..4a858f5 100644 Binary files a/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.pdb and b/aspclassiccompiler/AspWebApp/obj/Release/AspWebApp.pdb differ diff --git a/aspclassiccompiler/AspWebApp/obj/Release/ResolveAssemblyReference.cache b/aspclassiccompiler/AspWebApp/obj/Release/ResolveAssemblyReference.cache index 0a87cb1..6c17360 100644 Binary files a/aspclassiccompiler/AspWebApp/obj/Release/ResolveAssemblyReference.cache and b/aspclassiccompiler/AspWebApp/obj/Release/ResolveAssemblyReference.cache differ diff --git a/aspclassiccompiler/AspWebApp/test/StringBuilder.asp b/aspclassiccompiler/AspWebApp/test/StringBuilder.asp new file mode 100644 index 0000000..1548fdb --- /dev/null +++ b/aspclassiccompiler/AspWebApp/test/StringBuilder.asp @@ -0,0 +1,16 @@ +<% + imports system + dim s = new system.text.stringbuilder() + dim i + + s = s + "" + for i = 1 to 12 + s = s + "" + s = s + "" + s = s + "" + s = s + "" + next + s = s + "
" + i + "" + MonthName(i) + "
" + response.Write(s) + +%> \ No newline at end of file