chc.app.COffset module

Base class and subclasses

chc.app.COffset.COffset(cd, ixval)

Base class for an expression offset.

chc.app.COffset.CNoOffset(cd, ixval)

chc.app.COffset.CFieldOffset(cd, ixval)

Field offset

chc.app.COffset.CIndexOffset(cd, ixval)

Index offset into an array.

Object representation for CIL offset sum type.

class chc.app.COffset.CFieldOffset(cd: CDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]

Bases: chc.app.COffset.COffset

Field offset

  • tags[1]: fieldname

  • args[0]: ckey of the containing struct

  • args[1]: index of sub-offset in cdictionary

property ckey: int
property fieldname: str
property is_field: bool
property offset: chc.app.COffset.COffset
to_dict() Dict[str, object][source]
class chc.app.COffset.CIndexOffset(cd: CDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]

Bases: chc.app.COffset.COffset

Index offset into an array.

  • args[0]: index of base of index expression in cdictionary

  • args[1]: index of sub-offset in cdictionary

get_strings() List[str][source]
get_variable_uses(vid: int) int[source]
property index_exp: CExp
property is_index: bool
property offset: chc.app.COffset.COffset
to_dict() Dict[str, object][source]
class chc.app.COffset.CNoOffset(cd: CDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]

Bases: chc.app.COffset.COffset

has_offset() bool[source]
property is_no_offset: bool
to_dict() Dict[str, object][source]
class chc.app.COffset.COffset(cd: CDictionary, ixval: chc.util.IndexedTable.IndexedTableValue)[source]

Bases: chc.app.CDictionaryRecord.CDictionaryRecord

Base class for an expression offset.

get_strings() List[str][source]
get_variable_uses(vid: int) int[source]
has_offset() bool[source]
property is_field: bool
property is_index: bool
property is_no_offset: bool
to_dict() Dict[str, object][source]