[m-rev.] for review: fix deep profiling runtime compilation failure

Julien Fischer juliensf at csse.unimelb.edu.au
Fri Feb 16 16:08:30 AEDT 2007


On Fri, 16 Feb 2007, Simon Taylor wrote:

> On 16-Feb-2007, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>> On Fri, 16 Feb 2007, Simon Taylor wrote:
>>> On 16-Feb-2007, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>>>> This change breaks the deep profiling grades (and possibly also the
>>>> debugging ones).  There is a fundamental problem with the way the
>>>> bitmap type is defined.  It's a foreign type but (parts of) the runtime
>>>> also
>>>> treat it as though it were a builtin type.
>>>>
>>>> This is a problem because the runtime is now referring to entities that
>>>> are defined in the library.  The solution here is to make it either one
>>>> or the other.
>>>
>>> This is the same as for arrays (they are defined in exactly the same way).
>>
>> Ah, I didn't realise that was the case.
>>
>>> The short-term fix is to abort if compare_representation/3 is called for
>>> bitmaps as well.
>>
>> This is fairly yucky.  We should consider allowing
>> compare_representation/3 to be defined for foreign_types.
>
> I would have thought that compare_representation/3 for foreign types
> should just call the normal comparison predicate, if it is defined.

compare_representation for foreign_types is (currently) the same as for
arrays (whether it should be is another matter).

> Estimated hours taken: 0.1
> Branches: main
>
> runtime/mercury_unify_compare_body.h:
> 	Disable C code for unifying and comparing bitmaps because
> 	in deep profiling grades it refers to proc_layouts that
> 	aren't defined.  compare_representation/3 now aborts whe
> 	applied to bitmaps.  This is the same as for arrays.

That looks okay.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list