AsmJit
Low-Latency Machine Code Generation
Base node.
Every node represents a building-block used by BaseBuilder. It can be instruction, data, label, comment, directive, or any other high-level representation that can be transformed to the building blocks mentioned. Every class that inherits BaseBuilder can define its own high-level nodes that can be later lowered to basic nodes like instructions.
NodeFlags::kNone
)noexcept◆ Creates a new BaseNode
- always use BaseBuilder
to allocate nodes.
Casts this node to T*
.
Casts this node to const T*
.
Returns previous node or nullptr
if this node is either first or not part of Builder/Compiler node-list.
Returns next node or nullptr
if this node is either last or not part of Builder/Compiler node-list.
Returns the type of the node, see NodeType
.
Sets the type of the node, see NodeType
(internal).
Tests whether this node is either InstNode
or extends it.
Tests whether this node is SectionNode
.
Tests whether this node is either LabelNode
or extends it.
Tests whether this node is AlignNode
.
Tests whether this node is EmbedDataNode
.
Tests whether this node is EmbedLabelNode
.
Tests whether this node is EmbedLabelDeltaNode
.
Tests whether this node is ConstPoolNode
.
Tests whether this node is CommentNode
.
Tests whether this node is SentinelNode
.
Tests whether this node is FuncNode
.
Tests whether this node is FuncRetNode
.
Tests whether this node is InvokeNode
.
Returns the node flags.
Tests whether the node has the given flag
set.
Replaces node flags with flags
.
Adds the given flags
to node flags.
Clears the given flags
from node flags.
Tests whether the node is code that can be executed.
Tests whether the node is data that cannot be executed.
Tests whether the node is informative only (is never encoded like comment, etc...).
Tests whether the node is removable if it's in an unreachable code block.
Tests whether the node has no effect when executed (label, .align, nop, ...).
Tests whether the node is part of the code.
Tests whether the node has a position assigned.
true
if node position is non-zero. Returns node position.
Sets node position.
Node position is a 32-bit unsigned integer that is used by Compiler to track where the node is relatively to the start of the function. It doesn't describe a byte position in a binary, instead it's just a pseudo position used by liveness analysis and other tools around Compiler.
If you don't use Compiler then you may use position()
and setPosition()
freely for your own purposes if the 32-bit value limit is okay for you.
Returns user data casted to T*
.
User data is dedicated to be used only by AsmJit users and not touched by the library. The data is of a pointer size so you can either store a pointer or int64_t
value through setUserDataAsPtr()
, setUserDataAsInt64()
and setUserDataAsUInt64()
.
Returns user data casted to int64_t
.
Returns user data casted to uint64_t
.
Sets user data to data
.
Sets used data to the given 64-bit signed value
.
Sets used data to the given 64-bit unsigned value
.
Resets user data to zero / nullptr.
Tests whether the node has an associated pass data.
Returns the node pass data - data used during processing & transformations.
Sets the node pass data to data
.
Resets the node pass data to nullptr.
Tests whether the node has an inline comment/annotation.
Returns an inline comment/annotation string.
Sets an inline comment/annotation string to s
.
Resets an inline comment/annotation string to nullptr.
Previous node.
Next node.
Links (an alternative view to previous and next nodes).
Data useful by any node type.
Data specific to AlignNode.
Data specific to InstNode.
Data specific to EmbedDataNode.
Data specific to SentinelNode.
Data that can have different meaning depending on NodeType.
Node position in code (should be unique).
User data as 64-bit integer.
User data as pointer.
Value reserved for AsmJit users never touched by AsmJit itself.
Data used exclusively by the current Pass
.
Inline comment/annotation or nullptr if not used.