public static Type Convert(BinaryReader reader) { byte res = reader.ReadByte(); if (res == 0x40) { return(null); } else { return(WebassemblyValueType.Convert(res)); } }
public Type EmitReturn() { if (results.Length == 0) { return(null); } if (results.Length == 1) { return(WebassemblyValueType.Convert((byte)this.results [0])); } throw new Exception("Result type array may only have length 1 in this version of Webassembly"); }
public Type [] EmitParams() { if (parameters.Length == 0) { return(null); } var accum = new List <Type> (); foreach (var res in parameters) { accum.Add(WebassemblyValueType.Convert((byte)res)); } return(accum.ToArray()); }