コード例 #1
0
        public VirtualRegister(Type type, StateSpaces stsp = StateSpaces.REG)
        {
            if (type == null)
            {
                throw new ArgumentNullException("type");
            }

            if (!type.IsValueType)
            {
                throw new ArgumentException("Only value types are permitted", "type");
            }

            UnderlyingType = type;
            StateSpace     = stsp;
        }
コード例 #2
0
 public InstructionSelector.DynamicRegister Allocate(Type type, StateSpaces stsp)
 {
     InstructionSelector.DynamicRegister vreg = pool.Where(
         rcr => !rcr.Live && rcr.StateSpace == stsp &&
         (rcr.StateSpace == StateSpaces.REG && rcr.DataType == type ||
          rcr.StateSpace != StateSpaces.REG && rcr.UnderlyingType == type)).FirstOrDefault();
     if (vreg == null)
     {
         vreg = new InstructionSelector.DynamicRegister(type, stsp);
         pool.Add(vreg);
     }
     else
     {
         vreg.Live = true;
     }
     return(vreg);
 }
コード例 #3
0
 public FormalParameter(Type type, StateSpaces stsp = StateSpaces.REG, PassingStyles style = PassingStyles.VAL) :
     base(type, stsp)
 {
     PassingStyle = style;
 }
コード例 #4
0
 public static InstructionSelector.DynamicRegister Waste(Type type, StateSpaces stsp)
 {
     return(new InstructionSelector.DynamicRegister(type, stsp));
 }
コード例 #5
0
ファイル: GenericOperand.cs プロジェクト: cephdon/gpudotnet
		public VirtualRegister(Type type, StateSpaces stsp = StateSpaces.REG)
		{
			if (type == null)
				throw new ArgumentNullException("type");
			
			if (!type.IsValueType)
				throw new ArgumentException("Only value types are permitted", "type");
			
			UnderlyingType = type;
			StateSpace = stsp;
		}
コード例 #6
0
ファイル: GenericOperand.cs プロジェクト: cephdon/gpudotnet
		public FormalParameter(Type type, StateSpaces stsp = StateSpaces.REG, PassingStyles style = PassingStyles.VAL) :
			base(type, stsp)
		{
			PassingStyle = style;
		}
コード例 #7
0
		private DynamicRegister AllocateRegister(Type type, StateSpaces stsp = StateSpaces.REG)
		{
			return regalloc(type, stsp);
		}
コード例 #8
0
			public DynamicRegister(Type type, StateSpaces stsp = StateSpaces.REG) :
				base(type, stsp)
			{
				Live = true;
			}
コード例 #9
0
 private DynamicRegister AllocateRegister(Type type, StateSpaces stsp = StateSpaces.REG)
 {
     return(regalloc(type, stsp));
 }
コード例 #10
0
 public DynamicRegister(Type type, StateSpaces stsp = StateSpaces.REG) :
     base(type, stsp)
 {
     Live = true;
 }