public static IType FindType(this ICompilation compilation, StackType stackType, Sign sign = Sign.None) { switch (stackType) { case StackType.Unknown: return(SpecialType.UnknownType); case StackType.Ref: return(new ByReferenceType(SpecialType.UnknownType)); default: return(compilation.FindType(stackType.ToKnownTypeCode(sign))); } }
public ILVariable RegisterVariable(VariableKind kind, StackType stackType, string name = null) { var type = Method.Compilation.FindType(stackType.ToKnownTypeCode()); return(RegisterVariable(kind, type, stackType, name)); }