[m-rev.] (no subject)

Julien Fischer jfischer at opturion.com
Sat May 2 17:36:59 AEST 2020


Hi Zoltan,

On Sat, 2 May 2020, Zoltan Somogyi wrote:

> For review by anyone. I am particularly seeking feedback on
> the changes to mlds_to_{cs,java}_data.m.

> Make unsigned_lt a builtin operation, step 1.
> 
> Step 1 is making it a builtin; step 2 will be declaring it.
> (We won't define it, since builtins may not have definitions.)

...

> diff --git a/compiler/mlds_to_java_data.m b/compiler/mlds_to_java_data.m
> index 2158d26e7..cb740ca70 100644
> --- a/compiler/mlds_to_java_data.m
> +++ b/compiler/mlds_to_java_data.m

> @@ -578,6 +577,28 @@ output_binop_for_java(Info, Op, X, Y, !IO) :-
>              output_rval_for_java(Info, Y, !IO),
>              io.write_string(")", !IO)
>          )
> +    ;
> +        ( Op = unsigned_lt, OpStr = "<"
> +        ; Op = unsigned_le, OpStr = "<="
> +        ),
> +        ( if rval_is_enum_object(X) then
> +            % XXX Is the bit masking needed in this case?

At the moment the MR_value field will always be postive, so no.
It's not clear what form foreign_enums for the Java backend will eventually
take, so maybe eventually?  That said, when are either of these operations
ever going to be called with enum operands?

The diff looks fine otherwise.

Julien.


More information about the reviews mailing list