Seed Dict and Set

This changes Dict and Set to have a compilation depedent seed.
The seed is not exposed to userland in anyway.
This gets a much more DOS resistant Dict and Set with no cost.
This commit is contained in:
Brendan Hansknecht 2023-05-25 09:39:52 -07:00
parent 8ecbd8c071
commit b4c359588e
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
11 changed files with 69 additions and 30 deletions

View file

@ -947,6 +947,7 @@ pub fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[Ownership] {
// - other refcounted arguments are Borrowed
match op {
Unreachable => arena.alloc_slice_copy(&[irrelevant]),
DictPseudoSeed => arena.alloc_slice_copy(&[irrelevant]),
ListLen | StrIsEmpty | StrToScalars | StrCountGraphemes | StrGraphemes
| StrCountUtf8Bytes | StrGetCapacity | ListGetCapacity => {
arena.alloc_slice_copy(&[borrowed])