Class SharedInitializationLocalSplitter


  • public class SharedInitializationLocalSplitter
    extends BodyTransformer
    There is a problem with the following code $u2#6 = 0; interfaceinvoke $u5#30.($u4, $u2#6); interfaceinvoke $u5#56.($u4, $u2#6); since $u2#6 will be boolean as well as int. A cast from boolean to int or vice versa is not valid in Java. The local splitter does not split the local since it would require the introduction of a new initialization statement. Therefore, we split for each usage of a constant variable, such as: $u2#6 = 0; $u2#6_2 = 0; interfaceinvoke $u5#30.($u4, $u2#6); interfaceinvoke $u5#56.($u4, $u2#6_2);
    Author:
    Marc Miltenberger
    • Field Detail

      • omitExceptingUnitEdges

        protected boolean omitExceptingUnitEdges
    • Constructor Detail

      • SharedInitializationLocalSplitter

        public SharedInitializationLocalSplitter​(Singletons.Global g)
      • SharedInitializationLocalSplitter

        public SharedInitializationLocalSplitter​(ThrowAnalysis ta)
      • SharedInitializationLocalSplitter

        public SharedInitializationLocalSplitter​(ThrowAnalysis ta,
                                                 boolean omitExceptingUnitEdges)
    • Method Detail

      • internalTransform

        protected void internalTransform​(Body body,
                                         String phaseName,
                                         Map<String,​String> options)
        Description copied from class: BodyTransformer
        This method is called to perform the transformation itself. It is declared abstract; subclasses must implement this method by making it the entry point to their actual Body transformation.
        Specified by:
        internalTransform in class BodyTransformer
        Parameters:
        body - the body on which to apply the transformation
        phaseName - the phasename for this transform; not typically used by implementations.
        options - the actual computed options; a combination of default options and Scene specified options.