()
| 856 | } |
| 857 | |
| 858 | func (l sinceVersionLib) CompileOptions() []EnvOption { |
| 859 | legacy := cost.FixedCostEstimate(*l.legacyCost) |
| 860 | return []EnvOption{ |
| 861 | Function("handoff", Overload("handoff_string", []*Type{StringType}, IntType, |
| 862 | UnaryBinding(func(ref.Val) ref.Val { return types.Int(1) }))), |
| 863 | CostModel(cost.Overload("handoff_string", |
| 864 | cost.EvalCost(cost.Const(7)), |
| 865 | cost.BeforeVersion(1, cost.ManualCost( |
| 866 | func(cost.Estimator, *cost.AstNode, []cost.AstNode) *cost.CallEstimate { |
| 867 | return cost.NewCallEstimate(legacy, nil) |
| 868 | }, |
| 869 | func([]ref.Val, ref.Val) *uint64 { return l.legacyCost }, |
| 870 | )), |
| 871 | cost.BeforeVersion(2, |
| 872 | cost.EvalCost(cost.Const(15)), |
| 873 | cost.ResultSize(cost.Const(1)), |
| 874 | ), |
| 875 | )), |
| 876 | } |
| 877 | } |
| 878 | |
| 879 | func (l sinceVersionLib) ProgramOptions() []ProgramOption { |
| 880 | return nil |
nothing calls this directly
no test coverage detected