Beispiel #1
0
 /// <summary>
 /// Creates an uninitialized pointer type from an element
 /// type and a pointer kind.
 /// </summary>
 /// <param name="elementType">
 /// The type of element referred to by the pointer.
 /// </param>
 /// <param name="kind">
 /// The pointer's kind.
 /// </param>
 private PointerType(IType elementType, PointerKind kind)
     : base(elementType)
 {
     this.Kind = kind;
 }
Beispiel #2
0
 /// <summary>
 /// Creates a pointer type of a particular kind that has a
 /// type as element.
 /// </summary>
 /// <param name="type">
 /// The type of values referred to by the pointer type.
 /// </param>
 /// <param name="kind">
 /// The kind of the pointer type.
 /// </param>
 /// <returns>A pointer type.</returns>
 internal static PointerType Create(IType type, PointerKind kind)
 {
     return(instanceCache.Intern(new PointerType(type, kind)));
 }
Beispiel #3
0
 /// <inheritdoc/>
 public override bool Equals(PointerKind other)
 {
     return(object.ReferenceEquals(this, other));
 }