FlowGraphBuilder

public final class FlowGraphBuilder

Machinery to build of a FlowGraph and its SymbolTable’s for a Unit that will be read though a tree protocol.

Methods

build

public static Unit build(TreeProtocol inputTreeStream, SymbolTable contextSymbolTable, CallGraph callGraph, int language, Unit unit, boolean fromLib)

Given an inputTreeStream, which is ready to output a piece of code, as a well-formed IL tree starting with op_function, op_program, op_constructor, op_class, op_module or op_nameSpace, fill the given empty unit with the internal representation of the incoming piece of code.

Parameters
  • inputTreeStream – The input stream, which is ready to output the piece of code

  • unit – The unit that will contain the internal representation of the piece code

  • contextSymbolTable – The symbol table of the level that will contain the piece of code

findHostingSymbolTable

public static SymbolTable findHostingSymbolTable(SymbolTable enclosingSymbolTable, String privacy, Tree modifiers)
Returns

the SymbolTable (at or around) enclosingSymbolTable, that will host the SymbolDecl of a symbol, given the privacy and modifiers of this symbol.