Hashtable fields = new Hashtable(); /* fast lookups */
Vector fieldlist = new Vector(); /* ordering information */
Hashtable labels = new Hashtable();
- int idnum;
- static int counter=0;
- public int getId() {
- return idnum;
- }
public StructureTypeDescriptor(String name) {
super(name);
- idnum=counter++;
}
public TypeDescriptor getGenerateType() {
public Expr getOffsetExpr(FieldDescriptor field) {
/* Fix sizeof calculations */
if ((field==null)&&(subtype!=null))
- return subtype.getOFfsetExpr(field);
+ return subtype.getSizeExpr();
boolean aligned=true;
Expr size = new IntegerLiteralExpr(0);
if (td == this) {
return true;
} else {
+ if (subtype==null)
+ return false;
return subtype.isSubtypeOf(td);
}
}