aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>1999-04-21 13:49:49 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>1999-04-21 06:49:49 -0700
commit5423609c57f756be5db8981d4ebb11a80d44f6e9 (patch)
tree6a4397f5304c150cbe5d79eab70071c1fe5a446a /gcc/java/decl.c
parent9d9cf1661deded9d4030041ba8a4dc6a80df78c7 (diff)
downloadgcc-5423609c57f756be5db8981d4ebb11a80d44f6e9.zip
gcc-5423609c57f756be5db8981d4ebb11a80d44f6e9.tar.gz
gcc-5423609c57f756be5db8981d4ebb11a80d44f6e9.tar.bz2
decl.c (predef_filenames, [...]): New globals
Wed Apr 21 11:13:36 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (predef_filenames, predef_filenames_size): New globals (init_decl_processing): predef_filenames and predef_filenames_size initialized. * java-tree.h (predef_filenames, predef_filenames_size): Declared extern. * jcf-parse.c (predefined_filename_p): New function. (yyparse): Check that files on the command line are specified only once and issue a warning otherwise. * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro. * parse.y (source_end_java_method): Nullify NOP method bodies, to avoid a gcc warning with -W -Wall turned on. (java_expand_classes): Abort if errors were encountered. (java_complete_lhs): If the cross reference flag is set, wrap field DECL node around a WFL when resolving expression name. From-SVN: r26578
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r--gcc/java/decl.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 1109454..f248ad2 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -257,6 +257,8 @@ tree string_type_node;
tree throwable_type_node;
tree runtime_exception_type_node;
tree error_exception_type_node;
+tree *predef_filenames;
+int predef_filenames_size;
tree boolean_type_node;
@@ -540,6 +542,9 @@ init_decl_processing ()
float_zero_node = build_real (float_type_node, dconst0);
double_zero_node = build_real (double_type_node, dconst0);
+ /* As your adding items here, please update the code right after
+ this section, so that the filename containing the source code of
+ the pre-defined class gets registered correctly. */
unqualified_object_id_node = get_identifier ("Object");
object_type_node = lookup_class (get_identifier ("java.lang.Object"));
object_ptr_type_node = promote_type (object_type_node);
@@ -551,6 +556,17 @@ init_decl_processing ()
error_exception_type_node =
lookup_class (get_identifier ("java.lang.Error"));
+ /* This section has to be updated as items are added to the previous
+ section. */
+ predef_filenames_size = 6;
+ predef_filenames = (tree *)xmalloc (predef_filenames_size * sizeof (tree));
+ predef_filenames [0] = get_identifier ("java/lang/Class.java");
+ predef_filenames [1] = get_identifier ("java/lang/Error.java");
+ predef_filenames [2] = get_identifier ("java/lang/Object.java");
+ predef_filenames [3] = get_identifier ("java/lang/RuntimeException.java");
+ predef_filenames [4] = get_identifier ("java/lang/String.java");
+ predef_filenames [5] = get_identifier ("java/lang/Throwable.java");
+
methodtable_type = make_node (RECORD_TYPE);
layout_type (methodtable_type);
build_decl (TYPE_DECL, get_identifier ("methodtable"), methodtable_type);