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

Method newNamedLabel

libraries/asmjit/asmjit/base/codebuilder.cpp:180–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180Label CodeBuilder::newNamedLabel(const char* name, size_t nameLength, uint32_t type, uint32_t parentId) {
181 uint32_t id = kInvalidValue;
182
183 if (!_lastError) {
184 CBLabel* node = newNodeT<CBLabel>(id);
185 if (ASMJIT_UNLIKELY(!node)) {
186 setLastError(DebugUtils::errored(kErrorNoHeapMemory));
187 }
188 else {
189 Error err = _code->newNamedLabelId(id, name, nameLength, type, parentId);
190 if (ASMJIT_UNLIKELY(err))
191 setLastError(err);
192 else
193 id = node->getId();
194 }
195 }
196
197 return Label(id);
198}
199
200Error CodeBuilder::bind(const Label& label) {
201 if (_lastError) return _lastError;

Callers

nothing calls this directly

Calls 4

erroredFunction · 0.85
LabelClass · 0.85
newNamedLabelIdMethod · 0.80
getIdMethod · 0.45

Tested by

no test coverage detected