/** * Creates a new EvaluationShrinker. * @param partialEvaluator the partial evaluator that will * analyze the code. * @param runPartialEvaluator specifies whether the partial * evaluator should be run for each * method, or if some other class is * already doing this. * @param extraDeletedInstructionVisitor an optional extra visitor for all * deleted instructions. * @param extraAddedInstructionVisitor an optional extra visitor for all * added instructions. */ public EvaluationShrinker(PartialEvaluator partialEvaluator, boolean runPartialEvaluator, InstructionVisitor extraDeletedInstructionVisitor, InstructionVisitor extraAddedInstructionVisitor) { this(new InstructionUsageMarker(partialEvaluator, runPartialEvaluator), true, extraDeletedInstructionVisitor, extraAddedInstructionVisitor); }
/** * Creates a new EvaluationShrinker. * @param partialEvaluator the partial evaluator that will * analyze the code. * @param runPartialEvaluator specifies whether the partial * evaluator should be run for each * method, or if some other class is * already doing this. * @param extraDeletedInstructionVisitor an optional extra visitor for all * deleted instructions. * @param extraAddedInstructionVisitor an optional extra visitor for all * added instructions. */ public EvaluationShrinker(PartialEvaluator partialEvaluator, boolean runPartialEvaluator, InstructionVisitor extraDeletedInstructionVisitor, InstructionVisitor extraAddedInstructionVisitor) { this(new InstructionUsageMarker(partialEvaluator, runPartialEvaluator), true, extraDeletedInstructionVisitor, extraAddedInstructionVisitor); }
/** * Creates a new EvaluationShrinker. * @param partialEvaluator the partial evaluator that will * analyze the code. * @param runPartialEvaluator specifies whether the partial * evaluator should be run for each * method, or if some other class is * already doing this. * @param extraDeletedInstructionVisitor an optional extra visitor for all * deleted instructions. * @param extraAddedInstructionVisitor an optional extra visitor for all * added instructions. */ public EvaluationShrinker(PartialEvaluator partialEvaluator, boolean runPartialEvaluator, InstructionVisitor extraDeletedInstructionVisitor, InstructionVisitor extraAddedInstructionVisitor) { this(new InstructionUsageMarker(partialEvaluator, runPartialEvaluator), true, extraDeletedInstructionVisitor, extraAddedInstructionVisitor); }
public ClassVisitor createClassVisitor() { // Perform partial evaluation again, now loading any previously stored // values for fields, method parameters, and method return values. ValueFactory valueFactory = new IdentifiedValueFactory(); SimplifiedInvocationUnit loadingInvocationUnit = new LoadingInvocationUnit(valueFactory, fieldPropagationValue, methodPropagationParameter, methodPropagationReturnvalue); // Trace the construction of reference values. ReferenceTracingValueFactory referenceTracingValueFactory = new ReferenceTracingValueFactory(valueFactory); return new AllMethodVisitor( new AllAttributeVisitor( new DebugAttributeVisitor("Shrinking code", new OptimizationCodeAttributeFilter( new EvaluationShrinker( new InstructionUsageMarker( new PartialEvaluator(referenceTracingValueFactory, new ParameterTracingInvocationUnit(loadingInvocationUnit), !codeSimplificationAdvanced, referenceTracingValueFactory), true), true, deletedCounter, addedCounter))))); } };
public ClassVisitor createClassVisitor() { // Perform partial evaluation again, now loading any previously stored // values for fields, method parameters, and method return values. ValueFactory valueFactory = new IdentifiedValueFactory(); SimplifiedInvocationUnit loadingInvocationUnit = new LoadingInvocationUnit(valueFactory, fieldPropagationValue, methodPropagationParameter, methodPropagationReturnvalue); // Trace the construction of reference values. ReferenceTracingValueFactory referenceTracingValueFactory = new ReferenceTracingValueFactory(valueFactory); return new AllMethodVisitor( new AllAttributeVisitor( new DebugAttributeVisitor("Shrinking code", new OptimizationCodeAttributeFilter( new EvaluationShrinker( new InstructionUsageMarker( new PartialEvaluator(referenceTracingValueFactory, new ParameterTracingInvocationUnit(loadingInvocationUnit), !codeSimplificationAdvanced, referenceTracingValueFactory), true), true, deletedCounter, addedCounter))))); } };
public ClassVisitor createClassVisitor() { // Perform partial evaluation again, now loading any previously stored // values for fields, method parameters, and method return values. ValueFactory valueFactory = new IdentifiedValueFactory(); SimplifiedInvocationUnit loadingInvocationUnit = new LoadingInvocationUnit(valueFactory, fieldPropagationValue, methodPropagationParameter, methodPropagationReturnvalue); // Trace the construction of reference values. ReferenceTracingValueFactory referenceTracingValueFactory = new ReferenceTracingValueFactory(valueFactory); return new AllMethodVisitor( new AllAttributeVisitor( new DebugAttributeVisitor("Shrinking code", new OptimizationCodeAttributeFilter( new EvaluationShrinker( new InstructionUsageMarker( new PartialEvaluator(referenceTracingValueFactory, new ParameterTracingInvocationUnit(loadingInvocationUnit), !codeSimplificationAdvanced, referenceTracingValueFactory), true), true, deletedCounter, addedCounter))))); } };
new InstructionUsageMarker(partialEvaluator, false);
new InstructionUsageMarker(partialEvaluator, false);
new InstructionUsageMarker(partialEvaluator, false);