Пример #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;
		}