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