Files
mercury/runtime/mercury_agc_debug.h
Fergus Henderson 1e9195b4f3 Add some Mmake rules to the runtime and some code to tools/bootcheck
Estimated hours taken: 16

Add some Mmake rules to the runtime and some code to tools/bootcheck
so that we automatically check that the namespace remains clean.
Also add some `MR_' prefixes that Zoltan missed in his earlier change.

tools/bootcheck:
	Add an option, which is enabled by default, to
	build the check_namespace target in the runtime.

runtime/RESERVED_MACRO_NAMES:
	New file.  Contains a list of the macros names that
	don't start with `MR_' or the like.

runtime/Mmakefile:
	Change the rule for `check_headers' so that it checks for macros
	that don't occur in the RESERVED_MACRO_NAMES files, as well as not
	starting with `MR_' prefixes, and reports errors for such macros.
	Also add a rule for check_objs that checks whether the object
	files define any global symbols that don't have the right prefixes,
	and a rule `check_namespace' that does both of the above.

runtime/mercury_bootstrap.h:
	#include "mercury_types.h" and "mercury_float.h",
	to ensure that this header file is self-contained.
	Also make sure that all the old names are disabled if you
	compile with `-DMR_NO_BACKWARDS_COMPAT'.

runtime/mercury_context.c:
runtime/mercury_thread.h:
runtime/mercury_thread.c:
	Use `bool' rather than `MR_Bool' for the argument to
	MR_check_pending_contexts() and the return type of
	MR_init_thread(), since these are C bools, not Mercury
	bools, and there's no requirement that they have the
	same size as MR_Integer.

runtime/mercury_type_info.h:
runtime/mercury_deep_copy_body.h:
runtime/mercury_tabling.c:
library/std_util.m:
trace/mercury_trace_declarative.c:
trace/mercury_trace_external.c:
trace/mercury_trace_internal.c:
tests/hard_coded/existential_types_test.m:
	Add MR_ prefixes to UNIV_OFFSET_FOR_TYPEINFO and UNIV_OFFSET_FOR_VALUE.

trace/mercury_trace_external.c:
trace/mercury_trace_internal.c:
trace/mercury_trace_tables.c:
	Add MR_ prefixes to do_init_modules().

runtime/mercury_tabling.h:
runtime/mercury_tabling.c:
runtime/mercury_overflow.h:
runtime/mercury_debug.h:
	Add MR_ prefixes to table_*.

runtime/mercury_overflow.h:
runtime/mercury_debug.h:
	Add MR_ prefixes to IF().

runtime/mercury_context.h:
	Add MR_ prefixes to IF_MR_THREAD_SAFE().

runtime/mercury_engine.h:
	Add MR_ prefixes to IF_NOT_CONSERVATIVE_GC().

runtime/mercury_engine.h:
runtime/mercury_engine.c:
library/exception.m:
extras/aditi/aditi.m:
	Add MR_ prefixs to do_fail, do_redo, do_not_reached, etc.

compiler/trace.m:
compiler/fact_table.m:
compiler/llds_out.m:
	Add MR_ prefixes to the generated code.
2000-12-04 18:35:22 +00:00

56 lines
1.7 KiB
C

/*
** Copyright (C) 1998, 2000 The University of Melbourne.
** This file may only be copied under the terms of the GNU Library General
** Public License - see the file COPYING.LIB in the Mercury distribution.
*/
#ifndef MERCURY_AGC_DEBUG_H
#define MERCURY_AGC_DEBUG_H
/*
** mercury_agc_debug.h -
** Debugging support for accurate garbage collection.
*/
#include "mercury_regs.h" /* needs to come first */
#include "mercury_types.h" /* for MR_Word */
#include "mercury_label.h" /* for MR_Internal */
#include "mercury_memory_zones.h" /* for MR_MemoryZone */
#include "mercury_accurate_gc.h" /* for MR_RootList */
/*---------------------------------------------------------------------------*/
/*
** MR_agc_dump_stack_frames:
** Dump the det stack, writing all information available about each
** stack frame.
**
** label is the topmost label on the stack, heap_zone is the zone
** which the data is stored upon.
*/
extern void MR_agc_dump_stack_frames(MR_Internal *label,
MR_MemoryZone *heap_zone,
MR_Word *stack_pointer, MR_Word *current_frame);
/*
** MR_agc_dump_nondet_stack_frames:
** Dump the nondet stack, writing all information available about each
** stack frame.
**
** label is the topmost label on the stack, heap_zone is the zone
** which the data is stored upon.
*/
extern void MR_agc_dump_nondet_stack_frames(MR_Internal *label,
MR_MemoryZone *heap_zone, MR_Word *stack_pointer,
MR_Word *current_frame, MR_Word *max_frame);
/*
** MR_agc_dump_roots:
** Dump the extra rootset, writing all information about each root.
*/
extern void MR_agc_dump_roots(MR_RootList roots);
/*---------------------------------------------------------------------------*/
#endif /* not MERCURY_AGC_DEBUG_H */