prog is the internal implementation of the Program interface.
| 171 | |
| 172 | // prog is the internal implementation of the Program interface. |
| 173 | type prog struct { |
| 174 | *Env |
| 175 | evalOpts EvalOption |
| 176 | defaultVars Activation |
| 177 | dispatcher interpreter.Dispatcher |
| 178 | interpreter interpreter.Interpreter |
| 179 | interruptCheckFrequency uint |
| 180 | |
| 181 | // Intermediate state used to configure the InterpretableDecorator set provided |
| 182 | // to the initInterpretable call. |
| 183 | plannerOptions []interpreter.PlannerOption |
| 184 | regexOptimizations []*interpreter.RegexOptimization |
| 185 | |
| 186 | // Interpretable configured from an Ast and aggregate decorator set based on program options. |
| 187 | interpretable interpreter.InterpretableV2 |
| 188 | observable *interpreter.ObservableInterpretable |
| 189 | callCostEstimator interpreter.ActualCostEstimator |
| 190 | costOptions []interpreter.CostTrackerOption |
| 191 | costLimit *uint64 |
| 192 | |
| 193 | // hasAsync indicates the planned expression contains an asynchronous function call, which can |
| 194 | // only be resolved by ConcurrentEval. |
| 195 | hasAsync bool |
| 196 | |
| 197 | // Async evaluation configuration used by ConcurrentEval. |
| 198 | drainStrategy async.DrainStrategy |
| 199 | asyncObserver async.Observer |
| 200 | asyncCompletionBufferSize int |
| 201 | asyncMaxConcurrency int |
| 202 | } |
| 203 | |
| 204 | // scanOptTargets walks the AST once and reports whether the Optimize() |
| 205 | // decorator (needOpt) and the regex-constant compiler (needRegex) have any |
nothing calls this directly
no outgoing calls
no test coverage detected