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).
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.
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.
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.