@@ -9,23 +9,28 @@ import Padding
99
1010/*
1111 * Sanity-check: Find discrepancies between computed and actual size on LP64.
12- *
13- from Type t, LP64 a, int padded, int bit, int real, MemberVariable v
14- where padded = a.paddedSize(t) and bit = a.bitSize(t)
15- and real = t.getSize() * 8 and padded != real and count(t.getSize()) = 1
16- select t, a.paddedSize(t) as Padded, real, v, t.(PaddedType).memberSize(v, a)
17- /** /
12+ */
13+
14+ /*
15+ * from Type t, LP64 a, int padded, int bit, int real, MemberVariable v
16+ * where padded = a.paddedSize(t) and bit = a.bitSize(t)
17+ * and real = t.getSize() * 8 and padded != real and count(t.getSize()) = 1
18+ * select t, a.paddedSize(t) as Padded, real, v, t.(PaddedType).memberSize(v, a)
19+ */
20+
21+ /*
22+ * from PaddedType t, LP64 a, MemberVariable v
23+ * where t instanceof Union and v = t.getAMember() and not exists(t.memberSize(v, a))
24+ * select t, v, v.getType().explain()
25+ */
26+
27+ /*
28+ * from PaddedType t, LP64 a, MemberVariable v
29+ * where not exists(a.paddedSize(t))
30+ * select t, t.fieldIndex(v) as i, v, t.memberSize(v, a) order by t, i
31+ */
1832
19- from PaddedType t, LP64 a, MemberVariable v
20- where t instanceof Union and v = t.getAMember() and not exists(t.memberSize(v, a))
21- select t, v, v.getType().explain()
22- /**
23- from PaddedType t, LP64 a, MemberVariable v
24- where not exists(a.paddedSize(t))
25- select t, t.fieldIndex(v) as i, v, t.memberSize(v, a) order by t, i
26- /**/
2733from PaddedType t , LP64 a
2834where a .wastedSpace ( t ) != 0
2935select t , a .paddedSize ( t ) as size , a .wastedSpace ( t ) as waste order by waste desc
30- /**/
3136
0 commit comments