Exemplo n.º 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;
        }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
 public FormalParameter(Type type, StateSpaces stsp = StateSpaces.REG, PassingStyles style = PassingStyles.VAL) :
     base(type, stsp)
 {
     PassingStyle = style;
 }
Exemplo n.º 4
0
 public static InstructionSelector.DynamicRegister Waste(Type type, StateSpaces stsp)
 {
     return(new InstructionSelector.DynamicRegister(type, stsp));
 }
Exemplo n.º 5
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;
		}
Exemplo n.º 6
0
		public FormalParameter(Type type, StateSpaces stsp = StateSpaces.REG, PassingStyles style = PassingStyles.VAL) :
			base(type, stsp)
		{
			PassingStyle = style;
		}
Exemplo n.º 7
0
		private DynamicRegister AllocateRegister(Type type, StateSpaces stsp = StateSpaces.REG)
		{
			return regalloc(type, stsp);
		}
Exemplo n.º 8
0
			public DynamicRegister(Type type, StateSpaces stsp = StateSpaces.REG) :
				base(type, stsp)
			{
				Live = true;
			}
Exemplo n.º 9
0
 private DynamicRegister AllocateRegister(Type type, StateSpaces stsp = StateSpaces.REG)
 {
     return(regalloc(type, stsp));
 }
Exemplo n.º 10
0
 public DynamicRegister(Type type, StateSpaces stsp = StateSpaces.REG) :
     base(type, stsp)
 {
     Live = true;
 }