Exemple #1
0
        private void ReadInstruction(CodeBuilder codeObject)
        {
            Opcode opcode   = (Opcode)binaryReader.ReadByte();
            int    argument = binaryReader.ReadInt32();
            int    line     = binaryReader.ReadInt32();

            SourceLocation location = line == -1
                ? null
                : new SourceLocation(line, 0, fileName);

            codeObject.EmitInstruction(
                location,
                opcode,
                argument
                );
        }
Exemple #2
0
        void ReadInstruction(CodeBuilder codeObject)
        {
            var opcode      = (Opcode)binaryReader.ReadByte();
            var argument    = binaryReader.ReadInt32();
            var argumentObj = ReadConstant();

            var line = binaryReader.ReadInt32();

            SourceLocation location = line == -1
                ? null
                : new SourceLocation(line, 0, fileName);


            codeObject.EmitInstruction(
                location,
                opcode,
                argument,
                argumentObj
                );
        }