[m-rev.] for review: allow foreign types to be Java numeric primitive types

Julien Fischer jfischer at opturion.com
Tue Apr 12 13:35:04 AEST 2016


Hi Peter,

On Tue, 12 Apr 2016, Peter Wang wrote:

> On Tue, 12 Apr 2016 11:35:07 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
>>
>> For review by anyone.
>>
>> Question: the remaining Java primitive types (bool and char) are not
>> supported by this change and I can't really see a need for them.  In
>> the interests of completness should was also support them?
>
> Might as well.  array.m already handles boolean and char.

Ok, I'll add them.  At the very least, supporting them simplifies the
specification of foreign_type pragmas for the Java backend.

>> +:- pred java_primitive_foreign_language_type(foreign_language_type::in, string::out,
>> +    string::out, string::out) is semidet.
>> +
>> +java_primitive_foreign_language_type(ForeignLangType, PrimitiveType,
>> +        BoxedType, UnboxMethod) :-
>> +    require_complete_switch [ForeignLangType] (
>> +        ForeignLangType = java(java_type(JavaForeignType))
>
> Write ( on a new line.

Done -- thanks for the review.

Julien.


More information about the reviews mailing list