private static CopyPrototype DecodeCopy(IReadOnlyList <LNode> data, DecoderState state) { return(CopyPrototype.Create(state.DecodeType(data[0]))); }
private static IReadOnlyList <LNode> EncodeCopy(CopyPrototype value, EncoderState state) { return(new LNode[] { state.Encode(value.ResultType) }); }
/// <summary> /// Creates a copy instruction, which creates an alias for /// an existing value. /// </summary> /// <param name="type"> /// The type of value to copy. /// </param> /// <param name="value"> /// The value to copy. /// </param> /// <returns> /// A copy instruction. /// </returns> public static Instruction CreateCopy(IType type, ValueTag value) { return(CopyPrototype.Create(type).Instantiate(value)); }