Purpose of StructuredBlock.moveDefinitions()?

Help
2006-12-14
2013-05-02
  • Trevor Harmon

    Trevor Harmon - 2006-12-14

    There's a method in StructuredBlock called moveDefinitions. It has no code, and as far as I can tell it is never overridden. However, there are several places in JODE where the method is invoked. Why is this method called if it doesn't do anything? What is (or was) its intended purpose? Thanks.

     
    • Jochen Hoenicke

      Jochen Hoenicke - 2006-12-14

      Crawling through the logs, I found that it was used more than seven years ago, to compute the used variables of a structured block on the fly.  The code was removed, but not its callers (I probably thought it may be useful for another purpose)

      http://jode.svn.sourceforge.net/viewvc/jode?view=rev&revision=790

       
      • Trevor Harmon

        Trevor Harmon - 2006-12-14

        "I probably thought it may be useful for another purpose"

        You were right! I discovered that adding a single statement to that method allows bytecode instructions to be preserved during transformations of StructuredBlocks. Thanks for thinking ahead...

         

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks