예제 #1
0
		public LIRParameter(LIRMethod parent, LIRType tp)
		{
			this.Parent = parent;
			this.Type = tp;
			this.Index = parent.mParameters.Count;
			parent.mParameters.Add(this);
		}
예제 #2
0
		public LIRLocal(LIRMethod parent, LIRType tp)
		{
			this.Parent = parent;
			this.Type = tp;

			this.Index = parent.mLocals.Count;
			this.Parent.mLocals.Add(this);
		}
예제 #3
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;
		}
예제 #4
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;
		}
예제 #5
0
			public StaticFieldEmittableDataItem(IRField fld)
			{
				this.FieldType = fld.Type;
				this.FieldName = fld.ToString();
			}
예제 #6
0
			internal DefaultValue(LIRType tp)
			{
				this.Type = tp;
			}
예제 #7
0
		public LIRMethod(string name, LIRType returnType)
		{
			this.mTempID = sTempID++;
			this.Name = name;
			this.ReturnType = returnType;
		}