parameters: (self)
docstring: Compute the max stack depth.
  
          Approach is to compute the stack effect of each basic block.
          Then find the path through the code with the largest total
          effect.
docstring_summary: Compute the max stack depth.
docstring_tokens: Compute the max stack depth .
function: def computeStackDepth(self):
          """Compute the max stack depth.
  
          Approach is to compute the stack effect of each basic block.
          Then find the path through the code with the largest total
          effect.
          """
          depth = {}
          exit = None
          for b in self.getBlocks():
              depth[b] = findDepth(b.getInstructions())
  
          seen = {}
  
          def max_depth(b, d):
              if b in seen:
                  return d
              seen[b] = 1
              d = d + depth[b]
              children = b.get_children()
              if children:
                  return max([max_depth(c, d) for c in children])
              else:
                  if not b.label == "exit":
                      return max_depth(self.exit, d)
                  else:
                      return d
  
          self.stacksize = max_depth(self.entry, 0)
function_tokens: def computeStackDepth ( self ) : depth = { } exit = None for b in self . getBlocks ( ) : depth [ b ] = findDepth ( b . getInstructions ( ) ) seen = { } def max_depth ( b , d ) : if b in seen : return d seen [ b ] = 1 d = d + depth [ b ] children = b . get_children ( ) if children : return max ( [ max_depth ( c , d ) for c in children ] ) else : if not b . label == "exit" : return max_depth ( self . exit , d ) else : return d self . stacksize = max_depth ( self . entry , 0 )