aboutsummaryrefslogtreecommitdiff
path: root/libjava/interpret.cc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-03-25 23:05:32 -0800
committerRichard Henderson <rth@gcc.gnu.org>2001-03-25 23:05:32 -0800
commitb3208f56cbe28aabe191564dd27cf6d78bfe9fd5 (patch)
tree8bd00c51e350e8505bf5561673010a0008df7aba /libjava/interpret.cc
parent56b8908481ae59ad65338b4d1249b040a057cc27 (diff)
downloadgcc-b3208f56cbe28aabe191564dd27cf6d78bfe9fd5.zip
gcc-b3208f56cbe28aabe191564dd27cf6d78bfe9fd5.tar.gz
gcc-b3208f56cbe28aabe191564dd27cf6d78bfe9fd5.tar.bz2
exception.cc (java_eh_info): Make value type jthrowable.
* exception.cc (java_eh_info): Make value type jthrowable. (_Jv_type_matcher): Remove now unneeded cast. (_Jv_Throw): Make argument type jthrowable. Munge name for SJLJ_EXCEPTIONS here ... * gcj/cni.h: ... not here. (JvThrow): Remove. * gcj/javaprims.h (_Jv_Throw, _Jv_Sjlj_Throw): Update declarations. * defineclass.cc, interpret.cc, jni.cc, posix-threads.cc, prims.cc, resolve.cc, gnu/gcj/runtime/natFirstThread.cc, gnu/gcj/xlib/natDrawable.cc, gnu/gcj/xlib/natFont.cc, gnu/gcj/xlib/natWMSizeHints.cc, gnu/gcj/xlib/natWindowAttributes.cc, gnu/gcj/xlib/natXImage.cc, java/io/natFile.cc, java/io/natFileDescriptorEcos.cc, java/io/natFileDescriptorPosix.cc, java/io/natFileDescriptorWin32.cc, java/io/natFileWin32.cc, java/lang/natClass.cc, java/lang/natClassLoader.cc, java/lang/natDouble.cc, java/lang/natObject.cc, java/lang/natPosixProcess.cc, java/lang/natRuntime.cc, java/lang/natString.cc, java/lang/natSystem.cc, java/lang/natThread.cc, java/lang/reflect/natArray.cc, java/lang/reflect/natConstructor.cc, java/lang/reflect/natField.cc, java/lang/reflect/natMethod.cc, java/util/zip/natDeflater.cc, java/util/zip/natInflater.cc: Use throw, not JvThrow or _Jv_Throw. From-SVN: r40838
Diffstat (limited to 'libjava/interpret.cc')
-rw-r--r--libjava/interpret.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/libjava/interpret.cc b/libjava/interpret.cc
index 44dc1ca..b121a1b 100644
--- a/libjava/interpret.cc
+++ b/libjava/interpret.cc
@@ -337,7 +337,7 @@ void _Jv_InterpMethod::run_normal (ffi_cif* cif,
+ storage_size * sizeof (_Jv_word));
jobject ex = _this->run (cif, ret, args, inv);
- if (ex != 0) _Jv_Throw (ex);
+ if (ex != 0) throw static_cast<jthrowable>(ex);
}
void _Jv_InterpMethod::run_synch_object (ffi_cif* cif,
@@ -357,7 +357,7 @@ void _Jv_InterpMethod::run_synch_object (ffi_cif* cif,
jobject ex = _this->run (cif, ret, args, inv);
_Jv_MonitorExit (rcv);
- if (ex != 0) _Jv_Throw (ex);
+ if (ex != 0) throw static_cast<jthrowable>(ex);
}
void _Jv_InterpMethod::run_synch_class (ffi_cif* cif,
@@ -377,7 +377,7 @@ void _Jv_InterpMethod::run_synch_class (ffi_cif* cif,
jobject ex = _this->run (cif, ret, args, inv);
_Jv_MonitorExit (sync);
- if (ex != 0) _Jv_Throw (ex);
+ if (ex != 0) throw static_cast<jthrowable>(ex);
}
/*
@@ -679,7 +679,7 @@ void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
// working if the method is final. So instead we do an
// explicit test.
if (! sp[0].o)
- throw new java::lang::NullPointerException ();
+ throw new java::lang::NullPointerException;
if (rmeth->vtable_index == -1)
{
@@ -1979,7 +1979,7 @@ void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
jclass type = field->type;
jint field_offset = field->u.boffset;
if (field_offset > 0xffff)
- JvThrow (new java::lang::VirtualMachineError);
+ throw new java::lang::VirtualMachineError;
jobject obj = POPA();
NULLCHECK(obj);
@@ -2086,7 +2086,7 @@ void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
jint field_offset = field->u.boffset;
if (field_offset > 0xffff)
- JvThrow (new java::lang::VirtualMachineError);
+ throw new java::lang::VirtualMachineError;
if (type->isPrimitive ())
{
@@ -2237,7 +2237,7 @@ void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
SAVE_PC;
{
jobject value = POPA();
- JvThrow (value);
+ throw static_cast<jthrowable>(value);
}
NEXT_INSN;
@@ -2250,8 +2250,7 @@ void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
if (value != NULL && ! to->isInstance (value))
{
- JvThrow (new java::lang::ClassCastException
- (to->getName()));
+ throw new java::lang::ClassCastException (to->getName());
}
PUSHA (value);
@@ -2412,13 +2411,13 @@ void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
static void
throw_internal_error (char *msg)
{
- JvThrow (new java::lang::InternalError (JvNewStringLatin1 (msg)));
+ throw new java::lang::InternalError (JvNewStringLatin1 (msg));
}
static void
throw_incompatible_class_change_error (jstring msg)
{
- JvThrow (new java::lang::IncompatibleClassChangeError (msg));
+ throw new java::lang::IncompatibleClassChangeError (msg);
}
#ifndef HANDLE_SEGV
@@ -2429,7 +2428,7 @@ throw_null_pointer_exception ()
if (null_pointer_exc == NULL)
null_pointer_exc = new java::lang::NullPointerException;
- JvThrow (null_pointer_exc);
+ throw null_pointer_exc;
}
#endif