Patch: FYI: fix for non-interpreted platforms

Tom Tromey tromey@redhat.com
Mon Oct 22 21:12:00 GMT 2001


I'm checking this in.

I believe this fixes the bug reported by Alexandre Oliva the other day
which caused builds to fail if the interpreter wasn't enabled.

Tom

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

	* defineclass.cc (character): Removed.
	(prepare_character): Removed.
	(is_identifier_start): Use Character, not character.
	(is_identifier_part): Likewise.

Index: defineclass.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/defineclass.cc,v
retrieving revision 1.25
diff -u -r1.25 defineclass.cc
--- defineclass.cc 2001/12/04 20:18:34 1.25
+++ defineclass.cc 2001/12/05 19:26:26
@@ -268,30 +268,15 @@
    */
 };
 
-/* This is used for the isJavaIdentifierStart & isJavaIdentifierPart
-   methods, so we avoid doing _Jv_InitClass all the time */
-
-static const java::lang::Character *character = 0;
-static void prepare_character ();
-
 void
 _Jv_DefineClass (jclass klass, jbyteArray data, jint offset, jint length)
 {
-  if (character == 0)
-    prepare_character ();
-
   _Jv_ClassReader reader (klass, data, offset, length);
   reader.parse();
 
   /* that's it! */
 }
 
-/** put it after _Jv_DefineClass, so it doesn't get inlined */
-static void prepare_character ()
-{
-  character = new java::lang::Character ('!');
-}
-
 
 /** This section defines the parsing/scanning of the class data */
 
@@ -1523,7 +1508,7 @@
   if (ch == 0x5FU)       		/* _ */
     return 1;
 
-  return character->isJavaIdentifierStart ((jchar) ch);
+  return java::lang::Character::isJavaIdentifierStart ((jchar) ch);
 }
 
 static __inline__ int 
@@ -1540,7 +1525,7 @@
   if (ch == 0x5FU || ch == 0x24U)       /* _ $ */
     return 1;
 
-  return character->isJavaIdentifierStart ((jchar) ch);
+  return java::lang::Character::isJavaIdentifierStart ((jchar) ch);
 }
 
 bool



More information about the Java-patches mailing list