mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-08 10:23:03 +00:00
Fix potential problems with the way we were handling grade components: the
Estimated hours taken: 5 Fix potential problems with the way we were handling grade components: the places that know about grade components were not being kept totally in sync. This change fixes previous damage and aims to prevent future damage. The file runtime/mercury_grade.h contains a list of all the files in the compiler that know about grade components. All these files now process the grade components in the same order, so that they can be checked for consistency more easily. runtime/mercury_grade.h: Add the list. runtime/mercury_conf_param.h: Remove a comment about an obsolete grade component. scripts/init_grade_options.sh-subr: Remove initializations of variables that do not correspond to grade components, add missing initializations of shell variables that do correspond to grade components, and concentrate the grade options component of usage messages here, to prevent double maintenance. Update list of user scripts. scripts/final_grade_options.sh-subr: Add missing initializations in processing the --grade superoption. Standardize the order of processing options, and the indentation. Update list of user scripts. scripts/c2init.in: Take the usage message for grade component options from init_grade_options.sh-subr. scripts/mgnuc.in: Take the usage message for grade component options from init_grade_options.sh-subr. Standardize the order of processing grade options, and separate the processing of grade options and non-grade options. scripts/ml.in: Take the usage message for grade component options from init_grade_options.sh-subr. Standardize the order of processing grade options. Process some missing ones. compiler/handle_options.m: Standardize the order of processing grade options. Remove code to handle an obsolete grade component.
This commit is contained in:
@@ -6,11 +6,17 @@
|
||||
#
|
||||
# final_grade_options.sh-subr:
|
||||
# An `sh' subroutine for handling implications between grade-related
|
||||
# options. Used by the `ml' and `mgnuc' scripts.
|
||||
# options. Used by the `ml', `mgnuc' and `c2init' scripts.
|
||||
#
|
||||
# The code here should be inserted after a script's option-parsing
|
||||
# loop.
|
||||
#
|
||||
# IMPORTANT: any changes to the handling of grades here may also require
|
||||
# changes to compiler/handle_options.m.
|
||||
#
|
||||
# This file should only use the shell variables initialized by
|
||||
# init_grade_options.sh-subr.
|
||||
#
|
||||
#---------------------------------------------------------------------------#
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user