MCPcopy Create free account
hub / github.com/ZDoom/Raze / registerLabelNode

Method registerLabelNode

libraries/asmjit/asmjit/base/codebuilder.cpp:95–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95Error CodeBuilder::registerLabelNode(CBLabel* node) noexcept {
96 if (_lastError) return _lastError;
97 ASMJIT_ASSERT(_code != nullptr);
98
99 // Don't call setLastError() from here, we are noexcept and we are called
100 // by `newLabelNode()` and `newFuncNode()`, which are noexcept as well.
101 uint32_t id;
102 ASMJIT_PROPAGATE(_code->newLabelId(id));
103 size_t index = Operand::unpackId(id);
104
105 // We just added one label so it must be true.
106 ASMJIT_ASSERT(_cbLabels.getLength() < index + 1);
107 ASMJIT_PROPAGATE(_cbLabels.resize(&_cbHeap, index + 1));
108
109 _cbLabels[index] = node;
110 node->_id = id;
111 return kErrorOk;
112}
113
114CBLabel* CodeBuilder::newLabelNode() noexcept {
115 CBLabel* node = newNodeT<CBLabel>();

Callers

nothing calls this directly

Calls 3

newLabelIdMethod · 0.80
getLengthMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected