@@ -548,7 +548,7 @@ public TypeState forContextInsensitiveTypeState(PointsToAnalysis bb, TypeState s
548548 AnalysisObject analysisObject = type .getContextInsensitiveAnalysisObject ();
549549 return singleTypeState (bb , state .canBeNull (), makeProperties (bb , analysisObject ), analysisObject .type (), analysisObject );
550550 } else {
551- MultiTypeState multiState = (MultiTypeState ) state ;
551+ ContextSensitiveMultiTypeState multiState = (ContextSensitiveMultiTypeState ) state ;
552552 AnalysisObject [] objectsArray = new AnalysisObject [multiState .typesCount ()];
553553
554554 int i = 0 ;
@@ -560,7 +560,7 @@ public TypeState forContextInsensitiveTypeState(PointsToAnalysis bb, TypeState s
560560 * immutable its types bit set cannot change.
561561 */
562562
563- BitSet typesBitSet = multiState .typesBitSet ();
563+ BitSet typesBitSet = multiState .bitSet ();
564564 int properties = makeProperties (bb , objectsArray );
565565 return multiTypeState (bb , multiState .canBeNull (), properties , typesBitSet , objectsArray );
566566 }
@@ -684,7 +684,7 @@ public TypeState doUnion(PointsToAnalysis bb, MultiTypeState state1, SingleTypeS
684684
685685 int properties = bb .analysisPolicy ().makePropertiesForUnion (s1 , s2 );
686686
687- MultiTypeState result = new ContextSensitiveMultiTypeState (bb , resultCanBeNull , properties , s1 .typesBitSet (), resultObjects );
687+ MultiTypeState result = new ContextSensitiveMultiTypeState (bb , resultCanBeNull , properties , s1 .bitSet (), resultObjects );
688688 assert !result .equals (s1 );
689689 /*
690690 * No need to check the result size against the all-instantiated since the type count
@@ -715,7 +715,7 @@ public TypeState doUnion(PointsToAnalysis bb, MultiTypeState state1, SingleTypeS
715715 }
716716
717717 /* Create the types bit set by adding the s2 type to avoid walking the objects. */
718- BitSet typesBitSet = TypeStateUtils .set (s1 .typesBitSet (), s2 .exactType ().getId ());
718+ BitSet typesBitSet = TypeStateUtils .set (s1 .bitSet (), s2 .exactType ().getId ());
719719 int properties = bb .analysisPolicy ().makePropertiesForUnion (s1 , s2 );
720720
721721 MultiTypeState result = new ContextSensitiveMultiTypeState (bb , resultCanBeNull , properties , typesBitSet , resultObjects );
@@ -760,7 +760,7 @@ private static TypeState doUnion0(PointsToAnalysis bb, ContextSensitiveMultiType
760760 AnalysisObject [] resultObjects = TypeStateUtils .concat (s1 .objects , s2 .objects );
761761
762762 /* Logical OR the type bit sets. */
763- BitSet resultTypesBitSet = TypeStateUtils .or (s1 .typesBitSet (), s2 .typesBitSet ());
763+ BitSet resultTypesBitSet = TypeStateUtils .or (s1 .bitSet (), s2 .bitSet ());
764764 int properties = bb .analysisPolicy ().makePropertiesForUnion (s1 , s2 );
765765
766766 MultiTypeState result = new ContextSensitiveMultiTypeState (bb , resultCanBeNull , properties , resultTypesBitSet , resultObjects );
@@ -774,7 +774,7 @@ private static TypeState doUnion0(PointsToAnalysis bb, ContextSensitiveMultiType
774774 AnalysisObject [] resultObjects = TypeStateUtils .concat (s2 .objects , s1 .objects );
775775
776776 /* Logical OR the type bit sets. */
777- BitSet resultTypesBitSet = TypeStateUtils .or (s1 .typesBitSet (), s2 .typesBitSet ());
777+ BitSet resultTypesBitSet = TypeStateUtils .or (s1 .bitSet (), s2 .bitSet ());
778778 int properties = bb .analysisPolicy ().makePropertiesForUnion (s1 , s2 );
779779
780780 MultiTypeState result = new ContextSensitiveMultiTypeState (bb , resultCanBeNull , properties , resultTypesBitSet , resultObjects );
@@ -797,10 +797,10 @@ private static TypeState doUnion1(PointsToAnalysis bb, ContextSensitiveMultiType
797797 * Optimization that gives 1.5-3x in performance for the (typeflow) phase.
798798 */
799799 private static TypeState allocationInsensitiveSpeculativeUnion1 (PointsToAnalysis bb , ContextSensitiveMultiTypeState s1 , ContextSensitiveMultiTypeState s2 , boolean resultCanBeNull ) {
800- if (s1 .typesBitSet ().length () >= s2 .typesBitSet ().length ()) {
801- long [] bits1 = TypeStateUtils .extractBitSetField (s1 .typesBitSet ());
802- long [] bits2 = TypeStateUtils .extractBitSetField (s2 .typesBitSet ());
803- assert s2 .typesBitSet ().cardinality () == s2 .objects .length : "Cardinality and length of objects must match." ;
800+ if (s1 .bitSet ().length () >= s2 .bitSet ().length ()) {
801+ long [] bits1 = TypeStateUtils .extractBitSetField (s1 .bitSet ());
802+ long [] bits2 = TypeStateUtils .extractBitSetField (s2 .bitSet ());
803+ assert s2 .bitSet ().cardinality () == s2 .objects .length : "Cardinality and length of objects must match." ;
804804
805805 boolean speculate = true ;
806806 int numberOfWords = Math .min (bits1 .length , bits2 .length );
@@ -965,7 +965,7 @@ private static TypeState doUnion2(PointsToAnalysis bb, ContextSensitiveMultiType
965965 assert resultObjects .size () > 1 : "The result state of a (Multi U Multi) operation must have at least 2 objects" ;
966966
967967 /* Logical OR the type bit sets. */
968- BitSet resultTypesBitSet = TypeStateUtils .or (s1 .typesBitSet (), s2 .typesBitSet ());
968+ BitSet resultTypesBitSet = TypeStateUtils .or (s1 .bitSet (), s2 .bitSet ());
969969 int properties = bb .analysisPolicy ().makePropertiesForUnion (s1 , s2 );
970970
971971 MultiTypeState result = new ContextSensitiveMultiTypeState (bb , resultCanBeNull , properties , resultTypesBitSet , resultObjects .copyToArray (new AnalysisObject [resultObjects .size ()]));
@@ -1034,12 +1034,12 @@ public TypeState doIntersection(PointsToAnalysis bb, MultiTypeState state1, Mult
10341034 private static TypeState doIntersection0 (PointsToAnalysis bb , ContextSensitiveMultiTypeState s1 , ContextSensitiveMultiTypeState s2 , boolean resultCanBeNull ) {
10351035 /* Speculate that s1 and s2 have either the same types, or no types in common. */
10361036
1037- if (s1 .typesBitSet ().equals (s2 .typesBitSet ())) {
1037+ if (s1 .bitSet ().equals (s2 .bitSet ())) {
10381038 /* Speculate that s1 and s2 have the same types, i.e., the result is s1. */
10391039 return s1 .forCanBeNull (bb , resultCanBeNull );
10401040 }
10411041
1042- if (!s1 .typesBitSet ().intersects (s2 .typesBitSet ())) {
1042+ if (!s1 .bitSet ().intersects (s2 .bitSet ())) {
10431043 /* Speculate that s1 and s2 have no types in common, i.e., the result is empty. */
10441044 return TypeState .forEmpty ().forCanBeNull (bb , resultCanBeNull );
10451045 }
@@ -1139,7 +1139,7 @@ private static TypeState doIntersection2(PointsToAnalysis bb, ContextSensitiveMu
11391139 return new ContextSensitiveSingleTypeState (bb , resultCanBeNull , bb .analysisPolicy ().makeProperties (bb , objects ), objects [0 ].type (), objects );
11401140 } else {
11411141 /* Logical AND the type bit sets. */
1142- BitSet resultTypesBitSet = TypeStateUtils .and (s1 .typesBitSet (), s2 .typesBitSet ());
1142+ BitSet resultTypesBitSet = TypeStateUtils .and (s1 .bitSet (), s2 .bitSet ());
11431143 MultiTypeState result = new ContextSensitiveMultiTypeState (bb , resultCanBeNull , bb .analysisPolicy ().makeProperties (bb , objects ), resultTypesBitSet , objects );
11441144
11451145 /*
@@ -1200,7 +1200,7 @@ public TypeState doSubtraction(PointsToAnalysis bb, MultiTypeState state1, Singl
12001200 /* Multiple objects of the same type. */
12011201 return new ContextSensitiveSingleTypeState (bb , resultCanBeNull , bb .analysisPolicy ().makeProperties (bb , resultObjects ), resultObjects [0 ].type (), resultObjects );
12021202 } else {
1203- BitSet resultTypesBitSet = TypeStateUtils .clear (s1 .typesBitSet (), s2 .exactType ().getId ());
1203+ BitSet resultTypesBitSet = TypeStateUtils .clear (s1 .bitSet (), s2 .exactType ().getId ());
12041204 return new ContextSensitiveMultiTypeState (bb , resultCanBeNull , bb .analysisPolicy ().makeProperties (bb , resultObjects ), resultTypesBitSet , resultObjects );
12051205 }
12061206
@@ -1229,12 +1229,12 @@ public TypeState doSubtraction(PointsToAnalysis bb, MultiTypeState state1, Multi
12291229 private static TypeState doSubtraction0 (PointsToAnalysis bb , ContextSensitiveMultiTypeState s1 , ContextSensitiveMultiTypeState s2 , boolean resultCanBeNull ) {
12301230 /* Speculate that s1 and s2 have either the same types, or no types in common. */
12311231
1232- if (s1 .typesBitSet ().equals (s2 .typesBitSet ())) {
1232+ if (s1 .bitSet ().equals (s2 .bitSet ())) {
12331233 /* Speculate that s1 and s2 have the same types, i.e., the result is empty set. */
12341234 return TypeState .forEmpty ().forCanBeNull (bb , resultCanBeNull );
12351235 }
12361236
1237- if (!s1 .typesBitSet ().intersects (s2 .typesBitSet ())) {
1237+ if (!s1 .bitSet ().intersects (s2 .bitSet ())) {
12381238 /* Speculate that s1 and s2 have no types in common, i.e., the result is s1. */
12391239 return s1 .forCanBeNull (bb , resultCanBeNull );
12401240 }
@@ -1323,7 +1323,7 @@ private static TypeState doSubtraction2(PointsToAnalysis bb, ContextSensitiveMul
13231323 /* Multiple objects of the same type. */
13241324 return new ContextSensitiveSingleTypeState (bb , resultCanBeNull , bb .analysisPolicy ().makeProperties (bb , objects ), objects [0 ].type (), objects );
13251325 } else {
1326- BitSet resultTypesBitSet = TypeStateUtils .andNot (s1 .typesBitSet (), s2 .typesBitSet ());
1326+ BitSet resultTypesBitSet = TypeStateUtils .andNot (s1 .bitSet (), s2 .bitSet ());
13271327 /*
13281328 * Don't need to check if the result is close-to-all-instantiated since result
13291329 * <= s1.
0 commit comments