object OpCodes extends ValueCodes

The set of all possible IR graph nodes can be split in two subsets: 1) operations which may appear in ErgoTree (these are defined by OpCodes below) 2) operations which are not valid to be in ErgoTree, but serve special purposes. (these are defined by OpCodesExtra) We can assume they are both Byte-sized codes, and store as a single byte, but as long as we can differentiate them from context (and where we cannot, we should use special encoding).

The general extended encoding is like the following: 0-255 - range of OpCodes 256-511 - range of OpCodesExtra Thus, any code in an extended code range of 0-511 can be saved using putUShort. We use Byte to represent OpCodes and OpCodesExtra. We use Short to represent any op code from extended code range. And we use VLQ to serialize Short values of extended codes.

Examples: 1) For validation rule CheckValidOpCode we use OpCodes range, so we use single byte encoding. 2) For CheckCostFuncOperation we use 1-511 range and extended encoding (see docs)

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OpCodes
  2. ValueCodes
  3. TypeCodes
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type OpCode = Byte with Tag[Byte, OpCodes.OpCode.Tag]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val AndCode: OpCode
  5. val AppendCode: OpCode
  6. val AtLeastCode: OpCode
  7. val AvlTreeCode: OpCode
  8. val AvlTreeGetCode: OpCode
  9. val BinAndCode: OpCode
  10. val BinOrCode: OpCode
  11. val BinXorCode: OpCode
  12. val BitAndCode: OpCode
  13. val BitInversionCode: OpCode
  14. val BitOrCode: OpCode
  15. val BitShiftLeftCode: OpCode
  16. val BitShiftRightCode: OpCode
  17. val BitShiftRightZeroedCode: OpCode
  18. val BitXorCode: OpCode
  19. val BlockValueCode: OpCode
  20. val BoolToSigmaPropCode: OpCode
  21. val ByIndexCode: OpCode
  22. val ByteArrayToBigIntCode: OpCode
  23. val ByteArrayToLongCode: OpCode
  24. val CalcBlake2b256Code: OpCode
  25. val CalcSha256Code: OpCode
  26. val CollRotateLeftCode: OpCode
  27. val CollRotateRightCode: OpCode
  28. val CollShiftLeftCode: OpCode
  29. val CollShiftRightCode: OpCode
  30. val CollShiftRightZeroedCode: OpCode
  31. val ConcreteCollectionBooleanConstantCode: OpCode
  32. val ConcreteCollectionCode: OpCode
  33. val ConstantCode: OpCode

    We use optimized encoding of constant values to save space in serialization.

    We use optimized encoding of constant values to save space in serialization. Since Box registers are stored as Constant nodes we save 1 byte for each register. This is due to convention that Value.opCode falling in [1..LastDataType] region is a constant. Thus, we can just decode an instance of SType and then decode data using DataSerializer.

    Decoding of constants depends on the first byte and in general is a recursive procedure consuming some number of bytes from Reader.

    Definition Classes
    ValueCodes
  34. val ConstantPlaceholderCode: OpCode
  35. val ContextCode: OpCode
  36. val DecodePointCode: OpCode
  37. val DeserializeContextCode: OpCode
  38. val DeserializeRegisterCode: OpCode
  39. val DivisionCode: OpCode
  40. val DowncastCode: OpCode
  41. val EqCode: OpCode
  42. val ExistsCode: OpCode
  43. val ExponentiateCode: OpCode
  44. val ExtractAmountCode: OpCode
  45. val ExtractBytesCode: OpCode
  46. val ExtractBytesWithNoRefCode: OpCode
  47. val ExtractCreationInfoCode: OpCode
  48. val ExtractIdCode: OpCode
  49. val ExtractRegisterAs: OpCode
  50. val ExtractScriptBytesCode: OpCode
  51. val FalseCode: OpCode
  52. val FilterCode: OpCode
  53. val FirstDataType: OpCode

    Decoding of types depends on the first byte and in general is a recursive procedure consuming some number of bytes from Reader.

    Decoding of types depends on the first byte and in general is a recursive procedure consuming some number of bytes from Reader. All data types are recognized by the first byte falling in the region [FirstDataType .. LastDataType]

    Definition Classes
    TypeCodes
  54. val FirstFuncType: OpCode

    SFunc types occupy remaining space of byte values [FirstFuncType ..

    SFunc types occupy remaining space of byte values [FirstFuncType .. 255]

    Definition Classes
    TypeCodes
  55. val FlatMapCollectionCode: OpCode
  56. val FoldCode: OpCode
  57. val ForAllCode: OpCode
  58. val FunDefCode: OpCode
  59. val FuncApplyCode: OpCode
  60. val FuncValueCode: OpCode
  61. val GeCode: OpCode
  62. val GetVarCode: OpCode
  63. val GlobalCode: OpCode
  64. val GroupGeneratorCode: OpCode
  65. val GtCode: OpCode
  66. val HeightCode: OpCode
  67. val IfCode: OpCode
  68. val InputsCode: OpCode
  69. val LastBlockUtxoRootHashCode: OpCode
  70. val LastConstantCode: OpCode

    The last constant code is equal to FirstFuncType which represent generic function type.

    The last constant code is equal to FirstFuncType which represent generic function type. We use this single code to represent all functional constants, since we don't have enough space in single byte. Subsequent bytes have to be read from Reader in order to decode the type of the function and the corresponding data.

    Definition Classes
    ValueCodes
  71. val LastDataType: OpCode
    Definition Classes
    TypeCodes
  72. val LastFuncType: OpCode
    Definition Classes
    TypeCodes
  73. val LeCode: OpCode
  74. val LogicalNotCode: OpCode
  75. val LongToByteArrayCode: OpCode
  76. val LtCode: OpCode
  77. val MapCollectionCode: OpCode
  78. val MaxCode: OpCode
  79. val MethodCallCode: OpCode
  80. val MinCode: OpCode
  81. val MinerPubkeyCode: OpCode
  82. val MinusCode: OpCode
  83. val MinusModQCode: OpCode
  84. val ModQCode: OpCode
  85. val ModuloCode: OpCode
  86. val MultiplyCode: OpCode
  87. val MultiplyGroupCode: OpCode
  88. val NegationCode: OpCode
  89. val NeqCode: OpCode
  90. val NoneValueCode: OpCode
  91. val OptionGetCode: OpCode
  92. val OptionGetOrElseCode: OpCode
  93. val OptionIsDefinedCode: OpCode
  94. val OrCode: OpCode
  95. val OutputsCode: OpCode
  96. val PlusCode: OpCode
  97. val PlusModQCode: OpCode
  98. val PropertyCallCode: OpCode
  99. val ProveDiffieHellmanTupleCode: OpCode
  100. val ProveDlogCode: OpCode
  101. val Select1Code: OpCode
  102. val Select2Code: OpCode
  103. val Select3Code: OpCode
  104. val Select4Code: OpCode
  105. val Select5Code: OpCode
  106. val SelectFieldCode: OpCode
  107. val SelfCode: OpCode
  108. val SigmaAndCode: OpCode
  109. val SigmaOrCode: OpCode
  110. val SigmaPropBytesCode: OpCode
  111. val SigmaPropIsProvenCode: OpCode
  112. val SizeOfCode: OpCode
  113. val SliceCode: OpCode
  114. val SomeValueCode: OpCode
  115. val SubstConstantsCode: OpCode
  116. val TaggedVariableCode: OpCode
  117. val TrivialPropFalseCode: OpCode
  118. val TrivialPropTrueCode: OpCode
  119. val TrueCode: OpCode
  120. val TupleCode: OpCode
  121. val Undefined: OpCode
  122. val UnitConstantCode: OpCode
  123. val UpcastCode: OpCode
  124. val ValDefCode: OpCode
  125. val ValUseCode: OpCode
  126. val XorCode: OpCode
  127. val XorOfCode: OpCode
  128. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  129. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  130. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  131. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  132. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  133. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  134. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  135. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  136. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  137. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  138. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  139. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  140. def toString(): String
    Definition Classes
    AnyRef → Any
  141. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  142. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  143. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  144. object OpCode extends TaggedType[Byte]

Inherited from ValueCodes

Inherited from TypeCodes

Inherited from AnyRef

Inherited from Any

Ungrouped