This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gcjx] Expand visitor interface


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

  My maniacal obsession with the visitor interface and the
pretty-printer continues. This patch seeks to bring as many
of the remaining model classes as possible under the visitor.

After this patch, only the following remain untouched by
the visitor interface:

  1. abstract classes.

  2. model_foo classes that are actually not model_element
  sub-classes. For example, model_ambiguous_field,
  model_modifier_list, etc.

  3. Classes like model_annotation and
  model_annotation_initializer that just abort() in their
  visit() implementations.

  4. model_generic_invocation, which has different base
  classes depending on the template instantiation. I could
  not immediately come up with a simple way to bind all
  of these instantiations together without too much
  disruption for a patch of this nature.

  5. Any class that was left out in my silly grep-sed-cut-
  based attempt to discover such classes.

Note that I cannot just put in empty implementations for
most of the new methods as I at least need to call
the visit_xxx method corresponding to the parent class
of the class making the visit_yyy call (yyy extends xxx).

This is also the reason for some of the quirky parameters
for some of the visit_xxx methods and why I had to
make model_block::statements, etc. protected instead of
private.

As usual, I've left the pretty-printer versions with a
"TODO", which I will flesh out later.

Tested with Jacks.

OK?

Thanks,
Ranjit.

- --
Ranjit Mathew       Email: rmathew AT gmail DOT com

Bangalore, INDIA.     Web: http://ranjitmathew.hostingzero.com/




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDTVCRYb1hx2wRS48RAiDzAKCoNIWL1aBsMyAJ5oytRpuW1/gwxQCgn8dX
ut1/5o0hH7a0U0EwE3VDTiM=
=7eVN
-----END PGP SIGNATURE-----
Index: ChangeLog
from  Ranjit Mathew  <rmathew@gcc.gnu.org>

	* model/annotype.hh (model_annotation_type::visit): Declare.
	* model/annotype.cc (model_annotation_type::visit): Implement.
	* model/arraytype.hh (model_array_type::visit): Declare.
	* model/arraytype.cc (model_array_type::visit): Implement.
	* model/block.hh (model_block::statements): Make protected.
	* model/bytecode.hh (model_phony_block::visit): Declare.
	* model/bytecode.cc (model_phony_block::visit): Implement.
	* model/class.hh (model_class::visit): Declare.
	* model/class.cc (model_class::visit): Implement.
	* model/classinst.hh (model_class_instance::visit): Declare.
	* model/classinst.cc (model_class_instance::visit): Implement.
	* model/constructor.hh (model_constructor::visit): Declare.
	* model/constructor.cc (model_constructor::visit): Implement.
	* model/enum.hh (model_enum::visit): Declare.
	* model/enum.cc (model_enum::visit): Implement.
	* model/enumconst.hh (model_enum_constant::visit): Declare.
	* model/enumconst.cc: New file.
	* model/init.hh (model_initializer_block::visit): Declare.
	* model/init.cc (model_initializer_block::visit): Implement.
	* model/javadoc.hh (model_javadoc::visit): Declare.
	* model/javadoc.cc: New file.
	* model/method.hh (model_abstract_method::visit): Declare.
	* model/method.cc (model_abstract_method::visit): Implement.
	* model/new.hh (model_new_primary::visit): Declare.
	* model/new.cc (model_new_primary::visit): Implement.
	* model/null.hh (model_null_type::visit): Declare.
	* model/null.cc (model_null_type::visit): Implement.
	* model/package.hh (model_package::name): Make protected.
	(model_unnamed_package::visit): Declare.
	(model_primordial_package::visit): Declare.
	* model/package.cc (model_unnamed_package::visit): Implement.
	(model_primordial_package::visit): Likewise.
	* model/primitive.hh (model_primitive_base::visit): Make abstract.
	(model_primitive_boolean::visit): Declare.
	(model_int_primitive::visit): Likewise.
	(model_fp_primitive::visit): Likewise.
	* model/primitive.cc (model_primitive_base::visit): Remove.
	(model_primitive_boolean::visit): Implement.
	(model_int_primitive::visit): Likewise.
	(model_fp_primitive::visit): Likewise.
	(model_fp_primitive<jfloat>): Instantiate.
	(model_fp_primitive<jdouble>): Likewise.
	* model/this.hh (model_this_outer::visit): Declare.
	(model_synthetic_this::visit): Likewise.
	* model/this.cc (model_synthetic_this::visit): Implement.
	(model_this_outer::visit): Likewise.
	* model/typevar.hh (model_type_variable::visit): Declare.
	* model/typevar.cc (model_type_variable::visit): Implement.
	* model/void.hh (model_void_type::visit): Declare.
	* model/void.cc: New file.
	* model/wildcard.hh (model_wildcard::visit): Declare.
	* model/wildcard.cc (model_wildcard::visit): Implement.
	* visitor.hh (visitor::visit_primitive): Remove.
	(visitor::visit_abstract_method): New method.
	(visitor::visit_annotation_type): Likewise.
	(visitor::visit_array_type): Likewise.
	(visitor::visit_class): Likewise.
	(visitor::visit_class_instance): Likewise.
	(visitor::visit_constructor): Likewise.
	(visitor::visit_enum): Likewise.
	(visitor::visit_enum_constant): Likewise.
	(visitor::visit_fp_primitive): Likewise.
	(visitor::visit_int_primitive): Likewise.
	(visitor::visit_primitive_boolean): Likewise.
	(visitor::visit_initializer_block): Likewise.
	(visitor::visit_new_primary): Likewise.
	(visitor::visit_null_type): Likewise.
	(visitor::visit_phony_block): Likewise.
	(visitor::visit_primordial_package): Likewise.
	(visitor::visit_unnamed_package): Likewise.
	(visitor::visit_synthetic_this): Likewise.
	(visitor::visit_this_outer): Likewise.
	(visitor::visit_type_variable): Likewise.
	(visitor::visit_void_type): Likewise.
	(visitor::visit_wildcard): Likewise.
	(visitor::visit_javadoc): Likewise.
	* defassign.cc (definite_assignment_visitor): Implement new visitor
	methods.
	* dump.cc (dumper, pretty_printer): Likewise.
	* fold.cc (fold_visitor): Likewise.
	* bytecode/generate.hh (bytecode_generator): Likewise.
	* Makefile.am (model_sources): Add model/enumconst.cc,
	model/javadoc.cc and model/void.cc.
	* Makefile.in: Regenerate.

Index: model/annotype.hh
===================================================================
--- model/annotype.hh	2005-10-12 16:30:52.000000000 +0530
+++ model/annotype.hh	2005-10-12 16:49:00.000000000 +0530
@@ -1,6 +1,6 @@
 // Represent an annotation type.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -67,6 +67,8 @@ public:
   /// Throw exception, using request as the location, on error.
   void check_completeness (const std::list<ref_annotation_value> &args,
 			   model_element *request);
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_ANNOTYPE_HH
Index: model/annotype.cc
===================================================================
--- model/annotype.cc	2005-10-12 16:49:08.000000000 +0530
+++ model/annotype.cc	2005-10-12 16:51:10.000000000 +0530
@@ -226,3 +226,9 @@ model_annotation_type::get_retention_pol
 
   return annotation_retention (policy);
 }
+
+void
+model_annotation_type::visit (visitor *v)
+{
+  v->visit_annotation_type (this, descriptor, name);
+}
Index: model/arraytype.hh
===================================================================
--- model/arraytype.hh	2005-10-12 16:53:02.000000000 +0530
+++ model/arraytype.hh	2005-10-12 16:53:35.000000000 +0530
@@ -1,6 +1,6 @@
 // Represent an array type.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -56,6 +56,8 @@ public:
     // an ordinary 'new' when the argument type is an array.
     abort ();
   }
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_ARRAYTYPE_HH
Index: model/arraytype.cc
===================================================================
--- model/arraytype.cc	2005-10-12 16:53:41.000000000 +0530
+++ model/arraytype.cc	2005-10-12 16:54:53.000000000 +0530
@@ -1,6 +1,6 @@
 // Array types.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -73,3 +73,9 @@ model_array_type::erasure ()
 {
   return element->erasure ()->array ();
 }
+
+void
+model_array_type::visit (visitor *v)
+{
+  v->visit_array_type (this, descriptor, name, element);
+}
Index: model/block.hh
===================================================================
--- model/block.hh	2005-10-12 20:42:23.000000000 +0530
+++ model/block.hh	2005-10-12 20:42:36.000000000 +0530
@@ -1,6 +1,6 @@
 // Represent a block.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -25,6 +25,8 @@
 /// This represents a block of statements.
 class model_block : public model_stmt
 {
+protected:
+
   // The statements in the block.
   std::list<ref_stmt> statements;
 
Index: model/bytecode.hh
===================================================================
--- model/bytecode.hh	2005-10-12 17:57:56.000000000 +0530
+++ model/bytecode.hh	2005-10-12 17:58:12.000000000 +0530
@@ -222,6 +222,8 @@ public:
   {
     // Nothing.
   }
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_BYTECODE_HH
Index: model/bytecode.cc
===================================================================
--- model/bytecode.cc	2005-10-12 17:58:25.000000000 +0530
+++ model/bytecode.cc	2005-10-12 20:42:59.000000000 +0530
@@ -70,3 +70,11 @@ model_bytecode_block::visit (visitor *v)
 {
   v->visit_bytecode_block (this, max_stack, max_locals, length, bytes);
 }
+
+
+
+void
+model_phony_block::visit (visitor *v)
+{
+  v->visit_phony_block (this, statements);
+}
Index: model/class.hh
===================================================================
--- model/class.hh	2005-10-12 16:38:46.000000000 +0530
+++ model/class.hh	2005-10-12 16:45:12.000000000 +0530
@@ -707,6 +707,8 @@ public:
   {
     return source_order_methods;
   }
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_CLASS_HH
Index: model/class.cc
===================================================================
--- model/class.cc	2005-10-12 16:45:33.000000000 +0530
+++ model/class.cc	2005-10-12 16:46:56.000000000 +0530
@@ -2498,3 +2498,9 @@ model_class::push_on_scope_for_class (re
   scope->push_warning_context (this);
   scope->push_scope (this);
 }
+
+void
+model_class::visit (visitor *v)
+{
+  v->visit_class (this, descriptor, name);
+}
Index: model/classinst.hh
===================================================================
--- model/classinst.hh	2005-10-12 16:58:06.000000000 +0530
+++ model/classinst.hh	2005-10-12 16:56:03.000000000 +0530
@@ -1,6 +1,6 @@
 // A parameterized class instance.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -77,6 +77,8 @@ public:
   /// capture conversion.  This differs from can_capture_p in that
   /// this method iterates over the parameters.
   bool capture_conversion_p (model_class_instance *);
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_CLASSINST_HH
Index: model/classinst.cc
===================================================================
--- model/classinst.cc	2005-10-12 16:56:15.000000000 +0530
+++ model/classinst.cc	2005-10-12 16:57:00.000000000 +0530
@@ -1,6 +1,6 @@
 // A parameterized class instance.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -119,3 +119,9 @@ model_class_instance::get_signature_map_
   result += ">";
   return result;
 }
+
+void
+model_class_instance::visit (visitor *v)
+{
+  v->visit_class_instance (this, descriptor, name, parent);
+}
Index: model/constructor.hh
===================================================================
--- model/constructor.hh	2005-10-12 16:58:53.000000000 +0530
+++ model/constructor.hh	2005-10-12 16:59:09.000000000 +0530
@@ -89,6 +89,8 @@ public:
   /// Prepend some statements to the constructor body.
   void prepend_statements (resolution_scope *, std::list<ref_stmt> &,
 			   bool = true);
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_CONSTRUCTOR_HH
Index: model/constructor.cc
===================================================================
--- model/constructor.cc	2005-10-12 17:00:21.000000000 +0530
+++ model/constructor.cc	2005-10-12 17:01:10.000000000 +0530
@@ -189,3 +189,9 @@ model_constructor::apply_type_map (const
 {
   return new model_constructor (this, type_map, enclosing);
 }
+
+void
+model_constructor::visit (visitor *v)
+{
+  v->visit_constructor (this, parameters, body);
+}
Index: model/enum.hh
===================================================================
--- model/enum.hh	2005-10-12 17:01:50.000000000 +0530
+++ model/enum.hh	2005-10-12 17:02:18.000000000 +0530
@@ -1,6 +1,6 @@
 // Represent an enum class.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -56,6 +56,8 @@ public:
   {
     return constants.size ();
   }
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_ENUM_HH
Index: model/enum.cc
===================================================================
--- model/enum.cc	2005-10-12 17:02:25.000000000 +0530
+++ model/enum.cc	2005-10-12 17:03:09.000000000 +0530
@@ -129,3 +129,9 @@ model_enum::resolve_hook (resolution_sco
   values->set_modifiers (ACC_STATIC);
   add (values);
 }
+
+void
+model_enum::visit (visitor *v)
+{
+  v->visit_enum (this, descriptor, name, constants);
+}
Index: model/enumconst.hh
===================================================================
--- model/enumconst.hh	2005-10-12 17:03:34.000000000 +0530
+++ model/enumconst.hh	2005-10-12 17:04:07.000000000 +0530
@@ -1,6 +1,6 @@
 // Represent an enum constant.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -83,6 +83,8 @@ public:
   {
     return ordinal;
   }
+
+  void visit (visitor *v);
 };
 
 #endif // GCJX_MODEL_ENUMCONST_HH
Index: model/enumconst.cc
===================================================================
--- model/enumconst.cc	2005-10-12 17:06:29.000000000 +0530
+++ model/enumconst.cc	2005-10-12 17:06:43.000000000 +0530
@@ -0,0 +1,28 @@
+// Represent an enum constant.
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// gcjx is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// gcjx 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with gcjx; see the file COPYING.LIB.  If
+// not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+#include "typedefs.hh"
+
+void
+model_enum_constant::visit (visitor *v)
+{
+  v->visit_enum_constant (this, descriptor, name, arguments);
+}
Index: model/init.hh
===================================================================
--- model/init.hh	2005-10-12 17:45:46.000000000 +0530
+++ model/init.hh	2005-10-12 17:46:16.000000000 +0530
@@ -1,6 +1,6 @@
 // Represent an initializer block.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -50,6 +50,8 @@ public:
   void resolve (resolution_scope *);
 
   void compute_normal_completion (normal_completion_state &);
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_INIT_HH
Index: model/init.cc
===================================================================
--- model/init.cc	2005-10-12 17:45:50.000000000 +0530
+++ model/init.cc	2005-10-12 17:47:03.000000000 +0530
@@ -1,6 +1,6 @@
 // Represent an initializer block.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -38,3 +38,9 @@ model_initializer_block::compute_normal_
 			? "instance initializer cannot complete normally"
 			: "static initializer cannot complete normally");
 }
+
+void
+model_initializer_block::visit (visitor *v)
+{
+  v->visit_initializer_block (this, statements, instance);
+}
Index: model/javadoc.hh
===================================================================
--- model/javadoc.hh	2005-10-12 17:07:00.000000000 +0530
+++ model/javadoc.hh	2005-10-12 17:07:09.000000000 +0530
@@ -49,10 +49,7 @@ public:
     return deprecated;
   }
 
-  void visit (visitor *)
-  {
-    // Nothing.
-  }
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_JAVADOC_HH
Index: model/javadoc.cc
===================================================================
--- model/javadoc.cc	2005-10-12 17:07:26.000000000 +0530
+++ model/javadoc.cc	2005-10-12 20:55:37.000000000 +0530
@@ -0,0 +1,28 @@
+// Represent a javadoc comment.
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// gcjx is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// gcjx 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with gcjx; see the file COPYING.LIB.  If
+// not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+#include "typedefs.hh"
+
+void
+model_javadoc::visit (visitor *v)
+{
+  v->visit_javadoc (this, deprecated);
+}
Index: model/method.hh
===================================================================
--- model/method.hh	2005-10-12 16:27:20.000000000 +0530
+++ model/method.hh	2005-10-12 16:27:36.000000000 +0530
@@ -369,6 +369,8 @@ public:
   {
     return original;
   }
+
+  void visit (visitor *);
 };
 
 const format &operator% (const format &, model_method *);
Index: model/method.cc
===================================================================
--- model/method.cc	2005-10-12 16:28:07.000000000 +0530
+++ model/method.cc	2005-10-12 16:29:41.000000000 +0530
@@ -751,6 +751,14 @@ model_method::apply_type_map (const mode
 
 
 
+void
+model_abstract_method::visit (visitor *v)
+{
+  v->visit_abstract_method (this, parameters, body, original);
+}
+
+
+
 const format &
 operator% (const format &fmt, model_method *meth)
 {
Index: model/new.hh
===================================================================
--- model/new.hh	2005-10-12 17:47:57.000000000 +0530
+++ model/new.hh	2005-10-12 17:48:37.000000000 +0530
@@ -1,6 +1,6 @@
 // Represent 'new'.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -117,6 +117,8 @@ public:
   {
     type_params = p;
   }
+
+  void visit (visitor *);
 };
 
 /// These typedefs are used to represent 'new' expressions with
Index: model/new.cc
===================================================================
--- model/new.cc	2005-10-12 17:48:53.000000000 +0530
+++ model/new.cc	2005-10-12 17:52:19.000000000 +0530
@@ -1,6 +1,6 @@
 // "new" operator
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -232,3 +232,10 @@ model_new_primary::determine_search_clas
 
   finish_search_class (scope, result, qualifier);
 }
+
+void
+model_new_primary::visit (visitor *v)
+{
+  v->visit_new_primary (this, method, klass, arguments, simple_name,
+                        type_params);
+}
Index: model/null.hh
===================================================================
--- model/null.hh	2005-10-12 17:54:12.000000000 +0530
+++ model/null.hh	2005-10-12 17:54:47.000000000 +0530
@@ -59,6 +59,8 @@ public:
   {
     return std::string ("null");
   }
+
+  void visit (visitor *);
 };
 
 extern model_null_type *null_type;
Index: model/null.cc
===================================================================
--- model/null.cc	2005-10-12 17:55:02.000000000 +0530
+++ model/null.cc	2005-10-12 17:56:39.000000000 +0530
@@ -1,6 +1,6 @@
 // 'null'
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -22,6 +22,14 @@
 #include "typedefs.hh"
 
 void
+model_null_type::visit (visitor *v)
+{
+  v->visit_null_type (this, descriptor);
+}
+
+
+
+void
 model_null_literal::visit (visitor *v)
 {
   v->visit_null_literal (this);
Index: model/package.hh
===================================================================
--- model/package.hh	2005-10-12 20:59:16.000000000 +0530
+++ model/package.hh	2005-10-12 20:59:38.000000000 +0530
@@ -25,6 +25,8 @@
 class model_package : public model_element, public Iname, public IContext,
 		      public IAnnotatable
 {
+protected:
+
   // The fully-qualified name of this package.  For the unnamed
   // package, this is empty.
   std::list<std::string> name;
@@ -129,6 +131,8 @@ public:
     : model_package (LOCATION_UNKNOWN)
   {
   }
+
+  void visit (visitor *);
 };
 
 class model_primordial_package : public model_package
@@ -139,6 +143,8 @@ public:
     : model_package (LOCATION_UNKNOWN)
   {
   }
+
+  void visit (visitor *);
 };
 
 const format &operator% (const format &fmt, model_package *pkg);
Index: model/package.cc
===================================================================
--- model/package.cc	2005-10-12 18:00:58.000000000 +0530
+++ model/package.cc	2005-10-12 18:01:56.000000000 +0530
@@ -88,6 +88,18 @@ model_package::visit (visitor *v)
   v->visit_package (this, name);
 }
 
+void
+model_unnamed_package::visit (visitor *v)
+{
+  v->visit_unnamed_package (this, name);
+}
+
+void
+model_primordial_package::visit (visitor *v)
+{
+  v->visit_primordial_package (this, name);
+}
+
 const format &
 operator% (const format &fmt, model_package *pkg)
 {
Index: model/primitive.hh
===================================================================
--- model/primitive.hh	2005-10-12 17:08:56.000000000 +0530
+++ model/primitive.hh	2005-10-12 21:11:57.000000000 +0530
@@ -202,7 +202,7 @@ public:
     abort ();
   }
 
-  void visit (visitor *);
+  void visit (visitor *) = 0;
 };
 
 class model_primitive_boolean : public model_primitive_base
@@ -260,6 +260,8 @@ public:
     assert (from_type == primitive_boolean_type);
     return from_val;
   }
+
+  void visit (visitor *);
 };
 
 template<typename T, char sig_char>
@@ -372,6 +374,8 @@ public:
       return convert_value<T, jdouble> (from_val);
     abort ();
   }
+
+  void visit (visitor *) = 0;
 };
 
 template<typename T, char sig_char, long long MIN, long long MAX>
@@ -490,6 +494,8 @@ public:
 
   // This is out-of-line so we can specialize for jlong.
   bool representable_p (int val);
+
+  void visit (visitor *v);
 };
 
 template<typename T, char sig_char, long long MIN, long long MAX>
@@ -538,6 +544,8 @@ public:
 
     return T (fmod (lv, rv));
   }
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_PRIMITIVE_HH
Index: model/primitive.cc
===================================================================
--- model/primitive.cc	2005-10-12 17:09:19.000000000 +0530
+++ model/primitive.cc	2005-10-12 21:35:02.000000000 +0530
@@ -30,9 +30,9 @@ model_primitive_base::assignable_from_p 
 }
 
 void
-model_primitive_base::visit (visitor *v)
+model_primitive_boolean::visit (visitor *v)
 {
-  v->visit_primitive (this, pretty_name);
+  v->visit_primitive_boolean (this);
 }
 
 template<typename T, char sig_char, long long MIN, long long MAX>
@@ -47,10 +47,28 @@ model_int_primitive<T,sig_char,MIN,MAX>:
   return (T) l / (T) r;
 }
 
+template<typename T, char sig_char, long long MIN, long long MAX>
+void
+model_int_primitive<T,sig_char,MIN,MAX>::visit (visitor *v)
+{
+  T dummy = 0;
+  v->visit_int_primitive (this, sig_char, MIN, MAX, dummy);
+}
+
+template<typename T, char sig_char>
+void
+model_fp_primitive<T,sig_char>::visit (visitor *v)
+{
+  T dummy = 0.0;
+  v->visit_fp_primitive (this, sig_char, dummy);
+}
+
 
 
 // Instantiations.
 
+template class model_fp_primitive<jfloat, 'F'>;
+template class model_fp_primitive<jdouble, 'D'>;
 template class model_int_primitive<jbyte, 'B', -128, 127>;
 template class model_int_primitive<jchar, 'C', 0, 65536>;
 template class model_int_primitive<jshort, 'S', -32768, 32767>;
Index: model/this.hh
===================================================================
--- model/this.hh	2005-10-12 18:02:24.000000000 +0530
+++ model/this.hh	2005-10-12 18:03:05.000000000 +0530
@@ -1,6 +1,6 @@
 // "this" in various flavors.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -84,6 +84,8 @@ public:
     : model_this (w, t)
   {
   }
+
+  void visit (visitor *);
 };
 
 class model_synthetic_this : public model_this
@@ -103,6 +105,8 @@ public:
   }
 
   bool check_match (model_class *, model_class *);
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_THIS_HH
Index: model/this.cc
===================================================================
--- model/this.cc	2005-10-12 18:03:13.000000000 +0530
+++ model/this.cc	2005-10-12 18:05:18.000000000 +0530
@@ -1,6 +1,6 @@
 // 'this' expression.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -105,8 +105,24 @@ model_this::get_synthetic_this (const lo
   return new model_this (where, referrer);
 }
 
+
+
+void
+model_synthetic_this::visit (visitor *v)
+{
+  v->visit_synthetic_this (this);
+}
+
 bool
 model_synthetic_this::check_match (model_class *self, model_class *target)
 {
   return self->assignable_from_p (target);
 }
+
+
+
+void
+model_this_outer::visit (visitor *v)
+{
+  v->visit_this_outer (this);
+}
Index: model/typevar.hh
===================================================================
--- model/typevar.hh	2005-10-12 18:05:56.000000000 +0530
+++ model/typevar.hh	2005-10-12 18:06:17.000000000 +0530
@@ -89,6 +89,8 @@ public:
   /// This returns the signature as used by the class signature (as
   /// opposed to the type signature).
   std::string get_formal_signature ();
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_TYPEVAR_HH
Index: model/typevar.cc
===================================================================
--- model/typevar.cc	2005-10-12 18:06:24.000000000 +0530
+++ model/typevar.cc	2005-10-12 18:07:56.000000000 +0530
@@ -1,6 +1,6 @@
 // A type variable.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -171,3 +171,9 @@ model_type_variable::get_signature ()
 {
   return "T" + name + ";";
 }
+
+void
+model_type_variable::visit (visitor *v)
+{
+  v->visit_type_variable (this, descriptor, name, bounds);
+}
Index: model/void.hh
===================================================================
--- model/void.hh	2005-10-12 18:08:28.000000000 +0530
+++ model/void.hh	2005-10-12 18:08:51.000000000 +0530
@@ -61,6 +61,8 @@ public:
   {
     return std::string ("void");
   }
+
+  void visit (visitor *);
 };
 
 extern model_void_type *primitive_void_type;
Index: model/void.cc
===================================================================
--- model/void.cc	2005-10-12 18:09:16.000000000 +0530
+++ model/void.cc	2005-10-12 18:10:12.000000000 +0530
@@ -0,0 +1,28 @@
+// The void type.
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// gcjx is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// gcjx 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with gcjx; see the file COPYING.LIB.  If
+// not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+#include "typedefs.hh"
+
+void
+model_void_type::visit (visitor *v)
+{
+  v->visit_void_type (this, descriptor);
+}
Index: model/wildcard.hh
===================================================================
--- model/wildcard.hh	2005-10-12 18:11:01.000000000 +0530
+++ model/wildcard.hh	2005-10-12 18:11:29.000000000 +0530
@@ -1,6 +1,6 @@
 // Type parameter wildcards.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -69,6 +69,8 @@ public:
   }
 
   std::string get_signature ();
+
+  void visit (visitor *);
 };
 
 #endif // GCJX_MODEL_WILDCARD_HH
Index: model/wildcard.cc
===================================================================
--- model/wildcard.cc	2005-10-12 18:11:08.000000000 +0530
+++ model/wildcard.cc	2005-10-12 18:12:42.000000000 +0530
@@ -1,6 +1,6 @@
 // Type parameter wildcards.
 
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -88,3 +88,9 @@ model_wildcard::get_signature ()
     }
   return result;
 }
+
+void
+model_wildcard::visit (visitor *v)
+{
+  v->visit_wildcard (this, descriptor, name, is_super, bound);
+}
Index: visitor.hh
===================================================================
--- visitor.hh	2005-10-12 18:50:50.000000000 +0530
+++ visitor.hh	2005-10-12 21:14:43.000000000 +0530
@@ -398,8 +398,6 @@ public:
   virtual void visit_package (model_package *,
                               const std::list<std::string> &) = 0;
 
-  virtual void visit_primitive (model_primitive_base *, const char *) = 0;
-
   virtual void visit_type (model_type *, const std::string &) = 0;
 
   virtual void visit_identifier (model_identifier *, const std::string &) = 0;
@@ -440,6 +438,98 @@ public:
   virtual void visit_unit_fake (model_unit_fake *, model_package *,
                                 const std::list<ref_class> &,
                                 const std::string &, bool) = 0;
+
+  virtual void visit_abstract_method (model_abstract_method *,
+                                      const std::list<ref_variable_decl> &,
+                                      const ref_block &,
+                                      model_method *) = 0;
+
+  virtual void visit_annotation_type (model_annotation_type *,
+                                      const std::string &,
+                                      const std::string &) = 0;
+  
+  virtual void visit_array_type (model_array_type *,
+                                 const std::string &,
+                                 const std::string &, model_type *) = 0;
+
+  virtual void visit_class (model_class *, const std::string &,
+                            const std::string &) = 0;
+
+  virtual void visit_class_instance (model_class_instance *,
+                                     const std::string &,
+                                     const std::string &, model_class *) = 0;
+  
+  virtual void visit_constructor (model_constructor *,
+                                  const std::list<ref_variable_decl> &,
+                                  const ref_block &) = 0;
+
+  virtual void visit_enum (model_enum *, const std::string &,
+                           const std::string &,
+                           const std::list<ref_enum_constant> &) = 0;
+
+  virtual void visit_enum_constant (model_enum_constant *,
+                                    const std::string &,
+                                    const std::string &,
+                                    const std::list<ref_expression> &) = 0;
+
+  virtual void visit_fp_primitive (model_primitive_base *, char, jfloat) = 0;
+
+  virtual void visit_fp_primitive (model_primitive_base *, char, jdouble) = 0;
+
+  virtual void visit_int_primitive (model_primitive_base *, char,
+                                    long long, long long, jbyte) = 0;
+
+  virtual void visit_int_primitive (model_primitive_base *, char,
+                                    long long, long long, jchar) = 0;
+
+  virtual void visit_int_primitive (model_primitive_base *, char,
+                                    long long, long long, jshort) = 0;
+
+  virtual void visit_int_primitive (model_primitive_base *, char,
+                                    long long, long long, jint) = 0;
+
+  virtual void visit_int_primitive (model_primitive_base *, char,
+                                    long long, long long, jlong) = 0;
+
+  virtual void visit_primitive_boolean (model_primitive_boolean *) = 0;
+
+  virtual void visit_initializer_block (model_initializer_block *,
+                                        const std::list<ref_stmt> &,
+                                        bool) = 0;
+
+  virtual void visit_new_primary (model_new_primary *, const model_method *,
+                                  const ref_forwarding_type &,
+                                  const std::list<ref_expression> &,
+                                  const std::string &,
+                                  const std::list<ref_forwarding_type> &) = 0;
+
+  virtual void visit_null_type (model_null_type *, const std::string &) = 0;
+
+  virtual void visit_phony_block (model_phony_block *,
+                                  const std::list<ref_stmt> &) = 0;
+
+  virtual void visit_primordial_package (model_primordial_package *,
+                                         const std::list<std::string> &) = 0;
+
+  virtual void visit_unnamed_package (model_unnamed_package *,
+                                      const std::list<std::string> &) = 0;
+
+  virtual void visit_synthetic_this (model_synthetic_this *) = 0;
+
+  virtual void visit_this_outer (model_this_outer *) = 0;
+
+  virtual void
+  visit_type_variable (model_type_variable *,
+                       const std::string &, const std::string &,
+                       const std::list<ref_forwarding_type> &) = 0;
+
+  virtual void visit_void_type (model_void_type *, const std::string &) = 0;
+
+  virtual void visit_wildcard (model_wildcard *, const std::string &,
+                               const std::string &, bool,
+                               const ref_forwarding_type &) = 0;
+
+  virtual void visit_javadoc (model_javadoc *, bool) = 0;
 };
 
 
Index: defassign.cc
===================================================================
--- defassign.cc	2005-10-12 18:51:11.000000000 +0530
+++ defassign.cc	2005-10-12 21:16:55.000000000 +0530
@@ -1620,11 +1620,6 @@ public:
     // Nothing.
   }
 
-  void visit_primitive (model_primitive_base *, const char *)
-  {
-    // Nothing.
-  }
-
   void visit_type (model_type *, const std::string &)
   {
     // Nothing.
@@ -1695,6 +1690,179 @@ public:
     // Nothing.
   }
 
+  void visit_abstract_method (model_abstract_method *am,
+                              const std::list<ref_variable_decl> &params,
+			      const ref_block &body, model_method *)
+  {
+    visit_method (am, params, body);
+  }
+
+  void visit_annotation_type (model_annotation_type *at,
+                              const std::string &descr,
+                              const std::string &name)
+  {
+    visit_class (at, descr, name);
+  }
+  
+  void visit_array_type (model_array_type *at, const std::string &descr,
+                         const std::string &name, model_type *)
+  {
+    visit_class (at, descr, name);
+  }
+
+  void visit_class (model_class *c, const std::string &descr,
+                    const std::string &)
+  {
+    visit_type (c, descr);
+  }
+
+  void visit_class_instance (model_class_instance *ci,
+                             const std::string &descr,
+                             const std::string &name, model_class *)
+  {
+    visit_class (ci, descr, name);
+  }
+  
+  void visit_constructor (model_constructor *c,
+                          const std::list<ref_variable_decl> &params,
+                          const ref_block &body)
+  {
+    visit_method (c, params, body);
+  }
+
+  void visit_enum (model_enum *e, const std::string &descr,
+                   const std::string &name,
+                   const std::list<ref_enum_constant> &)
+  {
+    visit_class (e, descr, name);
+  }
+
+  void visit_enum_constant (model_enum_constant *ec,
+                            const std::string &descr,
+                            const std::string &name,
+                            const std::list<ref_expression> &)
+  {
+    visit_class (ec, descr, name);
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jfloat)
+  {
+    // Nothing.
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jdouble)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jbyte)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jchar)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jshort)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jint)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jlong)
+  {
+    // Nothing.
+  }
+
+  void visit_primitive_boolean (model_primitive_boolean *)
+  {
+    // Nothing.
+  }
+
+  void visit_initializer_block (model_initializer_block *ib,
+                                const std::list<ref_stmt> &stmts, bool)
+  {
+    visit_block (ib, stmts);
+  }
+
+  void visit_new_primary (model_new_primary *np, const model_method *meth,
+			  const ref_forwarding_type &klass,
+			  const std::list<ref_expression> &args,
+			  const std::string &,
+			  const std::list<ref_forwarding_type> &)
+  {
+    visit_new (np, meth, klass, args);
+  }
+
+  void visit_null_type (model_null_type *nt, const std::string &descr)
+  {
+    visit_type (nt, descr);
+  }
+
+  void visit_phony_block (model_phony_block *pb,
+                          const std::list<ref_stmt> &stmts)
+  {
+    visit_block (pb, stmts);
+  }
+
+  void visit_primordial_package (model_primordial_package *pp,
+                                 const std::list<std::string> &name)
+  {
+    visit_package (pp, name);
+  }
+
+  void visit_unnamed_package (model_unnamed_package *up,
+                              const std::list<std::string> &name)
+  {
+    visit_package (up, name);
+  }
+
+  void visit_synthetic_this (model_synthetic_this *st)
+  {
+    visit_this (st);
+  }
+
+  void visit_this_outer (model_this_outer *to)
+  {
+    visit_this (to);
+  }
+
+  void
+  visit_type_variable (model_type_variable *tv,
+                       const std::string &descr, const std::string &name,
+                       const std::list<ref_forwarding_type> &)
+  {
+    visit_class (tv, descr, name);
+  }
+
+  void visit_void_type (model_void_type *vt, const std::string &descr)
+  {
+    visit_type (vt, descr);
+  }
+
+  void visit_wildcard (model_wildcard *w, const std::string &descr,
+                       const std::string &name, bool,
+                       const ref_forwarding_type &)
+  {
+    visit_class (w, descr, name);
+  }
+
+  void visit_javadoc (model_javadoc *, bool)
+  {
+    // Nothing.
+  }  
+
   // This is a helper for visiting a subexpression.  It handles
   // boolean expressions for the caller, merging final states if
   // needed.
Index: dump.cc
===================================================================
--- dump.cc	2005-10-12 18:51:05.000000000 +0530
+++ dump.cc	2005-10-12 21:20:41.000000000 +0530
@@ -1035,11 +1035,6 @@ public:
     // Nothing.
   }
 
-  void visit_primitive (model_primitive_base *, const char *)
-  {
-    // Nothing.
-  }
-
   void visit_type (model_type *, const std::string &)
   {
     // Nothing.
@@ -1109,6 +1104,179 @@ public:
   {
     // Nothing.
   }
+
+  void visit_abstract_method (model_abstract_method *am,
+                              const std::list<ref_variable_decl> &params,
+			      const ref_block &body, model_method *)
+  {
+    visit_method (am, params, body);
+  }
+
+  void visit_annotation_type (model_annotation_type *at,
+                              const std::string &descr,
+                              const std::string &name)
+  {
+    visit_class (at, descr, name);
+  }
+  
+  void visit_array_type (model_array_type *at, const std::string &descr,
+                         const std::string &name, model_type *)
+  {
+    visit_class (at, descr, name);
+  }
+
+  void visit_class (model_class *c, const std::string &descr,
+                    const std::string &)
+  {
+    visit_type (c, descr);
+  }
+
+  void visit_class_instance (model_class_instance *ci,
+                             const std::string &descr,
+                             const std::string &name, model_class *)
+  {
+    visit_class (ci, descr, name);
+  }
+  
+  void visit_constructor (model_constructor *c,
+                          const std::list<ref_variable_decl> &params,
+                          const ref_block &body)
+  {
+    visit_method (c, params, body);
+  }
+
+  void visit_enum (model_enum *e, const std::string &descr,
+                   const std::string &name,
+                   const std::list<ref_enum_constant> &)
+  {
+    visit_class (e, descr, name);
+  }
+
+  void visit_enum_constant (model_enum_constant *ec,
+                            const std::string &descr,
+                            const std::string &name,
+                            const std::list<ref_expression> &)
+  {
+    visit_class (ec, descr, name);
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jfloat)
+  {
+    // Nothing.
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jdouble)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jbyte)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jchar)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jshort)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jint)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jlong)
+  {
+    // Nothing.
+  }
+
+  void visit_primitive_boolean (model_primitive_boolean *)
+  {
+    // Nothing.
+  }
+
+  void visit_initializer_block (model_initializer_block *ib,
+                                const std::list<ref_stmt> &stmts, bool)
+  {
+    visit_block (ib, stmts);
+  }
+
+  void visit_new_primary (model_new_primary *np, const model_method *meth,
+			  const ref_forwarding_type &klass,
+			  const std::list<ref_expression> &args,
+			  const std::string &,
+			  const std::list<ref_forwarding_type> &)
+  {
+    visit_new (np, meth, klass, args);
+  }
+
+  void visit_null_type (model_null_type *nt, const std::string &descr)
+  {
+    visit_type (nt, descr);
+  }
+
+  void visit_phony_block (model_phony_block *pb,
+                          const std::list<ref_stmt> &stmts)
+  {
+    visit_block (pb, stmts);
+  }
+
+  void visit_primordial_package (model_primordial_package *pp,
+                                 const std::list<std::string> &name)
+  {
+    visit_package (pp, name);
+  }
+
+  void visit_unnamed_package (model_unnamed_package *up,
+                              const std::list<std::string> &name)
+  {
+    visit_package (up, name);
+  }
+
+  void visit_synthetic_this (model_synthetic_this *st)
+  {
+    visit_this (st);
+  }
+
+  void visit_this_outer (model_this_outer *to)
+  {
+    visit_this (to);
+  }
+
+  void
+  visit_type_variable (model_type_variable *tv,
+                       const std::string &descr, const std::string &name,
+                       const std::list<ref_forwarding_type> &)
+  {
+    visit_class (tv, descr, name);
+  }
+
+  void visit_void_type (model_void_type *vt, const std::string &descr)
+  {
+    visit_type (vt, descr);
+  }
+
+  void visit_wildcard (model_wildcard *w, const std::string &descr,
+                       const std::string &name, bool,
+                       const ref_forwarding_type &)
+  {
+    visit_class (w, descr, name);
+  }
+
+  void visit_javadoc (model_javadoc *, bool)
+  {
+    // Nothing.
+  }  
 };
 
 /// A simple pretty-printer for the model elements.
@@ -2443,13 +2611,6 @@ public:
     end_element ();
   }
 
-  void visit_primitive (model_primitive_base *prim, const char *name)
-  {
-    begin_element (prim, "primitive");
-    out << " " << name;
-    end_element ();
-  }
-
   void visit_type (model_type *t, const std::string &descriptor)
   {
     begin_element (t, "type");
@@ -2523,6 +2684,179 @@ public:
   {
     // TODO.
   }
+
+  void visit_abstract_method (model_abstract_method *am,
+                              const std::list<ref_variable_decl> &params,
+			      const ref_block &body, model_method *)
+  {
+    // TODO.
+  }
+
+  void visit_annotation_type (model_annotation_type *at,
+                              const std::string &descr,
+                              const std::string &name)
+  {
+    // TODO.
+  }
+  
+  void visit_array_type (model_array_type *at, const std::string &descr,
+                         const std::string &name, model_type *)
+  {
+    // TODO.
+  }
+
+  void visit_class (model_class *c, const std::string &descr,
+                    const std::string &)
+  {
+    // TODO.
+  }
+
+  void visit_class_instance (model_class_instance *ci,
+                             const std::string &descr,
+                             const std::string &name, model_class *)
+  {
+    // TODO.
+  }
+  
+  void visit_constructor (model_constructor *c,
+                          const std::list<ref_variable_decl> &params,
+                          const ref_block &body)
+  {
+    // TODO.
+  }
+
+  void visit_enum (model_enum *e, const std::string &descr,
+                   const std::string &name,
+                   const std::list<ref_enum_constant> &)
+  {
+    // TODO.
+  }
+
+  void visit_enum_constant (model_enum_constant *ec,
+                            const std::string &descr,
+                            const std::string &name,
+                            const std::list<ref_expression> &)
+  {
+    // TODO.
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jfloat)
+  {
+    // TODO.
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jdouble)
+  {
+    // TODO.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jbyte)
+  {
+    // TODO.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jchar)
+  {
+    // TODO.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jshort)
+  {
+    // TODO.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jint)
+  {
+    // TODO.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jlong)
+  {
+    // TODO.
+  }
+
+  void visit_primitive_boolean (model_primitive_boolean *)
+  {
+    // TODO.
+  }
+
+  void visit_initializer_block (model_initializer_block *ib,
+                                const std::list<ref_stmt> &stmts, bool)
+  {
+    // TODO.
+  }
+
+  void visit_new_primary (model_new_primary *np, const model_method *meth,
+			  const ref_forwarding_type &klass,
+			  const std::list<ref_expression> &args,
+			  const std::string &,
+			  const std::list<ref_forwarding_type> &)
+  {
+    // TODO.
+  }
+
+  void visit_null_type (model_null_type *nt, const std::string &descr)
+  {
+    // TODO.
+  }
+
+  void visit_phony_block (model_phony_block *pb,
+                          const std::list<ref_stmt> &stmts)
+  {
+    // TODO.
+  }
+
+  void visit_primordial_package (model_primordial_package *pp,
+                                 const std::list<std::string> &name)
+  {
+    // TODO.
+  }
+
+  void visit_unnamed_package (model_unnamed_package *up,
+                              const std::list<std::string> &name)
+  {
+    // TODO.
+  }
+
+  void visit_synthetic_this (model_synthetic_this *st)
+  {
+    // TODO.
+  }
+
+  void visit_this_outer (model_this_outer *to)
+  {
+    // TODO.
+  }
+
+  void
+  visit_type_variable (model_type_variable *tv,
+                       const std::string &descr, const std::string &name,
+                       const std::list<ref_forwarding_type> &)
+  {
+    // TODO.
+  }
+
+  void visit_void_type (model_void_type *vt, const std::string &descr)
+  {
+    // TODO.
+  }
+
+  void visit_wildcard (model_wildcard *w, const std::string &descr,
+                       const std::string &name, bool,
+                       const ref_forwarding_type &)
+  {
+    // TODO.
+  }
+
+  void visit_javadoc (model_javadoc *, bool)
+  {
+    // TODO.
+  }  
 };
 
 void
Index: fold.cc
===================================================================
--- fold.cc	2005-10-12 18:51:22.000000000 +0530
+++ fold.cc	2005-10-12 21:15:53.000000000 +0530
@@ -729,11 +729,6 @@ public:
     // Nothing.
   }
 
-  void visit_primitive (model_primitive_base *, const char *)
-  {
-    // Nothing.
-  }
-
   void visit_type (model_type *, const std::string &)
   {
     // Nothing.
@@ -804,6 +799,179 @@ public:
     // Nothing.
   }
 
+  void visit_abstract_method (model_abstract_method *am,
+                              const std::list<ref_variable_decl> &params,
+			      const ref_block &body, model_method *)
+  {
+    visit_method (am, params, body);
+  }
+
+  void visit_annotation_type (model_annotation_type *at,
+                              const std::string &descr,
+                              const std::string &name)
+  {
+    visit_class (at, descr, name);
+  }
+  
+  void visit_array_type (model_array_type *at, const std::string &descr,
+                         const std::string &name, model_type *)
+  {
+    visit_class (at, descr, name);
+  }
+
+  void visit_class (model_class *c, const std::string &descr,
+                    const std::string &)
+  {
+    visit_type (c, descr);
+  }
+
+  void visit_class_instance (model_class_instance *ci,
+                             const std::string &descr,
+                             const std::string &name, model_class *)
+  {
+    visit_class (ci, descr, name);
+  }
+  
+  void visit_constructor (model_constructor *c,
+                          const std::list<ref_variable_decl> &params,
+                          const ref_block &body)
+  {
+    visit_method (c, params, body);
+  }
+
+  void visit_enum (model_enum *e, const std::string &descr,
+                   const std::string &name,
+                   const std::list<ref_enum_constant> &)
+  {
+    visit_class (e, descr, name);
+  }
+
+  void visit_enum_constant (model_enum_constant *ec,
+                            const std::string &descr,
+                            const std::string &name,
+                            const std::list<ref_expression> &)
+  {
+    visit_class (ec, descr, name);
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jfloat)
+  {
+    // Nothing.
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jdouble)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jbyte)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jchar)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jshort)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jint)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jlong)
+  {
+    // Nothing.
+  }
+
+  void visit_primitive_boolean (model_primitive_boolean *)
+  {
+    // Nothing.
+  }
+
+  void visit_initializer_block (model_initializer_block *ib,
+                                const std::list<ref_stmt> &stmts, bool)
+  {
+    visit_block (ib, stmts);
+  }
+
+  void visit_new_primary (model_new_primary *np, const model_method *meth,
+			  const ref_forwarding_type &klass,
+			  const std::list<ref_expression> &args,
+			  const std::string &,
+			  const std::list<ref_forwarding_type> &)
+  {
+    visit_new (np, meth, klass, args);
+  }
+
+  void visit_null_type (model_null_type *nt, const std::string &descr)
+  {
+    visit_type (nt, descr);
+  }
+
+  void visit_phony_block (model_phony_block *pb,
+                          const std::list<ref_stmt> &stmts)
+  {
+    visit_block (pb, stmts);
+  }
+
+  void visit_primordial_package (model_primordial_package *pp,
+                                 const std::list<std::string> &name)
+  {
+    visit_package (pp, name);
+  }
+
+  void visit_unnamed_package (model_unnamed_package *up,
+                              const std::list<std::string> &name)
+  {
+    visit_package (up, name);
+  }
+
+  void visit_synthetic_this (model_synthetic_this *st)
+  {
+    visit_this (st);
+  }
+
+  void visit_this_outer (model_this_outer *to)
+  {
+    visit_this (to);
+  }
+
+  void
+  visit_type_variable (model_type_variable *tv,
+                       const std::string &descr, const std::string &name,
+                       const std::list<ref_forwarding_type> &)
+  {
+    visit_class (tv, descr, name);
+  }
+
+  void visit_void_type (model_void_type *vt, const std::string &descr)
+  {
+    visit_type (vt, descr);
+  }
+
+  void visit_wildcard (model_wildcard *w, const std::string &descr,
+                       const std::string &name, bool,
+                       const ref_forwarding_type &)
+  {
+    visit_class (w, descr, name);
+  }
+
+  void visit_javadoc (model_javadoc *, bool)
+  {
+    // Nothing.
+  }  
+
   ref_expression fold (const ref_expression &expr)
   {
     if (expr->constant_p ())
Index: bytecode/generate.hh
===================================================================
--- bytecode/generate.hh	2005-10-12 18:51:47.000000000 +0530
+++ bytecode/generate.hh	2005-10-12 21:21:39.000000000 +0530
@@ -812,11 +812,6 @@ public:
     // Nothing.
   }
 
-  void visit_primitive (model_primitive_base *, const char *)
-  {
-    // Nothing.
-  }
-
   void visit_type (model_type *, const std::string &)
   {
     // Nothing.
@@ -886,6 +881,179 @@ public:
   {
     // Nothing.
   }
+
+  void visit_abstract_method (model_abstract_method *am,
+                              const std::list<ref_variable_decl> &params,
+			      const ref_block &body, model_method *)
+  {
+    visit_method (am, params, body);
+  }
+
+  void visit_annotation_type (model_annotation_type *at,
+                              const std::string &descr,
+                              const std::string &name)
+  {
+    visit_class (at, descr, name);
+  }
+  
+  void visit_array_type (model_array_type *at, const std::string &descr,
+                         const std::string &name, model_type *)
+  {
+    visit_class (at, descr, name);
+  }
+
+  void visit_class (model_class *c, const std::string &descr,
+                    const std::string &)
+  {
+    visit_type (c, descr);
+  }
+
+  void visit_class_instance (model_class_instance *ci,
+                             const std::string &descr,
+                             const std::string &name, model_class *)
+  {
+    visit_class (ci, descr, name);
+  }
+  
+  void visit_constructor (model_constructor *c,
+                          const std::list<ref_variable_decl> &params,
+                          const ref_block &body)
+  {
+    visit_method (c, params, body);
+  }
+
+  void visit_enum (model_enum *e, const std::string &descr,
+                   const std::string &name,
+                   const std::list<ref_enum_constant> &)
+  {
+    visit_class (e, descr, name);
+  }
+
+  void visit_enum_constant (model_enum_constant *ec,
+                            const std::string &descr,
+                            const std::string &name,
+                            const std::list<ref_expression> &)
+  {
+    visit_class (ec, descr, name);
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jfloat)
+  {
+    // Nothing.
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jdouble)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jbyte)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jchar)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jshort)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jint)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jlong)
+  {
+    // Nothing.
+  }
+
+  void visit_primitive_boolean (model_primitive_boolean *)
+  {
+    // Nothing.
+  }
+
+  void visit_initializer_block (model_initializer_block *ib,
+                                const std::list<ref_stmt> &stmts, bool)
+  {
+    visit_block (ib, stmts);
+  }
+
+  void visit_new_primary (model_new_primary *np, const model_method *meth,
+			  const ref_forwarding_type &klass,
+			  const std::list<ref_expression> &args,
+			  const std::string &,
+			  const std::list<ref_forwarding_type> &)
+  {
+    visit_new (np, meth, klass, args);
+  }
+
+  void visit_null_type (model_null_type *nt, const std::string &descr)
+  {
+    visit_type (nt, descr);
+  }
+
+  void visit_phony_block (model_phony_block *pb,
+                          const std::list<ref_stmt> &stmts)
+  {
+    visit_block (pb, stmts);
+  }
+
+  void visit_primordial_package (model_primordial_package *pp,
+                                 const std::list<std::string> &name)
+  {
+    visit_package (pp, name);
+  }
+
+  void visit_unnamed_package (model_unnamed_package *up,
+                              const std::list<std::string> &name)
+  {
+    visit_package (up, name);
+  }
+
+  void visit_synthetic_this (model_synthetic_this *st)
+  {
+    visit_this (st);
+  }
+
+  void visit_this_outer (model_this_outer *to)
+  {
+    visit_this (to);
+  }
+
+  void
+  visit_type_variable (model_type_variable *tv,
+                       const std::string &descr, const std::string &name,
+                       const std::list<ref_forwarding_type> &)
+  {
+    visit_class (tv, descr, name);
+  }
+
+  void visit_void_type (model_void_type *vt, const std::string &descr)
+  {
+    visit_type (vt, descr);
+  }
+
+  void visit_wildcard (model_wildcard *w, const std::string &descr,
+                       const std::string &name, bool,
+                       const ref_forwarding_type &)
+  {
+    visit_class (w, descr, name);
+  }
+
+  void visit_javadoc (model_javadoc *, bool)
+  {
+    // Nothing.
+  }  
 };
 
 #endif // GCJX_BYTECODE_GENERATE_HH
Index: Makefile.am
===================================================================
--- Makefile.am	2005-10-12 20:29:08.000000000 +0530
+++ Makefile.am	2005-10-12 20:31:36.000000000 +0530
@@ -86,18 +86,19 @@ model/arraytype.cc model/assert.cc model
 model/block.cc model/blockscope.cc model/break.cc model/bytecode.cc \
 model/cast.cc model/catch.cc model/class.cc model/classinst.cc \
 model/classref.cc model/cond.cc model/constructor.cc model/continue.cc \
-model/declstmt.cc model/do.cc model/empty.cc model/enum.cc model/expr.cc \
-model/exprstmt.cc model/field.cc model/fieldinit.cc model/fieldref.cc \
-model/for.cc model/forenhanced.cc model/fwdtype.cc model/iannotatable.cc \
-model/identifier.cc model/if.cc model/import.cc model/imodifiable.cc \
-model/init.cc model/instanceof.cc model/invoke.cc model/label.cc \
-model/literal.cc model/memberref.cc model/method.cc model/modifier.cc \
-model/newarray.cc model/new.cc model/null.cc model/package.cc \
-model/parameters.cc model/primitive.cc model/return.cc model/stmt.cc \
-model/switch.cc model/synchronized.cc model/this.cc model/throw.cc \
-model/throwsclause.cc model/try.cc model/type.cc model/typemap.cc \
-model/typevar.cc model/unary.cc model/unit.cc model/value.cc \
-model/variable.cc model/varref.cc model/varstmt.cc model/while.cc \
+model/declstmt.cc model/do.cc model/empty.cc model/enum.cc \
+model/enumconst.cc model/expr.cc model/exprstmt.cc model/field.cc \
+model/fieldinit.cc model/fieldref.cc model/for.cc model/forenhanced.cc \
+model/fwdtype.cc model/iannotatable.cc model/identifier.cc model/if.cc \
+model/import.cc model/imodifiable.cc model/init.cc model/instanceof.cc \
+model/invoke.cc model/javadoc.cc model/label.cc model/literal.cc \
+model/memberref.cc model/method.cc model/modifier.cc model/newarray.cc \
+model/new.cc model/null.cc model/package.cc model/parameters.cc \
+model/primitive.cc model/return.cc model/stmt.cc model/switch.cc \
+model/synchronized.cc model/this.cc model/throw.cc model/throwsclause.cc \
+model/try.cc model/type.cc model/typemap.cc model/typevar.cc \
+model/unary.cc model/unit.cc model/value.cc model/variable.cc \
+model/varref.cc model/varstmt.cc model/void.cc model/while.cc \
 model/wildcard.cc
 
 bytecode_sources = bytecode/attribute.cc bytecode/block.cc \
Index: Makefile.in
===================================================================
--- Makefile.in	2005-10-12 20:29:14.000000000 +0530
+++ Makefile.in	2005-10-12 20:31:50.000000000 +0530
@@ -82,20 +82,21 @@ am__objects_2 = model/annotation.lo mode
 	model/cast.lo model/catch.lo model/class.lo model/classinst.lo \
 	model/classref.lo model/cond.lo model/constructor.lo \
 	model/continue.lo model/declstmt.lo model/do.lo model/empty.lo \
-	model/enum.lo model/expr.lo model/exprstmt.lo model/field.lo \
-	model/fieldinit.lo model/fieldref.lo model/for.lo \
-	model/forenhanced.lo model/fwdtype.lo model/iannotatable.lo \
-	model/identifier.lo model/if.lo model/import.lo \
-	model/imodifiable.lo model/init.lo model/instanceof.lo \
-	model/invoke.lo model/label.lo model/literal.lo \
-	model/memberref.lo model/method.lo model/modifier.lo \
-	model/newarray.lo model/new.lo model/null.lo model/package.lo \
+	model/enum.lo model/enumconst.lo model/expr.lo \
+	model/exprstmt.lo model/field.lo model/fieldinit.lo \
+	model/fieldref.lo model/for.lo model/forenhanced.lo \
+	model/fwdtype.lo model/iannotatable.lo model/identifier.lo \
+	model/if.lo model/import.lo model/imodifiable.lo model/init.lo \
+	model/instanceof.lo model/invoke.lo model/javadoc.lo \
+	model/label.lo model/literal.lo model/memberref.lo \
+	model/method.lo model/modifier.lo model/newarray.lo \
+	model/new.lo model/null.lo model/package.lo \
 	model/parameters.lo model/primitive.lo model/return.lo \
 	model/stmt.lo model/switch.lo model/synchronized.lo \
 	model/this.lo model/throw.lo model/throwsclause.lo \
 	model/try.lo model/type.lo model/typemap.lo model/typevar.lo \
 	model/unary.lo model/unit.lo model/value.lo model/variable.lo \
-	model/varref.lo model/varstmt.lo model/while.lo \
+	model/varref.lo model/varstmt.lo model/void.lo model/while.lo \
 	model/wildcard.lo
 am__objects_3 = reader/classbytes.lo reader/fdreader.lo \
 	reader/zereader.lo reader/zebuffer.lo reader/mmapbuffer.lo \
@@ -325,18 +326,19 @@ model/arraytype.cc model/assert.cc model
 model/block.cc model/blockscope.cc model/break.cc model/bytecode.cc \
 model/cast.cc model/catch.cc model/class.cc model/classinst.cc \
 model/classref.cc model/cond.cc model/constructor.cc model/continue.cc \
-model/declstmt.cc model/do.cc model/empty.cc model/enum.cc model/expr.cc \
-model/exprstmt.cc model/field.cc model/fieldinit.cc model/fieldref.cc \
-model/for.cc model/forenhanced.cc model/fwdtype.cc model/iannotatable.cc \
-model/identifier.cc model/if.cc model/import.cc model/imodifiable.cc \
-model/init.cc model/instanceof.cc model/invoke.cc model/label.cc \
-model/literal.cc model/memberref.cc model/method.cc model/modifier.cc \
-model/newarray.cc model/new.cc model/null.cc model/package.cc \
-model/parameters.cc model/primitive.cc model/return.cc model/stmt.cc \
-model/switch.cc model/synchronized.cc model/this.cc model/throw.cc \
-model/throwsclause.cc model/try.cc model/type.cc model/typemap.cc \
-model/typevar.cc model/unary.cc model/unit.cc model/value.cc \
-model/variable.cc model/varref.cc model/varstmt.cc model/while.cc \
+model/declstmt.cc model/do.cc model/empty.cc model/enum.cc \
+model/enumconst.cc model/expr.cc model/exprstmt.cc model/field.cc \
+model/fieldinit.cc model/fieldref.cc model/for.cc model/forenhanced.cc \
+model/fwdtype.cc model/iannotatable.cc model/identifier.cc model/if.cc \
+model/import.cc model/imodifiable.cc model/init.cc model/instanceof.cc \
+model/invoke.cc model/javadoc.cc model/label.cc model/literal.cc \
+model/memberref.cc model/method.cc model/modifier.cc model/newarray.cc \
+model/new.cc model/null.cc model/package.cc model/parameters.cc \
+model/primitive.cc model/return.cc model/stmt.cc model/switch.cc \
+model/synchronized.cc model/this.cc model/throw.cc model/throwsclause.cc \
+model/try.cc model/type.cc model/typemap.cc model/typevar.cc \
+model/unary.cc model/unit.cc model/value.cc model/variable.cc \
+model/varref.cc model/varstmt.cc model/void.cc model/while.cc \
 model/wildcard.cc
 
 bytecode_sources = bytecode/attribute.cc bytecode/block.cc \
@@ -497,6 +499,8 @@ model/declstmt.lo: model/$(am__dirstamp)
 model/do.lo: model/$(am__dirstamp) model/$(DEPDIR)/$(am__dirstamp)
 model/empty.lo: model/$(am__dirstamp) model/$(DEPDIR)/$(am__dirstamp)
 model/enum.lo: model/$(am__dirstamp) model/$(DEPDIR)/$(am__dirstamp)
+model/enumconst.lo: model/$(am__dirstamp) \
+	model/$(DEPDIR)/$(am__dirstamp)
 model/expr.lo: model/$(am__dirstamp) model/$(DEPDIR)/$(am__dirstamp)
 model/exprstmt.lo: model/$(am__dirstamp) \
 	model/$(DEPDIR)/$(am__dirstamp)
@@ -522,6 +526,8 @@ model/init.lo: model/$(am__dirstamp) mod
 model/instanceof.lo: model/$(am__dirstamp) \
 	model/$(DEPDIR)/$(am__dirstamp)
 model/invoke.lo: model/$(am__dirstamp) model/$(DEPDIR)/$(am__dirstamp)
+model/javadoc.lo: model/$(am__dirstamp) \
+	model/$(DEPDIR)/$(am__dirstamp)
 model/label.lo: model/$(am__dirstamp) model/$(DEPDIR)/$(am__dirstamp)
 model/literal.lo: model/$(am__dirstamp) \
 	model/$(DEPDIR)/$(am__dirstamp)
@@ -563,6 +569,7 @@ model/variable.lo: model/$(am__dirstamp)
 model/varref.lo: model/$(am__dirstamp) model/$(DEPDIR)/$(am__dirstamp)
 model/varstmt.lo: model/$(am__dirstamp) \
 	model/$(DEPDIR)/$(am__dirstamp)
+model/void.lo: model/$(am__dirstamp) model/$(DEPDIR)/$(am__dirstamp)
 model/while.lo: model/$(am__dirstamp) model/$(DEPDIR)/$(am__dirstamp)
 model/wildcard.lo: model/$(am__dirstamp) \
 	model/$(DEPDIR)/$(am__dirstamp)
@@ -962,6 +969,8 @@ mostlyclean-compile:
 	-rm -f model/empty.lo
 	-rm -f model/enum.$(OBJEXT)
 	-rm -f model/enum.lo
+	-rm -f model/enumconst.$(OBJEXT)
+	-rm -f model/enumconst.lo
 	-rm -f model/expr.$(OBJEXT)
 	-rm -f model/expr.lo
 	-rm -f model/exprstmt.$(OBJEXT)
@@ -994,6 +1003,8 @@ mostlyclean-compile:
 	-rm -f model/instanceof.lo
 	-rm -f model/invoke.$(OBJEXT)
 	-rm -f model/invoke.lo
+	-rm -f model/javadoc.$(OBJEXT)
+	-rm -f model/javadoc.lo
 	-rm -f model/label.$(OBJEXT)
 	-rm -f model/label.lo
 	-rm -f model/literal.$(OBJEXT)
@@ -1050,6 +1061,8 @@ mostlyclean-compile:
 	-rm -f model/varref.lo
 	-rm -f model/varstmt.$(OBJEXT)
 	-rm -f model/varstmt.lo
+	-rm -f model/void.$(OBJEXT)
+	-rm -f model/void.lo
 	-rm -f model/while.$(OBJEXT)
 	-rm -f model/while.lo
 	-rm -f model/wildcard.$(OBJEXT)
@@ -1187,6 +1200,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/do.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/empty.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/enum.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/enumconst.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/expr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/exprstmt.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/field.Plo@am__quote@
@@ -1203,6 +1217,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/init.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/instanceof.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/invoke.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/javadoc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/label.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/literal.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/memberref.Plo@am__quote@
@@ -1231,6 +1246,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/variable.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/varref.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/varstmt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/void.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/while.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@model/$(DEPDIR)/wildcard.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@reader/$(DEPDIR)/classbytes.Plo@am__quote@
Index: ChangeLog
from  Ranjit Mathew  <rmathew@gcc.gnu.org>

	* tree.hh (tree_generator): Implement new methods from the visitor
	interface.

Index: tree.hh
===================================================================
--- tree.hh	2005-10-12 22:17:25.000000000 +0530
+++ tree.hh	2005-10-12 22:17:44.000000000 +0530
@@ -667,6 +667,179 @@ public:
   {
     // Nothing.
   }
+
+  void visit_abstract_method (model_abstract_method *am,
+                              const std::list<ref_variable_decl> &params,
+			      const ref_block &body, model_method *)
+  {
+    visit_method (am, params, body);
+  }
+
+  void visit_annotation_type (model_annotation_type *at,
+                              const std::string &descr,
+                              const std::string &name)
+  {
+    visit_class (at, descr, name);
+  }
+  
+  void visit_array_type (model_array_type *at, const std::string &descr,
+                         const std::string &name, model_type *)
+  {
+    visit_class (at, descr, name);
+  }
+
+  void visit_class (model_class *c, const std::string &descr,
+                    const std::string &)
+  {
+    visit_type (c, descr);
+  }
+
+  void visit_class_instance (model_class_instance *ci,
+                             const std::string &descr,
+                             const std::string &name, model_class *)
+  {
+    visit_class (ci, descr, name);
+  }
+  
+  void visit_constructor (model_constructor *c,
+                          const std::list<ref_variable_decl> &params,
+                          const ref_block &body)
+  {
+    visit_method (c, params, body);
+  }
+
+  void visit_enum (model_enum *e, const std::string &descr,
+                   const std::string &name,
+                   const std::list<ref_enum_constant> &)
+  {
+    visit_class (e, descr, name);
+  }
+
+  void visit_enum_constant (model_enum_constant *ec,
+                            const std::string &descr,
+                            const std::string &name,
+                            const std::list<ref_expression> &)
+  {
+    visit_class (ec, descr, name);
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jfloat)
+  {
+    // Nothing.
+  }
+
+  void visit_fp_primitive (model_primitive_base *, char, jdouble)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jbyte)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jchar)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jshort)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jint)
+  {
+    // Nothing.
+  }
+
+  void visit_int_primitive (model_primitive_base *, char,
+                            long long, long long, jlong)
+  {
+    // Nothing.
+  }
+
+  void visit_primitive_boolean (model_primitive_boolean *)
+  {
+    // Nothing.
+  }
+
+  void visit_initializer_block (model_initializer_block *ib,
+                                const std::list<ref_stmt> &stmts, bool)
+  {
+    visit_block (ib, stmts);
+  }
+
+  void visit_new_primary (model_new_primary *np, const model_method *meth,
+			  const ref_forwarding_type &klass,
+			  const std::list<ref_expression> &args,
+			  const std::string &,
+			  const std::list<ref_forwarding_type> &)
+  {
+    visit_new (np, meth, klass, args);
+  }
+
+  void visit_null_type (model_null_type *nt, const std::string &descr)
+  {
+    visit_type (nt, descr);
+  }
+
+  void visit_phony_block (model_phony_block *pb,
+			  const std::list<ref_stmt> &stmts)
+  {
+    visit_block (pb, stmts);
+  }
+
+  void visit_primordial_package (model_primordial_package *pp,
+                                 const std::list<std::string> &name)
+  {
+    visit_package (pp, name);
+  }
+
+  void visit_unnamed_package (model_unnamed_package *up,
+                              const std::list<std::string> &name)
+  {
+    visit_package (up, name);
+  }
+
+  void visit_synthetic_this (model_synthetic_this *st)
+  {
+    visit_this (st);
+  }
+
+  void visit_this_outer (model_this_outer *to)
+  {
+    visit_this (to);
+  }
+
+  void
+  visit_type_variable (model_type_variable *tv,
+                       const std::string &descr, const std::string &name,
+                       const std::list<ref_forwarding_type> &)
+  {
+    visit_class (tv, descr, name);
+  }
+
+  void visit_void_type (model_void_type *vt, const std::string &descr)
+  {
+    visit_type (vt, descr);
+  }
+
+  void visit_wildcard (model_wildcard *w, const std::string &descr,
+                       const std::string &name, bool,
+                       const ref_forwarding_type &)
+  {
+    visit_class (w, descr, name);
+  }
+
+  void visit_javadoc (model_javadoc *, bool)
+  {
+    // Nothing.
+  }  
 };
 
 #endif // GCC_JAVA_TREE_HH

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]