mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-09 19:02:18 +00:00
Use trail segments by default in trailing grades.
Until now, we have supported two variants of trailing grades, those that use a
fixed-size trail (.tr) and those that use trail segments (.trseg). This change
removes support for fixed sized trails, and renames the .trseg grade component
to .tr. The .trseg grade now acts a synonym for .tr; it is deprecated, since we
intend to eventually delete it. Until then, the behavior of the old .tr grade
component should be available, though to developers only, by compiling the
whole system with EXTRA_CFLAGS = -DMR_USE_FIXED_SIZE_TRAIL.
runtime/mercury_conf_param.h:
Delete the MR_TRAIL_SEGMENTS macro. Its effect is now implied by
MR_USE_TRAIL, unless a new macro, MR_USE_FIXED_SIZE_TRAIL, is defined.
Developers can use this new macro to disable trail segments, should the
need for doing that arise.
runtime/mercury_grade.h:
Add a new macro that defines a binary compatibility version number for
trailing; use that in the grade part for trailing.
Use "_trfix" or "_trseg" as the prefix of the trailing part of the
MR_GRADE_VAR depending on if MR_USE_FIXED_SIZE_TRAIL is defined or
not.
runtime/mercury_trail.[ch]:
runtime/mercury_context.h:
Enable trail segments by default, only disabling them if
MR_USE_FIXED_SIZE_TRAIL is enabled.
runtime/mercury_wrapper.c:
trace/mercury_trace_cmd_developer.c:
Conform to the above changes.
compiler/compile_target_code.m:
Do not pass options for trail segments to the C compiler.
compiler/compute_grade.m:
Treat trseg as a synonym for tr.
compiler/options.m:
Deprecate --trail-segments.
grade_lib/grade_spec.m:
grade_lib/grade_string.m:
grade_lib/grade_structure.m:
grade_lib/grade_vars.m:
grade_lib/try_all_grade_structs.m:
grade_lib/var_value_names.m:
Remove the trseg component.
scripts/canonical_grade.sh-subr:
scripts/init_grade_options.sh-subr:
scripts/mgnuc.in:
scripts/parse_grade_options.sh-subr:
Remove support for the --trail-segments option.
doc/user_guide.texi:
Update the documentation for the --trail-segments.
Comment out the documentation of the --trail-size and --trail-size-kwords
runtime options; they are no longer useful to non-developers.
NEWS:
Announce this change.
This commit is contained in:
@@ -119,14 +119,9 @@ case $record_term_sizes_as_words,$record_term_sizes_as_cells in
|
||||
;;
|
||||
esac
|
||||
|
||||
case $use_trail,$trail_segments in
|
||||
true,false) GRADE="$GRADE.tr" ;;
|
||||
true,true) GRADE="$GRADE.trseg" ;;
|
||||
false,false) ;;
|
||||
*) progname=`basename $0`
|
||||
echo "$progname: error: invalid combination of trailing options." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
case $use_trail in
|
||||
true) GRADE="$GRADE.tr" ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
case $use_minimal_model_stack_copy,$use_minimal_model_own_stacks,$minimal_model_debug in
|
||||
|
||||
@@ -78,7 +78,6 @@ profile_deep=false
|
||||
record_term_sizes_as_words=false
|
||||
record_term_sizes_as_cells=false
|
||||
use_trail=false
|
||||
trail_segments=false
|
||||
use_minimal_model_stack_copy=false
|
||||
use_minimal_model_own_stacks=false
|
||||
minimal_model_debug=false
|
||||
|
||||
@@ -390,9 +390,6 @@ esac
|
||||
case $use_trail in
|
||||
true)
|
||||
TRAIL_OPTS="-DMR_USE_TRAIL"
|
||||
case $trail_segments in
|
||||
true) TRAIL_OPTS="$TRAIL_OPTS -DMR_TRAIL_SEGMENTS" ;;
|
||||
esac
|
||||
# See the comment in compile_c_file/7 in compiler/compile_target_code.m
|
||||
# for an explanation of this.
|
||||
case $COMPILER in
|
||||
@@ -402,15 +399,7 @@ case $use_trail in
|
||||
;;
|
||||
|
||||
false)
|
||||
TRAIL_OPTS=""
|
||||
case $trail_segments in
|
||||
true)
|
||||
progname`basename $0`
|
||||
echo "$progname: cannot use trail segments without trailing"
|
||||
exit 1;;
|
||||
esac
|
||||
FN_ALIGN_OPTS=""
|
||||
;;
|
||||
TRAIL_OPTS="" ;;
|
||||
esac
|
||||
|
||||
case $use_minimal_model_stack_copy,$use_minimal_model_own_stacks in
|
||||
|
||||
@@ -143,11 +143,6 @@
|
||||
--no-use-trail)
|
||||
use_trail=false ;;
|
||||
|
||||
--trail-segments)
|
||||
trail_segments=true ;;
|
||||
--no-trail-segments)
|
||||
trail_segments=false ;;
|
||||
|
||||
--use-minimal-model-stack-copy)
|
||||
use_minimal_model_stack_copy=true ;;
|
||||
--no-use-minimal-model-stack-copy)
|
||||
@@ -243,7 +238,6 @@
|
||||
record_term_sizes_as_words=false
|
||||
record_term_sizes_as_cells=false
|
||||
use_trail=false
|
||||
trail_segments=false
|
||||
use_minimal_model_stack_copy=false
|
||||
use_minimal_model_own_stacks=false
|
||||
minimal_model_debug=false
|
||||
@@ -423,12 +417,10 @@
|
||||
|
||||
tr)
|
||||
use_trail=true
|
||||
trail_segments=false
|
||||
;;
|
||||
|
||||
trseg)
|
||||
use_trail=true
|
||||
trail_segments=true
|
||||
;;
|
||||
|
||||
mm)
|
||||
|
||||
Reference in New Issue
Block a user