Merge pull request #298 from joshuawarner32/fix-arm

fix arm build
This commit is contained in:
Joel Dice 2014-07-16 10:37:36 -06:00
commit 00340cdc6b

View File

@ -74,11 +74,16 @@ GcField* fieldForOffsetInClass(Thread* t, GcClass* c, unsigned offset)
return 0;
}
GcField* fieldForOffset(Thread* t, GcSingleton* o, unsigned offset)
GcField* fieldForOffset(Thread* t, object o, unsigned offset)
{
GcClass* c = objectClass(t, o);
if (c->vmFlags() & SingletonFlag) {
c = cast<GcClass>(t, singletonObject(t, o, 0));
GcSingleton* s = cast<GcSingleton>(t, o);
// If the object is a Singleton, we assume it's the static table of a class -
// which will always have the parent class as the first (0th) element.
c = cast<GcClass>(t, singletonObject(t, s, 0));
object table = c->fieldTable();
if (table) {
for (unsigned i = 0; i < objectArrayLength(t, table); ++i) {