Files
mercury/runtime/mercury_conf_param.h
Zoltan Somogyi c6812299c2 Remove support for --args simple. We don't use it, we won't use it even for
Estimated hours taken: 4.5

Remove support for --args simple. We don't use it, we won't use it even for
experiments, and it is unnecessary complication.

If anybody were using --args simple, this would need bootstrapping, but
since nobody does, there is no need, and this can be committed as an
ordinary change.

compiler/options.m:
doc/user_guide.texi:
scripts/*.in:
scripts/*.sh-subr:
	Remove the --args option.

compiler/globals.m:
	Remove the args_method global and its access predicates.

compiler/handle_options.m:
	Don't set the args_method global from the option.

compiler/arg_info.m:
	Remove support for --args simple. This allows us to remove a now
	redundant argument from an exported predicate.

compiler/mercury_compile.m:
	Remove the code for passing -DCOMPACT_ARGS to the C compiler.

compiler/bytecode_gen.m:
compiler/fact_table.m:
compiler/follow_vars.m:
compiler/live_vars.m:
compiler/call_gen.m:
	Don't pass the unnecessary argument to arg_info.

compiler/call_gen.m:
compiler/unify_gen.m:
	Remove now unnecessary assertions.

compiler/hlds_pred.m:
	Don't include an args_method in proc_infos; instead, include
	a slot that says whether the procedure's address is taken or not.
	(In most cases, this determined whether the args_method was
	simple or compact.) We will need this bool in the near future
	(when we generate layout structures for procedures whose address
	is taken).

	Modify the signatures of exported predicates to accommodate
	this change to the data structure.

compiler/hlds_out.m:
	Print the new slot, not the args_method.

compiler/lambda.m:
	When creating procedures from lambdas, set the address-taken slot
	to address_is_taken instead of setting up its args_method.

compiler/make_hlds.m:
	Minor changes to conform to the changes in the signatures of
	the predicates exported from hlds_pred.m.

compiler/check_typeclass.m:
compiler/clause_to_proc.m:
compiler/dnf.m:
compiler/magic.m:
compiler/magic_util.m:
compiler/modecheck_call.m:
compiler/pd_info.m:
compiler/post_typecheck.m:
compiler/unify_gen.m:
	Minor changes to conform to the changes in the signatures of
	the predicates exported from hlds_pred.m and make_hlds.m.

runtime/mercury_type_info.h:
	Remove the conditional definition of the macros that provided
	an argument-method-independent way of referring to the registers
	holding the inputs and outputs of e.g. unification procedures.
	We don't need the independence anymore, and using registers instead
	of macros in the code ensures that maintainers are aware of register
	reuse issues (e.g. they copy an input from r1 before overwriting it
	with an output).

runtime/mercury_conf_param.h:
runtime/mercury_grade.h:
	Remove support for the args method component of the grade.

runtime/mercury_ho_call.c:
runtime/mercury_tabling.c:
library/*.m:
	Conform to the changes in runtime/mercury_type_info.h by effectively
	applying the #defines appropriate to compact args by hand.

	Remove code and data structures only needed for simple args.
	Remove comments needed only in the presence of uncertainty about
	the args method.
1999-06-01 09:46:20 +00:00

319 lines
9.4 KiB
C

/*
** Copyright (C) 1997-1999 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.
*/
/*
** mercury_conf_param.h:
** Defines various configuration parameters.
**
** Configuration parameters fall into three groups.
** They can be set automatically by autoconf.
** They can be passed on the command line (e.g. the mgnuc
** script sets some options based on the grade).
** Or their values can be implied by the settings of other parameters.
**
** The ones defined in mercury_conf.h are determined by autoconf.
** The remainder are documented and/or defined by this file,
** #included by mercury_conf.h.
*/
/*
** IMPORTANT NOTE:
** This file must not contain any #include statements,
** and may not define any global variables,
** for reasons explained in mercury_imp.h.
** This file should contain _only_ configuration macros.
*/
#ifndef MERCURY_CONF_PARAM_H
#define MERCURY_CONF_PARAM_H
/*---------------------------------------------------------------------------*/
/*
** Documentation for configuration parameters which can be set on the
** command line via `-D'.
*/
/*
** Code generation options:
**
** USE_GCC_GLOBAL_REGISTERS
** USE_GCC_NONLOCAL_GOTOS
** USE_ASM_LABELS
** CONSERVATIVE_GC
** NATIVE_GC [not yet working]
** NO_TYPE_LAYOUT
** BOXED_FLOAT
** MR_USE_TRAIL
** MR_USE_MINIMAL_MODEL
** See the documentation for
** --gcc-global-registers
** --gcc-non-local-gotos
** --gcc-asm-labels
** --gc conservative
** --gc accurate [not yet working]
** --args compact
** --no-type-layout
** --unboxed-float
** --use-trail
** --use-minimal-model
** (respectively) in the mmc help message or the Mercury User's Guide.
**
** USE_SINGLE_PREC_FLOAT:
** Use C's `float' rather than C's `double' for the
** Mercury floating point type (`Float').
**
** USE_TYPE_TO_TERM:
** Include `type_to_term' and `term_to_type' fields in type_infos.
** [This is obsolete. USE_TYPE_LAYOUT is a better solution.]
**
** PARALLEL
** Enable support for parallelism [not yet working].
**
** MR_NO_BACKWARDS_COMPAT
** Disable backwards compatibility with C code using obsolete low-level
** constructs, e.g. referring to variables and macros without their MR_
** prefixes.
*/
/*
** Runtime checking options:
**
** MR_CHECK_FOR_OVERFLOW
** (Implied by MR_LOWLEVEL_DEBUG.)
** Check for overflow of the various memory
** areas, e.g. heap, det stack, nondet stack,
** before every access that might result in overflow.
** Causes the generated code to become bigger and less efficient.
** Slows down compilation.
**
** Normally MR_CHECK_FOR_OVERFLOW is not set, since
** we trap overflows using mprotect().
*/
/*
** Debugging options:
**
** MR_STACK_TRACE
** Require the inclusion of the layout information needed by error/1
** and the debugger to print stack traces. This effect is achieved by
** including MR_STACK_TRACE in the mangled grade (see mercury_grade.h).
**
** MR_REQUIRE_TRACING
** Require that all Mercury procedures linked in should be compiled
** with at least interface tracing. This effect is achieved
** by including MR_REQUIRE_TRACING in the mangled grade
** (see mercury_grade.h).
** Note that MR_REQUIRE_TRACING is talking about execution tracing,
** not stack tracing; these are two independently configurable features.
**
** MR_LOWLEVEL_DEBUG
** Enables various low-level debugging stuff,
** that was in the distant past used to debug
** the low-level code generation.
** Causes the generated code to become VERY big and VERY inefficient.
** Slows down compilation a LOT.
**
** MR_DEBUG_DD_BACK_END
** Enables low-level debugging messages on the operation of the
** declarative debugging back end.
**
** MR_DEBUG_GOTOS
** (Implied by MR_LOWLEVEL_DEBUG.)
** Enables low-level debugging of gotos.
** Causes the generated code to become bigger and less efficient.
** Slows down compilation.
**
** MR_DEBUG_AGC_SCHEDULING
** Display debugging information while scheduling accurate garbage
** collection.
**
** MR_DEBUG_AGC_COLLECTION
** Display debugging information while collecting garbage using the
** accurate garbage collector.
**
** MR_DEBUG_AGC_FORWARDING
** Display debugging information when leaving or finding forwarding
** pointers during accurate garbage collection.
**
** MR_DEBUG_AGC_PRINT_VARS
** Display the values of live variables during accurate garbage
** collection.
**
** MR_DEBUG_AGC
** Turn on all debugging information for accurate garbage
** collection. (Equivalent to all MR_DEBUG_AGC_* macros above).
*/
#if MR_DEBUG_AGC
#define MR_DEBUG_AGC_SCHEDULING
#define MR_DEBUG_AGC_COLLECTION
#define MR_DEBUG_AGC_FORWARDING
#define MR_DEBUG_AGC_PRINT_VARS
#endif
/*
** MR_LABEL_STRUCTS_INCLUDE_NUMBER
** Include a label number in each label layout structure.
*/
/*
** Profiling options:
**
** MEASURE_REGISTER_USAGE
** Enable this if you want to measure the number of times
** each register is used. (Note that the measurement includes
** uses which occur inside debugging routines, so to get an accurate
** count you should not also enable low-level debugging.)
**
** PROFILE_CALLS
** Enables call count profiling.
**
** PROFILE_TIME
** Enables time profiling.
**
** PROFILE_MEMORY
** Enables profiling of memory usage.
*/
/*
** Experimental options:
**
** MR_TRACE_HISTOGRAM
** Enable this if you want to count the number of execution tracing events
** at various call depths.
*/
/*---------------------------------------------------------------------------*/
/*
** Settings of configuration parameters which can be passed on
** the command line, but which are also implied by other parameters.
*/
/* MR_LOWLEVEL_DEBUG implies MR_DEBUG_GOTOS and MR_CHECK_FOR_OVERFLOW */
#ifdef MR_LOWLEVEL_DEBUG
#define MR_DEBUG_GOTOS
#define MR_CHECK_FOR_OVERFLOW
#endif
/*---------------------------------------------------------------------------*/
/*
** Configuration parameters whose values are determined by the settings
** of other configuration parameters. These parameters should not be
** set on the command line.
**
** You must make sure that you don't test the value of any of these parameters
** before its conditional definition.
*/
/*
** Static code addresses are available unless using gcc non-local gotos,
** without assembler labels.
*/
#ifdef MR_STATIC_CODE_ADDRESSES
#error "MR_STATIC_CODE_ADDRESSES should not be defined on the command line"
#endif
#if !defined(USE_GCC_NONLOCAL_GOTOS) || defined(USE_ASM_LABELS)
#define MR_STATIC_CODE_ADDRESSES
#endif
/*
** MR_INSERT_LABELS -- labels need to be inserted into the label table.
** (this also means the initialization code needs
** to be run some time before the first use of the
** label table).
*/
#ifdef MR_INSERT_LABELS
#error "MR_INSERT_LABELS should not be defined on the command line"
#endif
#if defined(MR_STACK_TRACE) || defined(NATIVE_GC) || defined(MR_DEBUG_GOTOS)
#define MR_INSERT_LABELS
#endif
/*
** MR_INSERT_ENTRY_LABEL_NAMES -- the entry label table should contain
** the names of labels as well as their
** addresses and layouts (label names are
** quite big, so prefer not to include them
** unless they are necessary).
*/
#ifdef MR_INSERT_ENTRY_LABEL_NAMES
#error "MR_INSERT_ENTRY_LABEL_NAMES should not be defined on the command line"
#endif
#if defined(PROFILE_CALLS) || defined(MR_LOWLEVEL_DEBUG) \
|| defined(MR_DEBUG_AGC_SCHEDULING)
#define MR_INSERT_ENTRY_LABEL_NAMES
#endif
/*
** MR_INSERT_INTERNAL_LABEL_NAMES -- the internal label table should contain
** the names of labels as well as their
** addresses and layouts (label names are
** quite big, so prefer not to include them
** unless they are necessary).
*/
#ifdef MR_INSERT_INTERNAL_LABEL_NAMES
#error "MR_INSERT_INTERNAL_LABEL_NAMES should not be defined on the command line"
#endif
#if defined(MR_LOWLEVEL_DEBUG) || defined(MR_DEBUG_AGC_SCHEDULING)
#define MR_INSERT_INTERNAL_LABEL_NAMES
#endif
/*
** MR_NEED_INITIALIZATION_AT_START -- the module specific initialization code
** must be run before any Mercury code
** is run.
**
** You need to run initialization code for grades without static
** code addresses, for profiling, and any time you need to insert
** labels into the label table.
*/
#ifdef MR_NEED_INITIALIZATION_AT_START
#error "MR_NEED_INITIALIZATION_AT_START should not be defined on the command line"
#endif
#if !defined(MR_STATIC_CODE_ADDRESSES) || defined(PROFILE_CALLS) \
|| defined(PROFILE_TIME) || defined(DEBUG_LABELS)
#define MR_NEED_INITIALIZATION_AT_START
#endif
/*
** MR_MAY_NEED_INITIALIZATION -- the module specific initialization code
** may be needed, either at start or later.
**
** You need to run initialization code for grades without static
** code addresses, for profiling, and any time you need to insert
** labels into the label table.
*/
#ifdef MR_MAY_NEED_INITIALIZATION
#error "MR_MAY_NEED_INITIALIZATION should not be defined on the command line"
#endif
#if defined(MR_NEED_INITIALIZATION_AT_START) || defined(MR_INSERT_LABELS)
#define MR_MAY_NEED_INITIALIZATION
#endif
/*---------------------------------------------------------------------------*/
/*
** Memory protection and signal handling.
*/
#if defined(HAVE_SIGINFO) && defined(PC_ACCESS)
#define MR_CAN_GET_PC_AT_SIGNAL
#endif
#if defined(HAVE_MPROTECT) && defined(HAVE_SIGINFO)
#define MR_CHECK_OVERFLOW_VIA_MPROTECT
#endif
/*---------------------------------------------------------------------------*/
#endif /* MERCURY_CONF_PARAM_H */