scalus.utils

package scalus.utils

Members list

Type members

Classlikes

object HashConsed

Objects are hash-consed during restoring from file. Note, that identityHashCode can be different on the different VM-s, so it is not safe to reky on it. value-based hash-code now is not determenistics on recuresive data structures with self-references. So, we use identityHashCode on VN which store file and restore internal references on other VN.

Objects are hash-consed during restoring from file. Note, that identityHashCode can be different on the different VM-s, so it is not safe to reky on it. value-based hash-code now is not determenistics on recuresive data structures with self-references. So, we use identityHashCode on VN which store file and restore internal references on other VN.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
HashConsed.type
class HashConsedDecoderState(val decode: DecoderState, val hashConsed: State, val debug: Boolean)

Attributes

Supertypes
class Object
trait Matchable
class Any
class HashConsedEncoderState(val encode: EncoderState, val hashConsed: State, val debug: Boolean)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
trait HashConsedFlat[A] extends Flat[A]

Attributes

Companion
object
Supertypes
trait Flat[A]
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait HashConsedMutRefReprFlat[A <: AnyRef, SA <: HashConsedRef[A]] extends HashConsedReprFlat[A, SA]

Attributes

Supertypes
trait HashConsedReprFlat[A, SA]
class Object
trait Matchable
class Any
Known subtypes
trait HashConsedRef[+A <: AnyRef]

When we read from the HashConsedRead.State, we can have forward references, which will be resolved after the whole structure is readed. Here, HashConsedRef can hold object ro Ref or object of some intermediate representation, which holds other refs.

When we read from the HashConsedRead.State, we can have forward references, which will be resolved after the whole structure is readed. Here, HashConsedRef can hold object ro Ref or object of some intermediate representation, which holds other refs.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class CachedTaggedRef[A]
class ConstRef[A]
class ForwardRef[A]
class MutRef[A]
class ListRepl[A, SA]
class StringMapRep[A, SA]
Show all
object HashConsedRef

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait HashConsedReprFlat[A <: AnyRef, SA <: HashConsedRef[A]]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
object Hex

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Hex.type
object PlainIntFlat extends HashConsedFlat[Int]

Attributes

Supertypes
trait HashConsedFlat[Int]
trait Flat[Int]
class Object
trait Matchable
class Any
Self type
case class PlutusTextEnvelope(`type`: String, description: String, cborHex: String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Utils

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Utils.type

Types

type HSRIdentityHashMap = IdentityHashMap[HashConsedRef[_], HashConsedRef[_]]

Extensions

Extensions

extension (s: State)
def finishCallbacks(debug: Boolean): Unit
def lookup(ihc: Int, tag: Tag): Option[Either[ForwardRefAcceptor, HashConsedRef[_]]]
def lookupValue(ihc: Int, tag: Tag): Option[HashConsedRef[_]]
def putForwardRef(ihc: Int, tag: Tag, action: AnyRef => Unit): Unit
def putForwardValueAcceptor[A <: AnyRef](ihc: Int, tag: Tag, acceptor: A => Unit): Unit
def setRef[A <: AnyRef](ihc: Int, tag: Tag, a: HashConsedRef[A]): Unit