Property | Type | Description | |
---|---|---|---|
AddRecursionCheck | |||
CalculateArgumentCount | int | ||
Call | object | ||
CleanFunctionCodes | void | ||
CodeCleanup | void | ||
CompileLambda | |||
CompileLambda | |||
ExpandArgsTuple | void | ||
FromSourceUnit | |||
FunctionCode | System.Linq.Expressions | ||
FunctionCode | System.Linq.Expressions | ||
GetAllCode | IEnumerable |
||
GetGeneratorOrNormalLambda | LightLambdaExpression | ||
GetGeneratorOrNormalLambdaTracing | |||
GetRootCodeNoUpdating | CodeList | ||
IExpressionSerializable | |||
LazyCompileFirstTarget | void | ||
LightThrowCompile | void | ||
RegisterFunctionCode | void | ||
SetDebugTarget | void | ||
SetTarget | void | ||
StringArrayToTuple | PythonTuple | ||
SymbolListToTuple | PythonTuple | ||
TupleToStringArray | |||
UpdateAllCode | void | ||
UpdateDelegate | void | ||
operator | IronPython.Runtime.Types.NotImplementedType |
Method | Description | |
---|---|---|
Equals ( object obj ) : bool | ||
GetHashCode ( ) : int | ||
__cmp__ ( CodeContext context, [ other ) : int |
Method | Description | |
---|---|---|
AddRecursionCheck ( IronPython.Runtime.PythonContext context, |
||
CalculateArgumentCount ( ) : int | ||
Call ( CodeContext context ) : object | ||
CleanFunctionCodes ( IronPython.Runtime.PythonContext context, bool synchronous ) : void | ||
CodeCleanup ( object state ) : void | ||
CompileLambda ( |
||
CompileLambda ( LightLambdaExpression code, EventHandler |
||
ExpandArgsTuple ( List |
||
FromSourceUnit ( SourceUnit sourceUnit, IronPython.Compiler.PythonCompilerOptions options, bool register ) : |
Creates a FunctionCode object for exec/eval/execfile'd/compile'd code. The code is then executed in a specific CodeContext by calling the .Call method. If the code is being used for compile (vs. exec/eval/execfile) then it needs to be registered incase our tracing mode changes.
|
|
FunctionCode ( IronPython.Runtime.PythonContext context, |
Constructor to create a FunctionCode at runtime. Code constructed this way supports both being interpreted and debugged. When necessary the code will be re-compiled or re-interpreted for that specific purpose. Function codes created this way do support recursion enforcement and are therefore registered in the global function code registry. the initial delegate provided here should NOT be the actual code. It should always be a delegate which updates our Target lazily.
|
|
FunctionCode ( IronPython.Runtime.PythonContext context, |
Constructor used to create a FunctionCode for code that's been serialized to disk. Code constructed this way cannot be interpreted or debugged using sys.settrace/sys.setprofile. Function codes created this way do support recursion enforcement and are therefore registered in the global function code registry.
|
|
GetAllCode ( IronPython.Runtime.PythonContext context ) : IEnumerable |
Enumerates all function codes for updating the current type of targets we generate. While enumerating we hold a lock so that users cannot change sys.settrace/sys.setprofile until the lock is released.
|
|
GetGeneratorOrNormalLambda ( ) : LightLambdaExpression |
Gets the correct final LambdaExpression for this piece of code. This is either just _lambda or _lambda re-written to be a generator expression.
|
|
GetGeneratorOrNormalLambdaTracing ( IronPython.Runtime.PythonContext context ) : |
Gets the LambdaExpression for tracing. If this is a generator function code then the lambda gets tranformed into the correct generator code.
|
|
GetRootCodeNoUpdating ( IronPython.Runtime.PythonContext context ) : CodeList | ||
IExpressionSerializable ( ) : |
||
LazyCompileFirstTarget ( |
Called the 1st time a function is invoked by our OriginalCallTarget* methods over in PythonCallTargets. This computes the real delegate which needs to be created for the function. Usually this means starting off interpretering. It also involves adding the wrapper function for recursion enforcement. Because this can race against sys.settrace/setprofile we need to take our _ThreadIsEnumeratingAndAccountingLock to ensure no one is actively changing all of the live functions.
|
|
LightThrowCompile ( CodeContext context ) : void | ||
RegisterFunctionCode ( IronPython.Runtime.PythonContext context ) : void |
Registers the current function code in our global weak list of all function codes. The weak list can be enumerated with GetAllCode(). Ultimately there are 3 types of threads we care about races with: 1. Other threads which are registering function codes 2. Threads calling sys.settrace which require the world to stop and get updated 3. Threads running cleanup (thread pool thread, or call to gc.collect). The 1st two must have perfect synchronization. We cannot have a thread registering a new function which another thread is trying to update all of the functions in the world. Doing so would mean we could miss adding tracing to a thread. But the cleanup thread can run in parallel to either registrying or sys.settrace. The only thing it needs to take a lock for is updating our accounting information about the number of code objects are alive.
|
|
SetDebugTarget ( IronPython.Runtime.PythonContext context, |
Called to set the initial target delegate when the user has passed -X:Debug to enable .NET style debugging.
|
|
SetTarget ( |
||
StringArrayToTuple ( string closureVars ) : PythonTuple | ||
SymbolListToTuple ( IList |
||
TupleToStringArray ( PythonTuple tuple ) : |
||
UpdateAllCode ( IronPython.Runtime.PythonContext context ) : void | ||
UpdateDelegate ( IronPython.Runtime.PythonContext context, bool forceCreation ) : void |
Updates the delegate based upon current Python context settings for recursion enforcement and for tracing.
|
|
operator ( ) : IronPython.Runtime.Types.NotImplementedType |
public __cmp__ ( CodeContext context, [ other ) : int | ||
context | CodeContext | |
other | [ | |
return | int |