Commit Graph

6 Commits

Author SHA1 Message Date
Zoltan Somogyi
455e1eea75 The runtime had two different conventions for naming types.
Estimated hours taken: 2
Branches: main

The runtime had two different conventions for naming types. One convention,
used mostly in the debugger-related modules, added underscores between
capitalized words; example: MR_Label_Layout. The other convention, used
in most modules, used capitalized words without underscores (e.g. MR_TypeInfo).

This diff standardizes on the second convention. It has no algorithmic changes,
only renames of types.

runtime/*.[ch]:
trace/*.[ch]:
compiler/*.m:
library/*.m:
mdbcomp/*.m:
	Effect the change described above. The only substantive change is that
	runtime/mercury_stack_layout.h used to define *two* types for trace
	levels: MR_TraceLevel and MR_Trace_Level, and this diff standardizes
	on just one (they had equivalent definitions).

runtime/mercury_bootstrap.h:
	Add a #define from the old name to the new for all the changed type
	names that the installed compiler can put into .c files. We can delete
	these #defines some time after this diff has bootstrapped.

slice/.mgnuc_opts:
	Restore the --no-mercury-stdlib-dir option, without which the slice
	directory won't compile after this change (because it looks for type
	names in the installed runtime header files, which define the old
	versions of type names).
2006-11-29 05:18:42 +00:00
Zoltan Somogyi
e65ee0f43f Convert to four-space indentation all modules that have not previously
Estimated hours taken: 1
Branches: main

trace/*.[ch]:
	Convert to four-space indentation all modules that have not previously
	been so converted.
2006-11-10 03:24:18 +00:00
Simon Taylor
b7c4a317e9 Add MR_ prefixes to the remaining non-prefixed symbols.
Estimated hours taken: 4
Branches: main

Add MR_ prefixes to the remaining non-prefixed symbols.

This change will require all workspaces to be updated
The compiler will start generating references to MR_TRUE,
MR_bool, etc., which are not defined in the old runtime
header files.

runtime/mercury_std.h:
	Add MR_ prefixes to bool, TRUE, FALSE, max, min,
	streq, strdiff, strtest, strntest, strneq, strndiff,
	strntest, NO_RETURN.

	Delete a commented out definition of `reg'.

runtime/mercury_tags.h:
	Add an MR_ prefix to TAGBITS.

configure.in:
runtime/mercury_goto.h:
runtime/machdeps/i386_regs.h/mercury_goto.h:
	Add an MR_ prefix to PIC.

runtime/mercury_conf_param.h:
	Allow non-prefixed PIC and HIGHTAGS to be defined on
	the command line.

runtime/mercury_bootstrap.h:
	Add backwards compatibility definitions.

RESERVED_MACRO_NAMES:
	Remove the renamed macros.

compiler/export.m:
compiler/ml_code_gen.m:
	Use MR_bool rather than MR_Bool (MR_Bool is
	meant to be for references to the Mercury type
	bool__bool).

runtime/mercury_types.h:
	Add a comment the MR_Bool is for references to
	bool__bool.

*/*.c:
*/*.h:
*/*.m:
	Add MR_ prefixes.
2002-02-18 07:01:33 +00:00
Mark Brown
76fe607e92 Implement a split-screen version of source linking for mdb.
Estimated hours taken: 3.75
Branches: main

Implement a split-screen version of source linking for mdb.  The lower
window shows what would normally be shown in the full window.  This
includes displaying the parent context at interface events.  The upper
window shows the current context (the callee) at interface events.

Split screen mode is enabled with the '-2' or '--split-screen' options
to 'view'.

trace/mercury_trace_source.h:
	Add a 'split' field to the struct which holds server info.

trace/mercury_trace_source.c:
	Handle split screen mode when opening a server and when
	synchronising.

	Factor out some common code into MR_trace_source_jump().

	Close the server with ":qall" instead of ":q".

	Repair an earlier oversight: pass the verbose flag in a call
	to MR_trace_source_check_server().

trace/mercury_trace_internal.c:
	Parse the new option and pass its value around where required.

	Set the split field in the server info before starting a
	new server.

	When synchronising, pass both parent and current contexts
	(if available).

doc/user_guide.texi:
	Document the new option.

NEWS:
	Mention the new source-linking feature.
2001-11-13 12:37:21 +00:00
Simon Taylor
5d5e1b052d Make this file self-contained.
Estimated hours taken: 0.1

mercury_trace_source.h:
	Make this file self-contained.
2001-11-02 06:25:56 +00:00
Mark Brown
9991b4974d Implement source-linking commands for mdb, using the new client/server
Estimated hours taken: 7.5
Branches: main

Implement source-linking commands for mdb, using the new client/server
feature of vim.  New commands added to mdb are 'view', which opens a
source-linked window if there is not one already open, and 'view -c'
which shuts any open source window.

This feature requires a version of vim compiled with '+clientserver'.
If such a program cannot be found, the mdb commands produce an error
message and do nothing else.

trace/mercury_trace_internal.c:
	Implement the new mdb commands.

	Add a new global variable which stores the information required
	for one source server.

	Every time mdb stops at an event, synchronise the source window
	if present with the source context of the event.  At interface
	events, we use the parent context if possible, since that is more
	useful information.

	When leaving mdb, close the source window if there is one open.

trace/mercury_trace_source.c:
trace/mercury_trace_source.h:
	Code for starting up and manipulating a source-server in a vim
	window.

trace/Mmakefile:
	Add the new module to the trace library.

doc/user_guide.texi:
doc/mdb_categories:
	Document the new mdb commands.

configure.in:
runtime/mercury_conf.h.in:
	Test for the functions getpid() and gethostname().  Without
	these functions mdb uses an inferior method to generate a unique
	server name.
2001-10-31 17:53:52 +00:00