remove dict/set lowlevels

This commit is contained in:
Folkert 2022-07-13 11:24:07 +02:00
parent 79f8ae4e69
commit 8e21fdcb04
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
9 changed files with 7 additions and 520 deletions

View file

@ -46,20 +46,6 @@ pub enum LowLevel {
ListDropAt,
ListSwap,
ListIsUnique,
DictSize,
DictEmpty,
DictInsert,
DictRemove,
DictContains,
DictGetUnsafe,
DictKeys,
DictValues,
DictUnion,
DictIntersection,
DictDifference,
DictWalk,
SetFromList,
SetToDict,
NumAdd,
NumAddWrap,
NumAddChecked,
@ -126,7 +112,7 @@ pub enum LowLevel {
macro_rules! higher_order {
() => {
ListMap | ListMap2 | ListMap3 | ListMap4 | ListSortWith | DictWalk
ListMap | ListMap2 | ListMap3 | ListMap4 | ListSortWith
};
}
@ -148,7 +134,6 @@ impl LowLevel {
ListMap3 => 3,
ListMap4 => 4,
ListSortWith => 1,
DictWalk => 2,
_ => unreachable!(),
}
}
@ -207,7 +192,6 @@ macro_rules! map_symbol_to_lowlevel {
LowLevel::ListMap3 => unreachable!(),
LowLevel::ListMap4 => unreachable!(),
LowLevel::ListSortWith => unreachable!(),
LowLevel::DictWalk => unreachable!(),
// (un)boxing is handled in a custom way
LowLevel::BoxExpr => unreachable!(),
@ -219,7 +203,6 @@ macro_rules! map_symbol_to_lowlevel {
LowLevel::NumToIntChecked => unreachable!(),
LowLevel::NumToFloatChecked => unreachable!(),
LowLevel::NumDivUnchecked => unreachable!(),
LowLevel::DictEmpty => unreachable!(),
// these are used internally and not tied to a symbol
LowLevel::Hash => unimplemented!(),
@ -275,18 +258,6 @@ map_symbol_to_lowlevel! {
ListSublist <= LIST_SUBLIST_LOWLEVEL,
ListDropAt <= LIST_DROP_AT,
ListSwap <= LIST_SWAP,
DictSize <= DICT_LEN,
DictInsert <= DICT_INSERT,
DictRemove <= DICT_REMOVE,
DictContains <= DICT_CONTAINS,
DictGetUnsafe <= DICT_GET_LOWLEVEL,
DictKeys <= DICT_KEYS,
DictValues <= DICT_VALUES,
DictUnion <= DICT_UNION,
DictIntersection <= DICT_INTERSECTION,
DictDifference <= DICT_DIFFERENCE,
SetFromList <= SET_FROM_LIST,
SetToDict <= SET_TO_DICT,
NumAdd <= NUM_ADD,
NumAddWrap <= NUM_ADD_WRAP,
NumAddChecked <= NUM_ADD_CHECKED_LOWLEVEL,