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

Method Push

interpreter/frame.go:157–163  ·  view source on GitHub ↗

Push pushes the given activation onto the activation stack and returns the new frame. This operation is internal to the interpreter and is used to handle comprehension scoping. The child frame inherits the shared evalContext from the parent.

(activation Activation)

Source from the content-addressed store, hash-verified

155// This operation is internal to the interpreter and is used to handle comprehension
156// scoping. The child frame inherits the shared evalContext from the parent.
157func (f *ExecutionFrame) Push(activation Activation) *ExecutionFrame {
158 child := frameStack.Get().(*ExecutionFrame)
159 child.parent = f
160 child.ctx = f.ctx
161 child.Activation = activationStack.create(f.Activation, activation)
162 return child
163}
164
165// Pop returns the parent frame, releasing the current frame back to the pool.
166func (f *ExecutionFrame) Pop() *ExecutionFrame {

Callers 10

newFolderFunction · 0.45
TestFrameResolveNameFunction · 0.45
TestFrameParentFunction · 0.45
TestFrameUnwrapFunction · 0.45
TestFramePushPopFunction · 0.45

Calls 2

GetMethod · 0.65
createMethod · 0.45

Tested by 9

TestFrameResolveNameFunction · 0.36
TestFrameParentFunction · 0.36
TestFrameUnwrapFunction · 0.36
TestFramePushPopFunction · 0.36