[Soot-list] Return Stmt

Eric Bodden eric.bodden at mail.mcgill.ca
Thu May 10 23:42:01 EDT 2007


Oh, sorry I got that wrong. No a basic block actually ends by
definition after each jump, return or before each statement that is
jumped to. So I guess that should always holds. Having said that, Soot
does actually not at all have a notion of blocks, really. We just have
jumps and return. So I guess it depends on the definition of a Block
;-)

Well, anyway - according to the normal definition of a basic block,
that should hold.

> You can test it by inserting a statement after a
> return, writing out the class file, reading it back into Soot, and
> seeing if it's still there.  Quite possibly a dead code elimination pass
> will get rid of it, but that pass could be turned off...

According to the JLS that *has* to be the case. A method body is not
allowed to hold any code that is certainly dead (and AFAIK the
bytecode verifier checks for that).

Eric

-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list