|
|
@ -97,13 +97,15 @@ public class GetFieldOperator extends Operator { |
|
|
|
return ana.getField(ref.getName(), |
|
|
|
return ana.getField(ref.getName(), |
|
|
|
Type.tType(ref.getType())); |
|
|
|
Type.tType(ref.getType())); |
|
|
|
} |
|
|
|
} |
|
|
|
if (ana.getParent() instanceof MethodAnalyzer) |
|
|
|
if (ana.getParent() == null) |
|
|
|
ana = ((MethodAnalyzer) ana.getParent()) |
|
|
|
return null; |
|
|
|
|
|
|
|
if (ana.getParent() instanceof CodeAnalyzer) |
|
|
|
|
|
|
|
ana = ((CodeAnalyzer) ana.getParent()) |
|
|
|
.getClassAnalyzer(); |
|
|
|
.getClassAnalyzer(); |
|
|
|
else if (ana.getParent() instanceof ClassAnalyzer) |
|
|
|
else if (ana.getParent() instanceof ClassAnalyzer) |
|
|
|
ana = (ClassAnalyzer) ana.getParent(); |
|
|
|
ana = (ClassAnalyzer) ana.getParent(); |
|
|
|
else |
|
|
|
else |
|
|
|
return null; |
|
|
|
throw new jode.AssertError("Unknown parent"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
return null; |
|
|
@ -160,13 +162,17 @@ public class GetFieldOperator extends Operator { |
|
|
|
if (!staticFlag) { |
|
|
|
if (!staticFlag) { |
|
|
|
subExpressions[0] = subExpressions[0].simplify(); |
|
|
|
subExpressions[0] = subExpressions[0].simplify(); |
|
|
|
subExpressions[0].parent = this; |
|
|
|
subExpressions[0].parent = this; |
|
|
|
if (subExpressions[0] instanceof ThisOperator |
|
|
|
if (subExpressions[0] instanceof ThisOperator) { |
|
|
|
&& getField() != null) { |
|
|
|
FieldAnalyzer field = getField(); |
|
|
|
Expression constant = getField().getConstant(); |
|
|
|
if (field != null |
|
|
|
if (constant instanceof ThisOperator) |
|
|
|
&& field.isSynthetic() && field.isFinal()) { |
|
|
|
|
|
|
|
Expression constant = field.getConstant(); |
|
|
|
|
|
|
|
if (constant instanceof ThisOperator |
|
|
|
|
|
|
|
|| constant instanceof OuterLocalOperator) |
|
|
|
return constant; |
|
|
|
return constant; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|