However, there is a big difference between mutually recursive functions and join definitions. The code for name x is automaton code that reacts to the arrival of a new message on that name. The compiler issues various versions of name code, one per possible status of the definition that defines x . In all cases, definition status may then need an update, which is performed by updating all code entries in the definition. In the jocaml system, a name is a pointer to a definition plus an index.
Definitions are still vectors structures, but there is only one entry per name for message queues.
Status field holds the current status of the definition as a bit-field. When a message is received on name x , the bit for x is checked in the current status bit-field. If the bit is set, some messages on name x are already present. Thus, definition status does not change. Since the current status before message sending is guaranteed to be a non-matching one, the message is queued and the function is exited.