From 82ae78227426b93541799f27f4dfcf6b62166085 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 5 Dec 2001 19:28:16 +0000 Subject: [PATCH] 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 --- libjava/ChangeLog | 7 +++++++ libjava/defineclass.cc | 19 ++----------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index e2b46288c57..4dfb96ea0ee 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2001-12-05 Tom Tromey + + * defineclass.cc (character): Removed. + (prepare_character): Removed. + (is_identifier_start): Use Character, not character. + (is_identifier_part): Likewise. + 2001-12-04 Tom Tromey * verify.cc (_Jv_BytecodeVerifier::linked_utf8): New structure. diff --git a/libjava/defineclass.cc b/libjava/defineclass.cc index 5fb8de3b0f3..290152713e2 100644 --- a/libjava/defineclass.cc +++ b/libjava/defineclass.cc @@ -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