defineclass.cc (character): Removed.

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

From-SVN: r47684
This commit is contained in:
Tom Tromey 2001-12-05 19:28:16 +00:00 committed by Tom Tromey
parent 457b6274e1
commit 82ae782274
2 changed files with 9 additions and 17 deletions

View File

@ -1,3 +1,10 @@
2001-12-05 Tom Tromey <tromey@redhat.com>
* defineclass.cc (character): Removed.
(prepare_character): Removed.
(is_identifier_start): Use Character, not character.
(is_identifier_part): Likewise.
2001-12-04 Tom Tromey <tromey@redhat.com>
* verify.cc (_Jv_BytecodeVerifier::linked_utf8): New structure.

View File

@ -268,30 +268,15 @@ struct _Jv_ClassReader {
*/
};
/* 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 @@ is_identifier_start (int c)
if (ch == 0x5FU) /* _ */
return 1;
return character->isJavaIdentifierStart ((jchar) ch);
return java::lang::Character::isJavaIdentifierStart ((jchar) ch);
}
static __inline__ int
@ -1540,7 +1525,7 @@ is_identifier_part (int c)
if (ch == 0x5FU || ch == 0x24U) /* _ $ */
return 1;
return character->isJavaIdentifierStart ((jchar) ch);
return java::lang::Character::isJavaIdentifierStart ((jchar) ch);
}
bool