enver 02/02/04 01:06:40
Modified: src/java/org/apache/bcel/verifier/structurals
InstConstraintVisitor.java
Log:
"commented in" a check that would often fail as long as there was some
BCEL bug lurking concerning Assignment Compatibility.
Revision Changes Path
1.2 +6 -5 jakarta-bcel/src/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
Index: InstConstraintVisitor.java
===================================================================
RCS file: /home/cvs/jakarta-bcel/src/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InstConstraintVisitor.java 29 Oct 2001 20:00:41 -0000 1.1
+++ InstConstraintVisitor.java 4 Feb 2002 09:06:40 -0000 1.2
@@ -84,7 +84,7 @@
* TODO: Currently, the JVM's behaviour concerning monitors (MONITORENTER,
* MONITOREXIT) is not modeled in JustIce.
*
- * @version $Id: InstConstraintVisitor.java,v 1.1 2001/10/29 20:00:41 jvanzyl Exp $
+ * @version $Id: InstConstraintVisitor.java,v 1.2 2002/02/04 09:06:40 enver Exp $
* @author <A HREF="http://www.inf.fu-berlin.de/~ehaase"/>Enver Haase</A>
* @see org.apache.bcel.verifier.exc.StructuralCodeConstraintException
* @see org.apache.bcel.verifier.exc.LinkingConstraintException
@@ -2472,11 +2472,12 @@
else{
constraintViolated(o, "The stack top type '"+value+"' is not of a reference type as
expected.");
}
- // TODO: This can only be checked using Staerk-et-al's "set-of-object types", not
+ // TODO: This can possibly only be checked using Staerk-et-al's "set-of-object types",
not
// using "wider cast object types" created during verification.
- //if (!(rvalue.isAssignmentCompatibleWith(shouldbe))){
- // constraintViolated(o, "The stack top type '"+value+"' is not assignment compatible
with '"+shouldbe+"'.");
- //}
+ // Comment it out if you encounter problems. See also the analogon at visitPUTSTATIC.
+ if (!(rvalue.isAssignmentCompatibleWith(shouldbe))){
+ constraintViolated(o, "The stack top type '"+value+"' is not assignment compatible
with '"+shouldbe+"'.");
+ }
}
else{
if (shouldbe != value){
--
To unsubscribe, e-mail: <mailto:bcel-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:bcel-dev-help@jakarta.apache.org>
|