/* src/vm/utf.h - utf string header
- Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
- R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
- C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
- Institut f. Computersprachen - TU Wien
+ Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+ C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+ E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+ J. Wenninger, Institut f. Computersprachen - TU Wien
This file is part of CACAO.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
- Contact: cacao@complang.tuwien.ac.at
+ Contact: cacao@cacaojvm.org
Authors: Christian Thalinger
Changes:
- $Id: utf8.h 3541 2005-11-03 20:33:51Z twisti $
+ $Id: utf8.h 4357 2006-01-22 23:33:38Z twisti $
*/
typedef struct utf utf;
+#include "config.h"
+#include "vm/types.h"
#include "vm/global.h"
struct utf {
utf *hashlink; /* link for external hash chain */
- int blength; /* text length in bytes */
+ s4 blength; /* text length in bytes */
char *text; /* pointer to text */
};
extern utf *utf_java_lang_VMThrowable;
extern utf *utf_java_lang_Error;
extern utf *utf_java_lang_NoClassDefFoundError;
+extern utf *utf_java_lang_LinkageError;
+extern utf *utf_java_lang_NoSuchMethodError;
extern utf *utf_java_lang_OutOfMemoryError;
extern utf *utf_java_lang_Exception;
/* function prototypes ********************************************************/
-void utf8_init(void);
+/* initialize the utf8 subsystem */
+bool utf8_init(void);
u4 utf_hashkey(const char *text, u4 length);
/* create new utf-symbol */
utf *utf_new(const char *text, u2 length);
-/* without locking (caller already holding lock*/
-utf *utf_new_intern(const char *text, u2 length);
-
/* make utf symbol from u2 array */
utf *utf_new_u2(u2 *unicodedata, u4 unicodelength, bool isclassname);