Community
Participate
Working Groups
UnconditionalFlowInfo outerInfo = flowInfo.unconditionalFieldLessCopy();
UnconditionalFlowInfo staticFieldUnconditionalInfo = staticFieldInfo.unconditionalInits();
flowInfo.addNullInfoFrom(staticFieldUnconditionalInfo.discardNonFieldInitializations());
flowInfo.addConstantFieldsMask(staticFieldInfo); // prevent resetting null info for constant fields inside methods
flowInfo.addConstantFieldsMask(staticFieldUnconditionalInfo); // prevent resetting null info for constant fields inside methods
flowInfo.resetNullInfoForFields(); // only preserve null info for constant fields
FlowInfo constructorInfo = nonStaticFieldInfo.unconditionalInits().discardNonFieldInitializations().addInitializationsFrom(flowInfo);
this.initsWhenFalse.updateConstantFieldsMask(field);
}
public void addConstantFieldsMask(FlowInfo other) {
public void addConstantFieldsMask(UnconditionalFlowInfo other) {
this.initsWhenTrue.addConstantFieldsMask(other);
this.initsWhenFalse.addConstantFieldsMask(other);
DEAD_END.tagBits = UNREACHABLE;
public long constantFieldsMask; // record positions of constant fields so that they don't get reset in resetNullInfoForFields()
public long extraConstantFieldMask[]; // extra mask for larger number of fields
/**
* Add other inits to this flow info, then return this. The operation semantics
* are to match as closely as possible the application to this flow info of all
* add the constant fields info from the other flow info
*/
abstract public void addConstantFieldsMask(FlowInfo other);
abstract public void addConstantFieldsMask(UnconditionalFlowInfo other);
* Record a field or local may have got assigned to unknown (set the bit on existing info).
// Constants
public static final int BitCacheSize = 64; // 64 bits in a long.
public int[] nullStatusChangedInAssert; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=303448
public long constantFieldsMask;
public long extraConstantFieldMask[];
private static final int AccConstant = ClassFileConstants.AccStatic|ClassFileConstants.AccFinal;
public static final int indexOfConstantFieldBitStream = 6; // the index just after nullBit4 i.e. extraLength
* All the infos originate in TypeDeclaration.analyseCode(). So making sure that this method is called for every info that is sent into
* methods/constructors should be sufficient
this.constantFieldsMask |= other.constantFieldsMask;
if (other.extraConstantFieldMask != null) {
int oldLength = 0;