From 9b8083c75c79ca8f1fa63f86420b77a9ca5fffd7 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 14 Apr 1999 20:19:48 +0000 Subject: [PATCH] Types moved to jode.type An array may be tUObject don't check array type on store git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@601 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/jvm/CodeVerifier.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/jode/jode/jvm/CodeVerifier.java b/jode/jode/jvm/CodeVerifier.java index 8f217fe..88002e6 100644 --- a/jode/jode/jvm/CodeVerifier.java +++ b/jode/jode/jvm/CodeVerifier.java @@ -1,9 +1,6 @@ package jode.jvm; import jode.bytecode.*; -import jode.Type; -import jode.MethodType; -import jode.ArrayType; -import jode.ClassInterfacesType; +import jode.type.*; import jode.AssertError; import jode.Decompiler; import java.util.BitSet; @@ -361,7 +358,9 @@ public class CodeVerifier implements Opcodes { || !isOfType(arrType, Type.tArray(Type.tBoolean)))) throw new VerifyException(instr.getDescription()); - result.push(((ArrayType)arrType).getElementType()); + Type elemType = (arrType == Type.tUObject ? Type.tUObject + :((ArrayType)arrType).getElementType()); + result.push(elemType); if (((1 << instr.opcode - opc_iaload) & 0xa) != 0) result.push(Type.tVoid); break; @@ -408,7 +407,9 @@ public class CodeVerifier implements Opcodes { && (instr.opcode != opc_bastore || !isOfType(arrType, Type.tArray(Type.tBoolean)))) throw new VerifyException(instr.getDescription()); - if (!isOfType(type, ((ArrayType)arrType).getElementType())) + Type elemType = instr.opcode >= opc_bastore ? Type.tInt + : types[instr.opcode - opc_iastore]; + if (!isOfType(type, elemType)) throw new VerifyException(instr.getDescription()); break; }