public static BrTable ToBrTable(BinaryReader reader) { var targetTable = Values.ToVector(reader, Values.ToUInt); var defaultTarget = Values.ToUInt(reader); return(new BrTable(targetTable, defaultTarget)); }
public static Element ToElement(BinaryReader reader) { var index = Values.ToUInt(reader); var offset = CodeParser.ToInitExpr(reader); var elements = Values.ToVector(reader, Values.ToUInt); return(new Element(index, offset, elements)); }
public static FunctionType ToFunctionType(BinaryReader reader) { const sbyte form = -0x20; if (Values.ToSByte(reader) != form) { throw new NotImplementedException(); } return(new FunctionType( Values.ToVector(reader, ToValueType), Values.ToVector(reader, ToValueType) )); }
public void ParseElement(BinaryReader reader) { Element = Values.ToVector(reader, SegmentsParser.ToElement); }
public void ParseExport(BinaryReader reader) { Export = Values.ToVector(reader, SegmentsParser.ToExport); }
public void ParseGlobal(BinaryReader reader) { Global = Values.ToVector(reader, SegmentsParser.ToGlobal); }
public void ParseMemory(BinaryReader reader) { Memory = Values.ToVector(reader, TypeParser.ToMemoryType); }
public void ParseTable(BinaryReader reader) { Table = Values.ToVector(reader, TypeParser.ToTableType); }
public void ParseFunction(BinaryReader reader) { Function = Values.ToVector(reader, Values.ToUInt); }
public void ParseType(BinaryReader reader) { Type = Values.ToVector(reader, TypeParser.ToFunctionType); }
public void ParseData(BinaryReader reader) { Data = Values.ToVector(reader, SegmentsParser.ToData); }
public void ParseCode(BinaryReader reader) { Code = Values.ToVector(reader, SegmentsParser.ToCodeSection); }