Esempio n. 1
0
        public static BrTable ToBrTable(BinaryReader reader)
        {
            var targetTable   = Values.ToVector(reader, Values.ToUInt);
            var defaultTarget = Values.ToUInt(reader);

            return(new BrTable(targetTable, defaultTarget));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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)
                       ));
        }
Esempio n. 4
0
 public void ParseElement(BinaryReader reader)
 {
     Element = Values.ToVector(reader, SegmentsParser.ToElement);
 }
Esempio n. 5
0
 public void ParseExport(BinaryReader reader)
 {
     Export = Values.ToVector(reader, SegmentsParser.ToExport);
 }
Esempio n. 6
0
 public void ParseGlobal(BinaryReader reader)
 {
     Global = Values.ToVector(reader, SegmentsParser.ToGlobal);
 }
Esempio n. 7
0
 public void ParseMemory(BinaryReader reader)
 {
     Memory = Values.ToVector(reader, TypeParser.ToMemoryType);
 }
Esempio n. 8
0
 public void ParseTable(BinaryReader reader)
 {
     Table = Values.ToVector(reader, TypeParser.ToTableType);
 }
Esempio n. 9
0
 public void ParseFunction(BinaryReader reader)
 {
     Function = Values.ToVector(reader, Values.ToUInt);
 }
Esempio n. 10
0
 public void ParseType(BinaryReader reader)
 {
     Type = Values.ToVector(reader, TypeParser.ToFunctionType);
 }
Esempio n. 11
0
 public void ParseData(BinaryReader reader)
 {
     Data = Values.ToVector(reader, SegmentsParser.ToData);
 }
Esempio n. 12
0
 public void ParseCode(BinaryReader reader)
 {
     Code = Values.ToVector(reader, SegmentsParser.ToCodeSection);
 }