Vector fieldlist = new Vector(); /* ordering information */
Hashtable labels = new Hashtable();
+
public StructureTypeDescriptor(String name) {
super(name);
}
}
public Expr getOffsetExpr(FieldDescriptor field) {
-
+ /* Fix sizeof calculations */
+ if ((field==null)&&(subtype!=null))
+ return subtype.getSizeExpr();
+
boolean aligned=true;
Expr size = new IntegerLiteralExpr(0);
labels.put(ld.getSymbol(), ld);
}
- public TypeDescriptor getSubType() {
+ public TypeDescriptor getSuperType() {
return subtype;
}
- public void setSubType(TypeDescriptor td) {
+ public void setSuperType(TypeDescriptor td) {
subtype = td;
}
if (td == this) {
return true;
} else {
+ if (subtype==null)
+ return false;
return subtype.isSubtypeOf(td);
}
}