Lines Matching refs:depth

70 1. From the root, recursively process all objects and calculate a "depth"
71 for each object. Mutable data and code segments have depth 0 and
73 precision values) have depth 1. Other cells have depths of 1 or greater,
74 the depth being the maximum recursion depth until a byte segment or an
75 object with depth 0 is reached. Cycles of immutable data don't arise
77 To avoid infinite recursion cycles are broken by setting the depth of an
78 object to zero before processing it. The depth of each object is stored
81 2. Vectors are created containing objects of the same depth, from 1 to the
82 maximum depth found.
83 3. We begin a loop starting at depth 1.
84 4. The length words are restored, replacing the depth count in the header.
92 7. Objects at the next depth are first processed to find pointers to objects
93 that moved in the previous step (or that step with a lower depth). The
127 // The depth is stored in the length field. If the Weak bit is set but the Mutable bit
128 // is clear the value in the length word is a depth rather than a real length.
130 // Previously "depth" values were encoded with the tombstone bit set but that isn't
136 // The DepthVector type contains all the items of a particular depth.
217 void AddToVector(POLYUNSIGNED depth, POLYUNSIGNED length, PolyObject *pt);
236 // Free the depth vectors.
244 // Grow the appropriate depth vector if necessary and add the item to it.
245 void ShareDataClass::AddToVector(POLYUNSIGNED depth, POLYUNSIGNED length, PolyObject *pt)
251 if (depth >= maxVectorSize) maxVectorSize = depth+1;
253 while (vectorToUse->size() <= depth)
265 (*vectorToUse)[depth]->AddToVector(length, pt);
268 // Add an object to a depth vector
317 // Add an object to a depth vector
545 // Set the genuine length word. This overwrites both depth words and forwarding pointers.
588 // Before we actually try to share the immutable objects at a particular depth it
634 // Generally each address will point to an object processed at a lower depth.
636 // structure to a higher depth.
646 // This class is used to set up the depth vectors for sorting. It subclasses ScanAddress
648 // handles all the other object types itself. It scans them depth-first using an explicit stack.
668 // Process an address and return the "depth".
704 // Either adds an object to the stack or, if its depth is known, adds it
705 // to the depth vector and returns the depth.
707 // computed the depth. We have to be careful that this bit is removed
719 if (OBJ_IS_DEPTH(L)) // tombstone contains genuine depth or 0.
783 // Byte objects always have depth 1 and can't contain addresses.
786 m_parent->AddToVector (1, L, obj);// add to vector at correct depth
848 // If it's local set the depth with the value zero. It has already been
849 // added to the zero depth vector.
872 // depth by computing the maximum of the depth of all the addresses in it.
873 POLYUNSIGNED depth = 0;
877 if (d > depth) depth = d;
886 depth++; // One more for this object
888 m_parent->AddToVector(depth, obj->LengthWord() & (~_OBJ_GC_MARK), obj);
889 obj->SetLengthWord(OBJ_SET_DEPTH(depth));
894 // Mutable or non-local objects. These have depth zero. Local objects have
896 // modified so we don't set the depth. Mutable objects are added to the
897 // depth vectors even though they aren't shared so that they will be
963 for (POLYUNSIGNED depth = 1; depth < maxVectorSize; depth++)
967 if (depth < depthVectorArray[j].size())
969 DepthVector *vec = depthVectorArray[j][depth];
979 depth, j, vec->ItemCount(), n, (float)n / (float)vec->ItemCount() * 100.0);