| 968 | // ======================== |
| 969 | |
| 970 | Error CodeHolder::new_reloc_entry(Out<RelocEntry*> dst, RelocType reloc_type) noexcept { |
| 971 | ASMJIT_PROPAGATE(_relocations.reserve_additional(_arena)); |
| 972 | |
| 973 | uint32_t reloc_id = _relocations._size; |
| 974 | if (ASMJIT_UNLIKELY(reloc_id == Globals::kInvalidId)) { |
| 975 | return make_error(Error::kTooManyRelocations); |
| 976 | } |
| 977 | |
| 978 | RelocEntry* re = _arena.alloc_oneshot<RelocEntry>(); |
| 979 | if (ASMJIT_UNLIKELY(!re)) { |
| 980 | return make_error(Error::kOutOfMemory); |
| 981 | } |
| 982 | |
| 983 | re->_id = reloc_id; |
| 984 | re->_reloc_type = reloc_type; |
| 985 | re->_format = OffsetFormat{}; |
| 986 | re->_source_section_id = Globals::kInvalidId; |
| 987 | re->_target_section_id = Globals::kInvalidId; |
| 988 | re->_source_offset = 0; |
| 989 | re->_payload = 0; |
| 990 | _relocations.append_unchecked(re); |
| 991 | |
| 992 | dst = re; |
| 993 | return Error::kOk; |
| 994 | } |
| 995 | |
| 996 | // CodeHolder - Expression Evaluation |
| 997 | // ================================== |
no test coverage detected