@@ -994,9 +994,9 @@ private module Cached {
994
994
995
995
import Cached
996
996
997
- private string getSplitString ( DefinitionExt def ) {
997
+ private string getSplitString ( Definition def ) {
998
998
exists ( ControlFlow:: BasicBlock bb , int i , ControlFlow:: Node cfn |
999
- def .definesAt ( _, bb , i , _ ) and
999
+ def .definesAt ( _, bb , i ) and
1000
1000
result = cfn .( ControlFlow:: Nodes:: ElementNode ) .getSplitsString ( )
1001
1001
|
1002
1002
cfn = bb .getNode ( i )
@@ -1006,48 +1006,13 @@ private string getSplitString(DefinitionExt def) {
1006
1006
)
1007
1007
}
1008
1008
1009
- string getToStringPrefix ( DefinitionExt def ) {
1009
+ string getToStringPrefix ( Definition def ) {
1010
1010
result = "[" + getSplitString ( def ) + "] "
1011
1011
or
1012
1012
not exists ( getSplitString ( def ) ) and
1013
1013
result = ""
1014
1014
}
1015
1015
1016
- /**
1017
- * An extended static single assignment (SSA) definition.
1018
- *
1019
- * This is either a normal SSA definition (`Definition`) or a
1020
- * phi-read node (`PhiReadNode`).
1021
- *
1022
- * Only intended for internal use.
1023
- */
1024
- class DefinitionExt extends Impl:: DefinitionExt {
1025
- override string toString ( ) { result = this .( Ssa:: Definition ) .toString ( ) }
1026
-
1027
- /** Gets the location of this definition. */
1028
- override Location getLocation ( ) { result = this .( Ssa:: Definition ) .getLocation ( ) }
1029
-
1030
- /** Gets the enclosing callable of this definition. */
1031
- Callable getEnclosingCallable ( ) { result = this .( Ssa:: Definition ) .getEnclosingCallable ( ) }
1032
- }
1033
-
1034
- /**
1035
- * A phi-read node.
1036
- *
1037
- * Only intended for internal use.
1038
- */
1039
- class PhiReadNode extends DefinitionExt , Impl:: PhiReadNode {
1040
- override string toString ( ) {
1041
- result = getToStringPrefix ( this ) + "SSA phi read(" + this .getSourceVariable ( ) + ")"
1042
- }
1043
-
1044
- override Location getLocation ( ) { result = this .getBasicBlock ( ) .getLocation ( ) }
1045
-
1046
- override Callable getEnclosingCallable ( ) {
1047
- result = this .getSourceVariable ( ) .getEnclosingCallable ( )
1048
- }
1049
- }
1050
-
1051
1016
private module DataFlowIntegrationInput implements Impl:: DataFlowIntegrationInputSig {
1052
1017
private import csharp as Cs
1053
1018
private import semmle.code.csharp.controlflow.BasicBlocks
0 commit comments