MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Exec

Method Exec

ext/bindings.go:228–238  ·  view source on GitHub ↗

Exec implements the Interpretable interface method and pushes a new frame onto the execution frame for the duration of the block execution.

(frame *interpreter.ExecutionFrame)

Source from the content-addressed store, hash-verified

226// Exec implements the Interpretable interface method and pushes a new frame onto the
227// execution frame for the duration of the block execution.
228func (b *dynamicBlock) Exec(frame *interpreter.ExecutionFrame) ref.Val {
229 sa := b.slotActivationPool.Get().(*dynamicSlotActivation)
230 sa.frame = frame.Push(sa)
231 // Ensure the 'unwrapped' Activation points to the original one from the frame,
232 // and not the hierarchical activation which composes the original and the slot
233 // activation.
234 sa.Activation = frame.Activation
235 defer sa.frame.Pop()
236 defer b.clearSlots(sa)
237 return b.expr.Exec(sa.frame)
238}
239
240// Eval implements the Interpretable interface method.
241func (b *dynamicBlock) Eval(activation cel.Activation) ref.Val {

Callers 1

EvalMethod · 0.95

Calls 5

clearSlotsMethod · 0.95
GetMethod · 0.65
ExecMethod · 0.65
PushMethod · 0.45
PopMethod · 0.45

Tested by

no test coverage detected