/** * Creates a new TracedVariables that is a copy of the given TracedVariables. */ public TracedVariables(TracedVariables tracedVariables) { super(tracedVariables); producerVariables = new Variables(tracedVariables.producerVariables); }
/** * Gets the producer Value for the specified variable, without disturbing it. * @param index the variable index. * @return the producer value of the given variable. */ public Value getProducerValue(int index) { return producerVariables.getValue(index); }
case InstructionConstants.OP_ILOAD_2: case InstructionConstants.OP_ILOAD_3: stack.push(variables.iload(variableIndex)); break; case InstructionConstants.OP_LLOAD_2: case InstructionConstants.OP_LLOAD_3: stack.push(variables.lload(variableIndex)); break; case InstructionConstants.OP_FLOAD_2: case InstructionConstants.OP_FLOAD_3: stack.push(variables.fload(variableIndex)); break; case InstructionConstants.OP_DLOAD_2: case InstructionConstants.OP_DLOAD_3: stack.push(variables.dload(variableIndex)); break; case InstructionConstants.OP_ALOAD_2: case InstructionConstants.OP_ALOAD_3: stack.push(variables.aload(variableIndex)); break; case InstructionConstants.OP_ISTORE_2: case InstructionConstants.OP_ISTORE_3: variables.store(variableIndex, stack.ipop()); break;
/** * Creates a Variables object that is a copy of the given Variables object. */ public Variables(Variables variables) { // Create the values array. this(variables.size); // Copy the values. initialize(variables); }
public boolean generalize(TracedVariables other, boolean clearConflictingOtherVariables) { boolean variablesChanged = super.generalize(other, clearConflictingOtherVariables); boolean producersChanged = producerVariables.generalize(other.producerVariables, clearConflictingOtherVariables); /* consumerVariables.generalize(other.consumerVariables)*/ // Clear any traces if a variable has become null. if (variablesChanged) { for (int index = 0; index < size; index++) { if (values[index] == null) { producerVariables.values[index] = null; if (clearConflictingOtherVariables) { other.producerVariables.values[index] = null; } } } } return variablesChanged || producersChanged; }
case InstructionConstants.OP_ILOAD_2: case InstructionConstants.OP_ILOAD_3: stack.push(variables.iload(variableIndex)); break; case InstructionConstants.OP_LLOAD_2: case InstructionConstants.OP_LLOAD_3: stack.push(variables.lload(variableIndex)); break; case InstructionConstants.OP_FLOAD_2: case InstructionConstants.OP_FLOAD_3: stack.push(variables.fload(variableIndex)); break; case InstructionConstants.OP_DLOAD_2: case InstructionConstants.OP_DLOAD_3: stack.push(variables.dload(variableIndex)); break; case InstructionConstants.OP_ALOAD_2: case InstructionConstants.OP_ALOAD_3: stack.push(variables.aload(variableIndex)); break; case InstructionConstants.OP_ISTORE_2: case InstructionConstants.OP_ISTORE_3: variables.store(variableIndex, stack.ipop()); break;
public void initialize(TracedVariables other) { super.initialize(other); producerVariables.initialize(other.producerVariables); }
public boolean generalize(TracedVariables other, boolean clearConflictingOtherVariables) { boolean variablesChanged = super.generalize(other, clearConflictingOtherVariables); boolean producersChanged = producerVariables.generalize(other.producerVariables, clearConflictingOtherVariables); /* consumerVariables.generalize(other.consumerVariables)*/ // Clear any traces if a variable has become null. if (variablesChanged) { for (int index = 0; index < size; index++) { if (values[index] == null) { producerVariables.values[index] = null; if (clearConflictingOtherVariables) { other.producerVariables.values[index] = null; } } } } return variablesChanged || producersChanged; }
case InstructionConstants.OP_ILOAD_2: case InstructionConstants.OP_ILOAD_3: stack.push(variables.iload(variableIndex)); break; case InstructionConstants.OP_LLOAD_2: case InstructionConstants.OP_LLOAD_3: stack.push(variables.lload(variableIndex)); break; case InstructionConstants.OP_FLOAD_2: case InstructionConstants.OP_FLOAD_3: stack.push(variables.fload(variableIndex)); break; case InstructionConstants.OP_DLOAD_2: case InstructionConstants.OP_DLOAD_3: stack.push(variables.dload(variableIndex)); break; case InstructionConstants.OP_ALOAD_2: case InstructionConstants.OP_ALOAD_3: stack.push(variables.aload(variableIndex)); break; case InstructionConstants.OP_ISTORE_2: case InstructionConstants.OP_ISTORE_3: variables.store(variableIndex, stack.ipop()); break;
/** * Creates a new TracedVariables that is a copy of the given TracedVariables. */ public TracedVariables(TracedVariables tracedVariables) { super(tracedVariables); producerVariables = new Variables(tracedVariables.producerVariables); }
public void initialize(TracedVariables other) { super.initialize(other); producerVariables.initialize(other.producerVariables); }
/** * Gets the producer Value for the specified variable, without disturbing it. * @param index the variable index. * @return the producer value of the given variable. */ public Value getProducerValue(int index) { return producerVariables.getValue(index); }