reset alignment at inheritence boundary when iterating over fields

In type-generator, we were incorrectly calculating field offsets where
a class inherits from another class whose last field has a natural
alignment which is different from the native word size.  Surprisingly,
this only popped up when I built using the Android class library on a
64-bit system.
This commit is contained in:
Joel Dice 2013-02-25 16:37:46 -07:00
parent 686c2352c1
commit 1310fbbe4f

View File

@ -662,6 +662,7 @@ class MemberIterator {
assert(member->type == Object::Scalar);
offset_ = ((offset_ + size_) + (BytesPerWord - 1))
& ~(BytesPerWord - 1);
alignment_ = BytesPerWord;
member = 0;
}