|
5 | 5 | import static com.ibm.wala.cast.python.ml.types.TensorFlowTypes.DType.STRING; |
6 | 6 | import static com.ibm.wala.cast.python.ml.types.TensorFlowTypes.FIELD_REFERENCE_TO_DTYPE; |
7 | 7 | import static com.ibm.wala.cast.python.ml.types.TensorFlowTypes.TENSORFLOW; |
| 8 | +import static com.ibm.wala.cast.python.types.PythonTypes.Root; |
8 | 9 | import static com.ibm.wala.cast.python.types.PythonTypes.list; |
9 | 10 | import static com.ibm.wala.cast.python.types.PythonTypes.tuple; |
10 | 11 | import static com.ibm.wala.cast.python.util.Util.getAllocationSiteInNode; |
@@ -121,8 +122,7 @@ protected Set<List<Dimension<?>>> getShapesFromShapeArgument( |
121 | 122 | Integer fieldIndex = (Integer) constantKeyValue; |
122 | 123 |
|
123 | 124 | FieldReference subscript = |
124 | | - FieldReference.findOrCreate( |
125 | | - PythonTypes.Root, findOrCreateAsciiAtom(fieldIndex.toString()), PythonTypes.Root); |
| 125 | + FieldReference.findOrCreate(Root, findOrCreateAsciiAtom(fieldIndex.toString()), Root); |
126 | 126 |
|
127 | 127 | IField f = builder.getClassHierarchy().resolveField(subscript); |
128 | 128 | LOGGER.fine("Found field: " + f); |
@@ -330,9 +330,7 @@ else if (valueIK instanceof AllocationSiteInNode) { |
330 | 330 |
|
331 | 331 | FieldReference subscript = |
332 | 332 | FieldReference.findOrCreate( |
333 | | - PythonTypes.Root, |
334 | | - findOrCreateAsciiAtom(fieldIndex.toString()), |
335 | | - PythonTypes.Root); |
| 333 | + Root, findOrCreateAsciiAtom(fieldIndex.toString()), Root); |
336 | 334 |
|
337 | 335 | IField f = builder.getClassHierarchy().resolveField(subscript); |
338 | 336 | LOGGER.fine("Found field: " + f); |
@@ -623,9 +621,7 @@ private EnumSet<DType> getDTypesOfValue( |
623 | 621 |
|
624 | 622 | FieldReference subscript = |
625 | 623 | FieldReference.findOrCreate( |
626 | | - PythonTypes.Root, |
627 | | - findOrCreateAsciiAtom(fieldIndex.toString()), |
628 | | - PythonTypes.Root); |
| 624 | + Root, findOrCreateAsciiAtom(fieldIndex.toString()), Root); |
629 | 625 |
|
630 | 626 | IField f = builder.getClassHierarchy().resolveField(subscript); |
631 | 627 | LOGGER.fine("Found field: " + f); |
|
0 commit comments