internal AnalysisInvocationExpession(MethodDescriptor caller, AnalysisCallNode callNode, IList<PropGraphNodeDescriptor> arguments, VariableNode lhs) { Caller = caller; Arguments = arguments; LHS = lhs; IsStatic = true; CallNode = callNode; InstatiatedTypes = new HashSet<TypeDescriptor>(); }
internal bool IsCaller(MethodDescriptor callerDescriptor, MethodDescriptor calleeDescriptor, CallGraph<MethodDescriptor, LocationDescriptor> callgraph) { return callgraph.GetCallers(calleeDescriptor).Select(kp => kp.Value).Contains(callerDescriptor); }
internal bool IsCalled(MethodDescriptor methodDescriptor, MethodDescriptor calleeDescriptor, CallGraph<MethodDescriptor, LocationDescriptor> callgraph) { return callgraph.GetCallees(methodDescriptor).Contains(calleeDescriptor); }
/// <summary> /// Checks if a method is reachbable /// </summary> /// <param name="methodDescriptor"></param> /// <returns></returns> internal bool IsReachable(MethodDescriptor methodDescriptor, CallGraph<MethodDescriptor, LocationDescriptor> callgraph) { //var method = FindMethodSymbolInSolution(methodDescriptor).Method; //return method != null && Callgraph.GetReachableMethods().Contains(method); // ,new Compare()); return callgraph.GetReachableMethods().Contains(methodDescriptor); }
internal CallInfo(MethodDescriptor caller, AnalysisCallNode callNode, MethodDescriptor callee, IList<PropGraphNodeDescriptor> arguments, VariableNode lhs, bool isConstructor) : base(caller, callNode, arguments, lhs) { Caller = caller; Callee = callee; Arguments = arguments; LHS = lhs; Receiver = default(VariableNode); IsStatic = true; IsConstructor = isConstructor; }
internal DelegateCallInfo(MethodDescriptor caller, AnalysisCallNode callNode, DelegateVariableNode calleeDelegate, PropGraphNodeDescriptor receiver, IList<PropGraphNodeDescriptor> arguments, VariableNode lhs) : base(caller, callNode, arguments, lhs) { Caller = caller; CalleeDelegate = calleeDelegate; Receiver = receiver; Arguments = arguments; LHS = lhs; }
public static object Deserializer(System.Type expected, global::Orleans.Serialization.BinaryTokenStreamReader stream) { ReachingTypeAnalysis.MethodDescriptor result = new ReachingTypeAnalysis.MethodDescriptor(); object objResult = ((object)(result)); object temp1 = ((string)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(string), stream))); fieldInfo1.SetValue(objResult, temp1); object temp2 = ((bool)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(bool), stream))); fieldInfo2.SetValue(objResult, temp2); object temp3 = ((string)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(string), stream))); fieldInfo3.SetValue(objResult, temp3); object temp4 = ((string)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(string), stream))); fieldInfo4.SetValue(objResult, temp4); object temp5 = ((System.Collections.Generic.IList<ReachingTypeAnalysis.TypeDescriptor>)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(System.Collections.Generic.IList<ReachingTypeAnalysis.TypeDescriptor>), stream))); fieldInfo5.SetValue(objResult, temp5); object temp6 = ((ReachingTypeAnalysis.TypeDescriptor)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(ReachingTypeAnalysis.TypeDescriptor), stream))); fieldInfo6.SetValue(objResult, temp6); object temp7 = ((ReachingTypeAnalysis.TypeDescriptor)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(ReachingTypeAnalysis.TypeDescriptor), stream))); fieldInfo7.SetValue(objResult, temp7); object temp8 = ((string)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(string), stream))); fieldInfo8.SetValue(objResult, temp8); return objResult; }
public static object DeepCopier(object original) { ReachingTypeAnalysis.MethodDescriptor input = ((ReachingTypeAnalysis.MethodDescriptor)(original)); ReachingTypeAnalysis.MethodDescriptor result = new ReachingTypeAnalysis.MethodDescriptor(); Orleans.Serialization.SerializationContext.Current.RecordObject(original, result); object objResult = ((object)(result)); object temp1 = input.ClassName; fieldInfo1.SetValue(objResult, temp1); object temp2 = input.IsStatic; fieldInfo2.SetValue(objResult, temp2); object temp3 = input.MethodName; fieldInfo3.SetValue(objResult, temp3); object temp4 = input.NamespaceName; fieldInfo4.SetValue(objResult, temp4); object temp5 = ((System.Collections.Generic.IList<ReachingTypeAnalysis.TypeDescriptor>)(Orleans.Serialization.SerializationManager.DeepCopyInner(input.Parameters))); fieldInfo5.SetValue(objResult, temp5); object temp6 = ((ReachingTypeAnalysis.TypeDescriptor)(Orleans.Serialization.SerializationManager.DeepCopyInner(input.ReturnType))); fieldInfo6.SetValue(objResult, temp6); object temp7 = ((ReachingTypeAnalysis.TypeDescriptor)(Orleans.Serialization.SerializationManager.DeepCopyInner(fieldInfo7.GetValue(input)))); fieldInfo7.SetValue(objResult, temp7); object temp8 = fieldInfo8.GetValue(input); fieldInfo8.SetValue(objResult, temp8); return objResult; }
public void AddDelegate(DelegateVariableNode delegateVariableNode, MethodDescriptor methodDescriptor) { var v = AddVertex(delegateVariableNode); if (v.Value.Delegates == null) { v.Value.Delegates = new HashSet<MethodDescriptor>(); } v.Value.Delegates.Add(methodDescriptor); }
public void AddDelegate(DelegateVariableNode delegateVariableNode, MethodDescriptor methodDescriptor) { Vertex v = AddVertex(delegateVariableNode); var data = GetData(v); if (data.Delegates == null) { data.Delegates = new HashSet<MethodDescriptor>(); } data.Delegates.Add(methodDescriptor); }
public override void SetAll(System.Collections.Generic.IDictionary<string,object> values) { object value; if (values == null) { InitStateFields(); return; } if (values.TryGetValue("MethodDescriptor", out value)) @MethodDescriptor = (MethodDescriptor) value; }