[m-dev.] diff: more existential types changes

David Glen JEFFERY dgj at cs.mu.OZ.AU
Thu Jul 1 16:15:24 AEST 1999


On 13-Jun-1999, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Estimated hours taken: 6
> 
> Some more changes to fix test case failures in the existential_types_2
> branch.
> 
> compiler/simplify.m:
> 	Be a bit more careful about when to issue warnings about 
> 	det goals that have no outputs or about goals that always fail.
> 	It was getting a few too many spurious warnings.
> 
> compiler/polymorphism.m:
> 	Add `private_builtin__table_restore_any_ans' and
> 	`private_builtin__table_lookup_insert_enum' to the list of
> 	no_type_info_builtins, i.e. polymorphic procedures for which we
> 	do not pass a type_info since they do not need it.
> 	This helps because it means that table_gen.m doesn't need
> 	to set up a type_info when calling them.
> 
> compiler/table_gen.m:
> 	Insert code to generate appropriate type_infos when calling
> 	polymorphic predicates (i.e. table_lookup_insert_user,
> 	table_lookup_insert_poly, and table_save_any_ans --
> 	but not table_lookup_insert_enum or table_restore_any_ans).
> 
> compiler/modecheck_call.m:
> compiler/unique_modes.m:
> compiler/modes.m:
> compiler/mode_info.m:
> compiler/mode_errors.m:
> 	Fix up the argument numbers in error messages so that they
> 	take the extra type_info arguments into account.
> 
> tests/term/arit_exp.trans_opt_exp:
> tests/term/associative.trans_opt_exp:
> tests/term/pl5_2_2.trans_opt_exp:
> tests/term/vangelder.trans_opt_exp:
> 	Update the expected output for these tests.
> 	My changes to when polymorphism.m is invoked seem to have affected
> 	the intermodule inlining heuristics a bit, and this results in
> 	some additional information in a few of the `.trans_opt' files here.
> 

> Workspace: /home/mercury0/fjh/mercury-other
> Index: compiler/mode_errors.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/mode_errors.m,v
> retrieving revision 1.62
> diff -u -r1.62 mode_errors.m
> --- mode_errors.m	1999/03/12 06:14:15	1.62
> +++ mode_errors.m	1999/06/12 03:07:18
> @@ -888,7 +888,7 @@
>  write_mode_context(call(PredId, ArgNum), Context, ModuleInfo) -->
>  	prog_out__write_context(Context),
>  	io__write_string("  in "),
> -	( { ArgNum = 0 } ->
> +	( { ArgNum =< 0 } ->

That deserves a comment.

> Index: compiler/table_gen.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/table_gen.m,v
> retrieving revision 1.7
> diff -u -r1.7 table_gen.m
> --- table_gen.m	1999/04/20 11:47:50	1.7
> +++ table_gen.m	1999/06/13 08:36:39

I'm not at all familiar with this module, but your changes look OK.


dgj
-- 
David Jeffery (dgj at cs.mu.oz.au) | If your thesis is utterly vacuous
PhD student,                    | Use first-order predicate calculus.
Dept. of Comp. Sci. & Soft. Eng.|     With sufficient formality
The University of Melbourne     |     The sheerist banality
Australia                       | Will be hailed by the critics: "Miraculous!"
                                |     -- Anon.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list