Too many slots added to an object

John Leuner jewel at pixie.co.za
Mon Jun 7 03:16:47 PDT 2004


I am getting this error from the bootstrapped VM:

Slate: Added too many slots to an object.


This is the code in vm.c:

struct Object * PSObject_addSlotNamed_valued_at_(struct Object * obj,
ObjectPointer name, ObjectPointer value, unsigned long int offset)
{
  struct Object * newObj;
  struct Map * map;
  struct SlotEntry * entry;

  entry = PSSlotTable_hashEntryForName_((obj->map)->slotTable, name);
  if (entry != Nil)
    return Nil;
*  if ((obj->header).objectSize >= ObjectSizeMask)
*    error("Added too many slots to an object.");
  map = PSObjectHeap_cloneMap_(CurrentMemory, obj->map);
  PSObjectHeap_rootStackPush_(CurrentMemory, (ObjectPointer *) (&map));
  map->slotTable = PSSlotTable_growBy_excluding_(map->slotTable, 1,
CurrentMemory->NilObject);
  PSSlotTable_relocate_by_(map->slotTable, offset, 4);

It is triggered by the following code (some other code is loaded before
this, but has never shown this kind of error until the following was
added):

prototypes addPrototype: #SrpMappingSaveRule derivedFrom: {Cloneable}.
prototypes addPrototype: #PmrCollection derivedFrom:
{SrpMappingSaveRule}.
prototypes addPrototype: #PmrKeyedCollection derivedFrom:
{PmrCollection}.
prototypes addPrototype: #PmrDictionary derivedFrom:
{PmrKeyedCollection}.
prototypes addPrototype: #PmrIdentityDictionary derivedFrom:
{PmrDictionary}.
prototypes addPrototype: #PmrSequenceableCollection derivedFrom:
{PmrCollection}.
prototypes addPrototype: #PmrAdditiveSequenceableCollection derivedFrom:
{PmrSequenceableCollection}.


-- 
John Leuner <jewel at pixie.co.za>




More information about the Slate mailing list