Vendor dependencies

This commit is contained in:
2026-08-01 16:11:49 +03:00
parent 7f139a0241
commit 6b5e7f0f8b
29706 changed files with 9575646 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
# One-Bit-After Tail Index
This is a semantic bit-index within *or one bit after* an `R` register. It is
the index of the first “dead” bit after a “live” region, and corresponds to the
similar half-open range concept in the Rust `Range` type or the LLVM memory
model, pointer values include the address one object past the end of a region.
It is a counter in the ring `0 ..= R::BITS` (note the inclusive high end). Like
[`BitIdx`], this is a virtual semantic index with no bearing on real memory
effects; unlike `BitIdx`, it can never be translated to real memory because it
does not describe real memory.
This type is necessary in order to preserve the distinction between a dead
memory address that is *not* part of a region and a live memory address that
*is* within a region. Additionally, it makes computation of region extension or
offsets easy. `BitIdx` is insufficient to this task, and produces off-by-one
errors when used in its stead.
## Type Parameters
- `R`: The register element that this dead-bit index governs.
## Validity
Values of this type are **required** to be in the range `0 ..= R::BITS`. Any
value greater than [`R::BITS`] makes the program invalid and will likely cause
either a crash or incorrect memory access.
## Construction
This type cannot be publicly constructed except by using the iterators provided
for testing.
[`BitIdx`]: crate::index::BitIdx
[`R::BITS`]: funty::Integral::BITS
+31
View File
@@ -0,0 +1,31 @@
# Semantic Bit Index
This type is a counter in the ring `0 .. R::BITS` and serves to mark a semantic
index within some register element. It is a virtual index, and is the stored
value used in pointer encodings to track region start information.
It is translated to a real index through the [`BitOrder`] trait. This virtual
index is the only counter that can be used for address computation, and once
lowered to an electrical index through [`BitOrder::at`], the electrical address
can only be used for setting up machine instructions.
## Type Parameters
- `R`: The register element that this index governs.
## Validity
Values of this type are **required** to be in the range `0 .. R::BITS`. Any
value not less than [`R::BITS`] makes the program invalid, and will likely cause
either a crash or incorrect memory access.
## Construction
This type can never be constructed outside of the `bitvec` crate. It is passed
in to [`BitOrder`] implementations, which may use it to construct electrical
position values from it. All values of this type constructed by `bitvec` are
known to be correct in their region; no other construction site can be trusted.
[`BitOrder`]: crate::order::BitOrder
[`BitOrder::at`]: crate::order::BitOrder::at
[`R::BITS`]: funty::Integral::BITS
+6
View File
@@ -0,0 +1,6 @@
# Bit Index Error
This type marks that a value is out of range to be used as an index within an
`R` element. It is likely never produced, as `bitvec` does not construct invalid
indices, but is provided for completeness and to ensure that in the event of
this error occurring, the diagnostic information is useful.
+19
View File
@@ -0,0 +1,19 @@
# Multi-Bit Selection Mask
Unlike [`BitSel`], which enforces a strict one-hot mask encoding, this type
permits any number of bits to be set or cleared. This is used to accumulate
selections for batched operations on a register in real memory.
## Type Parameters
- `R`: The register element that this mask governs.
## Construction
This must only be constructed by combining `BitSel` selection masks produced
through the accepted chains of custody beginning with [`BitIdx`] values.
Bit-masks not constructed in this manner are not guaranteed to be correct in the
caller’s context and may lead to incorrect memory behaviors.
[`BitIdx`]: crate::index::BitIdx
[`BitSel`]: crate::index::BitSel
+29
View File
@@ -0,0 +1,29 @@
# Bit Position
This is a position counter of a real bit in an `R` memory element.
Like [`BitIdx`], it is a counter in the ring `0 .. R::BITS`. It marks a real bit
in memory, and is the shift distance in the expression `1 << n`. It can only be
produced by applying [`BitOrder::at`] to an existing `BitIdx` produced by
`bitvec`.
## Type Parameters
- `R`: The register element that this position governs.
## Validity
Values of this type are **required** to be in the range `0 .. R::BITS`. Any
value not less than [`R::BITS`] makes the program invalid, and will likely cause
either a crash or incorrect memory access.
## Construction
This type is publicly constructible, but is only correct to do so within an
implementation of `BitOrder::at`. `bitvec` will only request its creation
through that trait implementation, and has no sites that can publicly accept
untrusted values.
[`BitIdx`]: crate::index::BitIdx
[`BitOrder::at`]: crate::order::BitOrder::at
[`R::BITS`]: funty::Integral::BITS
+28
View File
@@ -0,0 +1,28 @@
# One-Hot Bit Selection Mask
This type selects exactly one bit in a register. It is a [`BitPos`] shifted from
a counter to a selector, and is used to apply test and write operations to real
memory.
## Type Parameters
- `R`: The register element this selector governs.
## Validity
Values of this type are **required** to have exactly one bit set and all others
cleared. Any other value makes the program incorrect, and will cause memory
corruption.
## Construction
This type is only constructed from `BitPos`, and is always equivalent to
`1 << BitPos`.
The chain of custody from known-good [`BitIdx`] values, through proven-good
[`BitOrder`] implementations, into `BitPos` and then `BitSel` proves that values
of this type are always correct to apply to real memory.
[`BitIdx`]: crate::index::BitIdx
[`BitOrder`]: crate::order::BitOrder
[`BitPos`]: crate::index::BitPos