示例#1
0
        internal FunctionSignature GetIndirectFunctionSignature(uint index)
        {
            if (0 > _tables.Length)
            {
                Errors.Add("Indirect function signature can't be resolved because no table is defined.");
                return(null);
            }
            if (BuiltinLanguageType.AnyFunc != _tables[0].ElementType)
            {
                Errors.Add("Indirect function signature can't be resolved because type of table[0] is not AnyFunc.");
                return(null);
            }
            FunctionSignature result = _module.GetFunctionSignature(index);

            if (null == result)
            {
                Errors.Add(string.Format("Indirect function index {0} is greater than maximum allowed index.",
                                         index));
                return(null);
            }
            return(result);
        }
示例#2
0
 internal FunctionDefinition(FunctionSignature signature)
 {
     Signature = signature ?? throw new ArgumentNullException("signature");
     Id        = ++LastId;
 }