[abc-users] Re: Strange effect in Baf to Jasmin conversion

From: Eric Bodden <eric.bodden_at_mail.mcgill.ca>
Date: Thu, 17 Apr 2008 20:51:44 -0400

Hi all.

After some discussion with Patrick it seems that indeed there exists
an implicit condition that identity statements have to be the first
statements in a Jimple (and Baf) body. (I remember this having come up
before but I could never quite explain why.)

So there's two things we can do in abc, either check this condition or
enforce it. I personally think that enforcing would be nicer and
indeed when looking at this method it seems that the person who
implemented the method had something like this in mind:


(the code that would do the actual restructuring is commented out)

What's your opinion on this?


On 17/04/2008, Patrick Lam <plam_at_cs.mcgill.ca> wrote:
> Eric Bodden wrote:
> > Thanks for the detailed explanation Patrick. After reading the
> > relevant portion of the specification (see below), I wonder whether
> > not actually the local variable packer should ensure that local
> > variable 0 is never written to and if that would not be the "more
> > correct" fix. Of course one could also enforce that identity
> > statements always come first in Jimple (and Baf) but that would add
> > yet another constraint on the developer.
> I don't like that as much as enforcing the Jimple/Baf conditions,
> because it means that the local variable packer needs to know whether or
> not the method is an instance method or a static method. The Jimple/Baf
> condition is something that really ought to be checked, and it just
> makes sense anyway: identity statements should come first (or at the
> head of exception-catching blocks).
> pat

Eric Bodden
Sable Research Group
McGill University, Montréal, Canada
Received on Fri Apr 18 2008 - 01:51:48 BST

This archive was generated by hypermail 2.2.0 : Fri Apr 18 2008 - 19:30:26 BST