mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[util] Remove enum_bitfields
The enum_bitfields system never worked quite right, and always had edge cases where name resolution for the SFINAE would fail. Move everything over to use util::bitset, which can be constexpr and boils down to inline integer bitops in release mode. Improved util::bitset itself, moving the array-backed base implementation into a new util::sized_bitset, and making the single-inttype backed implementation the base case. Also added a distinction between | or |= (which work with real bit values) and + or += (which work with bit indexes).
This commit is contained in:
@@ -95,7 +95,7 @@ load_program_into(j6_handle_t proc, elf::file &file, uintptr_t image_base, const
|
||||
// TODO: way to remap VMA as read-only if there's no write flag on
|
||||
// the segment
|
||||
unsigned long flags = j6_vm_flag_write;
|
||||
if (seg.flags && elf::segment_flags::exec)
|
||||
if (seg.flags.get(elf::segment_flags::exec))
|
||||
flags |= j6_vm_flag_exec;
|
||||
|
||||
uintptr_t start = file.base() + seg.offset;
|
||||
|
||||
Reference in New Issue
Block a user