| 180 | }; |
| 181 | |
| 182 | inline 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 | |
| 202 | Value NoOverloadResult(absl::string_view name, |
| 203 | absl::Span<const cel::Value> args, bool receiver_style, |
no test coverage detected