Skip to main content

Dictionary Manipulation Primitives

The gas consumption of most dictionary operations is not fixed, it depends on the contents of the given dictionary.

TVM Instructions Content List

OpcodeFift syntaxStackDescriptionGas
Please enter a search query
No results found

Dictionary Manipulation Primitives

Dictionary creation

xxxxxxx
Opcode
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax
xxxxxxxxxxxxxxxxx
Stack
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description
xxxx
Gas
6DNEWDICT - DReturns a new empty dictionary.
It is an alternative mnemonics for PUSHNULL.
18
6EDICTEMPTYD - ?Checks whether dictionary D is empty, and returns -1 or 0 accordingly.
It is an alternative mnemonics for ISNULL.
18

Dictionary serialization and deserialization

xxxxxxx
Opcode
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax
xxxxxxxxxxxxxxxxx
Stack
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description
xxxx
Gas
CESTDICTS
``
s b - b'Stores a Slice-represented dictionary s into Builder b.
It is actually a synonym for STSLICE.
18
F400STDICT
STOPTREF
D b - b'Stores dictionary D into Builder b, returing the resulting Builder b'.
In other words, if D is a cell, performs STONE and STREF; if D is Null, performs NIP and STZERO; otherwise throws a type checking exception.
26
F401SKIPDICT
SKIPOPTREF
s - s'Equivalent to LDDICT NIP.26
F402LDDICTSs - s' s''Loads (parses) a (Slice-represented) dictionary s' from Slice s, and returns the remainder of s as s''.
This is a “split function'' for all HashmapE(n,X) dictionary types.
26
F403PLDDICTSs - s'Preloads a (Slice-represented) dictionary s' from Slice s.
Approximately equivalent to LDDICTS DROP.
26
F404LDDICT
LDOPTREF
s - D s'Loads (parses) a dictionary D from Slice s, and returns the remainder of s as s'. May be applied to dictionaries or to values of arbitrary (^Y)? types.26
F405PLDDICT
PLDOPTREF
s - DPreloads a dictionary D from Slice s.
Approximately equivalent to LDDICT DROP.
26
F406LDDICTQs - D s' -1 or s 0A quiet version of LDDICT.26
F407PLDDICTQs - D -1 or 0A quiet version of PLDDICT.26

Get dictionary operations

xxxxxxx
Opcode
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax
xxxxxxxxxxxxxxxxx
Stack
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description
xxxx
Gas
F40ADICTGETk D n - x -1 or 0Looks up key k (represented by a Slice, the first 0 <= n <= 1023 data bits of which are used as a key) in dictionary D of type HashmapE(n,X) with n-bit keys.
On success, returns the value found as a Slice x.
F40BDICTGETREFk D n - c -1 or 0Similar to DICTGET, but with a LDREF ENDS applied to x on success.
This operation is useful for dictionaries of type HashmapE(n,^Y).
F40CDICTIGETi D n - x -1 or 0Similar to DICTGET, but with a signed (big-endian) n-bit Integer i as a key. If i does not fit into n bits, returns 0. If i is a NaN, throws an integer overflow exception.
F40DDICTIGETREFi D n - c -1 or 0Combines DICTIGET with DICTGETREF: it uses signed n-bit Integer i as a key and returns a Cell instead of a Slice on success.
F40EDICTUGETi D n - x -1 or 0Similar to DICTIGET, but with unsigned (big-endian) n-bit Integer i used as a key.
F40FDICTUGETREFi D n - c -1 or 0Similar to DICTIGETREF, but with an unsigned n-bit Integer key i.

Set/Replace/Add dictionary operations

xxxxxxx
Opcode
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax
xxxxxxxxxxxxxxxxx
Stack
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description
xxxx
Gas
F412DICTSETx k D n - D'Sets the value associated with n-bit key k (represented by a Slice as in DICTGET) in dictionary D (also represented by a Slice) to value x (again a Slice), and returns the resulting dictionary as D'.
F413DICTSETREFc k D n - D'Similar to DICTSET, but with the value set to a reference to Cell c.
F414DICTISETx i D n - D'Similar to DICTSET, but with the key represented by a (big-endian) signed n-bit integer i. If i does not fit into n bits, a range check exception is generated.
F415DICTISETREFc i D n - D'Similar to DICTSETREF, but with the key a signed n-bit integer as in DICTISET.
F416DICTUSETx i D n - D'Similar to DICTISET, but with i an unsigned n-bit integer.
F417DICTUSETREFc i D n - D'Similar to DICTISETREF, but with i unsigned.
F41ADICTSETGETx k D n - D' y -1 or D' 0Combines DICTSET with DICTGET: it sets the value corresponding to key k to x, but also returns the old value y associated with the key in question, if present.
F41BDICTSETGETREFc k D n - D' c' -1 or D' 0Combines DICTSETREF with DICTGETREF similarly to DICTSETGET.
F41CDICTISETGETx i D n - D' y -1 or D' 0DICTISETGET, but with i a signed n-bit integer.
F41DDICTISETGETREFc i D n - D' c' -1 or D' 0DICTISETGETREF, but with i a signed n-bit integer.
F41EDICTUSETGETx i D n - D' y -1 or D' 0DICTISETGET, but with i an unsigned n-bit integer.
F41FDICTUSETGETREFc i D n - D' c' -1 or D' 0DICTISETGETREF, but with i an unsigned n-bit integer.
F422DICTREPLACEx k D n - D' -1 or D 0A Replace operation, which is similar to DICTSET, but sets the value of key k in dictionary D to x only if the key k was already present in D.
F423DICTREPLACEREFc k D n - D' -1 or D 0A Replace counterpart of DICTSETREF.
F424DICTIREPLACEx i D n - D' -1 or D 0DICTREPLACE, but with i a signed n-bit integer.
F425DICTIREPLACEREFc i D n - D' -1 or D 0DICTREPLACEREF, but with i a signed n-bit integer.
F426DICTUREPLACEx i D n - D' -1 or D 0DICTREPLACE, but with i an unsigned n-bit integer.
F427DICTUREPLACEREFc i D n - D' -1 or D 0DICTREPLACEREF, but with i an unsigned n-bit integer.
F42ADICTREPLACEGETx k D n - D' y -1 or D 0A Replace counterpart of DICTSETGET: on success, also returns the old value associated with the key in question.
F42BDICTREPLACEGETREFc k D n - D' c' -1 or D 0A Replace counterpart of DICTSETGETREF.
F42CDICTIREPLACEGETx i D n - D' y -1 or D 0DICTREPLACEGET, but with i a signed n-bit integer.
F42DDICTIREPLACEGETREFc i D n - D' c' -1 or D 0DICTREPLACEGETREF, but with i a signed n-bit integer.
F42EDICTUREPLACEGETx i D n - D' y -1 or D 0DICTREPLACEGET, but with i an unsigned n-bit integer.
F42FDICTUREPLACEGETREFc i D n - D' c' -1 or D 0DICTREPLACEGETREF, but with i an unsigned n-bit integer.
F432DICTADDx k D n - D' -1 or D 0An Add counterpart of DICTSET: sets the value associated with key k in dictionary D to x, but only if it is not already present in D.
F433DICTADDREFc k D n - D' -1 or D 0An Add counterpart of DICTSETREF.
F434DICTIADDx i D n - D' -1 or D 0DICTADD, but with i a signed n-bit integer.
F435DICTIADDREFc i D n - D' -1 or D 0DICTADDREF, but with i a signed n-bit integer.
F436DICTUADDx i D n - D' -1 or D 0DICTADD, but with i an unsigned n-bit integer.
F437DICTUADDREFc i D n - D' -1 or D 0DICTADDREF, but with i an unsigned n-bit integer.
F43ADICTADDGETx k D n - D' -1 or D y 0An Add counterpart of DICTSETGET: sets the value associated with key k in dictionary D to x, but only if key k is not already present in D. Otherwise, just returns the old value y without changing the dictionary.
F43BDICTADDGETREFc k D n - D' -1 or D c' 0An Add counterpart of DICTSETGETREF.
F43CDICTIADDGETx i D n - D' -1 or D y 0DICTADDGET, but with i a signed n-bit integer.
F43DDICTIADDGETREFc i D n - D' -1 or D c' 0DICTADDGETREF, but with i a signed n-bit integer.
F43EDICTUADDGETx i D n - D' -1 or D y 0DICTADDGET, but with i an unsigned n-bit integer.
F43FDICTUADDGETREFc i D n - D' -1 or D c' 0DICTADDGETREF, but with i an unsigned n-bit integer.

Builder-accepting variants of Set dictionary operations

The following primitives accept the new value as a Builder b instead of a Slice x. | xxxxxxx
Opcode | xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax | xxxxxxxxxxxxxxxxx
Stack | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description | xxxx
Gas | |:-|:-|:-|:-|:-| | F441 | DICTSETB | b k D n - D' | | | | F442 | DICTISETB | b i D n - D' | | | | F443 | DICTUSETB | b i D n - D' | | | | F445 | DICTSETGETB | b k D n - D' y -1 or D' 0 | | | | F446 | DICTISETGETB | b i D n - D' y -1 or D' 0 | | | | F447 | DICTUSETGETB | b i D n - D' y -1 or D' 0 | | | | F449 | DICTREPLACEB | b k D n - D' -1 or D 0 | | | | F44A | DICTIREPLACEB | b i D n - D' -1 or D 0 | | | | F44B | DICTUREPLACEB | b i D n - D' -1 or D 0 | | | | F44D | DICTREPLACEGETB | b k D n - D' y -1 or D 0 | | | | F44E | DICTIREPLACEGETB | b i D n - D' y -1 or D 0 | | | | F44F | DICTUREPLACEGETB | b i D n - D' y -1 or D 0 | | | | F451 | DICTADDB | b k D n - D' -1 or D 0 | | | | F452 | DICTIADDB | b i D n - D' -1 or D 0 | | | | F453 | DICTUADDB | b i D n - D' -1 or D 0 | | | | F455 | DICTADDGETB | b k D n - D' -1 or D y 0 | | | | F456 | DICTIADDGETB | b i D n - D' -1 or D y 0 | | | | F457 | DICTUADDGETB | b i D n - D' -1 or D y 0 | | |

Delete dictionary operations

xxxxxxx
Opcode
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax
xxxxxxxxxxxxxxxxx
Stack
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description
xxxx
Gas
F459DICTDELk D n - D' -1 or D 0Deletes n-bit key, represented by a Slice k, from dictionary D. If the key is present, returns the modified dictionary D' and the success flag -1. Otherwise, returns the original dictionary D and 0.
F45ADICTIDELi D n - D' ?A version of DICTDEL with the key represented by a signed n-bit Integer i. If i does not fit into n bits, simply returns D 0 (“key not found, dictionary unmodified'').
F45BDICTUDELi D n - D' ?Similar to DICTIDEL, but with i an unsigned n-bit integer.
F462DICTDELGETk D n - D' x -1 or D 0Deletes n-bit key, represented by a Slice k, from dictionary D. If the key is present, returns the modified dictionary D', the original value x associated with the key k (represented by a Slice), and the success flag -1. Otherwise, returns the original dictionary D and 0.
F463DICTDELGETREFk D n - D' c -1 or D 0Similar to DICTDELGET, but with LDREF ENDS applied to x on success, so that the value returned c is a Cell.
F464DICTIDELGETi D n - D' x -1 or D 0DICTDELGET, but with i a signed n-bit integer.
F465DICTIDELGETREFi D n - D' c -1 or D 0DICTDELGETREF, but with i a signed n-bit integer.
F466DICTUDELGETi D n - D' x -1 or D 0DICTDELGET, but with i an unsigned n-bit integer.
F467DICTUDELGETREFi D n - D' c -1 or D 0DICTDELGETREF, but with i an unsigned n-bit integer.

"Maybe reference" dictionary operations

The following operations assume that a dictionary is used to store values c? of type Maybe Cell. The representation is as follows: if c? is a Cell , it is stored as a value with no data bits and exactly one reference to this Cell. If c? is Null, then the corresponding key must be absent from the dictionary. | xxxxxxx
Opcode | xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax | xxxxxxxxxxxxxxxxx
Stack | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description | xxxx
Gas | |:-|:-|:-|:-|:-| | F469 | DICTGETOPTREF | k D n - c^? | A variant of DICTGETREF that returns Null instead of the value c^? if the key k is absent from dictionary D. | | | F46A | DICTIGETOPTREF | i D n - c^? | DICTGETOPTREF, but with i a signed n-bit integer. If the key i is out of range, also returns Null. | | | F46B | DICTUGETOPTREF | i D n - c^? | DICTGETOPTREF, but with i an unsigned n-bit integer. If the key i is out of range, also returns Null. | | | F46D | DICTSETGETOPTREF | c^? k D n - D' ~c^? | A variant of both DICTGETOPTREF and DICTSETGETREF that sets the value corresponding to key k in dictionary D to c^? (if c^? is Null, then the key is deleted instead), and returns the old value ~c^? (if the key k was absent before, returns Null instead). | | | F46E | DICTISETGETOPTREF | c^? i D n - D' ~c^? | Similar to primitive DICTSETGETOPTREF, but using signed n-bit Integer i as a key. If i does not fit into n bits, throws a range checking exception. | | | F46F | DICTUSETGETOPTREF | c^? i D n - D' ~c^? | Similar to primitive DICTSETGETOPTREF, but using unsigned n-bit Integer i as a key. | |

Prefix code dictionary operations

These are some basic operations for constructing prefix code dictionaries. These primitives are completely similar to their non-prefix code counterparts (DICTSET etc), with the obvious difference that even a Set may fail in a prefix code dictionary, so a success flag must be returned by PFXDICTSET as well. | xxxxxxx
Opcode | xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax | xxxxxxxxxxxxxxxxx
Stack | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description | xxxx
Gas | |:-|:-|:-|:-|:-| | F470 | PFXDICTSET | x k D n - D' -1 or D 0 | | | | F471 | PFXDICTREPLACE | x k D n - D' -1 or D 0 | | | | F472 | PFXDICTADD | x k D n - D' -1 or D 0 | | | | F473 | PFXDICTDEL | k D n - D' -1 or D 0 | | |

Variants of GetNext and GetPrev operations

xxxxxxx
Opcode
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax
xxxxxxxxxxxxxxxxx
Stack
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description
xxxx
Gas
F474DICTGETNEXTk D n - x' k' -1 or 0Computes the minimal key k' in dictionary D that is lexicographically greater than k, and returns k' (represented by a Slice) along with associated value x' (also represented by a Slice).
F475DICTGETNEXTEQk D n - x' k' -1 or 0Similar to DICTGETNEXT, but computes the minimal key k' that is lexicographically greater than or equal to k.
F476DICTGETPREVk D n - x' k' -1 or 0Similar to DICTGETNEXT, but computes the maximal key k' lexicographically smaller than k.
F477DICTGETPREVEQk D n - x' k' -1 or 0Similar to DICTGETPREV, but computes the maximal key k' lexicographically smaller than or equal to k.
F478DICTIGETNEXTi D n - x' i' -1 or 0Similar to DICTGETNEXT, but interprets all keys in dictionary D as big-endian signed n-bit integers, and computes the minimal key i' that is larger than Integer i (which does not necessarily fit into n bits).
F479DICTIGETNEXTEQi D n - x' i' -1 or 0Similar to DICTGETNEXTEQ, but interprets keys as signed n-bit integers.
F47ADICTIGETPREVi D n - x' i' -1 or 0Similar to DICTGETPREV, but interprets keys as signed n-bit integers.
F47BDICTIGETPREVEQi D n - x' i' -1 or 0Similar to DICTGETPREVEQ, but interprets keys as signed n-bit integers.
F47CDICTUGETNEXTi D n - x' i' -1 or 0Similar to DICTGETNEXT, but interprets all keys in dictionary D as big-endian unsigned n-bit integers, and computes the minimal key i' that is larger than Integer i (which does not necessarily fit into n bits, and is not necessarily non-negative).
F47DDICTUGETNEXTEQi D n - x' i' -1 or 0Similar to DICTGETNEXTEQ, but interprets keys as unsigned n-bit integers.
F47EDICTUGETPREVi D n - x' i' -1 or 0Similar to DICTGETPREV, but interprets keys as unsigned n-bit integers.
F47FDICTUGETPREVEQi D n - x' i' -1 or 0Similar to DICTGETPREVEQ, but interprets keys a unsigned n-bit integers.

GetMin, GetMax, RemoveMin, RemoveMax operations

xxxxxxx
Opcode
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax
xxxxxxxxxxxxxxxxx
Stack
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description
xxxx
Gas
F482DICTMIND n - x k -1 or 0Computes the minimal key k (represented by a Slice with n data bits) in dictionary D, and returns k along with the associated value x.
F483DICTMINREFD n - c k -1 or 0Similar to DICTMIN, but returns the only reference in the value as a Cell c.
F484DICTIMIND n - x i -1 or 0Similar to DICTMIN, but computes the minimal key i under the assumption that all keys are big-endian signed n-bit integers. Notice that the key and value returned may differ from those computed by DICTMIN and DICTUMIN.
F485DICTIMINREFD n - c i -1 or 0Similar to DICTIMIN, but returns the only reference in the value.
F486DICTUMIND n - x i -1 or 0Similar to DICTMIN, but returns the key as an unsigned n-bit Integer i.
F487DICTUMINREFD n - c i -1 or 0Similar to DICTUMIN, but returns the only reference in the value.
F48ADICTMAXD n - x k -1 or 0Computes the maximal key k (represented by a Slice with n data bits) in dictionary D, and returns k along with the associated value x.
F48BDICTMAXREFD n - c k -1 or 0Similar to DICTMAX, but returns the only reference in the value.
F48CDICTIMAXD n - x i -1 or 0Similar to DICTMAX, but computes the maximal key i under the assumption that all keys are big-endian signed n-bit integers. Notice that the key and value returned may differ from those computed by DICTMAX and DICTUMAX.
F48DDICTIMAXREFD n - c i -1 or 0Similar to DICTIMAX, but returns the only reference in the value.
F48EDICTUMAXD n - x i -1 or 0Similar to DICTMAX, but returns the key as an unsigned n-bit Integer i.
F48FDICTUMAXREFD n - c i -1 or 0Similar to DICTUMAX, but returns the only reference in the value.
F492DICTREMMIND n - D' x k -1 or D 0Computes the minimal key k (represented by a Slice with n data bits) in dictionary D, removes k from the dictionary, and returns k along with the associated value x and the modified dictionary D'.
F493DICTREMMINREFD n - D' c k -1 or D 0Similar to DICTREMMIN, but returns the only reference in the value as a Cell c.
F494DICTIREMMIND n - D' x i -1 or D 0Similar to DICTREMMIN, but computes the minimal key i under the assumption that all keys are big-endian signed n-bit integers. Notice that the key and value returned may differ from those computed by DICTREMMIN and DICTUREMMIN.
F495DICTIREMMINREFD n - D' c i -1 or D 0Similar to DICTIREMMIN, but returns the only reference in the value.
F496DICTUREMMIND n - D' x i -1 or D 0Similar to DICTREMMIN, but returns the key as an unsigned n-bit Integer i.
F497DICTUREMMINREFD n - D' c i -1 or D 0Similar to DICTUREMMIN, but returns the only reference in the value.
F49ADICTREMMAXD n - D' x k -1 or D 0Computes the maximal key k (represented by a Slice with n data bits) in dictionary D, removes k from the dictionary, and returns k along with the associated value x and the modified dictionary D'.
F49BDICTREMMAXREFD n - D' c k -1 or D 0Similar to DICTREMMAX, but returns the only reference in the value as a Cell c.
F49CDICTIREMMAXD n - D' x i -1 or D 0Similar to DICTREMMAX, but computes the minimal key i under the assumption that all keys are big-endian signed n-bit integers. Notice that the key and value returned may differ from those computed by DICTREMMAX and DICTUREMMAX.
F49DDICTIREMMAXREFD n - D' c i -1 or D 0Similar to DICTIREMMAX, but returns the only reference in the value.
F49EDICTUREMMAXD n - D' x i -1 or D 0Similar to DICTREMMAX, but returns the key as an unsigned n-bit Integer i.
F49FDICTUREMMAXREFD n - D' c i -1 or D 0Similar to DICTUREMMAX, but returns the only reference in the value.

Special Get dictionary and prefix code dictionary operations and constant dictionaries

xxxxxxx
Opcode
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax
xxxxxxxxxxxxxxxxx
Stack
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description
xxxx
Gas
F4A0DICTIGETJMPi D n - Similar to DICTIGET, but with x BLESSed into a continuation with a subsequent JMPX to it on success. On failure, does nothing. This is useful for implementing switch/case constructions.
F4A1DICTUGETJMPi D n - Similar to DICTIGETJMP, but performs DICTUGET instead of DICTIGET.
F4A2DICTIGETEXECi D n - Similar to DICTIGETJMP, but with EXECUTE instead of JMPX.
F4A3DICTUGETEXECi D n - Similar to DICTUGETJMP, but with EXECUTE instead of JMPX.
F4A6_n[ref] [n] DICTPUSHCONST - D nPushes a non-empty constant dictionary D (as a Cell^?) along with its key length 0 <= n <= 1023, stored as a part of the instruction. The dictionary itself is created from the first of remaining references of the current continuation. In this way, the complete DICTPUSHCONST instruction can be obtained by first serializing xF4A4_, then the non-empty dictionary itself (one 1 bit and a cell reference), and then the unsigned 10-bit integer n (as if by a STU 10 instruction). An empty dictionary can be pushed by a NEWDICT primitive instead.34
F4A8PFXDICTGETQs D n - s' x s'' -1 or s 0Looks up the unique prefix of Slice s present in the prefix code dictionary represented by Cell^? D and 0 <= n <= 1023. If found, the prefix of s is returned as s', and the corresponding value (also a Slice) as x. The remainder of s is returned as a Slice s''. If no prefix of s is a key in prefix code dictionary D, returns the unchanged s and a zero flag to indicate failure.
F4A9PFXDICTGETs D n - s' x s''Similar to PFXDICTGET, but throws a cell deserialization failure exception on failure.
F4AAPFXDICTGETJMPs D n - s' s'' or sSimilar to PFXDICTGETQ, but on success BLESSes the value x into a Continuation and transfers control to it as if by a JMPX. On failure, returns s unchanged and continues execution.
F4ABPFXDICTGETEXECs D n - s' s''Similar to PFXDICTGETJMP, but EXECutes the continuation found instead of jumping to it. On failure, throws a cell deserialization exception.
F4AE_n[ref] [n] PFXDICTCONSTGETJMP
[ref] [n] PFXDICTSWITCH
s - s' s'' or sCombines [n] DICTPUSHCONST for 0 <= n <= 1023 with PFXDICTGETJMP.
F4BCDICTIGETJMPZi D n - i or nothingA variant of DICTIGETJMP that returns index i on failure.
F4BDDICTUGETJMPZi D n - i or nothingA variant of DICTUGETJMP that returns index i on failure.
F4BEDICTIGETEXECZi D n - i or nothingA variant of DICTIGETEXEC that returns index i on failure.
F4BFDICTUGETEXECZi D n - i or nothingA variant of DICTUGETEXEC that returns index i on failure.

SubDict dictionary operations

xxxxxxx
Opcode
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fift syntax
xxxxxxxxxxxxxxxxx
Stack
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Description
xxxx
Gas
F4B1SUBDICTGETk l D n - D'Constructs a subdictionary consisting of all keys beginning with prefix k (represented by a Slice, the first 0 <= l <= n <= 1023 data bits of which are used as a key) of length l in dictionary D of type HashmapE(n,X) with n-bit keys. On success, returns the new subdictionary of the same type HashmapE(n,X) as a Slice D'.
F4B2SUBDICTIGETx l D n - D'Variant of SUBDICTGET with the prefix represented by a signed big-endian l-bit Integer x, where necessarily l <= 257.
F4B3SUBDICTUGETx l D n - D'Variant of SUBDICTGET with the prefix represented by an unsigned big-endian l-bit Integer x, where necessarily l <= 256.
F4B5SUBDICTRPGETk l D n - D'Similar to SUBDICTGET, but removes the common prefix k from all keys of the new dictionary D', which becomes of type HashmapE(n-l,X).
F4B6SUBDICTIRPGETx l D n - D'Variant of SUBDICTRPGET with the prefix represented by a signed big-endian l-bit Integer x, where necessarily l <= 257.
F4B7SUBDICTURPGETx l D n - D'Variant of SUBDICTRPGET with the prefix represented by an unsigned big-endian l-bit Integer x, where necessarily l <= 256.

TVM Instructions Content List