示例#1
0
        internal SigilVerificationException(string message, string[] instructions, StackState atBranch, int branchLoc, StackState atLabel, int labelLoc)
            : this(message, instructions)
        {
            Stack = atBranch;
            SecondStack = atLabel;

            BranchLoc = branchLoc;
            LabelLoc = labelLoc;
        }
示例#2
0
 private StackState(StackState prev, TypeOnStack val)
 {
     Previous = prev;
     Value = val;
 }
示例#3
0
 internal SigilVerificationException(string message, string[] instructions, StackState stack, params int[] locsOnStack)
     : this(message, instructions)
 {
     BadValueLocation = locsOnStack;
     Stack = stack;
 }
示例#4
0
        private static void EmitStack(StringBuilder sb, StackState stack, int[] highlightLocation)
        {
            if (stack.IsRoot)
            {
                sb.AppendLine("!!EMPTY!!");
            }

            int i = 0;

            while (!stack.IsRoot)
            {
                var val = stack.Value.ToString();

                if (highlightLocation != null && highlightLocation.Any(l => l == i))
                {
                    val += " // Bad value";
                }

                sb.AppendLine(val);
                stack = stack.Pop();

                i++;
            }
        }