# Lib.FunctionData module

This file defines the base class `FunctionData`, containing metadata on a RiscV function, as well as utility functions common to the different intermediate representations.

class Lib.FunctionData.FunctionData(name: str)

  Bases: `object`

  Stores some metadata on a RiscV function: name of the function, label names, temporary variables (using `Lib.Operands.TemporaryPool`), and div_by_zero label.

  This class is usually used indirectly through the different intermediate representations we work with, such as `Lib.LinearCode.LinearCode.fdata`.

  fresh_label(name) → Label

    Return a new label, with a unique name based on the given string.

  fresh_offset() → Offset

    Return a new offset in the memory stack. Offsets are decreasing relative to FP.

  fresh_tmp() → Temporary

    Return a new fresh Temporary, which is added to the pool.

  get_label_div_by_zero() → Label
  get_name() → str

    Return the name of the function.

  get_offset() → int

    Return the current offset in the memory stack.