SimpleVerifier
"Markus Heiden" <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <6B3D025FD1324C8188F0C903EE1D0C7B@Laptop> |
Hi,
I have some problems with the SimpleVerifier. I extended Analyzer, SimpleVerifier, Frame and BasicValue to compute which values (and not just types) are on the stack and into the locals. At some places in the code of SimpleVerifier (and some of its superclasses) BasicValues are compared with == or != for primitve types. This comparison fails for instances of my extended BasicValue class, which additionally holds the value of stack elements and locals (but still uses the original BasicValue.equals()). My code currently works, but I need to workaround the above problems by overwriting the problematic methods with patched ones. Is there a small chance that this code will be changed in asm to use equals() for comparing BasicValues in all cases? I would like to provide a patch in that case.
Some of the problematic places in the code are BasicVerifier#copyOperation(), #ternaryOperation(), #naryOperation(). E.g.:
public Value copyOperation(final AbstractInsnNode insn, final Value value) throws AnalyzerException
{
...
// type is necessarily a primitive type here, so value must be == to expected value
if (value != expected) {
throw new AnalyzerException(null, expected, value);
}
return value;
}
Markus
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws