diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-29 16:18:53 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-29 16:18:53 +0000 |
commit | 03ec52bcf479e979c68de4b9f919b41b78b6c86d (patch) | |
tree | 8924f86f1c35eafa095a7f8b99440ce31668edd9 /libjava/interpret.cc | |
parent | e8dba39f5172c8a55f923b8f306cad3aa66c6f5c (diff) | |
download | gcc-03ec52bcf479e979c68de4b9f919b41b78b6c86d.tar.gz |
* interpret.cc (run) <insn_checkcast, checkcast_resolved>: Use
_Jv_CheckCast.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101427 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/interpret.cc')
-rw-r--r-- | libjava/interpret.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libjava/interpret.cc b/libjava/interpret.cc index 355b5b9054a..8b46dc6fa4a 100644 --- a/libjava/interpret.cc +++ b/libjava/interpret.cc @@ -25,7 +25,6 @@ details. */ #include <java/lang/StringBuffer.h> #include <java/lang/Class.h> #include <java/lang/reflect/Modifier.h> -#include <java/lang/ClassCastException.h> #include <java/lang/VirtualMachineError.h> #include <java/lang/InternalError.h> #include <java/lang/NullPointerException.h> @@ -3022,8 +3021,7 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args, _Jv_InterpMethod *meth) jclass to = (_Jv_Linker::resolve_pool_entry (meth->defining_class, index)).clazz; - if (value != NULL && ! to->isInstance (value)) - throw new java::lang::ClassCastException (to->getName()); + value = (jobject) _Jv_CheckCast (to, value); PUSHA (value); @@ -3040,8 +3038,7 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args, _Jv_InterpMethod *meth) SAVE_PC(); jobject value = POPA (); jclass to = (jclass) AVAL (); - if (value != NULL && ! to->isInstance (value)) - throw new java::lang::ClassCastException (to->getName()); + value = (jobject) _Jv_CheckCast (to, value); PUSHA (value); } NEXT_INSN; |