private int OldStartDepth(Subroutine subroutine) { Method method = ((IMethodInfo)subroutine).Method; int count = MetaDataProvider.Parameters(method).Count; if (!MetaDataProvider.IsConstructor(method) && !MetaDataProvider.IsStatic(method)) { ++count; } return(count); }
public StackInfo Call <TypeList, ArgList> (APC pc, Method method, bool virt, TypeList extraVarargs, Dummy dest, ArgList args, StackInfo data) where TypeList : IIndexable <TypeNode> where ArgList : IIndexable <Dummy> { int count = MetaDataProvider.Parameters(method).Count + (extraVarargs == null ? 0 : extraVarargs.Count); if (!MetaDataProvider.IsStatic(method)) { if (data.IsThis(count)) { this.stack_depth_mirror_for_end_old.AddCallOnThis(pc); } ++count; } data = data.Pop(count); if (MetaDataProvider.IsVoidMethod(method)) { return(data); } return(data.Push()); }
public override INumericalEnvironmentDomain <BoxedVariable <TVar>, BoxedExpression> Entry (APC pc, Method method, INumericalEnvironmentDomain <BoxedVariable <TVar>, BoxedExpression> data) { foreach (var param in MetaDataProvider.Parameters(method).AsEnumerable()) { TVar variable; var readAt = ContextProvider.MethodContext.CFG.Post(pc); if (!ContextProvider.ValueContext.TryParameterValue(readAt, param, out variable)) { continue; } var abstractType = ContextProvider.ValueContext.GetType(readAt, variable); if (abstractType.IsNormal() && MetaDataProvider.IsPrimitive(abstractType.Value)) { data = SetInitialRange(variable, abstractType.Value, data); } } return(data); }
public StackInfo NewObj <ArgList> (APC pc, Method ctor, Dummy dest, ArgList args, StackInfo data) where ArgList : IIndexable <Dummy> { int paramsCount = MetaDataProvider.Parameters(ctor).Count; return(data.Pop(paramsCount).Push()); }