/// <summary> /// Creates an operator that takes a single 32-bit signed integer immediate. /// </summary> /// <param name="opCode">The operator's opcode.</param> /// <param name="declaringType">A type that defines the operator, if any.</param> /// <param name="mnemonic">The operator's mnemonic.</param> public VarInt32Operator(byte opCode, WasmType declaringType, string mnemonic) : base(opCode, declaringType, mnemonic) { }
/// <summary> /// Creates a block instruction. /// </summary> /// <param name="op">The operator performed by the block instruction.</param> /// <param name="type">The block instruction's result type.</param> /// <param name="contents">The block instruction's contents, as a sequence of instructions.</param> public BlockInstruction(BlockOperator op, WasmType type, IEnumerable <Instruction> contents) { this.opValue = op; this.Type = type; this.Contents = new List <Instruction>(contents); }
public Operator(byte OpCode, WasmType DeclaringType, string Mnemonic) { this.OpCode = OpCode; this.DeclaringType = DeclaringType; this.Mnemonic = Mnemonic; }
public BlockInstruction(Operator Op, WasmType Type, IEnumerable <Instruction> Contents) { this.opValue = Op; this.Type = Type; this.Contents = new List <Instruction>(Contents); }
/// <summary> /// Writes a textual representation of the given WebAssembly type to /// the given text writer. /// </summary> /// <param name="Value">The type to print to the text writer.</param> /// <param name="Writer">The writer to which the textual WebAssembly value type should be written.</param> public static void DumpWasmType(WasmType Value, TextWriter Writer) { Writer.Write(WasmTypeToString(Value)); }
/// <summary> /// Creates a break table operator. /// </summary> /// <param name="opCode">The operator's opcode.</param> /// <param name="declaringType">A type that defines the operator, if any.</param> /// <param name="mnemonic">The operator's mnemonic.</param> public BrTableOperator(byte opCode, WasmType declaringType, string mnemonic) : base(opCode, declaringType, mnemonic) { }
private static string WasmTypeToIdentifier(WasmType Type) { return(((object)Type).ToString()); }
public Float64Operator(byte OpCode, WasmType DeclaringType, string Mnemonic) : base(OpCode, DeclaringType, Mnemonic) { }
/// <summary> /// Creates a table description from the given element type and limits. /// </summary> /// <param name="ElementType">The table's element type.</param> /// <param name="Limits">The table's limits.</param> public TableType(WasmType ElementType, ResizableLimits Limits) { this.ElementType = ElementType; this.Limits = Limits; }
public VarUInt32Operator(byte OpCode, WasmType DeclaringType, string Mnemonic) : base(OpCode, DeclaringType, Mnemonic) { }
public WasmLocalEntry(WasmType type, uint count) { Type = type; Count = count; }
/// <summary> /// Writes a WebAssembly language type. /// </summary> /// <param name="Value">The WebAssembly language type to write.</param> /// <returns>The number of bytes used to encode the type.</returns> public int WriteWasmType(WasmType Value) { return(WriteVarInt7((sbyte)Value)); }
/// <summary> /// Creates an operator. /// </summary> /// <param name="opCode">The operator's opcode.</param> /// <param name="declaringType">A type that defines the operator, if any.</param> /// <param name="mnemonic">The operator's mnemonic.</param> public Operator(byte opCode, WasmType declaringType, string mnemonic) { this.OpCode = opCode; this.DeclaringType = declaringType; this.Mnemonic = mnemonic; }