[m-rev.] for review: external pseudo-imported special preds bug fix
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Dec 3 22:43:13 AEDT 2003
On 03-Dec-2003, Peter Ross <pro at missioncriticalit.com> wrote:
> Fix a bug where the compiler was treating pseudo_imported external
> definitions incorrectly.
...
> Index: il_compiler/compiler/ml_code_gen.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/ml_code_gen.m,v
> retrieving revision 1.132
> diff -u -r1.132 ml_code_gen.m
> --- il_compiler/compiler/ml_code_gen.m 24 Oct 2003 06:17:42 -0000 1.132
> +++ il_compiler/compiler/ml_code_gen.m 3 Dec 2003 11:49:10 -0000
> @@ -980,6 +980,8 @@
> (
> { ImportStatus = imported(_)
> ; pred_info_is_aditi_relation(PredInfo)
> + ; is_unify_or_compare_pred(PredInfo),
> + ImportStatus = external(pseudo_imported)
> }
> ->
This if-then-else needs some comments.
Otherwise this change looks fine.
> +++ tests/hard_coded/external_unification_pred.m 3 Dec 2003 11:49:25 -0000
> + :- pragma foreign_type(c, ft, "int") where equality is unify_ft.
> + :- pragma foreign_type(il, ft, "valuetype [mscorlib]System.Int32")
> + where equality is unify_ft.
BTW, you know that you can declare this as just
:- pragma foreign_type(il, ft, "int32") where equality is unify_ft.
?
P.S. Would be nice to add Java definitions for the foreign code in
this test case, and/or add Mercury definitions so that it works for new
back-ends without any additional effort. But this is not essential.
--
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