| 591 | } // namespace runtime_internal |
| 592 | |
| 593 | absl::Status RegisterEqualityFunctions(FunctionRegistry& registry, |
| 594 | const RuntimeOptions& options) { |
| 595 | if (options.enable_heterogeneous_equality) { |
| 596 | if (options.enable_fast_builtins) { |
| 597 | // If enabled, the evaluator provides an implementation that works |
| 598 | // directly on the value stack. |
| 599 | return absl::OkStatus(); |
| 600 | } |
| 601 | // Heterogeneous equality uses one generic overload that delegates to the |
| 602 | // right equality implementation at runtime. |
| 603 | CEL_RETURN_IF_ERROR(RegisterHeterogeneousEqualityFunctions(registry)); |
| 604 | } else { |
| 605 | CEL_RETURN_IF_ERROR(RegisterHomogenousEqualityFunctions(registry)); |
| 606 | |
| 607 | CEL_RETURN_IF_ERROR(RegisterNullMessageEqualityFunctions(registry)); |
| 608 | } |
| 609 | return absl::OkStatus(); |
| 610 | } |
| 611 | |
| 612 | } // namespace cel |