[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Jimple and JSR/RET



On Tue, 7 Jan 2003, Archie Cobbs wrote:

> This question is mainly out of curiousity rather than need, but...
>
> It appears that Jimple supports subroutines with jimple.internal.JRetStmt
> and soot.StmtAddressType. Jimple always seems to remove subroutines, however.
>
> Is the purpose of this to make analysis and optimization simpler?

Hi,

A naive translation of bytecode into Jimple would leave the JRetStmts in
place.  However, these statements cause huge problems with analysis and
optimization; I believe that we can't even do type inference without
removing subroutines.  They make analyses that would be intraprocedural
into interprocedural analyses, and we don't really want that.

> Is there an option to tell Soot to not "flatten out" JSR/RET subroutines?
>
> Is there any intention of adding support for restoring subroutines?

You can probably hack the code and comment out the call to the JSR
inliner.  But that will probably make type inference, and other things,
fail.  There is no intention of adding support for subroutines.

pat