public void branch(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget) { // Override the branch targets. traceBranchTargets = new InstructionOffsetValue(branchTarget); wasCalled = true; }
public void branch(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget) { // Override the branch targets. traceBranchTargets = new InstructionOffsetValue(branchTarget); wasCalled = true; }
public void branch(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget) { // Override the branch targets. traceBranchTargets = new InstructionOffsetValue(branchTarget); wasCalled = true; }
public void branch(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget) { // Override the branch targets. traceBranchTargets = new InstructionOffsetValue(branchTarget); wasCalled = true; }
public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction) { switch (simpleInstruction.opcode) { case InstructionConstants.OP_ACONST_NULL: case InstructionConstants.OP_NEWARRAY: case InstructionConstants.OP_ATHROW: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.NEW_INSTANCE); break; case InstructionConstants.OP_AALOAD: traceValue = new InstructionOffsetValue(offset); break; default: traceValue = null; break; } }
public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction) { switch (simpleInstruction.opcode) { case InstructionConstants.OP_ACONST_NULL: case InstructionConstants.OP_NEWARRAY: case InstructionConstants.OP_ATHROW: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.NEW_INSTANCE); break; case InstructionConstants.OP_AALOAD: traceValue = new InstructionOffsetValue(offset); break; default: traceValue = null; break; } }
public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction) { switch (simpleInstruction.opcode) { case InstructionConstants.OP_ACONST_NULL: case InstructionConstants.OP_NEWARRAY: case InstructionConstants.OP_ATHROW: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.NEW_INSTANCE); break; case InstructionConstants.OP_AALOAD: traceValue = new InstructionOffsetValue(offset); break; default: traceValue = null; break; } }
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction) { switch (constantInstruction.opcode) { case InstructionConstants.OP_LDC: case InstructionConstants.OP_LDC_W: case InstructionConstants.OP_NEW: case InstructionConstants.OP_ANEWARRAY: case InstructionConstants.OP_MULTIANEWARRAY: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.NEW_INSTANCE); break; case InstructionConstants.OP_GETSTATIC: case InstructionConstants.OP_GETFIELD: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.FIELD_VALUE); break; case InstructionConstants.OP_INVOKEVIRTUAL: case InstructionConstants.OP_INVOKESPECIAL: case InstructionConstants.OP_INVOKESTATIC: case InstructionConstants.OP_INVOKEINTERFACE: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.METHOD_RETURN_VALUE); break; case InstructionConstants.OP_CHECKCAST: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.CAST); break; default: traceValue = null; break; } }
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction) { switch (constantInstruction.opcode) { case InstructionConstants.OP_LDC: case InstructionConstants.OP_LDC_W: case InstructionConstants.OP_NEW: case InstructionConstants.OP_ANEWARRAY: case InstructionConstants.OP_MULTIANEWARRAY: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.NEW_INSTANCE); break; case InstructionConstants.OP_GETSTATIC: case InstructionConstants.OP_GETFIELD: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.FIELD_VALUE); break; case InstructionConstants.OP_INVOKEVIRTUAL: case InstructionConstants.OP_INVOKESPECIAL: case InstructionConstants.OP_INVOKESTATIC: case InstructionConstants.OP_INVOKEINTERFACE: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.METHOD_RETURN_VALUE); break; case InstructionConstants.OP_CHECKCAST: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.CAST); break; default: traceValue = null; break; } }
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction) { switch (constantInstruction.opcode) { case InstructionConstants.OP_LDC: case InstructionConstants.OP_LDC_W: case InstructionConstants.OP_NEW: case InstructionConstants.OP_ANEWARRAY: case InstructionConstants.OP_MULTIANEWARRAY: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.NEW_INSTANCE); break; case InstructionConstants.OP_GETSTATIC: case InstructionConstants.OP_GETFIELD: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.FIELD_VALUE); break; case InstructionConstants.OP_INVOKEVIRTUAL: case InstructionConstants.OP_INVOKESPECIAL: case InstructionConstants.OP_INVOKESTATIC: case InstructionConstants.OP_INVOKEINTERFACE: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.METHOD_RETURN_VALUE); break; case InstructionConstants.OP_CHECKCAST: traceValue = new InstructionOffsetValue(offset | InstructionOffsetValue.CAST); break; default: traceValue = null; break; } }
/** * Returns an InstructionOffsetValue that contains the instructions offsets * of this value but not the given instruction offset. */ public InstructionOffsetValue remove(int value) { for (int index = 0; index < values.length; index++) { if (values[index] == value) { int[] newValues = new int[values.length-1]; System.arraycopy(values, 0, newValues, 0, index); System.arraycopy(values, index+1, newValues, index, values.length-index-1); return new InstructionOffsetValue(newValues); } } return this; }
/** * Returns an InstructionOffsetValue that contains the instructions offsets * of this value but not the given instruction offset. */ public InstructionOffsetValue remove(int value) { for (int index = 0; index < values.length; index++) { if (values[index] == value) { int[] newValues = new int[values.length-1]; System.arraycopy(values, 0, newValues, 0, index); System.arraycopy(values, index+1, newValues, index, values.length-index-1); return new InstructionOffsetValue(newValues); } } return this; }
/** * Returns an InstructionOffsetValue that contains the instructions offsets * of this value but not the given instruction offset. */ public InstructionOffsetValue remove(int value) { for (int index = 0; index < values.length; index++) { if (values[index] == value) { int[] newValues = new int[values.length-1]; System.arraycopy(values, 0, newValues, 0, index); System.arraycopy(values, index+1, newValues, index, values.length-index-1); return new InstructionOffsetValue(newValues); } } return this; }
/** * Returns an InstructionOffsetValue that contains the instructions offsets * of this value and the given instruction offset. */ public InstructionOffsetValue add(int value) { if (contains(value)) { return this; } int[] newValues = new int[values.length+1]; System.arraycopy(values, 0, newValues, 0, values.length); newValues[values.length] = value; return new InstructionOffsetValue(newValues); }
/** * Returns an InstructionOffsetValue that contains the instructions offsets * of this value and the given instruction offset. */ public InstructionOffsetValue add(int value) { if (contains(value)) { return this; } int[] newValues = new int[values.length+1]; System.arraycopy(values, 0, newValues, 0, values.length); newValues[values.length] = value; return new InstructionOffsetValue(newValues); }
/** * Returns an InstructionOffsetValue that contains the instructions offsets * of this value and the given instruction offset. */ public InstructionOffsetValue add(int value) { if (contains(value)) { return this; } int[] newValues = new int[values.length+1]; System.arraycopy(values, 0, newValues, 0, values.length); newValues[values.length] = value; return new InstructionOffsetValue(newValues); }
public void branchConditionally(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget, int conditional) { // Accumulate the branch targets. traceBranchTargets = traceBranchTargets.generalize(new InstructionOffsetValue(branchTarget)).instructionOffsetValue(); wasCalled = true; }
/** * Sets or replaces the trace value on a given value, if it's a * reference value, returning the result. */ protected Value trace(Value value, int trace) { if (value.computationalType() != Value.TYPE_REFERENCE) { return value; } return trace(value, new InstructionOffsetValue(trace)); }
/** * Sets or replaces the trace value on a given value, if it's a * reference value, returning the result. */ protected Value trace(Value value, int trace) { if (value.computationalType() != Value.TYPE_REFERENCE) { return value; } return trace(value, new InstructionOffsetValue(trace)); }
/** * Sets or replaces the trace value on a given value, if it's a * reference value, returning the result. */ protected Value trace(Value value, int trace) { if (value.computationalType() != Value.TYPE_REFERENCE) { return value; } return trace(value, new InstructionOffsetValue(trace)); }