Object Slots
The layout of object slots for my instances.
Entries
The function to invoke for styling. It should accept the original send phrase being styled, plus the phrase that was produced by a macro, if one was applied, otherwise the original send phrase again. Most functions are only interested in the first argument, but some, like the variable-use macro's styler, require access to the resulting variable-use phrase, to get to the declaration that it's a use of, so that it can determine if it should be styled as a use of a constant, variable, function argument, etc.
Properties
In Java it was possible to define this interface in such a way that the name method was abstract and implemented by each specific Enum, but Kotlin breaks this mechanism. BUT – we're able to cast this to Enum to get to that field. I believe this code gets copied down into each specific Enum subclass, so the dynamic type check for the cast is trivially eliminated in each case. And worst case, Hotspot will be able to inline calls to this from sites that are known to be Enums.
In Java it was possible to define this interface in such a way that the ordinal() method was abstract and implemented by each specific Enum, but Kotlin breaks this mechanism. BUT – we're able to cast this to Enum to get to that field. I believe this code gets copied down into each specific Enum subclass, so the dynamic type check for the cast is trivially eliminated in each case. And worst case, Hotspot will be able to inline calls to this from sites that are known to be Enums.
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.