Suppose we have some code for an analysis:

example1 = function() {
  x = 3
  y = x
  z = x

  # ...
  bar(y)
}

We'd like to analyze this code to identify and mark where variables are no longer needed, so that they can be garbage collected.

To do this, we first use the to_blocks() function to get information about control flow in the sample code.

blocks = to_blocks(example1)


nick-ulle/ast documentation built on Oct. 18, 2019, 4:37 a.m.