コード例 #1
0
        public string VisitInstructionExpression(CilInstructionExpression expression)
        {
            string instructionsString =
                (expression.ShouldEmitFlagsUpdate ? "fl_" : "")
                + string.Join(" - ", expression.Instructions.Select(i => i.Operand == null
                    ? _formatter.FormatOpCode(i.OpCode)
                    : _formatter.FormatOpCode(i.OpCode) + " " +
                                                                    _formatter.FormatOperand(i.OpCode.OperandType, i.Operand)));

            return(expression.Arguments.Count == 0
                ? instructionsString
                : $"{instructionsString}({string.Join(", ", expression.Arguments.Select(a=>a.AcceptVisitor(this)))})");
        }
コード例 #2
0
 public string VisitInstructionExpression(CilInstructionExpression expression)
 {
     return(string.Join(" - ", expression.Instructions.Select(i => i.Operand == null
         ? _formatter.FormatOpCode(i.OpCode)
         : $"{_formatter.FormatOpCode(i.OpCode)} {_formatter.FormatOperand(i.OpCode.OperandType, i.Operand)}")));
 }