summaryrefslogtreecommitdiff
path: root/libjava/verify.cc
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-15 22:02:13 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-15 22:02:13 +0000
commit9981c44b92386c6d642ef71245fab27974f08dbf (patch)
tree9f425c2996ae0b146771dcc668979c48675ee708 /libjava/verify.cc
parent966073719a045032562f6bbfd595456b85b28e24 (diff)
downloadgcc-9981c44b92386c6d642ef71245fab27974f08dbf.tar.gz
PR libgcj/16032:
* interpret.cc (AVAL1U): Resolve pool entry when not direct threaded. (AVAL2U): Likewise. (compile): Handle 'ldc class' specially. (_Jv_InterpMethod::run): Added special 'ldc class' instruction. * verify.cc (check_constant): Handle 'ldc class' for 1.5 classes. * defineclass.cc (handleCodeAttribute): Set new field. (MAJOR_1_1, MINOR_1_1, MAJOR_1_2, MINOR_1_2, MAJOR_1_3, MINOR_1_3, MAJOR_1_4, MINOR_1_4, MAJOR_1_5, MINOR_1_5): New defines. (parse): Check version numbers. (_Jv_ClassReader::is_15): New field. (_Jv_ClassReader): Initialize it. * include/java-interp.h (_Jv_InterpMethod::is_15): New field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104325 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/verify.cc')
-rw-r--r--libjava/verify.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/libjava/verify.cc b/libjava/verify.cc
index 3869bffd502..8b9cfcc759f 100644
--- a/libjava/verify.cc
+++ b/libjava/verify.cc
@@ -1950,13 +1950,16 @@ private:
{
check_pool_index (index);
_Jv_Constants *pool = &current_class->constants;
- if (pool->tags[index] == JV_CONSTANT_ResolvedString
- || pool->tags[index] == JV_CONSTANT_String)
+ int tag = pool->tags[index];
+ if (tag == JV_CONSTANT_ResolvedString || tag == JV_CONSTANT_String)
return type (&java::lang::String::class$, this);
- else if (pool->tags[index] == JV_CONSTANT_Integer)
+ else if (tag == JV_CONSTANT_Integer)
return type (int_type);
- else if (pool->tags[index] == JV_CONSTANT_Float)
+ else if (tag == JV_CONSTANT_Float)
return type (float_type);
+ else if (current_method->is_15
+ && (tag == JV_CONSTANT_ResolvedClass || tag == JV_CONSTANT_Class))
+ return type (&java::lang::Class::class$, this);
verify_fail ("String, int, or float constant expected", start_PC);
}