mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-09 19:02:18 +00:00
Clean up the handling of the --java' and --gc' compilation options.
Estimated hours taken: 3
Branches: main
Clean up the handling of the `--java' and `--gc' compilation options.
README.Java:
Document the `--java' and `--target java' options,
and use `--java' rather than `--grade java' in the examples.
compiler/handle_options.m:
Fix a bug where `mmc --java --output-grade-string'
was printing "java.gc" instead of "java". It was calling
set_gc_method to set the gc_method field in the globals structure,
but it was not setting the corresponding string option in the
options table, and compute_grade was looking at the string option.
The fix was to also set the string option.
scripts/parse_grade_options.sh-subr:
Handle the `--java' and `--java-only' options.
scripts/final_grade_options.sh-subr:
For the IL and Java back-ends, set the gc_method to automatic.
For the Java back-end, set highlevel_data to true.
compiler/globals.m:
Fix an XXX: add a new alternative to the gc_method type,
"automatic", to distinguish lack of GC ("none") from the
automatic GC done by Java or the .NET CLR.
compiler/options.m:
doc/user_guide.texi:
Document the new `--gc automatic' alternative for the `--gc' option.
Delete the documentation of the deprecated `--gc conservative'
option (which has been replaced with `--gc boehm').
compiler/compile_target_code.m:
compiler/handle_options.m:
scripts/parse_grade_options.sh-subr:
scripts/final_grade_options.sh-subr:
Handle the new `--gc automatic' option..
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#---------------------------------------------------------------------------#
|
||||
# Copyright (C) 1998-2002 The University of Melbourne.
|
||||
# Copyright (C) 1998-2002, 2004 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
# Public License - see the file COPYING in the Mercury distribution.
|
||||
#---------------------------------------------------------------------------#
|
||||
@@ -54,6 +54,20 @@ case $target in asm|il|java)
|
||||
highlevel_code=true ;;
|
||||
esac
|
||||
|
||||
#
|
||||
# --target Java implies --high-level-data
|
||||
#
|
||||
case $target in java)
|
||||
highlevel_data=true ;;
|
||||
esac
|
||||
|
||||
#
|
||||
# --target IL or Java implies --gc automatic
|
||||
#
|
||||
case $target in il|java)
|
||||
gc_method=automatic ;;
|
||||
esac
|
||||
|
||||
#
|
||||
# --high-level-code disables the use of low-level gcc extensions
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user