indexForConstant

Answer the index of the given constant, adding it to the global constantsList and constantsMap} if necessary.

Return

The one-based index of the type, which can be retrieved later via constantForIndex.

Parameters

constant

The type to look up or add to the global index.