/// <summary> /// Returns true if the two variable details have the same constant and same type /// </summary> /// <param name="varDetailsA"></param> /// <param name="varDetailsB"></param> /// <returns></returns> public static bool SameConstantAndType(VariableDetails varDetailsA, VariableDetails varDetailsB) { if (varDetailsA == null) { if (varDetailsB != null) { return false; } return true; } return ((varDetailsA.Constant == null && varDetailsB.Constant == null) || (varDetailsA.Constant != null && varDetailsA.Constant.Equals(varDetailsB.Constant))) && varDetailsA.Type == varDetailsB.Type; }
/// <summary> /// Constructor that takes in a VariableDetails /// Used for phi operator /// </summary> /// <param name="VarDetails"></param> public VariableTarget(VariableDetails VarDetails) { if (VarDetails != null) { Name = VarDetails.Name; RealName = VarDetails.RealName; DefinedBlock = VarDetails.DefinedBlock; } }