
AsmJit
Low-Latency Machine Code Generation
Label entry provides data stored by CodeHolder for each Label.
Label entry is used mostly internall by AsmJit, but it's possibly to use it to query various information about a label. For example to get its type, flags, name, and fixups (if the label is not bound) or offset (if the label is bound).
To make the entry small, it's currently split into two data structures - LabelEntry, which is stored in an array as a value, and LabelEntry::ExtraData, which can be pointed to via LabelEntry::_objectData. Extra data of unnamed anonymous labels is shared (and immutable), thus all unnamed anonymous labels would only use LabelEntry (16 bytes per label).
Returns the type of the label.
The type of the label depends on how it was created. Most JIT code uses unnamed anonymous labels created by emitters, for example BaseEmitter::newLabel() returns a Label instance having id that was created by CodeHolder::newLabelId.
Returns label flags.
Tests whether the label has the given flag
set.
Tests whether the LabelEntry has own extra data (see LabelEntry::ExtraData).
Tests whether the Label represented by this LabelEntry has a name.
Tests whether the Label represented by this LabelEntry has a parent label.
Tests whether the label represented by this LabelEntry is bound.
Bound label means that it has an associated Section and a position in such section. Labels are bound by calling BaseEmitter::bind() method with Label operand.
Tests whether the label is bound to a the given section
.
Tests whether the label is bound to a the given sectionId
.
Returns the section where the label was bound.
If the label was not yet bound the return value is nullptr
.
Returns label's parent id or Globals::kInvalidId if the label has no parent.
Returns the label's name.
Returns size of label's name.
strlen()
to get it, however, it's also cached in LabelEntry
itself, so if you want to know the size the fastest way is to call LabelEntry::nameSize()
. Returns unresolved fixups associated with this label.
Returns unresolved fixups associated with this label.
Returns the label offset (can only be used after the label is bound).