[m-rev.] for review: mlds_enum_class_defn
Zoltan Somogyi
zoltan.somogyi at runbox.com
Tue Jun 13 16:46:55 AEST 2023
On 2023-06-13 02:42 +02:00 CEST, "Julien Fischer" <jfischer at opturion.com> wrote:
> The "value" field is present of the Java backend it's defined in
> java/runtime/MercuryEnum.java, which is the base class that all Mercury-Java
> enumerations extend. My guess it that field being present in the MLDS is either
> a left-over from the MLDS->IL backend or something that was thought to be
> required for one of the target languages for which support was never
> implemented.
I have added a comment to this effect.
>> + EnumConst = mlds_enum_const_foreign(_Lang, _EnumNameStr, _Type),
>> + % XXX JAVA ENUM The code previously here got the enum value from
>> + % an mlds_initializer, and insisted that it be bound to a term
>> + % of the init_obj(ml_const(mlconst_enum(_, _))). This meant that
>> + % it did not allow for an enum defined by foreign language code.
>
> Foreign enums are not (currently) supported by the Java backend.
And the same here.
Thanks for the review.
Zoltan.
More information about the reviews
mailing list