LabelHeap

public final class LabelHeap

Holds the heap of all known labels (“goto” labels).

Methods

checkFormatLabel

public void checkFormatLabel(String label, Tree position)

fuseLabelled

public void fuseLabelled(String label, Block fuseBlock, Tree position)

Look for Block labelled “label”. If it exists, either complain for double definition or fuse it into “fuseBlock”. Otherwise, let it be “fuseBlock”.

getLabelled

public Block getLabelled(String label)

getSetLabelled

public Block getSetLabelled(String label, TapList<Block> allBlocks, boolean defines, Tree position)
Returns

the unique Block designated by the “label”. Creates this Block if necessary. “defines” is a flag indicating that this label is here defined (instead of used) In case of a redefinition of a label, the second definition is ignored, and this function returns null.

undefinedLabels

public void undefinedLabels(Block exitBlock, SymbolTable symbolTable)