Commit 2f196f12 authored by Vít Kabele's avatar Vít Kabele

Contextes and annotations extracted back to subpackages.

parent c80afb7a
Pipeline #3427 passed with stages
in 3 minutes and 13 seconds
package ch.usi.dag.disl;
package ch.usi.dag.disl.annotation;
import ch.usi.dag.disl.classcontext.ClassContext;
import ch.usi.dag.disl.dynamiccontext.DynamicContext;
import ch.usi.dag.disl.marker.Marker;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorContext;
import ch.usi.dag.disl.staticcontext.StaticContext;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.annotation;
import ch.usi.dag.disl.classcontext.ClassContext;
import ch.usi.dag.disl.dynamiccontext.DynamicContext;
import ch.usi.dag.disl.marker.Marker;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorContext;
import ch.usi.dag.disl.staticcontext.StaticContext;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.annotation;
import ch.usi.dag.disl.classcontext.ClassContext;
import ch.usi.dag.disl.dynamiccontext.DynamicContext;
import ch.usi.dag.disl.marker.Marker;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorContext;
import ch.usi.dag.disl.staticcontext.StaticContext;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.annotation;
import ch.usi.dag.disl.processorcontext.ArgumentContext;
import ch.usi.dag.disl.classcontext.ClassContext;
import ch.usi.dag.disl.dynamiccontext.DynamicContext;
import ch.usi.dag.disl.staticcontext.StaticContext;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.annotation;
import ch.usi.dag.disl.classcontext.ClassContext;
import ch.usi.dag.disl.dynamiccontext.DynamicContext;
import ch.usi.dag.disl.marker.Marker;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorContext;
import ch.usi.dag.disl.staticcontext.StaticContext;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.annotation;
import ch.usi.dag.disl.processorcontext.ArgumentContext;
import ch.usi.dag.disl.guardcontext.GuardContext;
import ch.usi.dag.disl.Shadow;
import ch.usi.dag.disl.staticcontext.StaticContext;
import java.lang.annotation.*;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.SyntheticLocal.Initialize;
import ch.usi.dag.disl.annotation.SyntheticLocal;
import ch.usi.dag.disl.annotation.SyntheticLocal.Initialize;
import ch.usi.dag.disl.annotation.ThreadLocal;
import ch.usi.dag.util.logging.Logger;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.annotation.Guarded;
import ch.usi.dag.disl.annotation.ProcessAlso;
import ch.usi.dag.util.Strings;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.ClassNode;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.classcontext.ClassContext;
import ch.usi.dag.disl.dynamiccontext.DynamicContext;
import ch.usi.dag.disl.processorcontext.ArgumentContext;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorContext;
import ch.usi.dag.disl.staticcontext.StaticContext;
import org.objectweb.asm.Type;
import java.util.HashMap;
......
......@@ -6,6 +6,7 @@
*/
package ch.usi.dag.disl;
import ch.usi.dag.disl.annotation.ArgumentProcessor;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AnnotationNode;
import org.objectweb.asm.tree.ClassNode;
......
......@@ -6,6 +6,7 @@
package ch.usi.dag.disl;
import ch.usi.dag.disl.staticcontext.StaticContext;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.annotation.After;
import ch.usi.dag.disl.annotation.AfterReturning;
import ch.usi.dag.disl.annotation.AfterThrowing;
import ch.usi.dag.disl.annotation.Before;
import ch.usi.dag.disl.marker.Marker;
import ch.usi.dag.disl.marker.Parameter;
import ch.usi.dag.util.logging.Logger;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AnnotationNode;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.staticcontext.StaticContext;
import java.lang.reflect.Method;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.classcontext;
/**
* Allows converting {@link String} literals to {@link Class} instances.
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.dynamiccontext;
import ch.usi.dag.disl.annotation.After;
import ch.usi.dag.disl.annotation.AfterThrowing;
import ch.usi.dag.disl.staticcontext.FieldAccessStaticContext;
/**
* Provides access to dynamic information available to a snippet at runtime.
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.guardcontext;
/**
* Guard context is used to invoke guard inside of other guard.
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.guardcontext;
import ch.usi.dag.disl.Reflection;
import ch.usi.dag.disl.Reflection.Class;
import ch.usi.dag.disl.Reflection.Method;
import ch.usi.dag.disl.staticcontext.AbstractStaticContext;
import org.objectweb.asm.tree.MethodNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.processorcontext;
import ch.usi.dag.disl.annotation.ArgumentProcessor;
/**
* Provides information about a particular method argument from within an
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.processorcontext;
/**
* Provides access to method arguments. This can be done either by querying the
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.processorcontext;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorContext;
/**
* Determines the scope of {@link ArgumentProcessorContext} methods.
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.processorcontext.ArgumentContext;
// used for guard invocation - reduced visibility
class ArgumentContextImpl implements ArgumentContext {
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.guardcontext.GuardContext;
import ch.usi.dag.disl.processorcontext.ArgumentContext;
//used for guard invocation - reduced visibility
class GuardContextImpl implements GuardContext {
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.guardcontext.GuardContext;
import ch.usi.dag.disl.processorcontext.ArgumentContext;
import ch.usi.dag.disl.staticcontext.StaticContext;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Formatter;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.annotation.SyntheticLocal;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.InsnList;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.staticcontext.SCGenerator;
import ch.usi.dag.util.asm.ClassNodeHelper;
import ch.usi.dag.util.logging.Logger;
import org.objectweb.asm.Opcodes;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import org.objectweb.asm.tree.MethodNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.Shadow.WeavingRegion;
import org.objectweb.asm.tree.AbstractInsnNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.MarkerException;
import ch.usi.dag.disl.Shadow;
import ch.usi.dag.disl.Shadow.WeavingRegion;
import ch.usi.dag.disl.Snippet;
import org.objectweb.asm.tree.*;
import java.util.HashSet;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.AsmHelper;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.JavaNames;
import ch.usi.dag.disl.Shadow.WeavingRegion;
import ch.usi.dag.disl.annotation.Before;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.commons.AdviceAdapter;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.BasicBlockCalc;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.AsmHelper;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.Shadow.WeavingRegion;
import org.objectweb.asm.tree.AbstractInsnNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.AsmOpcodes;
import ch.usi.dag.disl.MarkerException;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import org.objectweb.asm.tree.MethodNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.CtrlFlowGraph;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.TryCatchBlockNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.MarkerException;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.MarkerException;
import ch.usi.dag.disl.Shadow;
import ch.usi.dag.disl.Snippet;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.JavaNames;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodInsnNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
/**
* Used for marker parameter parsing.
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.AsmOpcodes;
import ch.usi.dag.disl.MarkerException;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.marker;
import ch.usi.dag.disl.AsmHelper.Insns;
import org.objectweb.asm.tree.AbstractInsnNode;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.annotation.ArgumentProcessor;
import java.lang.reflect.Method;
import java.util.Set;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorMode;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodInsnNode;
......@@ -72,7 +73,8 @@ public class ProcGenerator {
ProcInstance procInst = insideMethodPIs.get(prcInv.getProcessor());
if (procInst == null) {
procInst = createProcInstance(ArgumentProcessorMode.METHOD_ARGS,
procInst = createProcInstance(
ArgumentProcessorMode.METHOD_ARGS,
shadow.getMethodNode().desc, shadow, prcInv);
}
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorMode;
import java.util.List;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.annotation.GuardMethod;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashMap;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.staticcontext.StaticContext;
import java.util.HashMap;
import java.util.Map;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorMode;
public class ProcInvocation {
private ArgProcessor processor;
......
......@@ -50,7 +50,7 @@ public final class Shadow {
private AbstractInsnNode afterThrowEnd;
WeavingRegion (
public WeavingRegion (
final AbstractInsnNode start, final List <AbstractInsnNode> ends,
final AbstractInsnNode afterThrowStart, final AbstractInsnNode afterThrowEnd
) {
......@@ -90,7 +90,7 @@ public final class Shadow {
this.afterThrowStart = afterThrowStart;
}
void setAfterThrowEnd(final AbstractInsnNode afterThrowEnd) {
public void setAfterThrowEnd(final AbstractInsnNode afterThrowEnd) {
this.afterThrowEnd = afterThrowEnd;
}
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.DiSL.CodeOption;
import ch.usi.dag.disl.marker.Marker;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
......
......@@ -69,7 +69,7 @@ public class SnippetCode {
* code, including those referenced in argument processors applied
* within this snippet.
*/
Set <StaticContextMethod> getReferencedSCMs () {
public Set <StaticContextMethod> getReferencedSCMs () {
return __getCachedReferencedSCMs ();
}
......
......@@ -2,6 +2,10 @@ package ch.usi.dag.disl;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.DiSL.CodeOption;
import ch.usi.dag.disl.marker.BytecodeMarker;
import ch.usi.dag.disl.marker.Marker;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorContext;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorMode;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.*;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.staticcontext.AbstractStaticContext;
public abstract class AbstractUniqueId extends AbstractStaticContext {
private IdHolder idHolder;
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.staticcontext.StaticContext;
/**
* Provides a {@link StaticContext} implementation that can be used to obtain a
* unique method identifier. This class provides random method identifiers.
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.staticcontext.StaticContext;
/**
* Provides a {@link StaticContext} implementation that can be used to obtain a
* unique method identifier. This class provides sequential method identifiers.
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.staticcontext;
import ch.usi.dag.disl.Shadow;
/**
* Provides a trivial {@link StaticContext} interface implementation, which just
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.staticcontext;
import ch.usi.dag.disl.BasicBlock;
import ch.usi.dag.disl.CtrlFlowGraph;
import ch.usi.dag.disl.Insn;
import ch.usi.dag.disl.Logging;
import ch.usi.dag.util.logging.Logger;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.staticcontext;
/**
* Provides static context information about instrumented bytecode.
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.staticcontext;
import ch.usi.dag.disl.JavaNames;
import org.objectweb.asm.Opcodes;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.staticcontext;
import ch.usi.dag.disl.marker.BytecodeMarker;
import ch.usi.dag.disl.JavaNames;
import org.objectweb.asm.tree.FieldInsnNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.staticcontext;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.Insn;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.InsnList;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.staticcontext;
import ch.usi.dag.disl.marker.BytecodeMarker;
import ch.usi.dag.disl.Insn;
import ch.usi.dag.disl.JavaNames;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.MethodInsnNode;
......
package ch.usi.dag.disl;
package ch.usi.dag.disl.staticcontext;
import ch.usi.dag.disl.BasicBlock;
import ch.usi.dag.disl.CtrlFlowGraph;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.TryCatchBlockNode;
......