case class MethodCall(obj: Value[SType], method: SMethod, args: IndexedSeq[Value[SType]], typeSubst: Map[STypeVar, SType]) extends Value[SType] with Product with Serializable
Represents in ErgoTree an invocation of method of the object obj
with arguments args
.
The SMethod instances in STypeCompanions may have type STypeIdent in methods types,
but 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 instances are monomorphic by construction.
- obj
object on which method will be invoked
- method
method to be invoked
- args
arguments passed to the method on invocation
- typeSubst
a map of concrete type for each generic type parameter
- Alphabetic
- By Inheritance
- MethodCall
- Serializable
- Serializable
- Value
- SigmaNode
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
addCost[R](costKind: TypeBasedCost, tpe: SType)(block: () ⇒ R)(implicit E: ErgoTreeEvaluator): R
Add the cost given by the descriptor to the accumulator and associate it with this operation node.
Add the cost given by the descriptor to the accumulator and associate it with this operation node.
- Definition Classes
- Value
- Annotations
- @inline()
-
final
def
addCost(costKind: FixedCost)(implicit E: ErgoTreeEvaluator): Unit
Add the cost given by the kind to the accumulator and associate it with this operation node.
Add the cost given by the kind to the accumulator and associate it with this operation node.
- Definition Classes
- Value
- Annotations
- @inline()
-
final
def
addSeqCost[R](costKind: PerItemCost, nItems: Int)(block: () ⇒ R)(implicit E: ErgoTreeEvaluator): R
Add the cost of a repeated operation to the accumulator and associate it with this operation.
Add the cost of a repeated operation to the accumulator and associate it with this operation. The number of items (loop iterations) is known in advance (like in Coll.map operation)
- R
result type of the operation
- costKind
cost descriptor of the operation
- nItems
number of operations known in advance (before loop execution)
- block
operation executed under the given cost
- Definition Classes
- Value
- Annotations
- @inline()
-
final
def
addSeqCostNoOp(costKind: PerItemCost, nItems: Int)(implicit E: ErgoTreeEvaluator): Unit
Add the cost of a repeated operation to the accumulator and associate it with this operation.
Add the cost of a repeated operation to the accumulator and associate it with this operation. The number of items (loop iterations) is known in advance (like in Coll.map operation)
- costKind
cost descriptor of the operation
- nItems
number of operations known in advance (before loop execution)
- Definition Classes
- Value
- Annotations
- @inline()
- val args: IndexedSeq[Value[SType]]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
companion: ValueCompanion
The companion node descriptor with opCode, cost and other metadata.
The companion node descriptor with opCode, cost and other metadata.
- Definition Classes
- MethodCall → Value
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
eval(env: DataEnv)(implicit E: ErgoTreeEvaluator): Any
- env
immutable map, which binds variables (given by ids) to the values
- E
Evaluator which defines evaluation context, cost accumulator, settings etc.
- returns
the data value which is the result of evaluation
- Attributes
- protected
- Definition Classes
- MethodCall → Value
-
final
def
evalTo[T](env: DataEnv)(implicit E: ErgoTreeEvaluator): T
Evaluates this node to the value of the given expected type.
Evaluates this node to the value of the given expected type. This method should called from all
eval
implementations.- T
expected type of the resulting value
- env
immutable map, which binds variables (given by ids) to the values
- E
Evaluator which defines evaluation context, cost accumulator, settings etc.
- returns
the data value which is the result of evaluation
- Definition Classes
- Value
- Annotations
- @inline()
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val method: SMethod
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val obj: Value[SType]
-
def
opCode: OpCode
Unique id of the node class used in serialization of ErgoTree.
Unique id of the node class used in serialization of ErgoTree.
- Definition Classes
- Value
-
def
opName: String
Name of the operation.
Name of the operation.
- Definition Classes
- Value
-
def
opType: SFunc
Every value represents an operation and that operation can be associated with a function type, describing functional meaning of the operation, kind of operation signature.
Every value represents an operation and that operation can be associated with a function type, describing functional meaning of the operation, kind of operation signature. Thus, we can obtain global operation identifiers by combining Value.opName with Value.opType, so that if (v1.opName == v2.opName) && (v1.opType == v2.opType) then v1 and v2 are functionally point-wise equivalent. This in particular means that if two _different_ ops have the same opType they _should_ have different opNames. Thus defined op ids are used in a v4.x Cost Model - a table of all existing primitives coupled with performance parameters.
- Definition Classes
- MethodCall → Value
-
def
sourceContext: Nullable[SourceContext]
- Definition Classes
- Value
-
def
sourceContext_=(srcCtx: Nullable[SourceContext]): Unit
- Definition Classes
- Value
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toSigmaProp: SigmaPropValue
Transforms this expression to SigmaProp expression or throws an exception.
Transforms this expression to SigmaProp expression or throws an exception.
- Definition Classes
- Value
-
val
tpe: SType
The type of the value represented by this node.
The type of the value represented by this node. If the value is an operation it is the type of operation result.
- Definition Classes
- MethodCall → Value
- val typeSubst: Map[STypeVar, SType]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()