Commit Graph

228 Commits

Author SHA1 Message Date
Warwick Harvey
f1de7db5a9 Fixed a couple of problems with the bootcheck script.
Estimated hours taken: 4

Fixed a couple of problems with the bootcheck script.

tools/bootcheck:
	Changed the stage 2 and 3 builds to always use the stage 1 version
	of `mmake' rather than the installed version (it had been using a
	rather bizarre mix of the two, which made bootstrapping changes to
	mmake rather difficult).  As part of this, made the definitions of
	`MMAKE_VPATH' and `MMAKE_DIR' apply to all invocations of mmake for
	stages 2 and 3, rather than just some of them.
1999-07-14 06:17:28 +00:00
Simon Taylor
c163d493be Document that `mmake depend' needs to be run
Estimated hours taken: 1

Mmake.common.in:
	Document that `mmake depend' needs to be run
	in the compiler directory if the setting
	of `INCLUDE_ADITI_OUTPUT' is changed.

compiler/Mmakefile:
	Change the action of `mmake depend' so that it always
	regenerates the `.m' files for which `.pp' files exist.

	Don't update the timestamp on a `.m' file if regenerating
	it does not change it.

tools/bootcheck:
	Link rather than copy `.pp' files now that reprocessing
	them is handled by `mmake depend'.
1999-06-23 03:09:31 +00:00
Peter Ross
0db6a01b2c Add the script from the log message on Thursday July 9, 1998
Estimated hours taken: 0.25

tools/alias_sync:
    Add the script from the log message on Thursday July 9, 1998
    to automatically sync the alias branch with the main branch.
1999-06-15 07:28:37 +00:00
Fergus Henderson
7a1f1090da Work around a problem with infinite loops on taifun.
Estimated hours taken: 1

Work around a problem with infinite loops on taifun.
The version of readline on taifun has a bug which causes
it to go into an infinite loop if input is redirected from
a file.  The work-around is to disable readline support.

aclocal.m4:
	Add new option `--without-readline' to disable readline support.

tools/test_mercury:
	On taifun, pass `--without-readline' to configure.
1999-06-01 08:04:38 +00:00
Fergus Henderson
2912fb5b0a Add a new option `--disable-extern-debug' for disabling the
Estimated hours taken: 0.5

configure.in:
	Add a new option `--disable-extern-debug' for disabling the
	external debugger support; this is needed because the
	autodetection for sockets doesn't work properly on our SGI
	machine (munta), and so we need to manually override it.

tools/test_mercury:
	For munta, pass --disable-extern-debug to configure.
1999-05-27 10:20:23 +00:00
Simon Taylor
846ce3f47e Copy the .pp files rather than linking them.
Estimated hours taken: 0.1

tools/bootcheck:
	Copy the .pp files rather than linking them.
	This is a more robust way making sure the corresponding
	.m files are rebuilt in stages 2 and 3 because it doesn't
	require any changes if someone adds some more .pp files.
1999-05-05 05:24:28 +00:00
Simon Taylor
43164d3be4 Make sure rl_out.m and rl_file.m are recreated in
Estimated hours taken: 0.1

tools/bootcheck:
	Make sure rl_out.m and rl_file.m are recreated in
	the stage 2 and 3 directories with the value of
	INCLUDE_ADITI_OUTPUT from Mmake.stage.params.
1999-05-05 01:36:12 +00:00
Zoltan Somogyi
1e64117950 Allow multiple -d options. Factor out some common code to make the
Estimated hours taken: 0.2

tools/bootcheck:
	Allow multiple -d options. Factor out some common code to make the
	change easier.
1999-04-29 07:52:40 +00:00
Zoltan Somogyi
b8ba941e5d Fix a stupid mistake: use the stage2 runtime, library etc
Estimated hours taken: 0.1

tools/bootcheck:
	Fix a stupid mistake: use the stage2 runtime, library etc
	if the stage2 grade and the test grade are the same, not if
	they are different.
1999-04-29 00:59:31 +00:00
Zoltan Somogyi
c52ccf8f51 Fix grammar in comment.
Estimated hours taken: 0.01

tools/bootcheck:
	Fix grammar in comment.
1999-04-26 00:52:27 +00:00
Simon Taylor
f18ac4159e Fix a syntax error.
Estimated hours taken: 0.1

tools/bootcheck:
	Fix a syntax error.
1999-04-22 05:47:35 +00:00
Zoltan Somogyi
427c9e62d1 Fix spelling error.
Estimated hours taken: 0.01

tools/bootcheck:
	Fix spelling error.
1999-04-22 02:25:12 +00:00
Zoltan Somogyi
19f1d3be9a Make it much more convenient to do a full bootcheck, including all the tests,
Estimated hours taken: 1

Make it much more convenient to do a full bootcheck, including all the tests,
in a grade other than the default one.

By passing a grade explicitly to the tests, instead of just grade component
flags, we allow the conditionals in tests/*/Mmakefiles to work in a lot
more cases than previously.

*** IMPORTANT **
If you do not use any grade other than the default one, then this change
does not affect you; if you do, it affects what you can put in Mmake.params
and Mmake.stage.params files. This change requires that there should be
no grade flags (e.g. --use-trail) specified in the file that becomes
stage2/Mmake.params, which is Mmake.stage.params in the top directory
if it exists, and Mmake.params in that directory otherwise.

tools/bootcheck:
	Add two new options, --grade (abbreviated -G) and --test-grade,
	which each take an argument specifying a grade. The purpose of the
	--grade option is to allow you to specify what grade stages 2 and 3
	should be compiled in. The purpose of the -test-grade option is
	to allow you to say that the tests should be done in the same
	grade as stage 1, not stage 2 or 3, although this is not checked.

	If you specify neither, then stages 2 and 3 will be built in the
	default grade, and the tests will be done in the default grade as well.
	The tests will use everything (compiler, library, runtime etc) from
	the stage2 directory.

	If you specify only --grade, then stages 2 and 3 will be built in the
	given grade, and the tests will be done in the given grade as well.
	The tests will use everything (compiler, library, runtime etc) from
	the stage2 directory.

	If you specify both --grade and --testgrade, then stages 2 and 3 will
	be built in the grade given to --grade, while the tests will be done
	in the grade given to --test-grade. The tests will use only the
	compiler from stage2; everything else (library, runtime etc) will be
	from stage 1 directory, since it is assumed that the test grade
	is the same as the grade of stage 1.

	If you specify only --testgrade, then stages 2 and 3 will be built
	in the default grade, while the tests will be done in the given grade.
	The tests will use only the compiler from stage2; everything else
	(library, runtime etc) will be from stage 1 directory, since it is
	assumed that the test grade is the same as the grade of stage 1.

	The runtime and boehm_gc directories of stage2 will be copied instead
	of linked from stage 1 if either of the new options is given, since
	there is no reason to give either option unless the stage 1 grade
	differs from the stage 2 grade, and such grade differences may require
	this copying.

	The old --copy-runtime and --copy-boehm-gc options, which were each
	intended to accomplish one half of this, are both implied by either
	of the two new options being given.
1999-04-21 09:10:18 +00:00
Zoltan Somogyi
4d607de825 Fix some typos in comments.
Estimated hours taken: 0.1

tools/makebatch:
	Fix some typos in comments.
1999-04-16 07:00:47 +00:00
Fergus Henderson
dc2ff9f823 Link the aclocal.m4 file into the stage2 and stage3 directories.
Estimated hours taken: 0.1

tools/bootcheck:
	Link the aclocal.m4 file into the stage2 and stage3 directories.
1999-03-31 08:03:37 +00:00
Fergus Henderson
7db6ab877b - Fix a bug where it was not deleting the old stable rotds
Estimated hours taken: 0.25

tools/test_mercury:
	- Fix a bug where it was not deleting the old stable rotds
	  when it added a new one; this was costing a lot of disk space...
	- Copy the rotd binary distributions to the beta ftp site.
1999-03-22 16:28:01 +00:00
Zoltan Somogyi
8d3486dbc4 Copy the newly created .mercury-compiler.spec.in file to the
Estimated hours taken: 0.1

tools/bootcheck:
	Copy the newly created .mercury-compiler.spec.in file to the
	stage[23] directories, since without this file the mmakes invoked
	by bootcheck fail.
1999-03-19 04:19:43 +00:00
Fergus Henderson
2f721802b4 Change a few comments.
Estimated hours taken: 0.1

tools/test_mercury:
	Change a few comments.
1999-03-18 01:03:11 +00:00
Fergus Henderson
14728289fa Remove support for NU-Prolog and SICStus Prolog.
Estimated hours taken: 5

Remove support for NU-Prolog and SICStus Prolog.

The reasons for this are:
(a) We now have a proper working debugger, so we don't need to use
    NU-Prolog or SICStus Prolog for debugging.
(b) The Prolog support was only ever a hack, not a proper solution;
    Mercury language features like functions or mode reordering
    were never supported.
(c) It was a maintenance problem.

compiler/make_hlds.m:
	Warn that NU-Prolog `when' declarations are deprecated.

compiler/prog_io.m:
	Update a comment to say that NU-Prolog `when' declarations
	are now deprecated.

library/*.m:
	Delete `when' declarations.

configure.in:
bindist/bindist.configure.in:
	Delete the autoconf tests for NU-Prolog and SICStus Prolog.
	Delete the stuff for generating the NU-Prolog and SICStus Prolog
	scripts.

tools/bootcheck:
	Delete the options for testing using SICStus Prolog.

library/Mmakefile:
	Delete the rules for building NU-Prolog and SICStus Prolog stuff.

library/library.nu.nl.in:
	library/swi_*.m:
	library/*.nu.nl:
library/array.nu.nl:
library/assoc_list.nu.nl:
library/char.nu.nl:
library/float.nu.nl:
library/int.nu.nl:
library/io.nu.nl:
library/library.nu.nl.in:
library/map.nu.nl:
library/mercury_builtin.nu.nl:
library/nc_builtin.nl:
library/require.nu.nl:
library/sp_builtin.nl:
library/sp_lib.nl:
library/std_util.nu.nl:
library/store.nu.nl:
library/string.nu.nl:
library/swi_builtin.m:
library/swi_lib.m:
library/term_io.nu.nl:
	Delete these files.

scripts/mnc.in:
scripts/mnp.in:
scripts/mnl.in:
scripts/msc.in:
scripts/msl.in:
scripts/msp.in:
	Delete these files.

doc/user_guide.texi:
	Delete the documentation about the Prolog support.

NEWS:
w3/news/newsdb.inc:
        Mention that we've removed the Prolog support.
1999-03-15 08:48:36 +00:00
Fergus Henderson
c790791fa0 Delete this file, since it is obsolete.
Estimated hours taken: 0.1

tools/install_webpage:
	Delete this file, since it is obsolete.
	We now use w3/bin/install_webpages to install the WWW pages.
1999-03-10 20:26:49 +00:00
Fergus Henderson
638d1c7ea5 Fix a bug in my previous change: when invoking rcp, I accidentally
Estimated hours taken: 0.1

tools/test_mercury:
	Fix a bug in my previous change: when invoking rcp, I accidentally
	used `/' to separate the host name in the directory, when I should
	have been a `:'.
1999-03-05 13:15:14 +00:00
Fergus Henderson
72dea528de Use ftp.mercury.cs.mu.oz.au rather than turiel for the ftp site.
Estimated hours taken: 0.25

tools/test_mercury:
	Use ftp.mercury.cs.mu.oz.au rather than turiel for the ftp site.
1999-03-01 06:28:44 +00:00
Fergus Henderson
9ab0e93e82 Change the machine name mercury' to quicksilver'.
Estimated hours taken: 0.25

tools/test_mercury:
tools/run_all_tests_from_cron:
	Change the machine name `mercury' to `quicksilver'.
1999-03-01 05:35:40 +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
Warwick Harvey
6d1644ce10 If the -g / --copy-boehm-gc option was specified, symlink the
Estimated hours taken: 0.25

tools/bootcheck:
	If the -g / --copy-boehm-gc option was specified, symlink the
	subdirectory "boehm_gc/include", rather than the non-existant
	"boehm_gc/includes".
1998-12-02 00:49:29 +00:00
Fergus Henderson
20bc10ddf7 Fix yet another bug with building binary distributions on
Estimated hours taken: 0.1

tools/test_mercury:
	Fix yet another bug with building binary distributions on
	murlibobo.
1998-11-26 18:52:31 +00:00
Fergus Henderson
41bd06d276 Fix another bug with building binary distributions on
Estimated hours taken: 0.25

tools/test_mercury:
	Fix another bug with building binary distributions on
	murlibobo.
1998-11-20 20:35:13 +00:00
Fergus Henderson
182b33698e Insert $INSTALL_DIR/bin at the front of the path, so that
Estimated hours taken: 0.25

tools/test_mercury:
	Insert $INSTALL_DIR/bin at the front of the path, so that
	it tests the same compiler it installed, rather than
	testing the one in mercury-latest (this makes a difference
	if you override INSTALL_DIR to install somewhere other than
	in mercury-latest, e.g. in a mercury-0.8 directory).
	Also replace the obsolete 0.5 & 0.6 entries in the path list
	with 0.8.
1998-11-16 20:46:39 +00:00
Fergus Henderson
8769306d18 Fix a bug in the code for automatically building binary distributions:
Estimated hours taken: 0.25

tools/test_mercury:
	Fix a bug in the code for automatically building binary distributions:
	on murlibobo, it was doing "version=`mmake version`" without having
	done "sh configure" beforehand.
1998-11-16 09:31:54 +00:00
Fergus Henderson
7cbde3be2e Fix a typo: it was copying the unstable binary dist into the
Estimated hours taken: 0.1

tools/test_mercury:
	Fix a typo: it was copying the unstable binary dist into the
	"stable" directory instead of the "unstable" directory.
1998-11-15 17:52:27 +00:00
Fergus Henderson
3a44b25868 Fix a bug in the code for automatically building binary distributions
Estimated hours taken: 0.5

tools/test_mercury:
	Fix a bug in the code for automatically building binary distributions
	(it was accessing `$version', which had not yet been defined.)
	Also change it to build "unstable" binary distributions, in the
	case where some of the tests failed, as well as "stable" ones.

Mmakefile:
	Add a new target `fullarch' which just echos $FULLARCH,
	for use by tools/test_mercury.
1998-11-13 08:04:21 +00:00
Fergus Henderson
39596ebce7 Fix a couple of bugs with the code for automatically building
Estimated hours taken: 0.25

tools/test_mercury:
	Fix a couple of bugs with the code for automatically building
	binary distributions.
1998-11-11 02:27:35 +00:00
Fergus Henderson
ea519f3481 Delete the code to invoke install_webpage, because that is now
Estimated hours taken: 0.25

tools/run_all_tests_from_cron:
	Delete the code to invoke install_webpage, because that is now
	done separately -- the wep page is installed by invoking
	`mmake install' in the w3 directory directly from cron,
	or so I'm told.
1998-11-09 10:30:08 +00:00
Zoltan Somogyi
9244c2806d s/wwas/was/
Estimated hours taken: 0.01

tools/bootcheck:
	s/wwas/was/
1998-11-09 01:29:53 +00:00
Fergus Henderson
25e5ea673c If the tests pass, build a binary distribution.
Estimated hours taken: 0.25

tools/test_mercury:
	If the tests pass, build a binary distribution.
1998-11-07 14:35:53 +00:00
Fergus Henderson
c89a5fafb8 Some minor changes to get things to work on taifun.cs.mu.oz.au.
Estimated hours taken: 0.5

tools/test_mercury:
tools/run_all_test_from_cron:
	Some minor changes to get things to work on taifun.cs.mu.oz.au.
1998-11-07 14:24:37 +00:00
Fergus Henderson
e16a97032d Ensure that --use-subdirs' defaults to true' if
Estimated hours taken: 0.25

tools/bootcheck:
	Ensure that `--use-subdirs' defaults to `true' if
	there is a `Mercury' subdirectory in the `compiler' directory.
	This avoids various annoyances that occur if you're using subdirs
	and you forget to pass `--use-subdirs' to bootcheck.
1998-11-02 10:29:32 +00:00
Zoltan Somogyi
8a0ceb49aa This checkin has several major purposes, set out in the sections below,
Estimated hours taken: 240

This checkin has several major purposes, set out in the sections below,
all connected with the implementation of the new debugger command set.

DOCUMENT NEW DEBUG COMMAND SET

doc/user_guide.texi:
	Add a new section on the debugger. The description of the commands
	is complete, but some of the background sections, and the section
	about how to build debuggable executables, are not yet done.

	Update the documentation of the tracing options.

doc/generate_mdb_doc:
	A new shell script that automatically converts some of the new
	sections of the user guide into the online documentation of the
	debugger.

doc/mdb_categories:
	The fixed initial part of the online documentation.

doc/Mmakefile:
	Add rules for creating mdb_doc, the file that is the online
	documentation of the debugger, and for installing it together
	with mdbrc.

Mmake.common.in:
	Define INSTALL_DOC_DIR for doc/Mmakefile.

scripts/mdbrc.in:
	A debugger command script that reads in the online documentation
	and then defines some standard aliases.

configure.in:
	Define the variable that scripts/mdb.in and scripts/mdbrc.in use
	to find the right files, and get configure to perform the
	substitutions.

configure.in:
scripts/mdb:
scripts/mdb.in:
	Replace mdb with mdb.in. Mdb is now created during configuration
	from mdb.in, filling in the name of the file that contains the default
	debugger initialization commands.

util/info_to_mdb.c:
	A program that does most of the work involved in automatically
	converting user guide sections into online documentation.
	(This couldn't easily be written in sh, because sh's read
	command has no notion of pushback.)

util/Mmakefile:
	Add info_to_mdb to the list of targets.

tools/bootcheck:
	Make sure that the tests in tests/debugger are executed with an
	initialization setup that is equivalent to what users will see
	by default.

REORGANIZE TRACING OPTIONS

compiler/globals.m:
compiler/handle_options.m:
compiler/options.m:
compiler/trace.m:
	Reorganize the handling of trace levels around the new options
	--trace-internal, --trace-redo, and --trace-return.

compiler/*.m:
	Use the new ways of getting at trace levels.

tests/hard_coded/typeclasses/Mmakefile:
	s/--trace all/--trace deep/

SUPPORT RETRY

compiler/trace.m:
	After every call to MR_trace(), emit code that checks whether it
	should jump away, and if yes, performs the jump. This is used to
	implement retry. (The debugger cannot execute the jump itself
	because it is in the wrong C stack frame.)

compiler/llds.m:
compiler/continuation_info.m:
compiler/stack_layout.m:
	Modify the data structures that record information about live
	value at program points, to record the identity of each variable.
	This is necessary for the implementation of the restart command,
	since we do not want to confuse two distinct variables just because
	they have the same name. For example, a variable whose name is X
	and number is 5 is now recorded in the name array as "5:X".

	Clean up the data structure a bit, so that we don't have to store
	dummy names for values that are not variables.

compiler/*.m:
	Minor changes to conform to the data structure changes.

runtime/mercury_stack_layout.h:
	Redefine an existing macro to strip away the initial number: prefix
	from the "name" of a variable (keeping its original function on
	changed data), and add a new one to access the raw unstripped data.

runtime/mercury_init.h:
runtime/mercury_wrapper.h:
	Update the prototype of MR_trace_{fake,real}, and the type of the
	global that points to them.

runtime/mercury_layout_util.h:
	Add an extra function, MR_get_register_number, for use by retry.

USE FIXED STACK SLOTS FOR TRACE INFO

compiler/code_gen.m:
compiler/code_info.m:
compiler/live_vars.m:
compiler/trace.m:
	If execution tracing is enabled, reserve the first few stack slots
	to hold the event number of the call event, the call number, the
	call depth, the redo layout structure address (if generating redo
	events) and the from_full flag at the time of call (if we are doing
	shallow tracing). By allocating the first four of these to fixed stack
	slots, the debugger knows where to look for them without having
	to be told. It finds out the location of the fifth, if needed,
	from a new slot in the proc layout structure. (It is not possible
	to allocate all five to fixed stack slots without wasting stack space
	in some cases.)

compiler/trace.m:
	Remove from the call to MR_trace the parameters that are now in fixed
	stack slots, since MR_trace can now look them up itself.

compiler/continuation_info.m:
compiler/stack_layout.m:
	Add an extra field to the proc_layout_info. If the module is shallow
	traced, this field says which stack slot holds the saved value of
	MR_from_full. If it is not shallow traced, this field says that
	there is no such stack slot.

runtime/mercury_stack_layout.h:
	Add macros for accessing the fixed stack slots holding the event
	number of the call event, the call number, the call depth, and,
	at a redo event, the redo layout structure address.

	Support the new field in proc layouts that gives the location of the
	from-full flag (if any).

runtime/mercury_trace_base.[ch]:
trace/mercury_trace.[ch]:
	Remove the call number and call depth arguments from MR_trace
	and its avatars, since this info is now in fixed stack slots
	in every procedure that can call MR_trace. This should reduce
	the size of the executable significantly, since there are lots
	of calls to MR_trace.

runtime/mercury_init.h:
runtime/mercury_wrapper.h:
	Update the prototype of MR_trace_{fake,real}, and the type of the
	global that points to them.

START NUMBERING FRAMEVARS FROM ONE

compiler/code_info.m:
compiler/live_vars.m:
compiler/llds_out.m:
compiler/trace.m:
	Start numbering framevars from 1 internally to the compiler;
	the runtime already starts from 1. This simplifies several tasks.

ADD REDO EVENTS

compiler/trace.m:
compiler/code_gen.m:
	Before the code that executes "succeed()", emit code to push a
	a temp nondet frame whose redoip points to a label in the runtime
	that calls MR_trace for a REDO event and then fails, provided
	--trace-redo is set.

compiler/llds.m:
	Add a new code address constant, do_trace_redo_fail, which stands
	for the address in the trace system to which calls MR_trace for
	the redo event and then fails.

compiler/trace.m:
compiler/llds_out.m:
	Provided we are doing redo tracing, fill in the slot that holds
	the layout information for the REDO event.

compiler/*.m:
	Minor changes to conform to handle the new code address constant.

browser/debugger_interface.m:
	Add redo to trace_port_type.

runtime/mercury_trace_base.[ch]:
	Add a C module containing the code that calls MR_trace for REDO
	events.

ENSURE THAT INPUT ARGUMENTS ARE ALWAYS VISIBLE

compiler/trace.m:
	When generating the set of live variables at internal ports,
	the variables that are in the pre-death set of the goal into which
	we are entering may not be available. However, the variables in the
	pre-death set that are also in the resume vars set will be available,
	so now include info about them in the layout structure for the event.
	Since with tracing the non-clobbered input args are in all resume vars
	sets, this ensures that these input args will be available from all
	internal events.

compiler/code_info.m:
	Export a previously internal predicate (current_resume_point_vars)
	to make this possible.

BUG FIX: WANT RETURN LAYOUTS

compiler/globals.m:
compiler/call_gen.m:
compiler/code_info.m:
compiler/mercury_compile.m:
	Add a new pred globals__want_return_layouts, which says whether the
	compiler should generate layout structures for call returns. This pred
	centralizes the several previous copies of the test. One of those
	copies (the one in call_gen) was faulty, leading to a bug: in the
	presence of execution tracing but the absence of accurate gc,
	information about the variables that are live at the call return
	wasn't being gathered properly.

BUG FIX: #include mercury_trace_base.h

compiler/llds_out.m:
	#include mercury_trace_base.h, not mercury_trace.h, since now
	mercury_trace_base.h defines everything directly accessible from
	modules compiled with tracing.

RECAST MERCURY_TRACE_UTIL AS MERCURY_LAYOUT_UTIL

runtime/mercury_trace_util.[ch]:
runtime/mercury_layout_util.[ch]:
	Rename this module from trace_util to layout_util, since it is also
	used by the native garbage collector. Remove "trace" from the names
	of functions.

	Get rid of the global variable MR_saved_regs, and instead thread
	a pointer to this data structure through the relevant functions
	as an extra argument.

	Add a lot more documentation in the header file.

runtime/Mmakefile:
	Reflect the module rename.

runtime/*.c:
	Refer to the new module.

DELETE EASY-TO-MISUSE MACROS

runtime/mercury_stacks.h:
	Delete the based_framevar and based_detstackvar macros, since their
	continued use can lead to off-by-one errors, and the saved_framevar
	and saved_detstackvar macros, since they are no longer used.

runtime/*.c
	Update any references to any macros removed from mercury_stacks.h.

MISC RUNTIME CHANGES

runtime/mercury_trace_base.[ch]:
trace/mercury_trace*.[ch]:
	Make typedef'd names conform to the naming convention.

	Make MR_trace_call_{seqno,depth} consistently Unsigned, rather than
	sometimes Word and sometimes Unsigned.

FIX BUG: MAKE THE DEBUGGER PRINT TO STDOUT, NOT THE CURRENT STREAM

library/io.m:
	Export to C code the predicates that return the identities and types
	of stdin, stdout and stderr, as well as io__print/[34].

library/std_util.m:
	Export to C code a predicate that returns the type_info for the
	type stdutil:type_info. This type_info is required if C code
	wants to invoke make_permanent on any type_info structure,
	as the debugger does.

runtime/mercury_init.h:
	Add extern declarations for the C functions now exported from io.m.

runtime/mercury_wrapper.[ch]:
	Add new global variables to hold the addresses of these C functions.

runtime/mercury_layout_util.c:
	Use indirect calls through these global variables to print Mercury
	values, instead of lower-level code.

util/mkinit.c:
	Assign the addresses of the functions exported from io.m to the
	global variables defined in mercury_wrapper.h.

BUG FIX: STACK TRACE FUNCTIONS DEPEND ON THE LABEL TABLE

runtime/mercury_stack_trace.c:
	On entry to any of the functions exported from this module,
	ensure that the label table is loaded by calling do_init_modules.
	Without a filled-in label table, the stack trace will not be able to
	find any stack layout info.

BUG FIX: REMOVE BROWSER/*.C

configure.in:
	When removing .c files generated by the C compiler, remove those
	in the browser directory as well as the compiler, library and
	profiler directories.

IMPLEMENT NEW DEBUGGER COMMAND SET

runtime/mercury_stack_trace.[ch]:
	Factor out the code that prints the id of a procedure into a function
	of its own, so that it can also be used from the debugger, ensuring
	appearance commonality.

	Add more documentation in the header file.

trace/mercury_trace_internal.c:
	Implement the proposed command set. Command names are now words,
	and several commands now have options allowing the user to override
	the default print level or strictness of the command, or the
	invocation conditions or action of a break point. Allows control
	over command echoing and the scrolling of sequences of event reports.
	Supports aliases, command file sourcing etc. Implements the retry
	command, using the info in the fixed stack slots.

trace/mercury_trace.[ch]:
	Extend the trace controls to support the new functionalities
	required by the new debugger language, which are print levels,
	variable-strictness commands, a more flexible finish command,
	and the retry command.

	Pass the command structure to MR_trace_event_report, since
	the user can now forcibly terminate the scrolling of reports.

trace/mercury_trace_alias.[ch]:
	New module to manage aliases for the debugger.

trace/mercury_trace_help.[ch]:
	New module to interface to browser/help.m.

trace/mercury_trace_spy.[ch]:
	New module to manage break points. The test of whether an event
	matches a break point is now much more efficient than before.
	The new module also allows several breakpoints with different
	actions and different invocation conditions (e.g. all ports,
	entry port, interface ports or specific (possibly internal) port)
	to be defined on the same procedure.

trace/mercury_trace_tables.[ch]:
	New module to manage a table of the debuggable modules, in which
	each such module is linked to the list of the layouts of all the
	procedures defined in that module. This information allows the
	debugger to turn the name of a predicate/function (possibly together
	with its arity and mode number) into the procedure layout structure
	required by the spy point module. Eventually it may also be useful
	in supplying lists of identifiers for command line completion.

	Modules for which no stack layout information is available will
	not be included in the table, since do_init_modules will not
	register any labels for them in the label table.

trace/Mmakefile:
	Mention the new files.

runtime/mercury_array_macros.h:
	A new file holding macros that can be useful in more than one module.

runtime/Mmakefile:
	Mention the new file.

runtime/mercury_conf.h.in:
	Mention a new configuration macro, MR_CANNOT_USE_STRUCTURE_ASSIGNMENT,
	used by runtime/mercury_array_macros.h.

configure.in:
	Find out whether we need to define MR_CANNOT_USE_STRUCTURE_ASSIGNMENT.

ADD TRACE DEPTH HISTOGRAMS

runtime/mercury_conf_param.h:
	Document MR_TRACE_HISTOGRAM.

runtime/mercury_trace_base.[ch]:
	Define the data structures for the histogram, and print the histogram
	when a traced program exits if MR_TRACE_HISTOGRAM is set.

trace/mercury_trace.[ch]:
	If MR_TRACE_HISTOGRAM is defined, record a count of the number of
	events at each depth. This information can help us evaluate space-time
	tradeoffs.

FACTOR OUT SHELL CODE HANDLING GRADE IMPLICATIONS

scripts/final_grade_options.sh-subr:
	A new file to contain any code that implements implications between
	grade flags; currently implements the implication debug -> use trail.

scripts/mgnuc.in:
scripts/ml.in:
	Replace the code that is now in final_grade_options.sh-subr with
	an inclusion of final_grade_options.sh-subr.

configure.in:
	Handle final_grade_options.sh-subr as {init,parse}_grade_options.sh-subr
	are handled.

SIMPLIFY THE MAINTAINANCE OF CONSISTENCY BETWEEN DEBUGGER CODE AND DOCUMENTATION

doc/Mmakefile:
	Add rules for creating mdb_command_list, a C code fragment
	that can included manually in trace/mercury_trace_internal.c
	to supply the list of valid commands, and mdb_command_test.inp,
	which is a list of invalid invocations of debugger commands,
	which tests whether the help message for such invocations
	can be located as expected.

doc/generate_mdb_command_list:
doc/generate_mdb_command_test:
	Awk scripts to create mdb_command_list and mdb_command_test.inp
	respectively from mdb_doc.

tools/bootcheck:
	Copy mdb_command_test.inp from doc to tests/debugger.

tests/debugger/Mmakefile:
	Add a new test that checks whether we get an internal error, unable
	to locate the right help node, for each invalid command invocation in
	mdb_command_test.inp.

UPDATE TEST CASES

tests/debugger/Mmakefile:
	Reenable queens. Conform to the new set of options.

tests/debugger/*.inp:
tests/debugger/*.exp:
	Update the inputs and expected outputs of the debugger test cases
	to use the new command set and output formats.
1998-10-16 06:20:28 +00:00
David Overton
ed91b801be Fix some scripts in the tools directory to work with the new
Estimated hours taken: 0.5

Fix some scripts in the tools directory to work with the new
directories and library names.

tools/binary:
tools/binary_step:
tools/linear:
	Update these scripts to work properly with the new browser and
	trace directories and the renamed libraries.

Mmake.common.in:
scripts/c2init.in:
scripts/ml.in:
	Add tools/binary, tools/binary_step and tools/linear to the
	list of files that know about library names.
1998-10-09 05:41:58 +00:00
Zoltan Somogyi
f633c977f6 Update the comments about the other locations that know the names of
Estimated hours taken: 0.2

Mmake.common.in:
scripts/ml.in:
tools/bootcheck:
	Update the comments about the other locations that know the names of
	the libraries, now that c2init knows them too.

scripts/c2init.in:
	Add a comment about the other locations.
1998-10-01 09:11:10 +00:00
Zoltan Somogyi
8ddce575d4 Introduce two new directories, trace and browser, containing libraries
Estimated hours taken: 10

Introduce two new directories, trace and browser, containing libraries
holding the C and Mercury code of the debugger respectively. (Although
the browser directory does not have a browser in it yet, the browser
should soon become its biggest component.) Take the opportunity to
rename the existing libraries, for consistency.

After this change, the linking order becomes:

	the object of the auto-generated init file
	program object files
	trace library (libmer_trace.a)
	browser library (libmer_browser.a)
	standard library (libmer_std.a)
	runtime library (libmer_rt.a)
	Boehm collector (libgc.a)

To avoid circularities, libraries cannot contain direct calls to
any routines that are defined in libraries (or object files) that
occur earlier in the above list.  Any such calls must be made into
indirect calls via function pointers.

In particular, there was a circularity caused by the library calling
MR_trace() which invokes the tracer which in turn invokes the
library.  This circularity was broken by having MR_trace(),
which is defined in the runtime, call the tracer indirectly via
a global variable named MR_trace_func_ptr.  This global variable
is initialized by the auto-generated *_init.c file.

To avoid linking in the tracer even when it is not being used,
this global variable is only set to point to MR_trace_real()
if you're using a debugging grade or if c2init was invoked
with the `-t' flag.  Otherwise it is set to MR_trace_fake()
which just prints an error message telling the user to
rebuild the executable with debugging enabled.

Makefile.DLLs:
	Reserve random locations for the two new libraries. Whether they work
	will be decided by testing on Windows.

Mmake.common.in:
	Add variables naming the new directories, and create variables
	naming the libraries.

Mmakefile:
	Add targets for the new directories, and modify existing rules
	as appropriate.

browser/Mmakefile:
	Mmakefile for the new directory, modelled on library/Mmakefile.

browser/browser_library.m:
	Umbrella file for the new directory, modelled on library/library.m.

{browser,library}/debugger_interface.m:
	Moved this file from library to browser without change.

browser/help.m:
	A new module for the help system of the debugger. Not yet used.

compiler/Mmakefile:
	Update to refer to the new directories and libraries where
	appropriate.

compiler/mercury_compile.m:
	If we are doing tracing, then pass -t instead of -i to c2init.

compiler/modules.m:
	When generating the .dep file, get the grade flags passed to c2init.

doc/Mmakefile:
	Remove the special treatment of library/debugger_interface.m.

library/Mmakefile:
	Update to refer to the new directories and libraries where
	appropriate, and to conform to the new name of the library.

library/library.m:
	Do not import debugger_interface.

profiler/Mmakefile:
	Update to refer to the new directories and libraries where
	appropriate.

runtime/Mmakefile:
	Update to refer to the new directories and libraries where
	appropriate, and to conform to the new name of the library.

	Remove references to files being moved to the trace directory.

runtime/mercury_init.h:
	Refer to the automatically generated dll header file by its new name
	(renamed because the runtime library is renamed).

	Add declarations to support the new global variable MR_trace_func_ptr.

runtime/mercury_memory_handlers.c:
runtime/mercury_memory_zones.c:
runtime/mercury_misc.c:
	Remove inappropriate #includes of "mercury_trace.h", and substitute
	a #include of "mercury_trace_base.h" if necessary.

{runtime,trace}/mercury_trace.[ch]:
{runtime,trace}/mercury_trace_external.[ch]:
{runtime,trace}/mercury_trace_internal.[ch]:
	Move these files from the runtime to the trace directory.

	The only changes are the removal from mercury_trace.h of declarations
	added to runtime/mercury_trace_base.h, and the change from MR_trace
	to MR_trace_real.

runtime/mercury_trace_base.[ch]:
	Define MR_trace(), which does an indirect call through
	MR_trace_func_ptr if the event should be traced.

	Define MR_trace_fake, which just prints an error message.
	Its address will be assigned to MR_trace_func_ptr if tracing
	is not enabled.

	Define the types needed by the signature of MR_trace.

	Fix an old bug: s/MERCURY_TRACE_PERMANENT_H/MERCURY_TRACE_BASE_H/.

runtime/mercury_wrapper.[ch]:
	Add the new global variable MR_trace_func_ptr.

scripts/c2init.in:
	Add a new option, -t/--trace, which enables tracing by causing the
	address of MR_trace_real to be assigned to MR_trace_func_ptr.

	Have this option be implied by the grade. Also have the old option
	-i (need initialization code) be implied by the grade, as well as by
	-t.

scripts/ml.in:
	Include the new libraries in the link command.

tests/debugger/Mmakefile:
	Include -t instead of -i in the list of c2init options. (-t implies
	-i.)

tools/bootcheck:
	Copy and build the new directories as appropriate. The trace directory
	is treated like the runtime, the browser directory is treated like the
	library.

trace/Mmakefile:
	Mmakefile for the new directory, modelled on runtime/Mmakefile.

util/mkinit.c:
	Add the new option -t, as discussed above.
	Mmakefile for the new directory, modelled on runtime/Mmakefile.

util/Mmakefile:
	Specify -O0, since with the default optimization level, gcc on
	cyclone ignores the assignment of TRUE to need_tracing when -t is
	given (!!!).
1998-09-29 05:12:06 +00:00
Tyson Dowd
822efe150d Install ROTDs to the www directory as well as the ftp site.
Estimated hours taken: 0.5

test_mercury:
	Install ROTDs to the www directory as well as the ftp site.
1998-09-24 05:30:52 +00:00
Tyson Dowd
cbffa9fde1 Only install in the beta-releases directory on murlibobo.
Estimated hours taken: 0.05

tools/test_mercury:
	Only install in the beta-releases directory on murlibobo.
1998-09-18 04:04:14 +00:00
Tyson Dowd
5acbb7724e A tar file was being misnamed when moved.
Estimated hours taken: 0.05

A tar file was being misnamed when moved.

tools/test_mercury:
	s/extra/extras
1998-09-14 05:47:00 +00:00
Tyson Dowd
3a83ccdf74 Small tweak to get unstable builds copied correctly.
Estimated hours taken: 0.1

tools/test_mercury:
	Small tweak to get unstable builds copied correctly.
1998-09-14 04:44:51 +00:00
Thomas Conway
12e16cd4af fix up the options that I added in the last change.
Estimated hours taken: 0.1

tools/bootcheck:
	fix up the options that I added in the last change. They now are:
		-g, --copy-boehm-gc
	so a bootcheck with a non-mt-safe stage 1 and an mt-safe stage 2/3
	should be invoked:
		bootcheck -r -g ...
1998-09-11 01:06:42 +00:00
Thomas Conway
cc489361e1 Enhance bootcheck to copy the boehm_gc directory as well as the runtime.
Estimated hours taken: 0.25

Enhance bootcheck to copy the boehm_gc directory as well as the runtime.
This was necessary because if the grade for stages 2 and 3 contains *.par.*
but the stage 1 grade doesn't then the collector must be recompiled.

tools/bootcheck:
	Add an option --copy-boehm-gc to copy the boehm_gc directory
	rather than link it.
	Add an option -R which implies --copy-runtime and --copy-boehm-gc.
1998-09-10 07:45:45 +00:00
Tyson Dowd
965a4a50a2 Change the release tar.gz file generation scheme.
Estimated hours taken: 1.5

Change the release tar.gz file generation scheme.

We now generate:
	mercury-compiler-rotd-YYYY-MM-DD-unstable.tar.gz
	mercury-extras-rotd-YYYY-MM-DD-unstable.tar.gz
	mercury-tests-rotd-YYYY-MM-DD-unstable.tar.gz
each night if we bootstrap, even if we don't pass the tests.

If we pass the tests, we generate:
	mercury-compiler-rotd-YYYY-MM-DD.tar.gz
	mercury-extras-rotd-YYYY-MM-DD.tar.gz
	mercury-tests-rotd-YYYY-MM-DD.tar.gz

And for numbered releases we create:
	mercury-compiler-0.8.tar.gz
	mercury-extras-0.8.tar.gz
	mercury-tests-0.8.tar.gz

Mmakefile:
	Change the tar target to create the newly named files.

tools/test_mercury:
	Change the behaviour of copying files to the beta-releases
	directory.
1998-09-10 03:21:49 +00:00
Zoltan Somogyi
8870e9fc48 Delete stage2/library/*.o only after stage 2 is complete, since
Estimated hours taken: 0.05

tools/bootcheck:
	Delete stage2/library/*.o only after stage 2 is complete, since
	the complete stage2 make requires it.
1998-08-31 04:14:15 +00:00
Zoltan Somogyi
019a8b7cd7 Delete stage2/library/*.o earlier, as soon as we have created the
Estimated hours taken: 0.2

tools/bootcheck:
	Delete stage2/library/*.o earlier, as soon as we have created the
	archive.

	Delete stage2/compiler/*.o later, only after stage3/library has been
	successfully built.

	Set up a better environment for the tests if stages 1 & 2 may have
	different grades.
1998-08-30 03:44:44 +00:00