Commit 95ca6d8b by Neil Booth Committed by Neil Booth

Make-lang.in (JAVA_OBJS, [...]): Update.

java:
	* Make-lang.in (JAVA_OBJS, java/lang.o): Update.
	(java/j-options.c, java/j-options.h): New.
	* java-tree.h (resource_name, compile_resource_file,
	compile_resource_data): Constify.
	* jcf-write.c (jcf_write_base_directory): Similarly.
	* jcf.h (jcf_write_base_directory): Similarly.
	* lang.c: Include j-options.h.
	(cl_options_count, cl_options, string_option, java_decode_option,
	lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
	process_option_with_no): Remove.
	(resource_name): Constify.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	(java_handle_option): New.
	(java_init): Don't call jcf_path_init.
	(java_init_options): Call jcf_path_init.
	* lang.opt: New.
	* resource.c (compile_resource_data, compile_resource_file): Constify.

From-SVN: r67673
parent 00051260
2003-06-09 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in (JAVA_OBJS, java/lang.o): Update.
(java/j-options.c, java/j-options.h): New.
* java-tree.h (resource_name, compile_resource_file,
compile_resource_data): Constify.
* jcf-write.c (jcf_write_base_directory): Similarly.
* jcf.h (jcf_write_base_directory): Similarly.
* lang.c: Include j-options.h.
(cl_options_count, cl_options, string_option, java_decode_option,
lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
process_option_with_no): Remove.
(resource_name): Constify.
(LANG_HOOKS_HANDLE_OPTION): Override.
(java_handle_option): New.
(java_init): Don't call jcf_path_init.
(java_init_options): Call jcf_path_init.
* lang.opt: New.
* resource.c (compile_resource_data, compile_resource_file): Constify.
2003-06-09 Nathan Sidwell <nathan@codesourcery.com> 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
* java-tree.h (DECL_FUNCTION_LAST_LINE): New. * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
......
...@@ -108,7 +108,7 @@ gt-java-builtins.h gtype-java.h gt-java-resource.h : s-gtype ; @true ...@@ -108,7 +108,7 @@ gt-java-builtins.h gtype-java.h gt-java-resource.h : s-gtype ; @true
JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \ JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \
java/constants.o java/lang.o java/typeck.o java/except.o java/verify.o \ java/constants.o java/lang.o java/typeck.o java/except.o java/verify.o \
java/zextract.o java/jcf-io.o java/jcf-parse.o java/mangle.o \ java/zextract.o java/jcf-io.o java/jcf-parse.o java/mangle.o \
java/mangle_name.o java/builtins.o java/resource.o \ java/mangle_name.o java/builtins.o java/resource.o java/j-options.o \
java/jcf-write.o java/buffer.o java/check-init.o java/jcf-depend.o \ java/jcf-write.o java/buffer.o java/check-init.o java/jcf-depend.o \
java/jcf-path.o java/xref.o java/boehm.o java/java-tree-inline.o mkdeps.o java/jcf-path.o java/xref.o java/boehm.o java/java-tree-inline.o mkdeps.o
...@@ -326,7 +326,7 @@ java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \ ...@@ -326,7 +326,7 @@ java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \
coretypes.h $(TM_H) coretypes.h $(TM_H)
java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \ java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \
toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(EXPR_H) diagnostic.h \ toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(EXPR_H) diagnostic.h \
langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h opts.h langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h opts.h java/j-options.h
java/mangle.o: java/mangle.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) $(SYSTEM_H) \ java/mangle.o: java/mangle.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) $(SYSTEM_H) \
coretypes.h $(TM_H) toplev.h $(GGC_H) gt-java-mangle.h coretypes.h $(TM_H) toplev.h $(GGC_H) gt-java-mangle.h
java/mangle_name.o: java/mangle_name.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) \ java/mangle_name.o: java/mangle_name.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) \
...@@ -347,6 +347,12 @@ java/xref.o: java/xref.c java/xref.h $(CONFIG_H) $(JAVA_TREE_H) toplev.h \ ...@@ -347,6 +347,12 @@ java/xref.o: java/xref.c java/xref.h $(CONFIG_H) $(JAVA_TREE_H) toplev.h \
java/zextract.o: java/zextract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ java/zextract.o: java/zextract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
java/zipfile.h java/zipfile.h
java/j-options.c: java/lang.opt opts.sh java/j-options.h
java/j-options.h: java/lang.opt opts.sh
AWK=$(AWK) $(SHELL) $(srcdir)/opts.sh java/j-options.c \
java/j-options.h $(srcdir)/java/lang.opt
# jcf-io.o needs $(ZLIBINC) added to cflags. # jcf-io.o needs $(ZLIBINC) added to cflags.
java/jcf-io.o: java/jcf-io.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ java/jcf-io.o: java/jcf-io.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(JAVA_TREE_H) $(JAVA_TREE_H)
......
...@@ -192,7 +192,7 @@ extern int flag_emit_xref; ...@@ -192,7 +192,7 @@ extern int flag_emit_xref;
extern int do_not_fold; extern int do_not_fold;
/* Resource name. */ /* Resource name. */
extern char * resource_name; extern const char *resource_name;
/* Turned to 1 if -Wall was encountered. See lang.c for their meanings. */ /* Turned to 1 if -Wall was encountered. See lang.c for their meanings. */
extern int flag_wall; extern int flag_wall;
...@@ -1130,7 +1130,6 @@ extern tree build_dtable_decl (tree); ...@@ -1130,7 +1130,6 @@ extern tree build_dtable_decl (tree);
extern tree build_internal_class_name (tree); extern tree build_internal_class_name (tree);
extern tree build_constants_constructor (void); extern tree build_constants_constructor (void);
extern tree build_ref_from_constant_pool (int); extern tree build_ref_from_constant_pool (int);
extern void compile_resource_file (char *, const char *);
extern tree build_utf8_ref (tree); extern tree build_utf8_ref (tree);
extern tree ident_subst (const char*, int, const char*, int, int, const char*); extern tree ident_subst (const char*, int, const char*, int, int, const char*);
extern tree identifier_subst (const tree, const char *, int, int, const char *); extern tree identifier_subst (const tree, const char *, int, int, const char *);
...@@ -1307,9 +1306,9 @@ struct rtx_def * java_expand_expr (tree, rtx, enum machine_mode, int); ...@@ -1307,9 +1306,9 @@ struct rtx_def * java_expand_expr (tree, rtx, enum machine_mode, int);
extern void java_inlining_merge_static_initializers (tree, void *); extern void java_inlining_merge_static_initializers (tree, void *);
extern void java_inlining_map_static_initializers (tree, void *); extern void java_inlining_map_static_initializers (tree, void *);
extern void compile_resource_data (char *name, const char *buffer, int length); extern void compile_resource_data (const char *name, const char *buffer, int);
extern void compile_resource_file (const char *, const char *);
extern void write_resource_constructor (void); extern void write_resource_constructor (void);
extern void compile_resource_file (char *name, const char *filename);
extern void init_resource_processing (void); extern void init_resource_processing (void);
......
...@@ -49,7 +49,7 @@ extern struct obstack temporary_obstack; ...@@ -49,7 +49,7 @@ extern struct obstack temporary_obstack;
/* Base directory in which `.class' files should be written. /* Base directory in which `.class' files should be written.
NULL means to put the file into the same directory as the NULL means to put the file into the same directory as the
corresponding .java file. */ corresponding .java file. */
char *jcf_write_base_directory = NULL; const char *jcf_write_base_directory = NULL;
/* Make sure bytecode.data is big enough for at least N more bytes. */ /* Make sure bytecode.data is big enough for at least N more bytes. */
......
...@@ -277,7 +277,7 @@ extern int jcf_unexpected_eof (JCF*, int) ATTRIBUTE_NORETURN; ...@@ -277,7 +277,7 @@ extern int jcf_unexpected_eof (JCF*, int) ATTRIBUTE_NORETURN;
? (((PTR)[-3]&0x0F) << 12) + (((PTR)[-2]&0x3F) << 6) + ((PTR)[-1]&0x3F) \ ? (((PTR)[-3]&0x0F) << 12) + (((PTR)[-2]&0x3F) << 6) + ((PTR)[-1]&0x3F) \
: ((PTR)++, -1)) : ((PTR)++, -1))
extern char *jcf_write_base_directory; extern const char *jcf_write_base_directory;
/* Debug macros, for the front end */ /* Debug macros, for the front end */
......
; Options for the Java front end.
; Copyright (C) 2003 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
; Software Foundation; either version 2, or (at your option) any later
; version.
;
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
; for more details.
;
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING. If not, write to the Free
; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
; 02111-1307, USA.
; This file is processed by the script opts.sh. It is a database of
; command line options, with each record separated by a blank line,
; and each field appearing on its own line. The first field is the
; command-line switch with the leading "-" removed. All options
; beginning with "f" or "W" are implicitly assumed to take a "no-"
; form; this form should not be listed. If you do not want this
; negative form and you want it to be automatically rejected, add
; RejectNegative to the second field.
; The second field should contain "Java". If the switch takes an
; argument, then you should also specify "Joined" and/or "Separate" to
; indicate where the argument can appear.
; Comments can appear on their own line anwhere in the file, preceded
; by a semicolon. Whitespace is permitted before the semicolon.
; For each switch XXX below, an enumeration constant is created by the
; script opts.sh spelt OPT_XXX, but with all non-alphanumeric
; characters replaced with an underscore.
; Please try to keep this file in ASCII collating order.
I
Java Joined
M
Java
MD
Java
MF
Java Separate
MM
Java
MMD
Java
MP
Java
MT
Java Separate
Wall
Java
Wdeprecated
Java
Wextraneous-semicolon
Java
Wout-of-date
Java
Wredundant-modifiers
Java
fCLASSPATH=
Java Joined RejectNegative
fassert
Java
fassume-compiled
Java
fassume-compiled=
Java Joined
fbootclasspath=
Java Joined RejectNegative
fcheck-references
Java
fclasspath=
Java Joined RejectNegative
fcompile-resource=
Java Joined RejectNegative
fdump-
Java Joined RejectNegative
femit-class-file
Java
femit-class-files
Java
fencoding=
Java Joined RejectNegative
fextdirs=
Java Joined RejectNegative
ffilelist-file
Java
fforce-classes-archive-check
Java
fhash-synchronization
Java
findirect-dispatch
Java
finline-functions
Java
fjni
Java
foptimize-static-class-initialization
Java
foutput-class-dir=
Java Joined RejectNegative
fstore-check
Java
fuse-boehm-gc
Java
fuse-divide-subroutine
Java
version
Java
; This comment is to ensure we retain the blank line above.
...@@ -56,7 +56,7 @@ static GTY(()) rtx registerResource_libfunc; ...@@ -56,7 +56,7 @@ static GTY(()) rtx registerResource_libfunc;
static int Jr_count = 0; static int Jr_count = 0;
void void
compile_resource_data (char *name, const char *buffer, int length) compile_resource_data (const char *name, const char *buffer, int length)
{ {
tree rtype, field = NULL_TREE, data_type, rinit, data, decl; tree rtype, field = NULL_TREE, data_type, rinit, data, decl;
char buf[60]; char buf[60];
...@@ -157,7 +157,7 @@ write_resource_constructor (void) ...@@ -157,7 +157,7 @@ write_resource_constructor (void)
compiled Java resource, which is accessed by the runtime using compiled Java resource, which is accessed by the runtime using
NAME. */ NAME. */
void void
compile_resource_file (char *name, const char *filename) compile_resource_file (const char *name, const char *filename)
{ {
struct stat stat_buf; struct stat stat_buf;
int fd; int fd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment