Skip to content

Commit

Permalink
non-execution of get_eval todo
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Jun 12, 2024
1 parent b17c8c8 commit fc3be57
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions data/shared/src/main/scala/sigma/ast/methods.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1024,10 +1024,9 @@ object SCollectionMethods extends MethodsContainer with MethodByNameUnapply {
*/
def get_eval[A](mc: MethodCall, xs: Coll[A], index: Int)
(implicit E: ErgoTreeEvaluator): Option[A] = {
val m = mc.method
E.addSeqCost(m.costKind.asInstanceOf[PerItemCost], xs.length, m.opDesc) { () => // todo: costing
xs.get(index)
}
E.addCost(ByIndex.costKind, mc.method.opDesc) //todo: costing
??? // todo: this get is not actually executed, why?
xs.get(index)
}

private val v5Methods = Seq(
Expand Down

0 comments on commit fc3be57

Please sign in to comment.