예제 #1
0
        public HExpr EnsurePseudoProcedure(string name, BaseType dt, int arity)
        {
            var exp = host.EnsurePseudoProcedure(name, ntf.GetRekoType((HExpr)dt), arity);
            var pc  = new ProcedureConstant(PrimitiveType.Ptr32, exp);

            return(m.MapToHandle(pc));
        }
예제 #2
0
        public HExpr EnsureIntrinsicProcedure(string name, int isIdempotent, BaseType dt, int arity)
        {
            var exp = host.EnsureIntrinsic(name, isIdempotent != 0, ntf.GetRekoType((HExpr)dt), arity);
            var pc  = new ProcedureConstant(PrimitiveType.Ptr32, exp);

            return(m.MapToHandle(pc));
        }
예제 #3
0
        public void Ntf_array_i32()
        {
            var ntf = new NativeTypeFactory();
            var a   = ntf.ArrayOf((HExpr)BaseType.Int32, 4);
            var arr = ntf.GetRekoType(a);

            Assert.AreEqual("(arr int32 4)", arr.ToString());
        }