[m-rev.] for review: fix rtti get_arg bugs for il grade

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Nov 28 00:24:44 AEDT 2002


On 26-Nov-2002, Peter Ross <peter.ross at miscrit.be> wrote:
> Fix bugs in get_arg when used with high-level data.
> 
> library/rtti_implementation.m:
> 	Fix a bug where the number of extra args in a functor where

s/where/were/

> 	being calculated according to whether or not a particular arg
> 	of that functor was an existentially quantified type variable,
> 	instead of just calculating the number of extra args from the
> 	information in the exist_info for that functor.
> 	Fix a bug where with high-level data the type of the secondary
> 	tag doesn't matter for determing the offset to find a functors
> 	arg.

Test case?

Does this bug show up for --target c --high-level-data
(e.g. the `hl.gc' grade?)

If not, the log message should mention that the problem only
shows up for the `il' grade.

> Index: library/rtti_implementation.m
...
> +:- pred high_level_data is semidet.
> +:- pragma promise_pure(high_level_data/0).
> +:- pragma foreign_proc("MC++", high_level_data,
> +		[will_not_call_mercury, thread_safe], "
> +#ifdef MR_HIGHLEVEL_DATA
> +	SUCCESS_INDICATOR = MR_TRUE;
> +#else
> +	SUCCESS_INDICATOR = MR_FALSE;
> +#endif
> +").
> +high_level_data :-
> +	fail.

That is wrong for the `hl*' and `java' grades.

Also, I think `fail' needs to be `semidet_fail' to avoid
a determinism warning for non-il grades.

I haven't really reviewed the bug fixes yet -- I'd like to see the test
cases first.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list