Class BlockEntryPointsManager


  • public class BlockEntryPointsManager
    extends Object
    Part of DotnetBody Manager for entry points (leave, branch instructions) ILSpy AST Blocks are labeled with a string. Strings are stored and replaced afterwards with the right JimpleStmt
    • Field Detail

      • gotoTargetsInBody

        public final HashMap<Unit,​String> gotoTargetsInBody
        first goto targets are nop stmts, mapped to the real entry point string_names. These are swapped afterwards with the real goto values, after all method blocks are visited.
    • Constructor Detail

      • BlockEntryPointsManager

        public BlockEntryPointsManager()
    • Method Detail

      • putBlockEntryPoint

        public void putBlockEntryPoint​(String blockName,
                                       Unit entryUnit)
      • getBlockEntryPoint

        public Unit getBlockEntryPoint​(String blockName)
      • swapGotoEntriesInJBody

        public void swapGotoEntriesInJBody​(Body jb)
        After producing Jimple Body, swap all target branches (label to stmt)
        Parameters:
        jb -
      • swapGotoEntryUnit

        public void swapGotoEntryUnit​(Unit in,
                                      Unit out)
        Swap two elements (out of the chain)
        Parameters:
        in -
        out -