List.appendUnsafe and List.reserve

This commit is contained in:
Folkert 2022-07-07 22:35:32 +02:00
parent dda79a255e
commit 56c9787e8f
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
13 changed files with 165 additions and 81 deletions

View file

@ -32,10 +32,11 @@ pub enum LowLevel {
StrGetScalarUnsafe,
ListLen,
ListWithCapacity,
ListReserve,
ListAppendUnsafe,
ListGetUnsafe,
ListReplaceUnsafe,
ListConcat,
ListAppend,
ListPrepend,
ListMap,
ListMap2,
@ -209,7 +210,7 @@ impl LowLevelWrapperType {
Symbol::LIST_GET => WrapperIsRequired,
Symbol::LIST_REPLACE => WrapperIsRequired,
Symbol::LIST_CONCAT => CanBeReplacedBy(ListConcat),
Symbol::LIST_APPEND => CanBeReplacedBy(ListAppend),
Symbol::LIST_APPEND_UNSAFE => CanBeReplacedBy(ListAppendUnsafe),
Symbol::LIST_PREPEND => CanBeReplacedBy(ListPrepend),
Symbol::LIST_MAP => WrapperIsRequired,
Symbol::LIST_MAP2 => WrapperIsRequired,