decl.c (java_init_decl_processing): Don't emit otable decls if flag_indirect_dispatch...
authorJeff Sturm <jsturm@one-point.com>
Tue, 23 Sep 2003 03:05:30 +0000 (03:05 +0000)
committerJeff Sturm <jsturm@gcc.gnu.org>
Tue, 23 Sep 2003 03:05:30 +0000 (03:05 +0000)
* decl.c (java_init_decl_processing): Don't emit otable decls
if flag_indirect_dispatch is not set.

From-SVN: r71674

gcc/java/ChangeLog
gcc/java/decl.c

index f0a863b2322dddcb82d9e9ffc491abe6d4b8cc4a..7ed9f4bb1d10267fbcdc7745e31bc25d61e2eb6e 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-22  Jeff Sturm  <jsturm@one-point.com>
+
+       * decl.c (java_init_decl_processing): Don't emit otable decls
+       if flag_indirect_dispatch is not set.
+
 2003-09-21  Richard Henderson  <rth@redhat.com>
 
        * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, 
index 7ddf704efad777761819a36d89d122accde601cf..858e0820ac6c80396344a89252237fd0549bd99f 100644 (file)
@@ -634,17 +634,21 @@ java_init_decl_processing (void)
   method_symbols_array_ptr_type = build_pointer_type 
                                  (method_symbols_array_type);
 
-  otable_decl = build_decl (VAR_DECL, get_identifier ("otable"), otable_type);
-  DECL_EXTERNAL (otable_decl) = 1;
-  TREE_STATIC (otable_decl) = 1;
-  TREE_READONLY (otable_decl) = 1;
-  pushdecl (otable_decl);
+  if (flag_indirect_dispatch)
+    {
+      otable_decl = build_decl (VAR_DECL, get_identifier ("otable"),
+                               otable_type);
+      DECL_EXTERNAL (otable_decl) = 1;
+      TREE_STATIC (otable_decl) = 1;
+      TREE_READONLY (otable_decl) = 1;
+      pushdecl (otable_decl);
   
-  otable_syms_decl = build_decl (VAR_DECL, get_identifier ("otable_syms"), 
-    method_symbols_array_type);
-  TREE_STATIC (otable_syms_decl) = 1;
-  TREE_CONSTANT (otable_syms_decl) = 1;
-  pushdecl (otable_syms_decl);
+      otable_syms_decl = build_decl (VAR_DECL, get_identifier ("otable_syms"), 
+                                    method_symbols_array_type);
+      TREE_STATIC (otable_syms_decl) = 1;
+      TREE_CONSTANT (otable_syms_decl) = 1;
+      pushdecl (otable_syms_decl);
+    }
   
   PUSH_FIELD (object_type_node, field, "vtable", dtable_ptr_type);
   /* This isn't exactly true, but it is what we have in the source.