mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
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:
parent
8ecbd8c071
commit
b4c359588e
11 changed files with 69 additions and 30 deletions
|
@ -126,6 +126,7 @@ pub enum LowLevel {
|
|||
BoxExpr,
|
||||
UnboxExpr,
|
||||
Unreachable,
|
||||
DictPseudoSeed,
|
||||
}
|
||||
|
||||
macro_rules! higher_order {
|
||||
|
@ -345,4 +346,5 @@ map_symbol_to_lowlevel! {
|
|||
Or <= BOOL_OR,
|
||||
Not <= BOOL_NOT,
|
||||
Unreachable <= LIST_UNREACHABLE,
|
||||
DictPseudoSeed <= DICT_PSEUDO_SEED,
|
||||
}
|
||||
|
|
|
@ -1463,6 +1463,7 @@ define_builtins! {
|
|||
21 DICT_UPDATE: "update"
|
||||
|
||||
22 DICT_LIST_GET_UNSAFE: "listGetUnsafe"
|
||||
23 DICT_PSEUDO_SEED: "pseudoSeed"
|
||||
}
|
||||
9 SET: "Set" => {
|
||||
0 SET_SET: "Set" exposed_type=true // the Set.Set type alias
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue