类 LivenessAnalyzer

    • 构造器详细资料

      • LivenessAnalyzer

        public LivenessAnalyzer()
        Creates a new LivenessAnalyzer.
      • LivenessAnalyzer

        public LivenessAnalyzer​(PartialEvaluator partialEvaluator,
                                boolean runPartialEvaluator,
                                InitializationFinder initializationFinder,
                                boolean runInitializationFinder)
        Creates a new LivenessAnalyzer that will use the given partial evaluator and initialization finder.
        参数:
        partialEvaluator - the evaluator to be used for the analysis.
        runPartialEvaluator - specifies whether to run this evaluator on every code attribute that is visited.
        initializationFinder - the initialization finder to be used for the analysis.
        runInitializationFinder - specifies whether to run this initialization finder on every code attribute that is visited.
    • 方法详细资料

      • isTraced

        public boolean isTraced​(int instructionOffset)
        Returns whether the instruction at the given offset has ever been executed during the partial evaluation.
      • isAliveBefore

        public boolean isAliveBefore​(int instructionOffset,
                                     int variableIndex)
        Returns whether the specified variable is alive before the instruction at the given offset.
      • setAliveBefore

        public void setAliveBefore​(int instructionOffset,
                                   int variableIndex,
                                   boolean alive)
        Sets whether the specified variable is alive before the instruction at the given offset.
      • isAliveAfter

        public boolean isAliveAfter​(int instructionOffset,
                                    int variableIndex)
        Returns whether the specified variable is alive after the instruction at the given offset.
      • setAliveAfter

        public void setAliveAfter​(int instructionOffset,
                                  int variableIndex,
                                  boolean alive)
        Sets whether the specified variable is alive after the instruction at the given offset.
      • isCategory2

        public boolean isCategory2​(int instructionOffset,
                                   int variableIndex)
        Returns whether the specified variable takes up two entries after the instruction at the given offset.
      • setCategory2

        public void setCategory2​(int instructionOffset,
                                 int variableIndex,
                                 boolean category2)
        Sets whether the specified variable takes up two entries after the instruction at the given offset.