| 682 | } |
| 683 | |
| 684 | Error BaseBuilder::embedConstPool(const Label& label, const ConstPool& pool) { |
| 685 | if (ASMJIT_UNLIKELY(!_code)) |
| 686 | return DebugUtils::errored(kErrorNotInitialized); |
| 687 | |
| 688 | if (!isLabelValid(label)) |
| 689 | return reportError(DebugUtils::errored(kErrorInvalidLabel)); |
| 690 | |
| 691 | ASMJIT_PROPAGATE(align(AlignMode::kData, uint32_t(pool.alignment()))); |
| 692 | ASMJIT_PROPAGATE(bind(label)); |
| 693 | |
| 694 | EmbedDataNode* node; |
| 695 | ASMJIT_PROPAGATE(newEmbedDataNode(&node, TypeId::kUInt8, nullptr, pool.size())); |
| 696 | ASMJIT_ASSUME(node != nullptr); |
| 697 | |
| 698 | pool.fill(node->data()); |
| 699 | addNode(node); |
| 700 | return kErrorOk; |
| 701 | } |
| 702 | |
| 703 | // BaseBuilder - EmbedLabel & EmbedLabelDelta |
| 704 | // ========================================== |
no test coverage detected