Exemple #1
0
		private static LIRType LocateLIRType(LIRType t)
		{
			LIRType f;
			if (CreatedLIRTypes.TryGetValue(t.GetHashCode(), out f))
				return f;
			CreatedLIRTypes.Add(t.GetHashCode(), t);
			return t;
		}
Exemple #2
0
		public LIRLocal RequestLocal(LIRType tp)
		{
			LIRLocal ret;
			Queue<LIRLocal> q;
			if (!requestedLocalMap.TryGetValue(tp.GetHashCode(), out q))
			{
				requestedLocalMap.Add(tp.GetHashCode(), new Queue<LIRLocal>());
				ret = new LIRLocal(this, tp);
			}
			else if (q.Count > 0)
				ret = q.Dequeue();
			else
			{
				ret = new LIRLocal(this, tp);
			}
			ret.Dynamic = true;
			return ret;
		}