[m-rev.] for review: unify/compare as MR_Unsigned

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri Oct 5 12:15:29 AEST 2018



On Fri, 5 Oct 2018 01:23:01 +0000 (UTC), Julien Fischer <jfischer at opturion.com> wrote:
> > +    ( if
> > +        UCOptions ^ uco_constants_as_ints = compare_constants_as_ints,
> > +        UCOptions ^ uco_packed_unify_compare = allow_packed_unify_compare,
> > +        % Can we compare two values of this type by casting both values
> > +        % to unsigned and comparing the results?
> > +        (
> > +            CtorRepns = [CtorRepnA],
> > +            % If all the arguments of functor A are stored next to the ptag,
> > +            % and if they are all comparable as unsigned, two conditions
> > +            % that is_ctor_with_all_locally_packed_unsigned_args will test,
> > +            % and if they are arranged earlier-args-in-more-significant-bits,
> > +            % which is always guaranteed for packed arguments by
> > +            % du_type_layout.m, then yes, cast-to-unsigned-and-compare
> > +            % will work.
> > +            is_ctor_with_all_locally_packed_unsigned_args(CtorRepnA, _)
> > +        ;
> > +            CtorRepns = [CtorRepnA, CtorRepnB],
> > +            % If functor A comes before functor B, and
> > +            %
> > +            % - the value of a term whose functor is A *must* be all zeroes
> > +            % - the value of a term whose functor is B *cannot* be all zeroes
> 
> The second condition is unclear, I think you also need something along the 
> lines of
> 
>      and to which cast-to-unsigned-and-compare would apply
> 
> (i.e B must also meet conditions described in the first disjunct.)

Done. Thanks for the review.

Zoltan.


More information about the reviews mailing list