예제 #1
0
 /// <inheritdoc/>
 public override InstructionPrototype Map(MemberMapping mapping)
 {
     return(Create(
                Name,
                mapping.MapType(ResultType),
                ParameterTypes.EagerSelect <IType, IType>(mapping.MapType)));
 }
        /// <inheritdoc/>
        public override InstructionPrototype Map(MemberMapping mapping)
        {
            var newReturnType = mapping.MapType(returnType);
            var newParamTypes = ParameterTypes.EagerSelect <IType, IType>(mapping.MapType);

            return(Create(newReturnType, newParamTypes));
        }
예제 #3
0
 /// <inheritdoc/>
 public override InstructionPrototype Map(MemberMapping mapping)
 {
     return(Create(
                mapping.MapType(delegateType),
                mapping.MapMethod(Callee),
                HasThisArgument,
                Lookup));
 }
예제 #4
0
        /// <inheritdoc/>
        public override InstructionPrototype Map(MemberMapping mapping)
        {
            var newType = mapping.MapType(elemType);

            if (object.ReferenceEquals(newType, elemType))
            {
                return(this);
            }
            else
            {
                return(Create(newType, IsVolatile, Alignment));
            }
        }
예제 #5
0
        /// <inheritdoc/>
        public override InstructionPrototype Map(MemberMapping mapping)
        {
            var newType = mapping.MapType(type);

            if (object.ReferenceEquals(newType, type))
            {
                return(this);
            }
            else
            {
                return(Create(newType));
            }
        }
예제 #6
0
        /// <inheritdoc/>
        public override InstructionPrototype Map(MemberMapping mapping)
        {
            var newType = mapping.MapType(TargetType);

            if (object.ReferenceEquals(newType, TargetType))
            {
                return(this);
            }
            else if (!(newType is PointerType))
            {
                throw new InvalidOperationException(
                          "Cannot transform a reinterpret cast to take non-pointer target type '" +
                          newType.FullName + "'.");
            }
            else
            {
                return(Create((PointerType)newType));
            }
        }
예제 #7
0
 /// <inheritdoc/>
 public override InstructionPrototype Map(MemberMapping mapping)
 {
     return(Create(mapping.MapType(ResultType)));
 }
예제 #8
0
 /// <summary>
 /// Applies a member mapping to this block parameter.
 /// </summary>
 /// <param name="mapping">A member mapping.</param>
 /// <returns>A transformed block parameter.</returns>
 public BlockParameter Map(MemberMapping mapping)
 {
     return(new BlockParameter(mapping.MapType(Type), Tag));
 }
예제 #9
0
 /// <summary>
 /// Applies a member mapping to this parameter's type.
 /// The result is returned as a new parameter.
 /// </summary>
 /// <param name="mapping">
 /// The member mapping to apply.
 /// </param>
 /// <returns>
 /// A new parameter.
 /// </returns>
 public Parameter Map(MemberMapping mapping)
 {
     return(WithType(mapping.MapType(Type)));
 }