ExecutionFrame provides the context for a single evaluation of an expression. The execution frame must not be stored in any fashion as its lifecycle is completely controlled by the CEL evaluation process.
| 73 | // The execution frame must not be stored in any fashion as its lifecycle is completely |
| 74 | // controlled by the CEL evaluation process. |
| 75 | type ExecutionFrame struct { |
| 76 | // parent provides the context for parent scopes (used for comprehension iterators and nested blocks). |
| 77 | parent *ExecutionFrame |
| 78 | |
| 79 | // scope provides the local activation for this frame (e.g. comprehension folder, block slots, or input Activation). |
| 80 | scope Activation |
| 81 | |
| 82 | // functions supplies the late-bound function implementations for the evaluation, resolved |
| 83 | // once from the input activation. Scopes introduced during evaluation never supply function |
| 84 | // bindings, so a child frame inherits this value from its parent rather than resolving again. |
| 85 | functions FunctionActivation |
| 86 | |
| 87 | // vars holds map-based input variables directly on the frame to eliminate pool allocations. |
| 88 | vars map[string]any |
| 89 | |
| 90 | // lazyVars caches evaluations of lazy variables (func() any / func() ref.Val) in vars. |
| 91 | lazyVars map[string]any |
| 92 | |
| 93 | // ctx provides the shared evaluation state across frames. |
| 94 | ctx *evalContext |
| 95 | |
| 96 | // costTracker provides direct access to the active CostTracker for this evaluation pass. |
| 97 | costTracker *CostTracker |
| 98 | } |
| 99 | |
| 100 | // Scope returns the local activation scope for this frame, if present. |
| 101 | func (f *ExecutionFrame) Scope() Activation { |
nothing calls this directly
no outgoing calls
no test coverage detected