case class SMethod(objType: STypeCompanion, name: String, stype: SFunc, methodId: Byte, costKind: CostKind, irInfo: MethodIRInfo, docInfo: Option[OperationInfo], costFunc: Option[MethodCostFunc]) extends Product with Serializable
Represents method descriptor.
- objType
type or type constructor descriptor
- name
method name
- stype
method signature type, where
stype.tDom
- argument type and
stype.tRange- method result type.
- methodId
method code, it should be unique among methods of the same objType.
- costKind
cost descriptor for this method
- irInfo
meta information connecting SMethod with ErgoTree (see MethodIRInfo)
- docInfo
optional human readable method description data
- costFunc
optional specification of how the cost should be computed for the given method call (See ErgoTreeEvaluator.calcCost method).
- Alphabetic
- By Inheritance
- SMethod
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
SMethod(objType: STypeCompanion, name: String, stype: SFunc, methodId: Byte, costKind: CostKind, irInfo: MethodIRInfo, docInfo: Option[OperationInfo], costFunc: Option[MethodCostFunc])
- objType
type or type constructor descriptor
- name
method name
- stype
method signature type, where
stype.tDom
- argument type and
stype.tRange- method result type.
- methodId
method code, it should be unique among methods of the same objType.
- costKind
cost descriptor for this method
- irInfo
meta information connecting SMethod with ErgoTree (see MethodIRInfo)
- docInfo
optional human readable method description data
- costFunc
optional specification of how the cost should be computed for the given method call (See ErgoTreeEvaluator.calcCost method).
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
-
def
argInfo(argName: String): ArgInfo
Lookup ArgInfo for the given argName or throw an exception.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val costFunc: Option[MethodCostFunc]
- val costKind: CostKind
- val docInfo: Option[OperationInfo]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
lazy val
evalMethod: RMethod
Returns refection RMethod which must be invoked to evaluate this method.
Returns refection RMethod which must be invoked to evaluate this method. The method is resolved by its name using
name + "_eval"
naming convention.- See also
map_eval
,flatMap_eval
and other*_eval
methods.
-
lazy val
extraDescriptors: Seq[RType[_]]
Additional type descriptors, which are necessary to perform invocation of Method associated with this instance.
Additional type descriptors, which are necessary to perform invocation of Method associated with this instance.
- See also
MethodCall.eval
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
genericMethod: SMethod
Return generic template of this method.
Return generic template of this method.
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
invokeFixed(obj: Any, args: Array[Any])(implicit E: ErgoTreeEvaluator): Any
Invoke this method on the given object with the arguments.
Invoke this method on the given object with the arguments. This is used for methods with FixedCost costKind.
- val irInfo: MethodIRInfo
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
lazy val
javaMethod: RMethod
Finds and keeps the RMethod instance which corresponds to this method descriptor.
Finds and keeps the RMethod instance which corresponds to this method descriptor. The lazy value is forced only if irInfo.javaMethod == None
- val methodId: Byte
- val name: String
-
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 objType: STypeCompanion
-
lazy val
opDesc: MethodDesc
Operation descriptor of this method.
-
def
opId: OperationId
Returns OperationId for AOT costing.
-
def
opName: String
Name of a language operation represented by this method.
-
def
specializeFor(objTpe: SType, args: Seq[SType]): SMethod
Specializes this instance by creating a new SMethod instance where signature is specialized with respect to the given object and args types.
Specializes this instance by creating a new SMethod instance where signature is specialized with respect to the given object and args types. It is used in sigmastate.serialization.MethodCallSerializer
parse
method, so it is part of consensus protocol.- objTpe
specific type of method receiver (aka object)
- args
specific types of method arguments
- returns
new instance of method descriptor with specialized signature
- val stype: SFunc
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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()
-
def
withConcreteTypes(subst: Map[STypeVar, SType]): SMethod
Create a new instance in which the
stype
field transformed using the given substitution. -
def
withCost(costFunc: MethodCostFunc): SMethod
Create a new instance with the given cost function.
-
def
withIRInfo(irBuilder: PartialFunction[(SigmaBuilder, SValue, SMethod, Seq[SValue], STypeSubst), SValue], javaMethod: RMethod = null, invokeHandler: InvokeDescBuilder = null): SMethod
Create a new instance with the given IR builder (aka MethodCall rewriter) parameter.
-
def
withInfo(desc: String, args: ArgInfo*): SMethod
Create a new instance with the given OperationInfo parameters.
Create a new instance with the given OperationInfo parameters. NOTE: opDesc parameter is not defined and falls back to None.
-
def
withInfo(opDesc: ValueCompanion, desc: String, args: ArgInfo*): SMethod
Create a new instance with the given OperationInfo parameters.
-
def
withSType(newSType: SFunc): SMethod
Create a new instance with the given stype.