Purpose of StructuredBlock.moveDefinitions()?

  • 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)


      • 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