Commit Graph

6223 Commits

Author SHA1 Message Date
Fergus Henderson
3f81c08fad Check for cygwin' as well as cygwin32', since
Estimated hours taken: 0.1

scripts/ml.in:
	Check for `cygwin' as well as `cygwin32', since
	Cygwin32 has been renamed as Cygwin now.
1999-02-20 15:30:42 +00:00
Peter Ross
51497341cc Add the DPPD (dozens of problems in partial deduction) suite to the
Estimated hours taken: 0.1

Add the DPPD (dozens of problems in partial deduction) suite to the
tests directory.
1999-02-20 11:34:42 +00:00
Mark Brown
f31b6bf9ed Fix some warnings about incompatible pointer types.
Estimated hours taken: 0.2

runtime/mercury_stack_trace.h:
runtime/mercury_stack_trace.c:
	Fix some warnings about incompatible pointer types.
1999-02-20 06:58:07 +00:00
Mark Brown
0a3b4958c1 Pass around event information for the tracing system in an
Estimated hours taken: 6

Pass around event information for the tracing system in an
MR_Event_Info struct instead of passing each item as a separate
argument.  Use Unsigned consistently for the type of the call
depth and call sequence number.

trace/mercury_trace.h:
	Add the new MR_Event_Info structure.

trace/mercury_trace.{c,h}:
trace/mercury_trace_declarative.{c,h}:
trace/mercury_trace_external.{c,h}:
trace/mercury_trace_internal.{c,h}:
	Use the new structure.

runtime/mercury_trace_base.c:
	Use Unsigned as the type of the call depth and sequence number.
1999-02-20 06:08:19 +00:00
Fergus Henderson
886f4f6d62 Fix some off-by-one errors in the code examples
Estimated hours taken: 0.1

doc/reference_manual.texi:
	Fix some off-by-one errors in the code examples
	for the use of nondet `pragma c_code'.
	Thanks to Juergen Stuber <juergen@mpi-sb.mpg.de>
	for pointing out the errors.
1999-02-19 23:39:35 +00:00
Fergus Henderson
acb892f343 Reword a few things, as suggested by dgj's review of my recent change.
Estimated hours taken: 0.25

doc/reference_manual.texi:
	Reword a few things, as suggested by dgj's review of my recent change.
	Also mention that the typeclass constraints on an abstract instance
	declaration must exactly match those on the corresponding definition.
1999-02-19 23:33:15 +00:00
Fergus Henderson
bf76f85e9a Use more meaningful variable names,
Estimated hours taken: 0.1

compiler/make_hlds.m:
	Use more meaningful variable names,
	as suggested by dgj's review of my previous change.
1999-02-19 19:47:33 +00:00
Erwan Jahier
b9c523e041 Add a pred_or_func attribute to the Mercury event for the external debugger
Estimated hours taken: 1

Add a pred_or_func attribute to the Mercury event for the external debugger
that indicates if the current procedure is a function or a predicate.


browser/debugger_interface.m:
trace/mercury_trace_external.c:
	Add a slot in MR_found_match() and MR_output_current_slots() for the
	pred_or_func attribute.


runtime/mercury_stack_layout.h.
	Add a comment to say that The MR_PredFunc enummeration should EXACTLY
	match the definition of the `pred_or_func' type in
	browser/debugger_interface.
1999-02-19 16:17:50 +00:00
Erwan Jahier
048016ba14 Fix a bug in the external debugger. The execution was crashing during the
Estimated hours taken: 3

Fix a bug in the external debugger. The execution was crashing during the
printing of polymorphic arguments. In runtime/mercury_layout_util.c,
MR_get_type_filtered() and MR_get_type_and_value_filtered() were calling
MR_get_type() and MR_get_type_and_value() without type_info information (third
argument set to NULL), which is needed to retrieve polymorphic types.


runtime/mercury_layout_util.[ch]:
	Pass down type_info in argument of MR_get_type_and_value_filtered() and
	MR_get_type_filtered() to be able to call MR_get_type_and_value() and
	MR_get_type() with type_info information.

runtime/mercury_layout_util.c
	Filter out variables which names begin by "TypeClassInfo" in
	MR_get_type_and_value_filtered() (as it was already done in
	MR_get_type_filtered()).

runtime/mercury_layout_util.c
trace/mercury_trace_external.c:
	In a few functions, do not try to retrieve information about live
	variables if it does not exist any.

trace/mercury_trace_external.c:
	Pass type_info in argument of MR_get_type_and_value_filtered()
	and MR_get_type_filtered().

	Filter out in MR_trace_make_var_names_list() the variable names
	that are also filtered in MR_get_type_and_value_filtered().
1999-02-19 16:11:48 +00:00
Erwan Jahier
9760975d5e This change implement stack dump commands for the external debugger.
Estimated hours taken: 7

This change implement stack dump commands for the external debugger.

The MR_dump_stack_record_print() defined in runtime/mercury_stack_trace.c is
the function that prints the contents of the stack. We move the definition of
this function to mercury_trace_internal.c and we pass down that function as a
parameter of MR_dump_stack_from_layout(). The rational for this change is that
we can then define a new MR_dump_stack_record_print_to_socket() in
mercury_trace_external.c that prints the data to the socket as a Prolog term
and pass down the address of that new function to MR_dump_stack_from_layout().


browser/debugger_interface.m:
	Add three new kinds of requests: stack, nondet_stack and stack_regs.

trace/mercury_trace_external.c:
	Define new MR_dump_stack_record_print_to_socket() and
	MR_print_proc_id_to_socket() that sends data to the socket as Prolog
	terms.

	Add support for stack, nondet stack and stack_regs requests.

runtime/mercury_stack_trace.[ch]
trace/mercury_trace.[ch]:
trace/mercury_trace_internal.[ch]:
	Move the definition of MR_dump_stack_record_print(),
	from mercury_stack_trace.c to mercury_trace_internal.c.

	Add MR_dump_stack_record_print() as an argument of all the
	functions that need it in mercury_stack_trace.c.

	Move the definition of detism_names[] from mercury_stack_trace.c
	to mercury_trace.c. This function is needed by both versions of
	MR_dump_stack_record_print(). Rename detism_names[] by
	MR_detism_names[].

runtime/mercury_stack_trace.[ch]
trace/mercury_trace_tables.[ch]:
	Move the definition of MR_print_proc_id() and
	MR_print_proc_id_for_debugger() from mercury_stack_trace.c to
	mercury_trace_tables.c since MR_print_proc_id() is called in that
	module.

	Include mercury_trace.h since we now make use of detism_names[] there.
1999-02-18 23:33:02 +00:00
Zoltan Somogyi
8b849ce534 Spell crs's name right.
Estimated hours taken: 0.01

doc/reference_manual.texi:
	Spell crs's name right.
1999-02-18 08:03:14 +00:00
Fergus Henderson
98b4e25207 Add various people to the authors list, since they have all made
Estimated hours taken: 0.25

doc/reference_manual.texi:
	Add various people to the authors list, since they have all made
	substantial contributions: Peter Schachte (impurity),
	Simon Taylor (module qualifications & use_module,
	Aditi compilation, and [soon] type specialization),
	and Chris Spiers (termination analysis).
1999-02-18 07:59:05 +00:00
Zoltan Somogyi
32cced660a Allow HLDS dumps to contain references to the pointers used by tabling.
Estimated hours taken: 0.5

Allow HLDS dumps to contain references to the pointers used by tabling.
Without this chance, HLDS dumps can abort on modules containing tabled
procedures.

compiler/hlds_out.m:
	Allow HLDS dumps to contain references to the pointers used by tabling.
	This requires adding an extra argument to an exported procedure.

compiler/mode_errors.m:
compiler/typecheck.m:
	Pass the extra argument that exported procedure.
1999-02-18 03:48:47 +00:00
Fergus Henderson
1f535128ae Fix a bug with the handling of instance declarations with no methods.
Estimated hours taken: 0.5

Fix a bug with the handling of instance declarations with no methods.

compiler/check_typeclass.m:
	Ensure that the MaybePredProcs field of the HLDS instance definition
	for instance definitions with no methods is set to `yes([])' rather
	than `no' -- the latter would indicate that this pass hasn't been
	run yet.
1999-02-15 07:13:22 +00:00
Fergus Henderson
39e15e87d7 Implement abstract instance declarations.
Estimated hours taken: 0.25

Implement abstract instance declarations.
(I forgot to commit changes to these two files as part of my last commit.)

compiler/mercury_to_mercury.m:
compiler/module_qual.m:
	Change the code to reflect the new name and representation
	of `instance_interface'.
1999-02-14 13:02:37 +00:00
Fergus Henderson
001e0fd1e7 Add support for FreeBSD (patch thanks to
Estimated hours taken: 0.1

boehm_gc/mach_dep.c:
	Add support for FreeBSD (patch thanks to
	Marko Schuetz <marko@ki.informatik.uni-frankfurt.de>).
1999-02-12 08:08:04 +00:00
Fergus Henderson
758acb5a5a Implement abstract instance declarations.
Estimated hours taken: 9

Implement abstract instance declarations.

compiler/prog_data.m:
	Rename the `instance_interface' type as `instance_body',
	and make it a discriminated union: either `abstract',
	or `concrete(Methods)'.

compiler/prog_io_typeclass.m:
compiler/hlds_data.m:
compiler/hlds_out.m:
compiler/equiv_type.m:
compiler/check_typeclass.m:
	Change the code to reflect the new name and representation
	of `instance_interface'.

compiler/prog_io_typeclass.m:
	Parse abstract instance declarations.

compiler/make_hlds.m:
	Clean up the code a bit, and make sure that it detects some errors
	which previously we didn't detect: duplicate or overlapping
	instance declarations, and instance declarations with methods for
	classes with no methods.

compiler/check_typeclass.m:
	If an instance is abstract, then we don't need to check
	that the methods in the instance body match those in the class.

compiler/base_typeclass_info.m:
	Only generate base_typeclass_infos for concrete instance
	declarations, not for abstract ones.

doc/reference_manual.texi:
	Document the change.

tests/hard_coded/typeclasses/Mmakefile:
tests/hard_coded/typeclasses/abstract_instance.m:
tests/hard_coded/typeclasses/use_abstract_instance.m:
tests/hard_coded/typeclasses/use_abstract_instance.exp:
tests/invalid/Mmakefile:
tests/invalid/typeclass_test_9.m:
tests/invalid/typeclass_test_9.err_exp:
	Some test cases.

tests/hard_coded/typeclasses/Mmakefile:
	Uncomment typeclass_test_5.m, since we pass that now
	(and have done so for quite some time).

tests/invalid/typeclass_test_[3-5].err_exp:
	Update to reflect additional error messages produced
	by the improved error checking in compiler/make_hlds.m.
1999-02-12 04:19:33 +00:00
Fergus Henderson
59fda6bfdf Implement abstract instance declarations.
Estimated hours taken: 9

Implement abstract instance declarations.

compiler/prog_data.m:
	Rename the `instance_interface' type as `instance_body',
	and make it a discriminated union: either `abstract',
	or `concrete(Methods)'.

compiler/prog_io_typeclass.m:
compiler/hlds_data.m:
compiler/hlds_out.m:
compiler/equiv_type.m:
compiler/check_typeclass.m:
	Change the code to reflect the new name and representation
	of `instance_interface'.

compiler/prog_io_typeclass.m:
	Parse abstract instance declarations.

compiler/make_hlds.m:
	Clean up the code a bit, and make sure that it detects some errors
	which previously we didn't detect: duplicate or overlapping
	instance declarations, and instance declarations with methods for
	classes with no methods.

compiler/check_typeclass.m:
	If an instance is abstract, then we don't need to check
	that the methods in the instance body match those in the class.

compiler/base_typeclass_info.m:
	Only generate base_typeclass_infos for concrete instance
	declarations, not for abstract ones.

doc/reference_manual.texi:
	Document the change.

tests/hard_coded/typeclasses/Mmakefile:
tests/hard_coded/typeclasses/abstract_instance.m:
tests/hard_coded/typeclasses/use_abstract_instance.m:
tests/hard_coded/typeclasses/use_abstract_instance.exp:
tests/invalid/Mmakefile:
tests/invalid/typeclass_test_9.m:
tests/invalid/typeclass_test_9.err_exp:
	Some test cases.

tests/hard_coded/typeclasses/Mmakefile:
	Uncomment typeclass_test_5.m, since we pass that now
	(and have done so for quite some time).

tests/invalid/typeclass_test_[3-5].err_exp:
	Update to reflect additional error messages produced
	by the improved error checking in compiler/make_hlds.m.
1999-02-12 03:46:59 +00:00
Mark Brown
da491e95ad Fix a typo (s/MD_mdb_err/MR_mdb_err).
Estimated hours taken: 0.1

trace/mercury_trace_internal.c:
	Fix a typo (s/MD_mdb_err/MR_mdb_err).
1999-02-12 02:50:01 +00:00
Fergus Henderson
72899bbd83 Add a missing const on the return type of MR_trace_retry().
Estimated hours taken: 0.5

trace/mercury_trace.h:
trace/mercury_trace.c:
	Add a missing const on the return type of MR_trace_retry().

trace/mercury_trace.c:
	Delete an old `#include <unistd.h>', since it is no longer needed.

trace/mercury_trace_internal.c:
	Fix two bug: check whether the return value from
	MR_trace_retry() is null; if it is null, don't try to print it
	out (this fixes a bug Erwan introduced), and if it is not null,
	then after printing out the message, keep interacting with the
	user rather than doing a step (this fixes a bug in Zoltan's
	original code).
1999-02-12 00:16:44 +00:00
Fergus Henderson
9d8e9793b8 Don't rebuild the `.exp' files using NU-Prolog.
Estimated hours taken: 0.1

tools/test_mercury:
	Don't rebuild the `.exp' files using NU-Prolog.
	Building one of the (tests/general/string_format_test_2) was failing,
	apparently due to the use somewhere of a function rather than a
	predicate, and our plan is to phase out the Prolog support,
	so not worth fixing this. Instead we now just treat the `.exp'
	files in the `general' directory as being hard-coded,
	just like those in the `hard-coded' directory.
1999-02-11 12:48:32 +00:00
Erwan Jahier
d211b9e2f3 This change implement the retry command for the external debugger.
Estimated hours taken: 10

This change implement the retry command for the external debugger.


trace/mercury_trace.[ch]:
trace/mercury_trace_internal.[ch]:
	Move MR_trace_retry() and MR_trace_find_input_arg() from
	mercury_trace_internal.c to mercury_trace.c since they are also needed
	in the external debugger.

	MR_trace_retry() now returns a `char *' pointer which is either
	NULL if the retry proceeds correctly or an error message if it fails.

trace/mercury_trace_internal.h:
trace/mercury_trace.h:
	Move the definition of the type MR_Event_Details from
	mercury_trace_internal.h to mercury_trace.h since both are also
	needed in the external debugger.

	Idem for the constant MR_INIT_ARG_COUNT.


trace/mercury_trace.c:
trace/mercury_trace_external.[ch]:
	MR_trace_external() now returns a code address to jump in.

	Pass the integer max_mr_num in argument of MR_trace_external() since
	it is needed by MR_trace_retry().

	Add a MR_send_message_to_socket_format() that allows to send formated
	message to the socket. I need that because the error message send to the
	socket must be a prolog term.

trace/mercury_trace_external.c:
	Implement the retry command in MR_trace_event_external().


browse/debugger_interface.m:
	Add support for the retry port.

	Make all the lines fits in 80 colums.
1999-02-10 22:31:27 +00:00
Fergus Henderson
ad2ee03194 Add trailing slash to the Mercury URL:
Estimated hours taken: 0.05

doc/mercury.info:
	Add trailing slash to the Mercury URL:
	<http://www.cs.mu.oz.au/mercury/>.
				       ^
1999-02-10 18:40:29 +00:00
Fergus Henderson
a143dc6ea0 Fix a bug: cast the argument to toupper() to `unsigned char'.
Estimated hours taken: 0.1

util/info_to_mdb.c:
	Fix a bug: cast the argument to toupper() to `unsigned char'.
1999-02-10 18:37:11 +00:00
Fergus Henderson
28b8d56689 Put back a blank line that I accidentally deleted in my previous
Estimated hours taken: 0.01

compiler/modules.m:
	Put back a blank line that I accidentally deleted in my previous
	change.
1999-02-09 00:27:44 +00:00
Fergus Henderson
056e7b3eb3 Add a regression test to test three recently-fixed bugs
Estimated hours taken: 0.25

tests/hard_coded/Mmakefile:
tests/hard_coded/factt.m:
tests/hard_coded/factt_examples:
tests/hard_coded/factt.exp:
	Add a regression test to test three recently-fixed bugs
	related to fact tables:
		- duplicate C labels,
		- incorrect dependencies with --use-subdirs, and
		- undefined symbols due to passing the wrong arguments
		  to c2init.
1999-02-08 23:36:47 +00:00
Fergus Henderson
c60e618e9a Fix a bug with the arguments passed to c2init by the generated `.dep'
Estimated hours taken: 1

compiler/modules.m:
	Fix a bug with the arguments passed to c2init by the generated `.dep'
	file when using fact tables: it should not pass the fact table `.c'
	files to c2init, because the fact table `.c' files do not have
	(or need) any initialization function.
1999-02-08 23:20:30 +00:00
Fergus Henderson
16b9fbe1f0 Fix a bug where inlining of fact tables caused duplicate
Estimated hours taken: 1.5

Fix a bug where inlining of fact tables caused duplicate
labels in the generated C code.

compiler/make_hlds.m:
	Make `pragma fact_table' imply `pragma no_inline'.

compiler/fact_table.m:
	Update some old comments which said that nondet `pragma c_code'
	was not yet implemented.

doc/reference_manual.texi:
	Document that `pragma c_code' should not contain labels
	unless there is a matching `pragma no_inline'.
1999-02-08 22:42:51 +00:00
Fergus Henderson
0cf838a152 Fix a bug with the dependencies computed when using
Estimated hours taken: 1

compiler/modules.m:
	Fix a bug with the dependencies computed when using
	both fact tables and `--use-subdirs'.
1999-02-08 22:40:56 +00:00
Fergus Henderson
474a223d6d Fix typo in comment: s/fals/fails/
Estimated hours taken: 0.01

compiler/prog_io.m:
	Fix typo in comment: s/fals/fails/
1999-02-08 20:52:38 +00:00
Fergus Henderson
b698a27f6f Fix a bug that was causing mdb's detailed stack traces to come out
Estimated hours taken: 0.25

Fix a bug that was causing mdb's detailed stack traces to come out
incorrectly on some occaisions.

runtime/mercury_stack_trace.c:
	Fix a bug: `maybe_from_full' should have type `Integer', not `Word'.
1999-02-08 11:18:48 +00:00
Fergus Henderson
968937342d Fix a bug where mdb was sometimes failing to stop at breakpoints
Estimated hours taken: 2

Fix a bug where mdb was sometimes failing to stop at breakpoints
(my previous fix for this was incomplete).

trace/mercury_trace_spy.c:
	Introduce a new function MR_compare_addr() and use it for the
	the comparison argument to MR_prepare_for_sorted_insert()
	and MR_bsearch.  This fixes the following problems:
		- the comparison argument for those functions
		  needs to have type `int', not `Unsigned';
		- the sense of the comparison argument to
		  MR_prepare_for_sorted_insert() was inverted.

runtime/mercury_array_macros.h:
	Document that the comparison argument to MR_prepare_for_sorted_insert()
	and MR_bsearch needs to have type `int'.
1999-02-08 10:51:47 +00:00
Fergus Henderson
469036b27c Add parentheses to use of `some' in type declaration for has_type/2,
Estimated hours taken: 0.1

library/std_util.m:
        Add parentheses to use of `some' in type declaration for has_type/2,
	to avoid syntax error for SICStus Prolog.
1999-02-07 14:07:24 +00:00
Fergus Henderson
e2aef81fae Explicitly disallow (1) cyclic equivalence types and
Estimated hours taken: 0.5

doc/reference_manual.texi:
	Explicitly disallow (1) cyclic equivalence types and
	(2) instance declarations containing abstract types
	which are defined as equivalence types.
	Regarding (1), this was always the intent, but due to
	oversight it was not explicitly stated until now.
	For the rationale for (2), see the recent
	discussion on the mercury-users mailing list.
1999-02-05 06:48:33 +00:00
Fergus Henderson
93d853c1d9 Fix a bug with I/O interleaving which was causing some of the
Estimated hours taken: 0.75

Fix a bug with I/O interleaving which was causing some of the
debugger test cases to fail.

trace/mercury_trace_internal.c:
	Ensure that MR_mdb_err is unbuffered, and that we always
	fflush(MR_mdb_out) before writing to MR_mdb_out.
1999-02-04 20:42:10 +00:00
Fergus Henderson
9158f4700f Fix a bug reported by Peter Ross <petdr@cs.mu.OZ.AU>
Estimated hours taken: 0.5

Fix a bug reported by Peter Ross <petdr@cs.mu.OZ.AU>
where mdb was sometimes failing to stop at breakpoints.

trace/mercury_trace_spy.c:
	Fix a bug -- the sense of the comparison argument to MR_bsearch()
	was inverted.
1999-02-04 16:59:07 +00:00
Fergus Henderson
a5ad353cf8 Use a macro rather than hard-coding the magic number 1000
Estimated hours taken: 0.1

util/mdemangle.c:
	Use a macro rather than hard-coding the magic number 1000
	in several places.
1999-02-04 15:26:40 +00:00
Fergus Henderson
af9b463a58 Implement demangling for instance declarations (i.e. base_typeclass_infos).
Estimated hours taken: 4.5

Implement demangling for instance declarations (i.e. base_typeclass_infos).

compiler/base_typeclass_info.m:
compiler/llds_out.m:
	Change the way name mangling for base_typeclass_infos is done
	to ensure that they can be unambiguously demangled.

util/mdemangle.c:
profiler/demangle.m:
	Add code to demangle base_typeclass_infos.

util/mdemangle.c:
	Fix a bug: if it got part way through demangling a symbol
	before noticing that it had the wrong format, then it would
	sometimes print out a partially demangled version of the
	symbol rather than printing out the original symbol unchanged.

tests/debugger/*.exp*:
	Update the expected output to reflect the new mangling scheme.
	(Really the debugger ought to demangle the names, but
	currently it doesn't.)
1999-02-04 14:58:38 +00:00
Erwan Jahier
f9f4c73cd6 MR_trace_init_external() and MR_trace_final_external() are defined
Estimated hours taken: 2

MR_trace_init_external() and MR_trace_final_external() are defined
in trace/mercury_trace_external.c but are also needed in
runtime/mercury_trace_base.c. As we can not do direct calls from
runtime/ to trace/, we do an indirect call via a function
pointer address_of_trace_init_external.


runtime/mercury_trace_base.c:
	Remove an out of date comment.

runtime/mercury_init.h:
runtime/mercury_wrapper.c:
runtime/mercury_wrapper.h:
	Add prototype declaration for MR_trace_init_external()
	and MR_trace_final_external().

runtime/mercury_wrapper.h:
util/mkinit.c:
	Remove useless prototypes.
1999-02-04 10:53:02 +00:00
Fergus Henderson
dd4770e783 Delete the test for SA_RESTART.
Estimated hours taken: 0.25

configure.in:
	Delete the test for SA_RESTART.
	The only reason for that test was to warn if SA_RESTART
	was not defined, but the test was giving spurious warnings in
	some cases (e.g. on Linux, due to siginfo_t not being defined),
	so it seems to be doing more harm than good.
1999-02-01 02:02:26 +00:00
Fergus Henderson
4621a657ea Apply a patch from Bas de Bakker <basde.bakker@pica.nl>.
Estimated hours taken: 0.1

Apply a patch from Bas de Bakker <basde.bakker@pica.nl>.

doc/transition_guide.texi:
	Update the table of operator precedences.
	Fix an error in the mode declaration for factorial.
1999-02-01 00:56:28 +00:00
Fergus Henderson
0394d85902 Update/clarify the documentation about the rules for naming
Estimated hours taken: 0.5

doc/user_guide.texi:
doc/reference_manual.texi:
	Update/clarify the documentation about the rules for naming
	source files when using separate sub-modules.
1999-01-31 11:51:46 +00:00
Fergus Henderson
26bd284be1 Clarify that module names in `include_module' declarations
Estimated hours taken: 0.1

doc/reference_manual.texi:
	Clarify that module names in `include_module' declarations
	need not be fully-qualified.
1999-01-30 04:10:49 +00:00
Fergus Henderson
7e0b766779 Fix a memory allocation bug reported by
Estimated hours taken: 6

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

library/std_util.m:
runtime/mercury_type_info.c:
	Use `newmem()' rather than `malloc()' when allocating memory
	that will contain Mercury terms or types.  This is needed
	because the Boehm collector does not trace memory allocated
	with malloc().
1999-01-28 11:46:29 +00:00
Fergus Henderson
4c61511f91 Fix a bug reported by Tom Conway:
Estimated hours taken: 0.75

library/io.m:
	Fix a bug reported by Tom Conway:
	io__write was not properly parenthesizing term arguments.
1999-01-28 11:34:50 +00:00
Fergus Henderson
6f1f6bcb17 Fix some bugs where we were not properly escaping special characters in
Estimated hours taken: 0.75

Fix some bugs where we were not properly escaping special characters in
C strings in the generated code.

compiler/llds_out.m:
	Change a number of places to call output_quoted_c_string instead of
	io__write_string, so that special characters will be properly escaped.
	Add new predicate llds_out__quote_c_string, for use by pragma_c_gen.m.

compiler/pragma_c_gen.m:
	Call llds_out__quite_c_string, to ensure that special characters
	in the generated "pragma_c_raw_code" are properly escaped.

tests/valid/int64.m:
tests/valid/Mmakefile:
	Regression test for the above-mentioned bug fix.
1999-01-27 08:34:38 +00:00
Fergus Henderson
c3b467f88c Don't pass `-fno-gcse' if gcc version is 2.8*.
Estimated hours taken: 0.5

configure.in:
	Don't pass `-fno-gcse' if gcc version is 2.8*.
	Also fix a bug in the check for gcc 2.8*.
1999-01-20 16:50:26 +00:00
Mark Brown
2be61d460d Changes to the internal tracer to implement a declarative
Estimated hours taken: 220

Changes to the internal tracer to implement a declarative
debugging back end.

runtime/mercury_conf_param.h:
	Document the new MR_USE_DECLARATIVE_DEBUGGER configuration
	parameter.

trace/mercury_trace_internal.{c,h}:
	Declare a global variable, MR_trace_decl_mode, that stores the
	current mode of the internal debugger, and an enum listing the
	possible modes.

	Move MR_Event_Details and MR_trace_retry into
	mercury_trace_internal.h, and make the latter extern, so that
	the declarative debugger back end can use them.

trace/mercury_trace_internal.c:
	Call the back end in mercury_trace_declarative.c.
	Add a new command, dd_wrong, to start wrong answer analysis.

trace/Mmakefile:
	Add mercury_trace_declarative.{c,h} to the dependencies.

trace/mercury_trace_declarative.{c,h}:
	The declarative debugging back end (new files).
1999-01-11 03:52:33 +00:00
Fergus Henderson
a6b007be78 Fix a bug: one of the "1>&2" redirections was in the wrong place.
Estimated hours taken: 0.1

tests/debugger/Mmakefile:
	Fix a bug: one of the "1>&2" redirections was in the wrong place.
1999-01-05 17:09:24 +00:00
Fergus Henderson
3ca511d8eb Add parentheses to use of `some' in type declaration for univ_value/1,
Estimated hours taken: 0.1

library/std_util.m:
	Add parentheses to use of `some' in type declaration for univ_value/1,
	to avoid syntax error for SICStus Prolog.
1999-01-05 17:05:06 +00:00