A system that associates an identifier with an instance defined within an object-oriented
programming system. The system generates an identifier for the instance and associates
a new near object with the instance, wherein the new near object points to a class
specifying behavior for the object. The system stores the identifier in the new
near object, and sets a class pointer located within a header of the instance to
point to the new near object. In this way, the class pointer indirectly points
to the class for the object through the new near object. The system can lock the
instance to facilitate exclusive access to the instance by copying a near object
associated with the instance to a method activation on the execution stack, and
setting the class pointer of the instance to point to the copy of the near object
on the execution stack.