public RloLocal(Compiler compiler, HighLocal highLocal, RloInstantiationParameters instParams, bool isArg) { switch (highLocal.TypeOfType) { case HighLocal.ETypeOfType.ByRef: { RloValueType vt = new RloValueType(compiler, highLocal.Type, instParams); vt = (RloValueType)compiler.InternRloType(vt); RloRefType rt = new RloRefType(vt); rt = (RloRefType)compiler.InternRloType(rt); m_type = rt; } break; case HighLocal.ETypeOfType.TypedByRef: m_type = compiler.InternedRloTypedRefType; break; case HighLocal.ETypeOfType.Value: { RloValueType vt = new RloValueType(compiler, highLocal.Type, instParams); vt = (RloValueType)compiler.InternRloType(vt); m_type = vt; } break; default: throw new Exception(); } }
public override bool Equals(RloType rloType) { RloValueType tOther = rloType as RloValueType; if (tOther == null) return false; return m_typeSpec.Equals(tOther.m_typeSpec); }
public override bool Equals(RloType rloType) { RloRefType tOther = rloType as RloRefType; if (tOther == null) return false; return m_subType == tOther.m_subType; }
public RloType InternRloType(RloType rloType) { RloType interned; if (m_internedRloTypes.TryGetValue(rloType, out interned)) return interned; m_internedRloTypes.Add(rloType, rloType); return rloType; }