[m-dev.] diff: fixing tests/debugger/implied_instance

Zoltan Somogyi zs at cs.mu.OZ.AU
Sun Apr 25 19:49:46 AEST 1999


The currently installed compiler on hydra, and probably other machines,
gets an internal error for this test case. The reason is that after Simon's
recent changes, the compiler performs higher-order specialization even if
--optimize-higher-order is explicitly turned off (as it is in handle_options.m
when tracing is turned on) if user guided type specialization option is
enabled (as it is by default).

compiler/handle_options.m:
	Turn off user_guided_type_specialization as well as type_specialization
	when tracing is enabled. Without this, tests/debugger/implied_instance
	gets an internal error.

	The cause of the internal error is that higher-order specialization
	creates procedures whose arguments are type infos and typeclass infos
	but does not give them a name. The rough and ready test in the debugger
	therefore does not filter out these variables, and dies because it does
	not understand the variable arity of the constructors of these types.

Zoltan.

cvs diff: Diffing .
Index: handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.73
diff -u -b -u -r1.73 handle_options.m
--- handle_options.m	1999/04/23 01:02:39	1.73
+++ handle_options.m	1999/04/25 11:45:06
@@ -335,6 +335,15 @@
 			globals__io_set_option(optimize_unused_args, bool(no)),
 			globals__io_set_option(optimize_higher_order, bool(no)),
 			globals__io_set_option(type_specialization, bool(no)),
+				% XXX We may remove the disabling of user
+				% guided specialization when the debugger can
+				% to handle typeinfos and typeclassinfos
+				% without looking at their names.
+				% Witout this capability, the debugger gets
+				% an internal error on the implied_instance
+				% test in tests/debugger.
+			globals__io_set_option(user_guided_type_specialization,
+				bool(no)),
 			globals__io_set_option(deforestation, bool(no)),
 			globals__io_set_option(optimize_duplicate_calls,
 				bool(no)),
cvs diff: Diffing notes
--------------------------------------------------------------------------
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