C# Class Pchp.CodeAnalysis.FlowAnalysis.ExpressionAnalysis

Visits single expressions and project transformations to flow state.
Inheritance: AnalysisVisitor
Afficher le fichier Open project: iolevel/peachpie

Méthodes publiques

Méthode Description
ExpressionAnalysis ( Worklist worklist, ISemanticModel model ) : Devsense.PHP.Syntax
VisitArgument ( BoundArgument x ) : void
VisitArray ( BoundArrayEx x ) : void
VisitArrayItem ( BoundArrayItemEx x ) : void
VisitAssign ( BoundAssignEx x ) : void
VisitCompoundAssign ( BoundCompoundAssignEx x ) : void
VisitConcat ( BoundConcatEx x ) : void
VisitConditional ( BoundConditionalEx x ) : void
VisitEcho ( BoundEcho x ) : void
VisitExit ( BoundExitEx x ) : void
VisitExpressionStatement ( BoundExpressionStatement x ) : void
VisitFieldRef ( BoundFieldRef x ) : void
VisitGlobalConstUse ( BoundGlobalConst x ) : void
VisitGlobalFunctionCall ( BoundGlobalFunctionCall x ) : void
VisitGlobalStatement ( BoundGlobalVariableStatement x ) : void
VisitIncDec ( BoundIncDecEx x ) : void
VisitInclude ( BoundIncludeEx x ) : void
VisitInstanceFunctionCall ( BoundInstanceFunctionCall x ) : void
VisitIsEmpty ( BoundIsEmptyEx x ) : void
VisitIsSet ( BoundIsSetEx x ) : void
VisitList ( BoundListEx x ) : void
VisitLiteral ( BoundLiteral x ) : void
VisitNew ( BoundNewEx x ) : void
VisitPseudoConstUse ( BoundPseudoConst x ) : void
VisitReturn ( BoundReturnStatement x ) : void
VisitStaticFunctionCall ( BoundStaticFunctionCall x ) : void
VisitStaticStatement ( BoundStaticVariableStatement x ) : void
VisitThrow ( BoundThrowStatement x ) : void
VisitTypeRef ( BoundTypeRef tref ) : void
VisitUnset ( BoundUnset x ) : void
VisitVariableRef ( BoundVariableRef x ) : void

Méthodes protégées

Méthode Description
Visit ( BoundBinaryEx x, ConditionBranch branch ) : void
Visit ( BoundInstanceOfEx x, ConditionBranch branch ) : void
Visit ( BoundUnaryEx x, ConditionBranch branch ) : void
VisitRoutineCall ( BoundRoutineCall x ) : void

Private Methods

Méthode Description
AsVariableName ( BoundReferenceExpression r ) : string

In case of a local variable or parameter, gets its name.

BindConstantValue ( BoundExpression target, FieldSymbol symbol ) : bool
CompoundOpToBinaryOp ( Operations op ) : Operations
GetBitOperationType ( TypeRefMask lValType, TypeRefMask rValType ) : TypeRefMask

Gets resulting type of bit operation (bit or, and, xor).

GetPlusOperationType ( BoundExpression left, BoundExpression right ) : TypeRefMask

Gets resulting type of + operation.

IsArrayOnly ( TypeRefMask tmask ) : bool

Gets value indicating the given type represents only array types.

IsClassOnly ( TypeRefMask tmask ) : bool

Gets value indicating the given type represents only class types.

IsDoubleOnly ( BoundExpression x ) : bool

Gets value indicating the given type represents a double and nothing else.

IsDoubleOnly ( TypeRefMask tmask ) : bool

Gets value indicating the given type represents a double and nothing else.

IsLTInt64Max ( BoundReferenceExpression r ) : bool

Determines if given expression represents a variable which value is less than Int64.Max in current state.

IsLongConstant ( BoundExpression expr, long value ) : bool
IsLongOnly ( BoundExpression x ) : bool

Gets value indicating the given type represents a long and nothing else.

IsLongOnly ( TypeRefMask tmask ) : bool

Gets value indicating the given type represents a long and nothing else.

IsNumberOnly ( BoundExpression x ) : bool

Gets value indicating the given type is long or double or both but nothing else.

IsNumberOnly ( TypeRefMask tmask ) : bool

Gets value indicating the given type is long or double or both but nothing else.

LTInt64Max ( BoundReferenceExpression r, bool lt ) : void

In case of a local variable or parameter, sets associated flag determining its value is less than Int64.Max.

ResolveBinaryEx ( BoundBinaryEx x, ConditionBranch branch ) : TypeRefMask
ResolveBitOperation ( object xobj, object yobj, Operations op ) : object

Resolves value of bit operation.

TODO: move to **evaluation**.

ResolveType ( INamedTypeRef dtype ) : TypeSymbol
ResolveUnaryOperatorExpression ( BoundUnaryEx x, ConditionBranch branch ) : TypeRefMask
Visit ( BoundExpression x, BoundAccess access ) : void

Updates the expression access and visits it.

VisitRoutineCallEpilogue ( BoundRoutineCall x ) : void
VisitShortCircuitOp ( BoundExpression lExpr, BoundExpression rExpr, bool isAndOp, ConditionBranch branch ) : void

Method Details

ExpressionAnalysis() public méthode

public ExpressionAnalysis ( Worklist worklist, ISemanticModel model ) : Devsense.PHP.Syntax
worklist Worklist
model ISemanticModel
Résultat Devsense.PHP.Syntax

Visit() protected méthode

protected Visit ( BoundBinaryEx x, ConditionBranch branch ) : void
x Pchp.CodeAnalysis.Semantics.BoundBinaryEx
branch ConditionBranch
Résultat void

Visit() protected méthode

protected Visit ( BoundInstanceOfEx x, ConditionBranch branch ) : void
x Pchp.CodeAnalysis.Semantics.BoundInstanceOfEx
branch ConditionBranch
Résultat void

Visit() protected méthode

protected Visit ( BoundUnaryEx x, ConditionBranch branch ) : void
x Pchp.CodeAnalysis.Semantics.BoundUnaryEx
branch ConditionBranch
Résultat void

VisitArgument() public méthode

public VisitArgument ( BoundArgument x ) : void
x BoundArgument
Résultat void

VisitArray() public méthode

public VisitArray ( BoundArrayEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundArrayEx
Résultat void

VisitArrayItem() public méthode

public VisitArrayItem ( BoundArrayItemEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundArrayItemEx
Résultat void

VisitAssign() public méthode

public VisitAssign ( BoundAssignEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundAssignEx
Résultat void

VisitCompoundAssign() public méthode

public VisitCompoundAssign ( BoundCompoundAssignEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundCompoundAssignEx
Résultat void

VisitConcat() public méthode

public VisitConcat ( BoundConcatEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundConcatEx
Résultat void

VisitConditional() public méthode

public VisitConditional ( BoundConditionalEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundConditionalEx
Résultat void

VisitEcho() public méthode

public VisitEcho ( BoundEcho x ) : void
x Pchp.CodeAnalysis.Semantics.BoundEcho
Résultat void

VisitExit() public méthode

public VisitExit ( BoundExitEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundExitEx
Résultat void

VisitExpressionStatement() public méthode

public VisitExpressionStatement ( BoundExpressionStatement x ) : void
x Pchp.CodeAnalysis.Semantics.BoundExpressionStatement
Résultat void

VisitFieldRef() public méthode

public VisitFieldRef ( BoundFieldRef x ) : void
x Pchp.CodeAnalysis.Semantics.BoundFieldRef
Résultat void

VisitGlobalConstUse() public méthode

public VisitGlobalConstUse ( BoundGlobalConst x ) : void
x Pchp.CodeAnalysis.Semantics.BoundGlobalConst
Résultat void

VisitGlobalFunctionCall() public méthode

public VisitGlobalFunctionCall ( BoundGlobalFunctionCall x ) : void
x Pchp.CodeAnalysis.Semantics.BoundGlobalFunctionCall
Résultat void

VisitGlobalStatement() public méthode

public VisitGlobalStatement ( BoundGlobalVariableStatement x ) : void
x Pchp.CodeAnalysis.Semantics.BoundGlobalVariableStatement
Résultat void

VisitIncDec() public méthode

public VisitIncDec ( BoundIncDecEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundIncDecEx
Résultat void

VisitInclude() public méthode

public VisitInclude ( BoundIncludeEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundIncludeEx
Résultat void

VisitInstanceFunctionCall() public méthode

public VisitInstanceFunctionCall ( BoundInstanceFunctionCall x ) : void
x Pchp.CodeAnalysis.Semantics.BoundInstanceFunctionCall
Résultat void

VisitIsEmpty() public méthode

public VisitIsEmpty ( BoundIsEmptyEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundIsEmptyEx
Résultat void

VisitIsSet() public méthode

public VisitIsSet ( BoundIsSetEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundIsSetEx
Résultat void

VisitList() public méthode

public VisitList ( BoundListEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundListEx
Résultat void

VisitLiteral() public méthode

public VisitLiteral ( BoundLiteral x ) : void
x Pchp.CodeAnalysis.Semantics.BoundLiteral
Résultat void

VisitNew() public méthode

public VisitNew ( BoundNewEx x ) : void
x Pchp.CodeAnalysis.Semantics.BoundNewEx
Résultat void

VisitPseudoConstUse() public méthode

public VisitPseudoConstUse ( BoundPseudoConst x ) : void
x Pchp.CodeAnalysis.Semantics.BoundPseudoConst
Résultat void

VisitReturn() public méthode

public VisitReturn ( BoundReturnStatement x ) : void
x Pchp.CodeAnalysis.Semantics.BoundReturnStatement
Résultat void

VisitRoutineCall() protected méthode

protected VisitRoutineCall ( BoundRoutineCall x ) : void
x Pchp.CodeAnalysis.Semantics.BoundRoutineCall
Résultat void

VisitStaticFunctionCall() public méthode

public VisitStaticFunctionCall ( BoundStaticFunctionCall x ) : void
x Pchp.CodeAnalysis.Semantics.BoundStaticFunctionCall
Résultat void

VisitStaticStatement() public méthode

public VisitStaticStatement ( BoundStaticVariableStatement x ) : void
x Pchp.CodeAnalysis.Semantics.BoundStaticVariableStatement
Résultat void

VisitThrow() public méthode

public VisitThrow ( BoundThrowStatement x ) : void
x Pchp.CodeAnalysis.Semantics.BoundThrowStatement
Résultat void

VisitTypeRef() public méthode

public VisitTypeRef ( BoundTypeRef tref ) : void
tref Pchp.CodeAnalysis.Semantics.BoundTypeRef
Résultat void

VisitUnset() public méthode

public VisitUnset ( BoundUnset x ) : void
x Pchp.CodeAnalysis.Semantics.BoundUnset
Résultat void

VisitVariableRef() public méthode

public VisitVariableRef ( BoundVariableRef x ) : void
x Pchp.CodeAnalysis.Semantics.BoundVariableRef
Résultat void