Commit Graph

5970 Commits

Author SHA1 Message Date
Fergus Henderson
270c12e80e Report an error if the first argument of a `some' goal
Estimated hours taken: 0.75

Report an error if the first argument of a `some' goal
is not a list of variables.

compiler/prog_io.m:
compiler/prog_io_util.m:
	Move `parse_list_of_vars' from prog_io.m to prog_io_util.m.

compiler/prog_io_goal.m:
	Check to make sure that the first argument to a some
	goal is a list of variables.  (If not, we don't report
	an error here -- the error will be reported by typecheck.m.)

compiler/typecheck.m:
	Report an proper error message if there is a call to an
	undefined predicate `some/2'.
	Also add `some/2' and `all/2' to the list of language builtins
	for which we report a special error message if they occur as
	undefined function symbols.

tests/invalid/Mmakefile:
tests/invalid/some.m:
tests/invalid/some.err_exp:
	Regression test for the above change.
1998-10-29 14:59:13 +00:00
Fergus Henderson
4240cbc000 Port Mercury to egcs-1.1 on sparc-sun-solaris2.6.
Estimated hours taken: 3

Port Mercury to egcs-1.1 on sparc-sun-solaris2.6.

configure.in:
	When using non-local gotos and egcs on sparc,
	include `-fno-function-cse -fno-gcse' in cflags.

scripts/mgnuc.in:
	Work-around some gcc internal errors for egcs-1.1 on sparc.
1998-10-29 14:10:35 +00:00
Fergus Henderson
61c37766b1 Fix a bug reported by Warwick Harvey <wharvey@cs.monash.edu.au>.
Estimated hours taken: 0.25

Fix a bug reported by Warwick Harvey <wharvey@cs.monash.edu.au>.

scripts/Mmakefile:
	Make sure we delete the installed `mmake' file, if any,
	before (re)installing it, to avoid problems that can occur
	if we overwrite the script while it is still running.
1998-10-29 12:17:41 +00:00
Fergus Henderson
7546e9a81c Test passing typeclass_infos to C code.
Estimated hours taken: 0.75

Test passing typeclass_infos to C code.

tests/hard_coded/typeclasses/existential_type_classes.m:
tests/debugger/existential_type_classes.m:
	Add some code to test passing typeclass_infos to C code.

tests/debugger/existential_type_classes.inp:
	Change the mdb input for this test case so that that
	output will match what happened previously.

tests/hard_coded/typeclasses/existential_type_classes.exp:
tests/debugger/existential_type_classes.exp:
	Modify the expected output for these test cases to reflect
	what mdb now outputs for them.
1998-10-29 10:14:09 +00:00
Fergus Henderson
a448d183d2 Minor improvements to some compiler error messages.
Estimated hours taken: 1

Minor improvements to some compiler error messages.

compiler/modules.m:
	Fix a missing close-quote in an error message.
	Also improve the wording of the message slightly.

compiler/check_typeclass.m:
compiler/typecheck.m:
	Add quotes (`...') in a couple of places

tests/invalid/sub*.err_exp:
tests/invalid/typeclass_test*.err_exp:
	Update to reflect the new error messages.

tests/invalid/Mmakefile:
	Delete an obsolete comment about a poor error message.
1998-10-29 09:25:45 +00:00
Fergus Henderson
a30437fd21 Minor improvements to some compiler error messages.
Estimated hours taken: 1

Minor improvements to some compiler error messages.

compiler/modules.m:
	Fix a missing close-quote in an error message.
	Also improve the wording of the message slightly.

compiler/check_typeclass.m:
compiler/typecheck.m:
	Add quotes (`...') in a couple of places

tests/invalid/sub*.err_exp:
tests/invalid/typeclass_test*.err_exp:
	Update to reflect the new error messages.

tests/invalid/Mmakefile:
	Delete an obsolete comment about a poor error message.
1998-10-29 09:20:00 +00:00
Fergus Henderson
c19ad08e38 Fix a typo in a previous change of mine: I had
Estimated hours taken: 0.1

tests/invalid/Mmakefile:
	Fix a typo in a previous change of mine: I had
	accidentally added `uu_type' instead of `uu_type.m'
	to the list of source files.
1998-10-29 09:16:43 +00:00
Fergus Henderson
a593e51f63 Change the syntax for existential type class constraints to use
Estimated hours taken: 1

Change the syntax for existential type class constraints to use
`=>' instead of `&'.

We eventually decided that `=>' was better, even though semantically
speaking it's more like conjunction than implication, because of the
symmetry with `<=' for universal type class constraints, and because
the precedence of `=>' matches what we want.
[However, the associativity might not.]

compiler/prog_io.m:
	Update the code that parses existential type class constraints.

compiler/mercury_to_mercury.m:
	Update the code that prints existential type class constraints.

tests/hard_coded/typeclasses/existential_type_classes.m:
tests/debugger/existential_type_classes.m:
	Update the test case that tests existential type class constraints.
	Also add a test of passing typeclass_infos to C code.
1998-10-29 08:53:49 +00:00
Fergus Henderson
6b610a7444 Fix a bug where type errors were causing spurious mode errors,
Estimated hours taken: 6

Fix a bug where type errors were causing spurious mode errors,

compiler/post_typecheck.m:
	Add new predicate post_typecheck__ill_typed_pred,
	which just module-qualifies the pred declaration for that pred.
	This is necessary to avoid spurious mode errors in predicates
	that call the ill-typed pred.

compiler/typecheck.m:
	Call post_typecheck__ill_typed_pred on ill-typed predicates
	before calling module_info_remove_pred.  We need to call it
	here because later passes won't process the pred once it
	has been removed.

tests/invalid/Mmakefile:
tests/invalid/spurious_mode_error.m:
tests/invalid/spurious_mode_error.err_exp:
	Regression test for the above-mentioned bug.
1998-10-29 03:55:28 +00:00
Thomas Conway
98576713ce Change the coefficients for the linear-congruential generator.
Estimated hours taken: 0.1

library/random.m:
	Change the coefficients for the linear-congruential generator.
	They now assume only 31 bits (unsigned) rather than 32. This
	should prevent the defective behaviour reported on the
	mercury-users mailing list.
1998-10-28 23:18:42 +00:00
Fergus Henderson
581bc059b3 Move the uu_type' test case from the warnings' directory
Estimated hours taken: 0.25

tests/warnings/Mmakefile:
tests/warnings/uu_type.m:
tests/warnings/uu_type.exp:
tests/invalid/Mmakefile:
tests/invalid/uu_type.m:
tests/invalid/uu_type.err_exp:
	Move the `uu_type' test case from the `warnings' directory
	to the `invalid' directory, since the compiler reports an
	error rather than a warning.  This also fixes a problem where
	the hard-coded rule for `uu_type.err' in tests/warnings/Mmakefile
	broke things (e.g. it broke `tools/bootcheck --use-subdirs').
1998-10-28 09:49:34 +00:00
Fergus Henderson
d4764e649e A minor change to a comment (use the new syntax for pragma
Estimated hours taken: 0.1

compiler/hlds_module.m:
	A minor change to a comment (use the new syntax for pragma
	rather than the many-years-old syntax).
1998-10-28 09:28:01 +00:00
Fergus Henderson
1abfe12072 Fix a number of places where there were the wrong
Estimated hours taken: 0.1

tests/general/string_format_test.m:
	Fix a number of places where there were the wrong
	number of arguments in the list passed to string__format.
	These needed to be fixed now that string__format is
	more picky about rejecting those sort of errors.
1998-10-28 08:56:08 +00:00
Fergus Henderson
77cda6dabc Fix a bug which had crept in which meant that you needed to have `info'
Estimated hours taken: 0.25

Fix a bug which had crept in which meant that you needed to have `info'
installed in order to build from the source distribution.

Mmakefile:
	In the rule for `mmake tar', make doc/mdb_doc.

Index: Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/Mmakefile,v
retrieving revision 1.26
diff -u -r1.26 Mmakefile
--- Mmakefile	1998/10/22 05:22:07	1.26
+++ Mmakefile	1998/10/28 08:39:39
@@ -212,7 +212,7 @@
 	cd compiler && $(SUBDIR_MMAKE) cs tags
 	cd profiler && $(SUBDIR_MMAKE) depend
 	cd profiler && $(SUBDIR_MMAKE) cs tags
-	cd doc && $(SUBDIR_MMAKE) info html dvi
+	cd doc && $(SUBDIR_MMAKE) info html dvi mdb_doc
 	cd bindist && $(SUBDIR_MMAKE) bindist.configure
 	# the following command might fail on Windows?
 	-cd bindist && $(SUBDIR_MMAKE) bindist.build_vars
1998-10-28 08:43:31 +00:00
Fergus Henderson
43fb66fe39 Don't pass `-Wcast-qual' to gcc, since it results in too many
Estimated hours taken: 0.25

compiler/mercury_compile.m:
	Don't pass `-Wcast-qual' to gcc, since it results in too many
	spurious warnings.
1998-10-28 07:35:26 +00:00
Fergus Henderson
ae0fbcbe70 Warn about modules with no exports when compiling,
Estimated hours taken: 1

compiler/modules.m:
compiler/mercury_compile.m:
	Warn about modules with no exports when compiling,
	not just when making interfaces.  Previous it would
	only issue this warning when doing `mmc --make-int',
	not when doing `mmc --compile-to-c'.

tests/invalid/Mmakefile:
tests/invalid/no_exports.err_exp:
	Enable the already-existing test case for this.
1998-10-28 06:15:21 +00:00
Fergus Henderson
fc6418d3f4 Delete an unecessary declaration of `io__print'.
Estimated hours taken: 0.1

util/mkinit.c:
	Delete an unecessary declaration of `io__print'.
1998-10-28 05:54:18 +00:00
Fergus Henderson
2a6d1d3d6e Document the meaning of the "Can fail?" column in the
Estimated hours taken: 0.5

doc/reference_manual.texi:
	Document the meaning of the "Can fail?" column in the
	determinism table more clearly.
1998-10-28 05:41:35 +00:00
Fergus Henderson
792a5582d3 Fix a cut-and-paste error in the comment for map__det_union where
Estimated hours taken: 1

library/map.m:
	Fix a cut-and-paste error in the comment for map__det_union where
	it was referring to map__insert instead map__union.
	Delete the error message argument from map__det_union
	and map__det_insert, for consistency with other det_* predicates,
	and to make them easier to use.
1998-10-28 05:33:32 +00:00
Fergus Henderson
3d51ffb3f2 Fix a couple of missing end-quotes.
Estimated hours taken: 0.1

doc/mdb_categories:
	Fix a couple of missing end-quotes.
1998-10-28 05:31:43 +00:00
Zoltan Somogyi
e196f28971 Improve the debugger's handling of compiler-generated and inter-module-inlined
Estimated hours taken: 3

Improve the debugger's handling of compiler-generated and inter-module-inlined
procedures.

compiler/stack_layout.m:
	Update a comment.

runtime/mercury_stack_layout.h:
	Introduce provisions for dealing with the procedure id section
	of the layout structures of compiler-generated procedures.

runtime/mercury_stack_trace.c:
	Use the new provisions to generalize the function that prints out
	procedure ids for both stack traces and the debugger, so that it now
	works for both user-written and compiler-generated procedure, and
	prints out the extra info needed for a full identification in cases
	where the defining and declaring modules are not the same. (This can
	happen due to intermodule inlining, or the generation of local
	unification procedures for imported types.)

trace/mercury_trace_tables.c:
	Update the code to conform to the changes in mercury_stack_layout.h.
	We still collect layout info only from user-written procedures,
	which means you can put breakpoints on only user-written procedures.

	Putting break-points on compiler-generated procedures would be
	unnecessary, even in the case of user-defined equality.

trace/mercury_trace_external.c:
	Update the code to conform to the changes in mercury_stack_layout.h,
	and add comments asking Erwan to eventually either generalize his code
	or explicitly restrict it to user-defined procedures.
1998-10-28 05:24:20 +00:00
Fergus Henderson
c7059d0b5d Update to reflect the current status of the HPUX port.
Estimated hours taken: 0.1

README.HPUX:
	Update to reflect the current status of the HPUX port.
1998-10-28 04:22:06 +00:00
David Overton
2ec641b797 Fix a bug with quoting of module-qualified terms in .opt files.
Estimated hours taken: 0.5

Fix a bug with quoting of module-qualified terms in .opt files.
Add a test case for this bug.

compiler/hlds_out.m:
	Add a version of `hlds_out__write_functor' which has a
	`needs_quotes' argument.  Call this new predicate from
	`hlds_out__write_qualified_functor' to ensure that functors
	are properly quoted after the `:'.

compiler/mercury_to_mercury.m:
	Export `mercury_output_term/6' so it can be called by
	`hlds_out__write_functor/7'.

tests/valid/Mmakefile:
	Add the new test case.

tests/valid/intermod_quote.m:
tests/valid/intermod_quote2.m:
	New test case for this bug.
1998-10-28 01:52:03 +00:00
Fergus Henderson
3503af80c6 Fix a portability problem: on alphas, it was using `end',
Estimated hours taken: 0.25

boehm_gc/config.h:
	Fix a portability problem: on alphas, it was using `end',
	which is undefined if you link with `cc -std1'.  I changed
	it to use `_end', which is always defined.
1998-10-27 23:18:31 +00:00
Fergus Henderson
bb4e177558 Fix a portability problem: on HPUX systems, with egcs as
Estimated hours taken: 0.25

boehm_gc/config.h:
	Fix a portability problem: on HPUX systems, with egcs as
	the C compiler, the test for HPUX wasn't working, because
	egcs doesn't define `_PA_RISC1_0' or `_PA_RISC1_1'.
	I changed it to also check for `hppa' and `__hppa__',
	which egcs does define.
1998-10-27 23:16:41 +00:00
Fergus Henderson
2f16eb26d9 Fix a bug where the compiler was generating incorrect code for
Estimated hours taken: 3

Fix a bug where the compiler was generating incorrect code for
list__reverse_2/3 if the `--typeinfo-liveness' option was set
(e.g. for `--gc accurate').

compiler/handle_options.m:
	Make `--typeinfo-liveness' disable middle recursion optimization,
	and add a comment explaining why.
1998-10-27 20:48:14 +00:00
Fergus Henderson
622dc00079 Some minor source cleanups.
Estimated hours taken: 0.25

Some minor source cleanups.

runtime/mercury_stacks.h:
	Add some missing parentheses to various macro definitions,
	so that they give the correct results even if the argument
	is a complicated expression rather than just a single variable.
	Also fix the layout in a few places by adding whitespace
	around operators.
1998-10-27 16:32:16 +00:00
Fergus Henderson
674d66cbad Fix a bug in string__format: it was not reporting an error
Estimated hours taken: 0.75

library/string.m:
	Fix a bug in string__format: it was not reporting an error
	in the case where the argument list had more elements
	than was appropriate for the format string.

tests/general/Mmakefile:
tests/general/string_format_test_2.m:
tests/general/string_format_test_2.exp:
tests/general/string_format_test_3.m:
tests/general/string_format_test_3.exp:
	Test cases for the above-mentioned bug fix.
1998-10-27 15:36:42 +00:00
Peter Ross
5e0a5c067e Update the file.
Estimated hours taken: 0.1

.cvsignore:
    Update the file.
1998-10-26 04:11:33 +00:00
Peter Ross
c6b2167e0a Update the file.
Estimated hours taken: 0.1

.cvsignore:
    Update the file.
1998-10-26 03:50:33 +00:00
Peter Ross
a2932ad59c Ignore all the automatically generated files.
Estimated hours taken: 0.1

browser/.cvsignore:
    Ignore all the automatically generated files.
1998-10-26 03:43:10 +00:00
Bert Thompson
eee1996975 Add a simple term browser for use by the trace-based debugger.
Estimated hours taken: 40

Add a simple term browser for use by the trace-based debugger.

This is minimal but useful browser. Not included in this version
are a scripting language, Windows Explorer-style tree expansion,
and other features not yet thought of.

N.B. This still needs to be hooked into the debugger.

browser/Mmakefile:
	Added target browse_test.

browser/browser_library.m:
	Added modules required for the browser.

browser/browse_test.m:
	A simple driver for the browser with an example
	data structure to browse. (new file)

browser/browse.m:
	The browser proper. (new file)

browser/parse.m:
	Parser for browser's command language. (new file)

browser/util.m:
	Miscellaneous utilities used in the browser code. (new file)

browser/frame.m:
	Bare minimal ASCII graphics frames. (new file)
1998-10-25 07:16:41 +00:00
Tyson Dowd
197ac9b879 Document that you should use --shared, not just --mercury-libs
Estimated hours taken: 0.5

README.Linux:
        Document that you should use --shared, not just --mercury-libs
	shared, if you want to link statically against other
	libraries.
1998-10-24 04:53:12 +00:00
Fergus Henderson
d6b09da3aa Fix a bug which caused an internal compiler error for disjunctions
Estimated hours taken: 6

Fix a bug which caused an internal compiler error for disjunctions
in single-solution contexts with e.g. the first two disjuncts `det'
and third disjunct `cc_multi'.

compiler/det_analysis.m:
	In det_infer_disj, replace `at_most_many' with `at_most_many_cc'
	if in a single-solution context.  This is also done by det_infer_goal,
	but it needs to be done here too, to avoid calling error/1 in
	det_disjunction_maxsoln.

tests/hard_coded/Mmakefile:
tests/hard_coded/cc_multi_bug.m:
tests/hard_coded/cc_multi_bug.exp:
	Test case for the above-mentioned bug.
1998-10-23 18:40:43 +00:00
Fergus Henderson
17118fb52a Fix a bug which caused an internal compiler error for disjunctions
Estimated hours taken: 6

Fix a bug which caused an internal compiler error for disjunctions
in single-solution contexts with e.g. the first two disjuncts `det'
and third disjunct `cc_multi'.

compiler/det_analysis.m:
	In det_infer_disj, replace `at_most_many' with `at_most_many_cc'
	if in a single-solution context.  This is also done by det_infer_goal,
	but it needs to be done here too, to avoid calling error/1 in
	det_disjunction_maxsoln.

tests/hard_coded/Mmakefile:
tests/hard_coded/cc_multi_bug.m:
tests/hard_coded/cc_multi_bug.exp:
	Test case for the above-mentioned bug.
1998-10-23 18:40:39 +00:00
Fergus Henderson
1ba323194c Link the profiler with the trace' and browser' libraries.
Estimated hours taken: 0.25

profiler/Mmakefile:
	Link the profiler with the `trace' and `browser' libraries.
	This is needed in case you try to build the profiler
	with debugging enabled.
1998-10-23 17:53:38 +00:00
Zoltan Somogyi
beaa554171 Extend the layout scheme to handle typeinfos inside typeclass infos,
Estimated hours taken: 16

Extend the layout scheme to handle typeinfos inside typeclass infos,
and thus enable the debugger (and later native gc) to work with programs
that use type classes and existential types.

compiler/llds.m:
	Change the data structure that holds information about the locations
	of the typeinfo variables of the tvars active at call return sites
	from set(pair(tvar, lval)) to map(tvar, set(layout_locn)).

	The change from set to map avoids the possibility of inadvertently
	duplicating the info for a give type variable.

	The change to explicitly keep a set of locations in which the typeinfo
	var may be found allows us to use set intersection on those sets if
	(a) the program point may be reached via more than one path, and
	(b) not all paths have the same sets. Both of these can happen in
	programs that use type classes.

	The change from lval to layout_locn (which encodes either an lval,
	or an lval representing a typeclass info and an (indirect) offset
	inside that typeclass info) is necessary support programs with
	type classes.

compiler/continuation_info.m:
	Change the data structure that holds information about the locations
	of the typeinfo variables of the tvars active at a particular program
	point the same way and for the same reasons as in llds.m.

	Take set intersections of typeinfo var locations whenever we find
	multiple live variable info records for the same label.

compiler/call_gen.m:
	Delay the construction of the return live variable information
	until the code generator state has been updated to reflect where
	things will be on return, instead of trying to cobble up this
	info into the code generator state that reflects the point just
	before the call. Apart from being cleaner, this is necessary
	to avoid compiler aborts for programs that use existential types.
	The old compiler could not find the typeinfos of any existentially
	quantified type vars, since they do not exist before the call.

compiler/code_info.m:
	Rewrite and generalize the code for generating live value information.

compiler/trace.m:
	Remove the specialized code for generating live value information;
	call code_info instead.

compiler/stack_layout.m:
	Pick one of several possible locations for a typeinfo var.

	Generate the new indirect layout location descriptions.

	Reduce the number of tag bits used to describe different kinds of
	lvals, to leave more room for the indirect information.

compiler/*.m:
	Conform to the above data structure changes.

compiler/hlds_pred.m:
	Clarify the documentation of type_info_locn.

runtime/mercury_stack_layout.h:
	Update the section that deals with MR_Live_Lval to take
	indirect typeinfo locations into account.

runtime/mercury_layout_util.c:
	Handle indirect typeinfo locations when interpreting layout structures.

runtime/mercury_layout_util.c:
trace/mercury_trace_internal.c:
	Ignore variables whose names start with TypeClassInfo.

runtime/mercury_accurate_gc.c:
runtime/mercury_agc_debug.c:
	Add markers to remind Tyson to handle indirect typeinfo locations.

tests/debugger/implied_instance.{m,inp,exp}:
tests/debugger/multi_paramster.{m,inp,exp}:
tests/debugger/existential_type_classes.{m,inp,exp}:
	Copies of the tests in tests/hard_coded/typeclasses, modified to
	avoid or delay I/O, so that the calls to I/O preds that may or may
	not be traced to do not affect the output.

tests/debugger/Mmakefile:
	Add the new test cases.

	Remove references to the *_lib variants of the old test cases.
	They are not necessary if I/O is delayed until after the last
	reported trace event.

tests/hard_coded/typeclasses/Mmakefile:
	Remove --trace deep from existential_type_classes, since that
	aspect of the test case is now covered in the debugger directory.
1998-10-23 00:42:02 +00:00
Zoltan Somogyi
6b9583eb74 Extend the layout scheme to handle typeinfos inside typeclass infos,
Estimated hours taken: 16

Extend the layout scheme to handle typeinfos inside typeclass infos,
and thus enable the debugger (and later native gc) to work with programs
that use type classes and existential types.

compiler/llds.m:
	Change the data structure that holds information about the locations
	of the typeinfo variables of the tvars active at call return sites
	from set(pair(tvar, lval)) to map(tvar, set(layout_locn)).

	The change from set to map avoids the possibility of inadvertently
	duplicating the info for a give type variable.

	The change to explicitly keep a set of locations in which the typeinfo
	var may be found allows us to use set intersection on those sets if
	(a) the program point may be reached via more than one path, and
	(b) not all paths have the same sets. Both of these can happen in
	programs that use type classes.

	The change from lval to layout_locn (which encodes either an lval,
	or an lval representing a typeclass info and an (indirect) offset
	inside that typeclass info) is necessary support programs with
	type classes.

compiler/continuation_info.m:
	Change the data structure that holds information about the locations
	of the typeinfo variables of the tvars active at a particular program
	point the same way and for the same reasons as in llds.m.

	Take set intersections of typeinfo var locations whenever we find
	multiple live variable info records for the same label.

compiler/call_gen.m:
	Delay the construction of the return live variable information
	until the code generator state has been updated to reflect where
	things will be on return, instead of trying to cobble up this
	info into the code generator state that reflects the point just
	before the call. Apart from being cleaner, this is necessary
	to avoid compiler aborts for programs that use existential types.
	The old compiler could not find the typeinfos of any existentially
	quantified type vars, since they do not exist before the call.

compiler/code_info.m:
	Rewrite and generalize the code for generating live value information.

compiler/trace.m:
	Remove the specialized code for generating live value information;
	call code_info instead.

compiler/stack_layout.m:
	Pick one of several possible locations for a typeinfo var.

	Generate the new indirect layout location descriptions.

	Reduce the number of tag bits used to describe different kinds of
	lvals, to leave more room for the indirect information.

compiler/*.m:
	Conform to the above data structure changes.

compiler/hlds_pred.m:
	Clarify the documentation of type_info_locn.

runtime/mercury_stack_layout.h:
	Update the section that deals with MR_Live_Lval to take
	indirect typeinfo locations into account.

runtime/mercury_layout_util.c:
	Handle indirect typeinfo locations when interpreting layout structures.

runtime/mercury_layout_util.c:
trace/mercury_trace_internal.c:
	Ignore variables whose names start with TypeClassInfo.

runtime/mercury_accurate_gc.c:
runtime/mercury_agc_debug.c:
	Add markers to remind Tyson to handle indirect typeinfo locations.

tests/debugger/implied_instance.{m,inp,exp}:
tests/debugger/multi_paramster.{m,inp,exp}:
tests/debugger/existential_type_classes.{m,inp,exp}:
	Copies of the tests in tests/hard_coded/typeclasses, modified to
	avoid or delay I/O, so that the calls to I/O preds that may or may
	not be traced to do not affect the output.

tests/debugger/Mmakefile:
	Add the new test cases.

	Remove references to the *_lib variants of the old test cases.
	They are not necessary if I/O is delayed until after the last
	reported trace event.

tests/hard_coded/typeclasses/Mmakefile:
	Remove --trace deep from existential_type_classes, since that
	aspect of the test case is now covered in the debugger directory.
1998-10-23 00:41:48 +00:00
David Overton
1051bc1164 Fix browser dependencies.
Estimated hours taken: 0.1

Mmakefile:
	Fix browser dependencies.
1998-10-22 05:22:07 +00:00
Fergus Henderson
ddd6b03c5a Fix a bug: when printing help on the "help" command,
Estimated hours taken: 2

trace/mercury_trace_internal.c:
	Fix a bug: when printing help on the "help" command,
	look it up in the "help" category, not the "misc" category.
	This avoids an mdb internal error for a command such as
	"help help help help".
1998-10-20 23:24:32 +00:00
Fergus Henderson
6d88f700a7 Fix a couple of bugs related to pruning of impure goals with no output
Estimated hours taken: 1.5

Fix a couple of bugs related to pruning of impure goals with no output
variables.

compiler/det_analysis.m:
	Fix a bug: the compiler was automatically inserting pruning
	across impure goals with no output variables.  That should
	happen only for pure or semipure goals.  To prevent pruning
	in those cases, I changed it so that impure goals with no
	output variables are not considered single-solution contexts.

doc/reference_manual.texi:
	Document the above-mentioned change.

compiler/clause_to_proc.m:
	Fix a bug: when converting a bunch of clauses into a disjunction,
	clause_to_proc.m was not computing the proper purity annotation
	on the goal_info for the disjunction.

tests/hard_coded/Mmakefile:
tests/hard_coded/impure_prune.m:
tests/hard_coded/impure_prune.exp:
	A test case for the above-mentioned changes to det_analysis.m
	and clause_to_proc.m.
1998-10-20 15:07:07 +00:00
Zoltan Somogyi
dbe7ccc6db Use map (and thus tree234) instead of bintree_set to represent
Estimated hours taken: 2

compiler/llds_out.m:
	Use map (and thus tree234) instead of bintree_set to represent
	the set of things declared so far. With --trace deep, the binary
	trees of items were almost always sticks. This change reduces
	the time spent in writing out typecheck.c with --trace deep
	from 58 seconds to 15 seconds on cyclone.

	The alternative solution, using set_bbbtree, requires about
	half a second more, because it allocates a bit more memory
	(930 Kb vs 890 Kb for map, even though the map has a dummy value).
1998-10-20 11:57:37 +00:00
Zoltan Somogyi
a95c389e8d Add some predicates that may be generally useful.
Estimated hours taken: 2

library/map.m:
	Add some predicates that may be generally useful. Some of them
	are needed in a near-future change to the compiler.

NEWS:
	Mention the new predicates.
1998-10-20 02:02:29 +00:00
Zoltan Somogyi
e8a36e3af4 Remove some obsolete stuff.
Estimated hours taken: 0.01

NEWS:
	Remove some obsolete stuff.
1998-10-20 01:54:30 +00:00
Fergus Henderson
b299150935 Fix a bug where the debugger was unable to find the `mdbrc' script,
Estimated hours taken: 0.75

Fix a bug where the debugger was unable to find the `mdbrc' script,
since it had been installed into the wrong directory.

Mmake.common.in:
doc/Mmakefile:
	Rename the `INSTALL_DOC_DIR' variable and `install_doc' targets
	as `INSTALL_MDB_DOC_DIR' and `install_mdb_doc', to more accurately
	reflect their function.
	Change the value of the INSTALL_MDB_DOC_DIR so that it installs
	into lib/mercury/mdb instead of lib/mercury/doc, because (a)
	the documentation is in `mdb script' format, which is not really
	suitable as an end-user documentation format, and (b) that
	is where the debugger expected it to be.
1998-10-19 14:39:35 +00:00
Peter Ross
72fad28243 Remove an invalid XXX comment.
Estimated hours taken: 0.1

compiler/llds_out.m:
    Remove an invalid XXX comment.
1998-10-19 04:08:40 +00:00
Peter Ross
12c8ec2693 Changes required to get the samples directory to compile using lcc in
Estimated hours taken: 60

Changes required to get the samples directory to compile using lcc in
the grade `none.gc'.

compiler/llds_out.m:
    Add a pass to make sure that the constants are all declared (with
    a complete type) before they are initialised.  We can't just
    forward declare each constant immediately before it is used in an
    initializer, as was done previously, because at that point we don't
    know the type of the constant, and ANSI C doesn't allow forward
    declarations of static variables with incomplete types.

    Also change data_ptr to type (Word *).  This is because (Word *) is
    a superset of (const Word *) and it is a non-trivial task to get the
    consts output in the correct places.  Hopefully consts will be
    output when I get the compiler to bootstrap using lcc.

scripts/mgnuc.in:
    Don't warn about casts which remove the const. ie (const char *) to
    (char *)

runtime/mercury_string.h:
    Get rid of a cast.

runtime/mercury_tags.h:
    Get rid of some of the const casts.

util/mkinit.c:
    Make mkinit compile using lcc.
1998-10-19 01:24:20 +00:00
Zoltan Somogyi
d3e3b716f3 Fix a trivial bug: the previous change commented out --use-trail
Estimated hours taken: 0.1

compiler/options:
	Fix a trivial bug: the previous change commented out --use-trail
	instead of --stack-trace.
1998-10-18 07:11:37 +00:00
Zoltan Somogyi
2ad286823d Fix silly mistake: s:$(INSTALL_LIBDIR/mdb):$(INSTALL_LIBDIR)/mdb:
Estimated hours taken: 0.1

scripts/Mmakefile:
	Fix silly mistake: s:$(INSTALL_LIBDIR/mdb):$(INSTALL_LIBDIR)/mdb:
1998-10-17 06:14:25 +00:00
Zoltan Somogyi
aa38c56951 When printing the typeclass info map, put % before each line,
Estimated hours taken: 0.1

compiler/hlds_out.m:
	When printing the typeclass info map, put % before each line,
	since such lines are not code.
1998-10-16 10:37:29 +00:00