src/ObjectVisitor.h
changeset 256 3c184218462d
parent 251 ca99a81745fe
child 261 219b49bf4a03
     1.1 --- a/src/ObjectVisitor.h	Tue Jan 01 20:08:34 2013 -0800
     1.2 +++ b/src/ObjectVisitor.h	Sun Jan 06 13:52:21 2013 -0800
     1.3 @@ -125,6 +125,7 @@
     1.4          visitImportable(obj);
     1.5          visitField(obj, Module::offsetOfGlobals());
     1.6          visitField(obj, Module::offsetOfCode());
     1.7 +        visitField(obj, Module::offsetOfImports());
     1.8          return sizeof(Module);
     1.9      }
    1.10  
    1.11 @@ -213,7 +214,7 @@
    1.12          unsigned noffsets = map->traceOffsetCount();
    1.13          for (unsigned i = 0; i < noffsets; i++)
    1.14              visitField(obj, Struct::offsetOfSlotOffset(offsets[i]));
    1.15 -        return obj->objSize();
    1.16 +        return Struct::SizeFor(map);
    1.17      }
    1.18  
    1.19      size_t iterateList(Object *obj) {
    1.20 @@ -388,7 +389,7 @@
    1.21          return sizeof(List<Object>);
    1.22  
    1.23        case MapKind_Struct:
    1.24 -        return Struct::cast(obj)->objSize();
    1.25 +        return Struct::SizeFor(StructMap::cast(map));
    1.26  
    1.27        case MapKind_EnvironmentSlotDescriptorArray:
    1.28          return EnvironmentSlotDescriptorArray::cast(obj)->objSize();