| 16 | namespace google::api::expr::runtime { |
| 17 | |
| 18 | void EvaluatorStack::Grow() { |
| 19 | const size_t new_max_size = std::max(max_size() * 2, size_t{1}); |
| 20 | ABSL_LOG(ERROR) << "evaluation stack is unexpectedly full: growing from " |
| 21 | << max_size() << " to " << new_max_size |
| 22 | << " as a last resort to avoid crashing: this should not " |
| 23 | "have happened so there must be a bug somewhere in " |
| 24 | "the planner or evaluator"; |
| 25 | Reserve(new_max_size); |
| 26 | } |
| 27 | |
| 28 | void EvaluatorStack::Reserve(size_t size) { |
| 29 | static_assert(alignof(cel::Value) <= __STDCPP_DEFAULT_NEW_ALIGNMENT__); |
nothing calls this directly
no test coverage detected