Code of the corresponding tree node (Value.opCode) which is used to lookup this serizalizer during deserialization.
Code of the corresponding tree node (Value.opCode) which is used to lookup this serizalizer during deserialization. It is emitted immediately before the body of this node in serialized byte array.
The SMethod instances in STypeCompanions may have type STypeIdent in methods types,
but a valid ErgoTree should have SMethod instances specialized for specific types
of obj
and args
using specializeFor
.
The SMethod instances in STypeCompanions may have type STypeIdent in methods types,
but a valid ErgoTree should have SMethod instances specialized for specific types
of obj
and args
using specializeFor
.
This means, if we save typeId, methodId, and we save all the arguments,
we can restore the specialized SMethod instance.
This work by induction, if we assume all arguments are monomorphic,
then we can make MethodCall monomorphic. Thus, all ErgoTree is monomorphic by construction.
This is limitation of MethodCall, because we cannot use it to represent for example
def Box.getReg[T](id: Int): Option[T], which require serialization of expected type T
However it can be implemented using separate node type (new type code) and can be added via soft-fork.
HOTSPOT: don't beautify this code
Wraps the given reader in SigmaByteReader and delegates to parse.
Wraps the given reader in SigmaByteReader and delegates to parse. NOTE: it is used in spam tests.
Wraps the given writer in SigmaByteWriter and delegates to serialize.
Wraps the given writer in SigmaByteWriter and delegates to serialize. NOTE: it is used in spam tests.