You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/contracts.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -498,6 +498,9 @@ The following container types are available in the QPI:
498
498
Lookup by key, insert, and remove run in approximately constant time if population is less than 80% of `L`.
499
499
-`HashSet<KeyT, L>`: Hash set of keys of type `KeyT` and total capacity `L`.
500
500
Lookup by key, insert, and remove run in approximately constant time if population is less than 80% of `L`.
501
+
-`LinkedList<T, L>`: Doubly-linked list of elements of type `T` with fixed capacity `L` (`L` must be 2^N).
502
+
Provides O(1) insertion at head/tail, O(1) insertion before/after a given index, O(1) removal by index, and bidirectional traversal.
503
+
Removed nodes are immediately recycled via a free list (no deferred cleanup needed).
501
504
502
505
Please note that removing items from `Collection`, `HashMap`, and `HashSet` does not immediately free the hash map slots used for the removed items.
503
506
This may negatively impact the lookup speed, which depends on the maximum population seen since the last cleanup.
@@ -613,7 +616,7 @@ Global constants, structs and classes must begin with the name of the contract s
613
616
There is a limit for recursion and depth of nested contract function / procedure calls (the limit is 10 at the moment).
614
617
615
618
The input and output structs of contract user procedures and functions may only use integer and boolean types (such as `uint64`, `sint8`, `bit`) as well as `id`, `Array`, and `BitArray`, and struct types containing only allowed types.
616
-
Complex types that may have an inconsistent internal state, such as `Collection`, are forbidden in the public interface of a contract.
619
+
Complex types that may have an inconsistent internal state, such as `Collection` and `LinkedList`, are forbidden in the public interface of a contract.
0 commit comments