* src/vm/exceptions.c [ENABLE_JAVAME_CLDC1_1](exceptions_new_error):
authortwisti <none@none>
Wed, 31 Jan 2007 10:00:12 +0000 (10:00 +0000)
committertwisti <none@none>
Wed, 31 Jan 2007 10:00:12 +0000 (10:00 +0000)
New function.
(exceptions_asm_new_abstractmethoderror) [!ENABLE_JAVASE]: Use
exceptions_new_error.
(exceptions_throw_virtualmachineerror): Removed.
* src/vm/exceptions.h (exceptions_throw_virtualmachineerror): Likewise.

src/vm/exceptions.c
src/vm/exceptions.h

index 24fb984ebdaeb62149667043537b14e5972dc3bd..a24b6793ea15ca5a61ed3f267f96f17a6844138b 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: exceptions.c 7246 2007-01-29 18:49:05Z twisti $
+   $Id: exceptions.c 7261 2007-01-31 10:00:12Z twisti $
 
 */
 
@@ -632,6 +632,24 @@ java_objectheader *exceptions_new_abstractmethoderror(void)
 }
 
 
+/* exceptions_new_error ********************************************************
+
+   Generates a java.lang.Error for the VM.
+
+*******************************************************************************/
+
+#if defined(ENABLE_JAVAME_CLDC1_1)
+static java_objectheader *exceptions_new_error(utf *message)
+{
+       java_objectheader *o;
+
+       o = exceptions_new_class_utf(class_java_lang_Error, message);
+
+       return o;
+}
+#endif
+
+
 /* exceptions_asm_new_abstractmethoderror **************************************
 
    Generates a java.lang.AbstractMethodError for
@@ -653,9 +671,7 @@ java_objectheader *exceptions_asm_new_abstractmethoderror(u1 *sp, u1 *ra)
 #if defined(ENABLE_JAVASE)
        e = exceptions_new_abstractmethoderror();
 #else
-       /* in the meantime we do this */
-
-       e = exceptions_new_virtualmachineerror();
+       e = exceptions_new_error(utf_java_lang_AbstractMethodError);
 #endif
 
        /* remove the stackframeinfo */
@@ -1337,18 +1353,6 @@ void exceptions_throw_verifyerror_for_stack(methodinfo *m,int type)
 }
 
 
-/* exceptions_throw_virtualmachineerror ****************************************
-
-   Generates and throws a java.lang.VirtualMachineError for the VM.
-
-*******************************************************************************/
-
-void exceptions_throw_virtualmachineerror(void)
-{
-       exceptions_throw_class(class_java_lang_VirtualMachineError);
-}
-
-
 /* exceptions_new_arithmeticexception ******************************************
 
    Generates a java.lang.ArithmeticException for the JIT compiler.
index 0c8a21cfc376e16b7582e1f7cfa44c554db46822..c3539cb4c7115461d202320f440013dac8446dc3 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: exceptions.h 7246 2007-01-29 18:49:05Z twisti $
+   $Id: exceptions.h 7261 2007-01-31 10:00:12Z twisti $
 
 */
 
@@ -108,7 +108,6 @@ void exceptions_throw_internalerror(const char *message, ...);
 void exceptions_throw_outofmemoryerror(void);
 void exceptions_throw_verifyerror(methodinfo *m, const char *message, ...);
 void exceptions_throw_verifyerror_for_stack(methodinfo *m, int type);
-void exceptions_throw_virtualmachineerror(void);
 void exceptions_throw_unsatisfiedlinkerror(utf *name);
 void exceptions_throw_unsupportedclassversionerror(classinfo *c, u4 ma, u4 mi);