| 178 | } |
| 179 | |
| 180 | Label 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 | |
| 200 | Error CodeBuilder::bind(const Label& label) { |
| 201 | if (_lastError) return _lastError; |
nothing calls this directly
no test coverage detected