Exemplo n.º 1
0
        /// <summary>
        /// Writes this function type to the given binary WebAssembly file.
        /// </summary>
        /// <param name="writer">The writer for a binary WebAssembly file.</param>
        public void WriteTo(BinaryWasmWriter writer)
        {
            writer.WriteWasmType(Form);
            writer.WriteVarUInt32((uint)ParameterTypes.Count);
            foreach (var item in ParameterTypes)
            {
                writer.WriteWasmValueType(item);
            }

            writer.WriteVarUInt32((uint)ReturnTypes.Count);
            foreach (var item in ReturnTypes)
            {
                writer.WriteWasmValueType(item);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Writes this local entry to the given WebAssembly file writer.
 /// </summary>
 /// <param name="Writer">The WebAssembly file writer.</param>
 public void WriteTo(BinaryWasmWriter Writer)
 {
     Writer.WriteVarUInt32(LocalCount);
     Writer.WriteWasmValueType(LocalType);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Writes this global variable type to the given WebAssembly writer.
 /// </summary>
 /// <param name="writer">The WebAssembly writer to use.</param>
 public void WriteTo(BinaryWasmWriter writer)
 {
     writer.WriteWasmValueType(ContentType);
     writer.WriteVarUInt1(IsMutable);
 }