X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvmcore%2Futf8.c;h=fe2da62dbe3817e667f0a7315044cb56fe8c8345;hb=204bf2cdfec73890037af529d67d396d30662a44;hp=3251e5924cf80de20bb7acf014205ec124f1b3e3;hpb=e2f3f1095d840ff64770c70da3a5b1f3a730690b;p=cacao.git diff --git a/src/vmcore/utf8.c b/src/vmcore/utf8.c index 3251e5924..fe2da62db 100644 --- a/src/vmcore/utf8.c +++ b/src/vmcore/utf8.c @@ -1,9 +1,7 @@ /* src/vmcore/utf8.c - utf8 string functions - Copyright (C) 1996-2005, 2006, 2007 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, 2007, 2008 + CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO This file is part of CACAO. @@ -22,8 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: utf8.c 7716 2007-04-16 14:29:53Z twisti $ - */ @@ -36,11 +32,7 @@ #include "mm/memory.h" -#if defined(ENABLE_THREADS) -# include "threads/native/lock.h" -#else -# include "threads/none/lock.h" -#endif +#include "threads/lock-common.h" #include "toolbox/hashtable.h" @@ -73,7 +65,6 @@ utf *utf_java_lang_ClassLoader; utf *utf_java_lang_Cloneable; utf *utf_java_lang_SecurityManager; utf *utf_java_lang_String; -utf *utf_java_lang_System; utf *utf_java_lang_ThreadGroup; utf *utf_java_lang_ref_SoftReference; utf *utf_java_lang_ref_WeakReference; @@ -100,10 +91,6 @@ utf *utf_java_lang_UnsupportedClassVersionError; utf *utf_java_lang_VerifyError; utf *utf_java_lang_VirtualMachineError; -#if defined(WITH_CLASSPATH_GNU) -utf *utf_java_lang_VMThrowable; -#endif - utf *utf_java_lang_Exception; utf *utf_java_lang_ArithmeticException; @@ -119,10 +106,13 @@ utf *utf_java_lang_InstantiationException; utf *utf_java_lang_InterruptedException; utf *utf_java_lang_NegativeArraySizeException; utf *utf_java_lang_NullPointerException; +utf *utf_java_lang_RuntimeException; utf *utf_java_lang_StringIndexOutOfBoundsException; utf *utf_java_lang_reflect_InvocationTargetException; +utf *utf_java_security_PrivilegedActionException; + #if defined(ENABLE_JAVASE) utf* utf_java_lang_Void; #endif @@ -154,14 +144,23 @@ utf *utf_SourceFile; /* SourceFile */ #if defined(ENABLE_JAVASE) utf *utf_EnclosingMethod; utf *utf_Signature; -utf *utf_RuntimeVisibleAnnotations; utf *utf_StackMapTable; + +#if defined(ENABLE_ANNOTATIONS) +utf *utf_RuntimeVisibleAnnotations; /* RuntimeVisibleAnnotations */ +utf *utf_RuntimeInvisibleAnnotations; /* RuntimeInvisibleAnnotations */ +utf *utf_RuntimeVisibleParameterAnnotations; /* RuntimeVisibleParameterAnnotations */ +utf *utf_RuntimeInvisibleParameterAnnotations; /* RuntimeInvisibleParameterAnnotations */ +utf *utf_AnnotationDefault; /* AnnotationDefault */ +#endif #endif utf *utf_init; /* */ utf *utf_clinit; /* */ utf *utf_clone; /* clone */ utf *utf_finalize; /* finalize */ +utf *utf_invoke; +utf *utf_main; utf *utf_run; /* run */ utf *utf_add; @@ -170,13 +169,19 @@ utf *utf_addThread; utf *utf_removeThread; utf *utf_put; utf *utf_get; +utf *utf_uncaughtException; utf *utf_value; utf *utf_fillInStackTrace; +utf *utf_findNative; utf *utf_getSystemClassLoader; +utf *utf_initCause; utf *utf_loadClass; +utf *utf_loadClassInternal; utf *utf_printStackTrace; +utf *utf_division_by_zero; + utf *utf_Z; /* Z */ utf *utf_B; /* B */ utf *utf_C; /* C */ @@ -199,11 +204,16 @@ utf *utf_double__void; /* (D)V */ utf *utf_void__java_lang_ClassLoader; /* ()Ljava/lang/ClassLoader; */ utf *utf_void__java_lang_Object; /* ()Ljava/lang/Object; */ utf *utf_void__java_lang_Throwable; /* ()Ljava/lang/Throwable; */ +utf *utf_java_lang_ClassLoader_java_lang_String__J; +utf *utf_java_lang_Exception__V; /* (Ljava/lang/Exception;)V */ utf *utf_java_lang_Object__java_lang_Object; utf *utf_java_lang_String__void; /* (Ljava/lang/String;)V */ utf *utf_java_lang_String__java_lang_Class; utf *utf_java_lang_Thread__V; /* (Ljava/lang/Thread;)V */ +utf *utf_java_lang_Thread_java_lang_Throwable__V; +utf *utf_Ljava_lang_ThreadGroup_Ljava_lang_String__V; utf *utf_java_lang_Throwable__void; /* (Ljava/lang/Throwable;)V */ +utf *utf_java_lang_Throwable__java_lang_Throwable; utf *utf_not_named_yet; /* special name for unnamed classes */ utf *utf_null; @@ -216,8 +226,10 @@ utf *array_packagename; *******************************************************************************/ -bool utf8_init(void) +void utf8_init(void) { + TRACESUBSYSTEMINITIALIZATION("utf8_init"); + /* create utf8 hashtable */ hashtable_utf = NEW(hashtable); @@ -238,7 +250,6 @@ bool utf8_init(void) utf_java_lang_Cloneable = utf_new_char("java/lang/Cloneable"); utf_java_lang_SecurityManager = utf_new_char("java/lang/SecurityManager"); utf_java_lang_String = utf_new_char("java/lang/String"); - utf_java_lang_System = utf_new_char("java/lang/System"); utf_java_lang_ThreadGroup = utf_new_char("java/lang/ThreadGroup"); utf_java_lang_ref_SoftReference = @@ -299,10 +310,6 @@ bool utf8_init(void) utf_new_char("java/lang/NoSuchMethodError"); #endif -#if defined(WITH_CLASSPATH_GNU) - utf_java_lang_VMThrowable = utf_new_char("java/lang/VMThrowable"); -#endif - utf_java_lang_Exception = utf_new_char("java/lang/Exception"); utf_java_lang_ArithmeticException = @@ -344,11 +351,17 @@ bool utf8_init(void) utf_java_lang_NullPointerException = utf_new_char("java/lang/NullPointerException"); + utf_java_lang_RuntimeException = + utf_new_char("java/lang/RuntimeException"); + utf_java_lang_StringIndexOutOfBoundsException = utf_new_char("java/lang/StringIndexOutOfBoundsException"); utf_java_lang_reflect_InvocationTargetException = utf_new_char("java/lang/reflect/InvocationTargetException"); + + utf_java_security_PrivilegedActionException = + utf_new_char("java/security/PrivilegedActionException"); #if defined(ENABLE_JAVASE) utf_java_lang_Void = utf_new_char("java/lang/Void"); @@ -385,14 +398,23 @@ bool utf8_init(void) #if defined(ENABLE_JAVASE) utf_EnclosingMethod = utf_new_char("EnclosingMethod"); utf_Signature = utf_new_char("Signature"); - utf_RuntimeVisibleAnnotations = utf_new_char("RuntimeVisibleAnnotations"); utf_StackMapTable = utf_new_char("StackMapTable"); + +#if defined(ENABLE_ANNOTATIONS) + utf_RuntimeVisibleAnnotations = utf_new_char("RuntimeVisibleAnnotations"); + utf_RuntimeInvisibleAnnotations = utf_new_char("RuntimeInvisibleAnnotations"); + utf_RuntimeVisibleParameterAnnotations = utf_new_char("RuntimeVisibleParameterAnnotations"); + utf_RuntimeInvisibleParameterAnnotations = utf_new_char("RuntimeInvisibleParameterAnnotations"); + utf_AnnotationDefault = utf_new_char("AnnotationDefault"); +#endif #endif utf_init = utf_new_char(""); utf_clinit = utf_new_char(""); utf_clone = utf_new_char("clone"); utf_finalize = utf_new_char("finalize"); + utf_invoke = utf_new_char("invoke"); + utf_main = utf_new_char("main"); utf_run = utf_new_char("run"); utf_add = utf_new_char("add"); @@ -401,12 +423,18 @@ bool utf8_init(void) utf_removeThread = utf_new_char("removeThread"); utf_put = utf_new_char("put"); utf_get = utf_new_char("get"); + utf_uncaughtException = utf_new_char("uncaughtException"); utf_value = utf_new_char("value"); - utf_printStackTrace = utf_new_char("printStackTrace"); utf_fillInStackTrace = utf_new_char("fillInStackTrace"); - utf_loadClass = utf_new_char("loadClass"); + utf_findNative = utf_new_char("findNative"); utf_getSystemClassLoader = utf_new_char("getSystemClassLoader"); + utf_initCause = utf_new_char("initCause"); + utf_loadClass = utf_new_char("loadClass"); + utf_loadClassInternal = utf_new_char("loadClassInternal"); + utf_printStackTrace = utf_new_char("printStackTrace"); + + utf_division_by_zero = utf_new_char("/ by zero"); utf_Z = utf_new_char("Z"); utf_B = utf_new_char("B"); @@ -432,6 +460,11 @@ bool utf8_init(void) utf_void__java_lang_ClassLoader = utf_new_char("()Ljava/lang/ClassLoader;"); + utf_java_lang_ClassLoader_java_lang_String__J = + utf_new_char("(Ljava/lang/ClassLoader;Ljava/lang/String;)J"); + + utf_java_lang_Exception__V = utf_new_char("(Ljava/lang/Exception;)V"); + utf_java_lang_Object__java_lang_Object = utf_new_char("(Ljava/lang/Object;)Ljava/lang/Object;"); @@ -441,15 +474,21 @@ bool utf8_init(void) utf_new_char("(Ljava/lang/String;)Ljava/lang/Class;"); utf_java_lang_Thread__V = utf_new_char("(Ljava/lang/Thread;)V"); + + utf_java_lang_Thread_java_lang_Throwable__V = + utf_new_char("(Ljava/lang/Thread;Ljava/lang/Throwable;)V"); + + utf_Ljava_lang_ThreadGroup_Ljava_lang_String__V = + utf_new_char("(Ljava/lang/ThreadGroup;Ljava/lang/String;)V"); + utf_java_lang_Throwable__void = utf_new_char("(Ljava/lang/Throwable;)V"); + utf_java_lang_Throwable__java_lang_Throwable = + utf_new_char("(Ljava/lang/Throwable;)Ljava/lang/Throwable;"); + utf_null = utf_new_char("null"); utf_not_named_yet = utf_new_char("\t"); array_packagename = utf_new_char("\t"); - - /* everything's ok */ - - return true; }