C# Class Microsoft.CSharp.RuntimeBinder.Semantics.ExpressionTreeRewriter

Inheritance: Microsoft.CSharp.RuntimeBinder.Semantics.ExprVisitorBase
Show file Open project: dotnet/corefx Class Usage Examples

Protected Properties

Property Type Description
alwaysRewrite bool
currentAnonMeth EXPRBOUNDLAMBDA
expressionFactory ExprFactory
symbolLoader SymbolLoader

Public Methods

Method Description
Rewrite ( EXPR expr, ExprFactory expressionFactory, SymbolLoader symbolLoader ) : EXPR

Protected Methods

Method Description
CreateTypeOf ( CType CType ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRTYPEOF
CreateWraps ( EXPRBOUNDLAMBDA anonmeth ) : EXPR
DestroyWraps ( EXPRBOUNDLAMBDA anonmeth, EXPR sequence ) : EXPR
Dispatch ( EXPR expr ) : EXPR
ExpressionTreeRewriter ( ExprFactory expressionFactory, SymbolLoader symbolLoader ) : System.Diagnostics
FixLiftedUserDefinedBinaryOperators ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP expr, EXPR &pp1, EXPR &pp2 ) : void
GenerateArgsList ( EXPR oldArgs ) : EXPR
GenerateBuiltInBinaryOperator ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP expr ) : EXPR
GenerateBuiltInUnaryOperator ( EXPRUNARYOP expr ) : EXPR
GenerateBuiltInUnaryOperator ( PREDEFMETH pdm, EXPR pOriginalOperator, EXPR pOperator ) : EXPR
GenerateCall ( PREDEFMETH pdm, EXPR arg1 ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
GenerateCall ( PREDEFMETH pdm, EXPR arg1, EXPR arg2 ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
GenerateCall ( PREDEFMETH pdm, EXPR arg1, EXPR arg2, EXPR arg3 ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
GenerateCall ( PREDEFMETH pdm, EXPR arg1, EXPR arg2, EXPR arg3, EXPR arg4 ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
GenerateConstant ( EXPR expr ) : EXPR
GenerateConstructor ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL expr ) : EXPR
GenerateConversion ( EXPR arg, CType CType, bool bChecked ) : EXPR
GenerateConversionWithSource ( EXPR pTarget, CType pType, bool bChecked ) : EXPR
GenerateDelegateConstructor ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL expr ) : EXPR
GenerateDelegateInvoke ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL expr ) : EXPR
GenerateIndexList ( EXPR oldIndices ) : EXPR
GenerateMembersArray ( AggregateType anonymousType, PredefinedType pt ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRINIT
GenerateParameter ( string name, CType CType ) : EXPR
GenerateParamsArray ( EXPR args, PredefinedType pt ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRINIT
GenerateQuestionMarkOperand ( EXPR pExpr ) : EXPR
GenerateUserDefinedBinaryOperator ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP expr ) : EXPR
GenerateUserDefinedComparisonOperator ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP expr ) : EXPR
GenerateUserDefinedConversion ( EXPR arg, CType CType, EXPR target, MethWithInst method ) : EXPR
GenerateUserDefinedConversion ( EXPR arg, CType type, MethWithInst method ) : EXPR
GenerateUserDefinedConversion ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRUSERDEFINEDCONVERSION pExpr, EXPR pArgument ) : EXPR
GenerateUserDefinedUnaryOperator ( EXPRUNARYOP expr ) : EXPR
GenerateValueAccessConversion ( EXPR pArgument ) : EXPR
GetExprFactory ( ) : ExprFactory
GetPreDefMethod ( PREDEFMETH pdm ) : MethodSymbol
GetSymbolLoader ( ) : SymbolLoader
IsDelegateConstructorCall ( EXPR pExpr ) : bool
IsNullableValueAccess ( EXPR pExpr, EXPR pObject ) : bool
IsNullableValueType ( CType pType ) : bool
RewriteLambdaBody ( EXPRBOUNDLAMBDA anonmeth ) : EXPR
RewriteLambdaParameters ( EXPRBOUNDLAMBDA anonmeth ) : EXPR
VisitARRAYINDEX ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRAYINDEX pExpr ) : EXPR
VisitARRAYLENGTH ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRAYLENGTH pExpr ) : EXPR
VisitARRINIT ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRINIT expr ) : EXPR
VisitASSIGNMENT ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRASSIGNMENT assignment ) : EXPR
VisitBINOP ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP expr ) : EXPR
VisitBOUNDLAMBDA ( EXPRBOUNDLAMBDA anonmeth ) : EXPR
VisitCALL ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL expr ) : EXPR
VisitCAST ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCAST pExpr ) : EXPR
VisitCONCAT ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCONCAT expr ) : EXPR
VisitCONSTANT ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCONSTANT expr ) : EXPR
VisitFIELD ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRFIELD expr ) : EXPR
VisitLOCAL ( EXPRLOCAL local ) : EXPR
VisitMULTI ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRMULTI pExpr ) : EXPR
VisitMULTIGET ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRMULTIGET pExpr ) : EXPR
VisitPROP ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRPROP expr ) : EXPR
VisitQUESTIONMARK ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRQUESTIONMARK pExpr ) : EXPR
VisitTHISPOINTER ( EXPRTHISPOINTER expr ) : EXPR
VisitTYPEOF ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRTYPEOF expr ) : EXPR
VisitUNARYOP ( EXPRUNARYOP pExpr ) : EXPR
VisitUSERDEFINEDCONVERSION ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRUSERDEFINEDCONVERSION expr ) : EXPR
VisitZEROINIT ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRZEROINIT expr ) : EXPR

Private Methods

Method Description
isEnumToDecimalConversion ( CType argtype, CType desttype ) : bool

Method Details

CreateTypeOf() protected method

protected CreateTypeOf ( CType CType ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRTYPEOF
CType CType
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPRTYPEOF

CreateWraps() protected method

protected CreateWraps ( EXPRBOUNDLAMBDA anonmeth ) : EXPR
anonmeth EXPRBOUNDLAMBDA
return EXPR

DestroyWraps() protected method

protected DestroyWraps ( EXPRBOUNDLAMBDA anonmeth, EXPR sequence ) : EXPR
anonmeth EXPRBOUNDLAMBDA
sequence EXPR
return EXPR

Dispatch() protected method

protected Dispatch ( EXPR expr ) : EXPR
expr EXPR
return EXPR

ExpressionTreeRewriter() protected method

protected ExpressionTreeRewriter ( ExprFactory expressionFactory, SymbolLoader symbolLoader ) : System.Diagnostics
expressionFactory ExprFactory
symbolLoader SymbolLoader
return System.Diagnostics

FixLiftedUserDefinedBinaryOperators() protected method

protected FixLiftedUserDefinedBinaryOperators ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP expr, EXPR &pp1, EXPR &pp2 ) : void
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP
pp1 EXPR
pp2 EXPR
return void

GenerateArgsList() protected method

protected GenerateArgsList ( EXPR oldArgs ) : EXPR
oldArgs EXPR
return EXPR

GenerateBuiltInBinaryOperator() protected method

protected GenerateBuiltInBinaryOperator ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP
return EXPR

GenerateBuiltInUnaryOperator() protected method

protected GenerateBuiltInUnaryOperator ( EXPRUNARYOP expr ) : EXPR
expr EXPRUNARYOP
return EXPR

GenerateBuiltInUnaryOperator() protected method

protected GenerateBuiltInUnaryOperator ( PREDEFMETH pdm, EXPR pOriginalOperator, EXPR pOperator ) : EXPR
pdm PREDEFMETH
pOriginalOperator EXPR
pOperator EXPR
return EXPR

GenerateCall() protected method

protected GenerateCall ( PREDEFMETH pdm, EXPR arg1 ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
pdm PREDEFMETH
arg1 EXPR
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL

GenerateCall() protected method

protected GenerateCall ( PREDEFMETH pdm, EXPR arg1, EXPR arg2 ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
pdm PREDEFMETH
arg1 EXPR
arg2 EXPR
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL

GenerateCall() protected method

protected GenerateCall ( PREDEFMETH pdm, EXPR arg1, EXPR arg2, EXPR arg3 ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
pdm PREDEFMETH
arg1 EXPR
arg2 EXPR
arg3 EXPR
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL

GenerateCall() protected method

protected GenerateCall ( PREDEFMETH pdm, EXPR arg1, EXPR arg2, EXPR arg3, EXPR arg4 ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
pdm PREDEFMETH
arg1 EXPR
arg2 EXPR
arg3 EXPR
arg4 EXPR
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL

GenerateConstant() protected method

protected GenerateConstant ( EXPR expr ) : EXPR
expr EXPR
return EXPR

GenerateConstructor() protected method

protected GenerateConstructor ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
return EXPR

GenerateConversion() protected method

protected GenerateConversion ( EXPR arg, CType CType, bool bChecked ) : EXPR
arg EXPR
CType CType
bChecked bool
return EXPR

GenerateConversionWithSource() protected method

protected GenerateConversionWithSource ( EXPR pTarget, CType pType, bool bChecked ) : EXPR
pTarget EXPR
pType CType
bChecked bool
return EXPR

GenerateDelegateConstructor() protected method

protected GenerateDelegateConstructor ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
return EXPR

GenerateDelegateInvoke() protected method

protected GenerateDelegateInvoke ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
return EXPR

GenerateIndexList() protected method

protected GenerateIndexList ( EXPR oldIndices ) : EXPR
oldIndices EXPR
return EXPR

GenerateMembersArray() protected method

protected GenerateMembersArray ( AggregateType anonymousType, PredefinedType pt ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRINIT
anonymousType AggregateType
pt PredefinedType
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRINIT

GenerateParameter() protected method

protected GenerateParameter ( string name, CType CType ) : EXPR
name string
CType CType
return EXPR

GenerateParamsArray() protected method

protected GenerateParamsArray ( EXPR args, PredefinedType pt ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRINIT
args EXPR
pt PredefinedType
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRINIT

GenerateQuestionMarkOperand() protected method

protected GenerateQuestionMarkOperand ( EXPR pExpr ) : EXPR
pExpr EXPR
return EXPR

GenerateUserDefinedBinaryOperator() protected method

protected GenerateUserDefinedBinaryOperator ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP
return EXPR

GenerateUserDefinedComparisonOperator() protected method

protected GenerateUserDefinedComparisonOperator ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP
return EXPR

GenerateUserDefinedConversion() protected method

protected GenerateUserDefinedConversion ( EXPR arg, CType CType, EXPR target, MethWithInst method ) : EXPR
arg EXPR
CType CType
target EXPR
method MethWithInst
return EXPR

GenerateUserDefinedConversion() protected method

protected GenerateUserDefinedConversion ( EXPR arg, CType type, MethWithInst method ) : EXPR
arg EXPR
type CType
method MethWithInst
return EXPR

GenerateUserDefinedConversion() protected method

protected GenerateUserDefinedConversion ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRUSERDEFINEDCONVERSION pExpr, EXPR pArgument ) : EXPR
pExpr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRUSERDEFINEDCONVERSION
pArgument EXPR
return EXPR

GenerateUserDefinedUnaryOperator() protected method

protected GenerateUserDefinedUnaryOperator ( EXPRUNARYOP expr ) : EXPR
expr EXPRUNARYOP
return EXPR

GenerateValueAccessConversion() protected method

protected GenerateValueAccessConversion ( EXPR pArgument ) : EXPR
pArgument EXPR
return EXPR

GetExprFactory() protected method

protected GetExprFactory ( ) : ExprFactory
return ExprFactory

GetPreDefMethod() protected method

protected GetPreDefMethod ( PREDEFMETH pdm ) : MethodSymbol
pdm PREDEFMETH
return MethodSymbol

GetSymbolLoader() protected method

protected GetSymbolLoader ( ) : SymbolLoader
return SymbolLoader

IsDelegateConstructorCall() protected method

protected IsDelegateConstructorCall ( EXPR pExpr ) : bool
pExpr EXPR
return bool

IsNullableValueAccess() protected method

protected IsNullableValueAccess ( EXPR pExpr, EXPR pObject ) : bool
pExpr EXPR
pObject EXPR
return bool

IsNullableValueType() protected method

protected IsNullableValueType ( CType pType ) : bool
pType CType
return bool

Rewrite() public static method

public static Rewrite ( EXPR expr, ExprFactory expressionFactory, SymbolLoader symbolLoader ) : EXPR
expr EXPR
expressionFactory ExprFactory
symbolLoader SymbolLoader
return EXPR

RewriteLambdaBody() protected method

protected RewriteLambdaBody ( EXPRBOUNDLAMBDA anonmeth ) : EXPR
anonmeth EXPRBOUNDLAMBDA
return EXPR

RewriteLambdaParameters() protected method

protected RewriteLambdaParameters ( EXPRBOUNDLAMBDA anonmeth ) : EXPR
anonmeth EXPRBOUNDLAMBDA
return EXPR

VisitARRAYINDEX() protected method

protected VisitARRAYINDEX ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRAYINDEX pExpr ) : EXPR
pExpr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRAYINDEX
return EXPR

VisitARRAYLENGTH() protected method

protected VisitARRAYLENGTH ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRAYLENGTH pExpr ) : EXPR
pExpr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRAYLENGTH
return EXPR

VisitARRINIT() protected method

protected VisitARRINIT ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRINIT expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRINIT
return EXPR

VisitASSIGNMENT() protected method

protected VisitASSIGNMENT ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRASSIGNMENT assignment ) : EXPR
assignment Microsoft.CSharp.RuntimeBinder.Semantics.EXPRASSIGNMENT
return EXPR

VisitBINOP() protected method

protected VisitBINOP ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP
return EXPR

VisitBOUNDLAMBDA() protected method

protected VisitBOUNDLAMBDA ( EXPRBOUNDLAMBDA anonmeth ) : EXPR
anonmeth EXPRBOUNDLAMBDA
return EXPR

VisitCALL() protected method

protected VisitCALL ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCALL
return EXPR

VisitCAST() protected method

protected VisitCAST ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCAST pExpr ) : EXPR
pExpr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCAST
return EXPR

VisitCONCAT() protected method

protected VisitCONCAT ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCONCAT expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCONCAT
return EXPR

VisitCONSTANT() protected method

protected VisitCONSTANT ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCONSTANT expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCONSTANT
return EXPR

VisitFIELD() protected method

protected VisitFIELD ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRFIELD expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRFIELD
return EXPR

VisitLOCAL() protected method

protected VisitLOCAL ( EXPRLOCAL local ) : EXPR
local EXPRLOCAL
return EXPR

VisitMULTI() protected method

protected VisitMULTI ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRMULTI pExpr ) : EXPR
pExpr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRMULTI
return EXPR

VisitMULTIGET() protected method

protected VisitMULTIGET ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRMULTIGET pExpr ) : EXPR
pExpr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRMULTIGET
return EXPR

VisitPROP() protected method

protected VisitPROP ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRPROP expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRPROP
return EXPR

VisitQUESTIONMARK() protected method

protected VisitQUESTIONMARK ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRQUESTIONMARK pExpr ) : EXPR
pExpr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRQUESTIONMARK
return EXPR

VisitTHISPOINTER() protected method

protected VisitTHISPOINTER ( EXPRTHISPOINTER expr ) : EXPR
expr EXPRTHISPOINTER
return EXPR

VisitTYPEOF() protected method

protected VisitTYPEOF ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRTYPEOF expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRTYPEOF
return EXPR

VisitUNARYOP() protected method

protected VisitUNARYOP ( EXPRUNARYOP pExpr ) : EXPR
pExpr EXPRUNARYOP
return EXPR

VisitUSERDEFINEDCONVERSION() protected method

protected VisitUSERDEFINEDCONVERSION ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRUSERDEFINEDCONVERSION expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRUSERDEFINEDCONVERSION
return EXPR

VisitZEROINIT() protected method

protected VisitZEROINIT ( Microsoft.CSharp.RuntimeBinder.Semantics.EXPRZEROINIT expr ) : EXPR
expr Microsoft.CSharp.RuntimeBinder.Semantics.EXPRZEROINIT
return EXPR

Property Details

alwaysRewrite protected property

protected bool alwaysRewrite
return bool

currentAnonMeth protected property

protected EXPRBOUNDLAMBDA,Microsoft.CSharp.RuntimeBinder.Semantics currentAnonMeth
return EXPRBOUNDLAMBDA

expressionFactory protected property

protected ExprFactory,Microsoft.CSharp.RuntimeBinder.Semantics expressionFactory
return ExprFactory

symbolLoader protected property

protected SymbolLoader,Microsoft.CSharp.RuntimeBinder.Semantics symbolLoader
return SymbolLoader