abstract class CostingHandler[T] extends AnyRef
Implements basic costing rule invocation mechanism.
Each MethodCall node of ErgoTree is costed using the same mechanism.
When MethodCall is matched during traverse of ErgoTree in RuntimeCosting.evalNode
:
1) the type of the receiver object is used to lookup the corresponding CostingHandler
2) The apply method of CostingHandler is called to create the Coster
3) When Coster is created, the costing-rule-method is looked up using reflection and then invoked.
4) The result of costing-rule-method is returned as the result of MethodCall node costing.
Instances of this class are typically singleton objects (see below).
- See also
Coster
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- CostingHandler
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
-
new
CostingHandler(createCoster: (IRContext.RCosted[T], SMethod, Seq[IRContext.RCosted[_]], Seq[IRContext.Sym]) ⇒ IRContext.Coster[T])
- createCoster
constructor of Coster for given parameters of MethodCall: obj, method, costedArgs, args.
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 apply(obj: IRContext.RCosted[_], method: SMethod, costedArgs: Seq[IRContext.RCosted[_]], args: Seq[IRContext.Sym] = Nil): IRContext.RCosted[_]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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()