This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[BC] Patch: FYI: add another class state


I'm checking this in on the BC branch.

This adds another class state.  defineclass was setting an interpreted
class' state to JV_STATE_LOADED without actually satisfying the
constraints of this state.  Adding a new state seemed like the
simplest way to fix this problem.  I reused a hole in the current enum
(I think, but am not certain, that those holes date all the way back
to the initial gcj/kaffe cooperation days).

The change to gcj does not change operation but is there to keep the
enums in sync.

Tom

Index: gcc/java/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* java-tree.h (JV_STATE_READ): New enum value.

Index: gcc/java/java-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/java-tree.h,v
retrieving revision 1.197.2.8
diff -u -r1.197.2.8 java-tree.h
--- gcc/java/java-tree.h 10 Sep 2004 17:15:33 -0000 1.197.2.8
+++ gcc/java/java-tree.h 6 Oct 2004 18:39:28 -0000
@@ -1862,7 +1862,8 @@
 
   JV_STATE_PRELOADING = 1,	/* Can do _Jv_FindClass.  */
   JV_STATE_LOADING = 3,		/* Has super installed.  */
-  JV_STATE_LOADED = 5,		/* Is complete.  */
+  JV_STATE_READ = 4,		/* Has been completely defined.  */
+  JV_STATE_LOADED = 5,		/* Has Miranda methods defined.  */
 
   JV_STATE_COMPILED = 6,	/* This was a compiled class.  */
 
Index: libjava/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* defineclass.cc (parse): Use JV_STATE_READ.
	* java/lang/Class.h (JV_STATE_READ): New enum value.

Index: libjava/defineclass.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/defineclass.cc,v
retrieving revision 1.35.16.7
diff -u -r1.35.16.7 defineclass.cc
--- libjava/defineclass.cc 29 Sep 2004 21:13:22 -0000 1.35.16.7
+++ libjava/defineclass.cc 6 Oct 2004 18:39:30 -0000
@@ -339,9 +339,8 @@
     throw_class_format_error ("unused data before end of file");
 
   // Tell everyone we're done.
-  def->state = JV_STATE_LOADED;
+  def->state = JV_STATE_READ;
   def->notifyAll ();
-
 }
 
 void _Jv_ClassReader::read_constpool ()
Index: libjava/java/lang/Class.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Class.h,v
retrieving revision 1.63.12.13
diff -u -r1.63.12.13 Class.h
--- libjava/java/lang/Class.h 29 Sep 2004 21:13:24 -0000 1.63.12.13
+++ libjava/java/lang/Class.h 6 Oct 2004 18:39:32 -0000
@@ -39,7 +39,8 @@
 
   JV_STATE_PRELOADING = 1,	// Can do _Jv_FindClass.
   JV_STATE_LOADING = 3,		// Has super installed.
-  JV_STATE_LOADED = 5,		// Is complete.
+  JV_STATE_READ = 4,		// Has been completely defined.
+  JV_STATE_LOADED = 5,		// Has Miranda methods defined.
 
   JV_STATE_COMPILED = 6,	// This was a compiled class.
 


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