Antlr4.StringTemplate.Compiler.BytecodeDisassembler.GetInstructions C# (CSharp) Метод

GetInstructions() публичный Метод

public GetInstructions ( ) : string
Результат string
        public virtual string GetInstructions()
        {
            StringBuilder buf = new StringBuilder();
            int ip = 0;
            while (ip < code.codeSize)
            {
                if (ip > 0)
                    buf.Append(", ");
                int opcode = code.instrs[ip];
                Instruction I = Instruction.instructions[opcode];
                buf.Append(I.name);
                ip++;
                for (int opnd = 0; opnd < I.nopnds; opnd++)
                {
                    buf.Append(' ');
                    buf.Append(GetShort(code.instrs, ip));
                    ip += Instruction.OperandSizeInBytes;
                }
            }
            return buf.ToString();
        }

Usage Example

Пример #1
0
        public virtual string GetInstructions()
        {
            BytecodeDisassembler dis = new BytecodeDisassembler(this);

            return(dis.GetInstructions());
        }
All Usage Examples Of Antlr4.StringTemplate.Compiler.BytecodeDisassembler::GetInstructions