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