Exemple #1
0
 public LPFunction(LPModule module, string name, LPType return_type, List <LPArgument> args)
 {
     blocks           = new List <LPBasicBlock>();
     arguments        = args;
     this.name        = name;
     this.return_type = return_type;
     this.module      = module;
 }
Exemple #2
0
        public LPFunction CreateFunction(string name, LPType return_type, List <LPArgument> args)
        {
            if (funcs.Any(x => x.Name == name))
            {
                return(funcs.Where(x => x.Name == name).ElementAt(0));
            }
            var func = new LPFunction(this, name, return_type, args);

            funcs.Add(func);
            return(func);
        }
Exemple #3
0
 public static LPConstant Create(LPType type, object content = null)
 => new LPConstant
 {
     Type = type, Content = content
 };
 public static LPAllocOperator Create(LPType type)
 => new LPAllocOperator
 {
     Type = type
 };