3 #include <yuni/core/string.h> 4 #include "details/ir/isa/opcodes.h" 5 #include "details/ir/isa/data.h" 6 #include "details/ir/instruction.h" 7 #include "details/utils/stringrefs.h" 8 #include "details/utils/clid.h" 71 template<
class T>
void each(T& visitor, uint32_t offset = 0);
74 template<
class T>
void each(T& visitor, uint32_t offset = 0)
const;
87 void increaseAllLVID(uint32_t inc, uint32_t greaterThan, uint32_t offset = 0);
105 void print(Yuni::String& out,
const AtomMap* =
nullptr, uint32_t offset = 0)
const;
120 void grow(uint32_t instrCount);
124 uint32_t m_size = 0u;
126 uint32_t m_capacity = 0u;
136 #include "sequence.hxx" void print(Yuni::String &out, const AtomMap *=nullptr, uint32_t offset=0) const
Print the sequence to a string.
Definition: sequence.cpp:100
isa::Operand< O > & at(uint32_t offset)
Fetch an instruction at a given offset.
Definition: sequence.hxx:42
void each(T &visitor, uint32_t offset=0)
Visit each instruction.
Definition: sequence.hxx:127
StringRefs stringrefs
All strings.
Definition: sequence.h:117
void increaseAllLVID(uint32_t inc, uint32_t greaterThan, uint32_t offset=0)
Iterate through all opcodes and increment all lvid.
Definition: sequence.cpp:181
void reserve(uint32_t count)
Reserve enough memory for N instructions.
Definition: sequence.hxx:14
bool jumpToLabelBackward(const Instruction *&cursor, uint32_t label) const
Go to a previous label.
Definition: sequence.hxx:110
isa::Operand< O > & emit()
emit a new Instruction
Definition: sequence.hxx:159
uint32_t opcodeCount() const
Get how many instructions the sequence has.
Definition: sequence.hxx:20
Atoms.
Definition: atom-map.h:17
void moveCursorFromBlueprintToEnd(Instruction *&cursor) const
Move the cursor at the end of the blueprint.
Definition: sequence.cpp:65
Definition: instruction.h:12
bool jumpToLabelForward(const Instruction *&cursor, uint32_t label) const
Go to the next label.
Definition: sequence.hxx:93
uint32_t capacity() const
Get the capacity of the sequence (in instructions)
Definition: sequence.hxx:25
bool isCursorValid(const Instruction &instr) const
Get if a cursor is valid.
Definition: sequence.hxx:69
uint32_t offsetOf(const isa::Operand< O > &instr) const
Get the offset of an instruction within the sequence.
Definition: sequence.hxx:77
void invalidateCursor(const Instruction *&cusror) const
Get the upper limit.
Definition: sequence.hxx:83
Sequence & operator=(const Sequence &)=delete
Copy operator.
Definition: sequence.h:22
Container for minimizing memory use of duplicate strings.
Definition: stringrefs.h:12
void clear()
Clear the sequence.
Definition: sequence.cpp:80