@@ -138,25 +138,6 @@ module Ssa {
138
138
}
139
139
}
140
140
141
- private string getSplitString ( Definition def ) {
142
- exists ( ControlFlow:: BasicBlock bb , int i , ControlFlow:: Node cfn |
143
- def .definesAt ( _, bb , i ) and
144
- result = cfn .( ControlFlow:: Nodes:: ElementNode ) .getSplitsString ( )
145
- |
146
- cfn = bb .getNode ( i )
147
- or
148
- not exists ( bb .getNode ( i ) ) and
149
- cfn = bb .getFirstNode ( )
150
- )
151
- }
152
-
153
- private string getToStringPrefix ( Definition def ) {
154
- result = "[" + getSplitString ( def ) + "] "
155
- or
156
- not exists ( getSplitString ( def ) ) and
157
- result = ""
158
- }
159
-
160
141
/**
161
142
* A static single assignment (SSA) definition. Either an explicit variable
162
143
* definition (`ExplicitDefinition`), an implicit variable definition
@@ -521,8 +502,8 @@ module Ssa {
521
502
522
503
override string toString ( ) {
523
504
if this .getADefinition ( ) instanceof AssignableDefinitions:: ImplicitParameterDefinition
524
- then result = getToStringPrefix ( this ) + "SSA param(" + this .getSourceVariable ( ) + ")"
525
- else result = getToStringPrefix ( this ) + "SSA def(" + this .getSourceVariable ( ) + ")"
505
+ then result = SsaImpl :: getToStringPrefix ( this ) + "SSA param(" + this .getSourceVariable ( ) + ")"
506
+ else result = SsaImpl :: getToStringPrefix ( this ) + "SSA def(" + this .getSourceVariable ( ) + ")"
526
507
}
527
508
528
509
override Location getLocation ( ) { result = ad .getLocation ( ) }
@@ -570,8 +551,12 @@ module Ssa {
570
551
571
552
override string toString ( ) {
572
553
if this .getSourceVariable ( ) .getAssignable ( ) instanceof LocalScopeVariable
573
- then result = getToStringPrefix ( this ) + "SSA capture def(" + this .getSourceVariable ( ) + ")"
574
- else result = getToStringPrefix ( this ) + "SSA entry def(" + this .getSourceVariable ( ) + ")"
554
+ then
555
+ result =
556
+ SsaImpl:: getToStringPrefix ( this ) + "SSA capture def(" + this .getSourceVariable ( ) + ")"
557
+ else
558
+ result =
559
+ SsaImpl:: getToStringPrefix ( this ) + "SSA entry def(" + this .getSourceVariable ( ) + ")"
575
560
}
576
561
577
562
override Location getLocation ( ) { result = this .getCallable ( ) .getLocation ( ) }
@@ -612,7 +597,7 @@ module Ssa {
612
597
}
613
598
614
599
override string toString ( ) {
615
- result = getToStringPrefix ( this ) + "SSA call def(" + this .getSourceVariable ( ) + ")"
600
+ result = SsaImpl :: getToStringPrefix ( this ) + "SSA call def(" + this .getSourceVariable ( ) + ")"
616
601
}
617
602
618
603
override Location getLocation ( ) { result = this .getCall ( ) .getLocation ( ) }
@@ -640,7 +625,8 @@ module Ssa {
640
625
final Definition getQualifierDefinition ( ) { result = q }
641
626
642
627
override string toString ( ) {
643
- result = getToStringPrefix ( this ) + "SSA qualifier def(" + this .getSourceVariable ( ) + ")"
628
+ result =
629
+ SsaImpl:: getToStringPrefix ( this ) + "SSA qualifier def(" + this .getSourceVariable ( ) + ")"
644
630
}
645
631
646
632
override Location getLocation ( ) { result = this .getQualifierDefinition ( ) .getLocation ( ) }
@@ -682,7 +668,7 @@ module Ssa {
682
668
}
683
669
684
670
override string toString ( ) {
685
- result = getToStringPrefix ( this ) + "SSA phi(" + this .getSourceVariable ( ) + ")"
671
+ result = SsaImpl :: getToStringPrefix ( this ) + "SSA phi(" + this .getSourceVariable ( ) + ")"
686
672
}
687
673
688
674
/*
0 commit comments