MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / Invoke

Function Invoke

eval/eval/function_step.cc:182–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180};
181
182inline absl::StatusOr<Value> Invoke(
183 const cel::FunctionOverloadReference& overload, int64_t expr_id,
184 absl::Span<const cel::Value> args, ExecutionFrameBase& frame) {
185 cel::Function::InvokeContext context(frame.descriptor_pool(),
186 frame.message_factory(), frame.arena());
187 if (overload.descriptor.is_contextual()) {
188 context.set_embedder_context(frame.embedder_context());
189 }
190
191 CEL_ASSIGN_OR_RETURN(Value result,
192 overload.implementation.Invoke(args, context));
193
194 if (frame.unknown_function_results_enabled() &&
195 IsUnknownFunctionResultError(result)) {
196 return frame.attribute_utility().CreateUnknownSet(overload.descriptor,
197 expr_id, args);
198 }
199 return result;
200}
201
202Value NoOverloadResult(absl::string_view name,
203 absl::Span<const cel::Value> args, bool receiver_style,

Callers 3

DoEvaluateMethod · 0.85
EvaluateMethod · 0.85
InvokeMethod · 0.85

Calls 9

is_contextualMethod · 0.80
set_embedder_contextMethod · 0.80
descriptor_poolMethod · 0.45
message_factoryMethod · 0.45
arenaMethod · 0.45
embedder_contextMethod · 0.45
CreateUnknownSetMethod · 0.45

Tested by

no test coverage detected