summaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-08 15:17:32 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-08 15:17:32 +0000
commitf3f006ad3e96de5657e8032c14fcb4f7eaf5e931 (patch)
treed7c6e9b6d0c3fea0b0d512fb08735055168c35e6 /gcc/java
parent9b5b6b7a2c78011bb892b071d1315f7b0182f4c6 (diff)
downloadgcc-f3f006ad3e96de5657e8032c14fcb4f7eaf5e931.tar.gz
* Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h.
(TREE_H): Include $(FLAGS_H) instead of options.h. (opts-common.o): Depend on $(FLAGS_H) instead of options.h. * c-objc-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. * common.opt (flag_complex_method, flag_evaluation_order, flag_ira_algorithm, flag_ira_region, flag_warn_unused_result): New Variable declarations. * configure.ac (tm_include_list): Include flags.h instead of options.h. * configure: Regenerate. * flags.h: Condition out contents for target libraries. Include options.h at end of file. (flag_complex_method, flag_ira_algorithm, flag_ira_region, flag_evaluation_order, flag_warn_unused_result): Remove. * gcc.c (main): Intialize global_options with global_options_init. * langhooks-def.h (lhd_init_options_struct): Declare. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. (LANG_HOOKS_INITIALIZER): Include LANG_HOOKS_INIT_OPTIONS_STRUCT. * langhooks.c (lhd_init_options_struct): New. * langhooks.h (struct lang_hooks): Add init_options_struct. Update comment on init_options. * optc-gen.awk: Generate initializer for global_options_init, not global_options. * opth-gen.awk: Condition out structure declarations for target libraries. Declare global_options_init. * opts-common.c: Include flags.h instead of options.h. * opts.c (flag_warn_unused_result): Remove. (read_cmdline_options): Take gcc_options parameters. Pass them to read_cmdline_option. (initial_lang_mask, initial_min_crossjump_insns, initial_max_fields_for_field_sensitive, initial_loop_invariant_max_bbs_in_loop): Define at file scope. (init_options_once): New. Split out of decode_options. (init_options_struct): New. Split out of decode_options. (decode_cmdline_options_to_array_default_mask): New. (default_options_optimization): New. Split out of decode_options. (decode_options): Move most code to other functions. Update call to read_cmdline_options. (finish_options): New. Split out of decode_options. * opts.h (decode_options): Add gcc_options parameters. (init_options_once, init_options_struct, decode_cmdline_options_to_array_default_mask): New. * toplev.c (flag_complex_method, flag_ira_algorithm, flag_ira_region, flag_evaluation_order): Remove. (general_init): Use global_options_init for initial flag values for global_dc. (toplev_main): Call init_options_once, init_options_struct, lang_hooks.init_options_struct, decode_cmdline_options_to_array_default_mask and lang_hooks.init_option before decode_options. Update arguments to decode_options. * tree.h: Include flags.h instead of options.h. ada: * gcc-interface/misc.c (gnat_init_options_struct): New. Split out from gnat_init_options. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. c-family: * c-common.c (parse_optimize_options): Call decode_cmdline_options_to_array_default_mask before decode_options. Update arguments to decode_options. * c-common.h (c_common_init_options_struct): Declare. * c-opts.c (c_common_init_options_struct): New. Split out from c_common_init_options. cp: * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. fortran: * f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. * gfortran.h (gfc_init_options_struct): Declare. * options.c (gfc_init_options_struct): New. Split out from gfc_init_options. java: * lang.c (java_init_options_struct): New. Split out from java_init_options. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. lto: * lto-lang.c (lto_init_options): Change to lto_init_options_struct. Update parameters. (LANG_HOOKS_INIT_OPTIONS): Don't define. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165189 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/lang.c25
2 files changed, 23 insertions, 8 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 0d155a8b1c5..1c737c64180 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-08 Joseph Myers <joseph@codesourcery.com>
+
+ * lang.c (java_init_options_struct): New. Split out from
+ java_init_options.
+ (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
+
2010-10-04 Andi Kleen <ak@linux.intel.com>
* Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 78f9715bb82..fbe25ad2e5e 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -48,6 +48,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
static bool java_init (void);
static void java_finish (void);
static unsigned int java_option_lang_mask (void);
+static void java_init_options_struct (struct gcc_options *);
static void java_init_options (unsigned int, struct cl_decoded_option *);
static bool java_post_options (const char **);
@@ -126,6 +127,8 @@ struct GTY(()) language_function {
#define LANG_HOOKS_FINISH java_finish
#undef LANG_HOOKS_OPTION_LANG_MASK
#define LANG_HOOKS_OPTION_LANG_MASK java_option_lang_mask
+#undef LANG_HOOKS_INIT_OPTIONS_STRUCT
+#define LANG_HOOKS_INIT_OPTIONS_STRUCT java_init_options_struct
#undef LANG_HOOKS_INIT_OPTIONS
#define LANG_HOOKS_INIT_OPTIONS java_init_options
#undef LANG_HOOKS_HANDLE_OPTION
@@ -535,23 +538,29 @@ java_option_lang_mask (void)
return CL_Java;
}
+/* Initialize options structure OPTS. */
+
static void
-java_init_options (unsigned int decoded_options_count ATTRIBUTE_UNUSED,
- struct cl_decoded_option *decoded_options ATTRIBUTE_UNUSED)
+java_init_options_struct (struct gcc_options *opts)
{
- flag_bounds_check = 1;
- flag_exceptions = 1;
- flag_non_call_exceptions = 1;
+ opts->x_flag_bounds_check = 1;
+ opts->x_flag_exceptions = 1;
+ opts->x_flag_non_call_exceptions = 1;
/* In Java floating point operations never trap. */
- flag_trapping_math = 0;
+ opts->x_flag_trapping_math = 0;
/* In Java arithmetic overflow always wraps around. */
- flag_wrapv = 1;
+ opts->x_flag_wrapv = 1;
/* Java requires left-to-right evaluation of subexpressions. */
- flag_evaluation_order = 1;
+ opts->x_flag_evaluation_order = 1;
+}
+static void
+java_init_options (unsigned int decoded_options_count ATTRIBUTE_UNUSED,
+ struct cl_decoded_option *decoded_options ATTRIBUTE_UNUSED)
+{
jcf_path_init ();
}