Ejemplo n.º 1
0
        void ComputeInstructionData(HashSet <InstructionBlock> visited, int stackHeight, InstructionBlock block)
        {
            if (visited.Contains(block))
            {
                return;
            }

            visited.Add(block);

            foreach (var instruction in block)
            {
                stackHeight = ComputeInstructionData(stackHeight, instruction);
            }

            foreach (var successor in block.Successors)
            {
                ComputeInstructionData(visited, stackHeight, successor);
            }
        }
Ejemplo n.º 2
0
 void RegisterBlock(InstructionBlock block)
 {
     blocks.Add(block.First.Offset, block);
 }
Ejemplo n.º 3
0
 public int CompareTo(InstructionBlock block)
 {
     return(first.Offset - block.First.Offset);
 }