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

Method PerformTestOnlySelect

eval/eval/select_step.cc:250–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250absl::Status SelectStep::PerformTestOnlySelect(ExecutionFrame* frame,
251 const Value& arg) const {
252 switch (arg.kind()) {
253 case ValueKind::kMap: {
254 Value result;
255 TestOnlySelect(arg.GetMap(), field_value_, frame->descriptor_pool(),
256 frame->message_factory(), frame->arena(), &result);
257 frame->value_stack().PopAndPush(std::move(result));
258 return absl::OkStatus();
259 }
260 case ValueKind::kMessage: {
261 Value result;
262 TestOnlySelect(arg.GetStruct(), field_, frame->descriptor_pool(),
263 frame->message_factory(), frame->arena(), &result);
264 frame->value_stack().PopAndPush(std::move(result));
265 return absl::OkStatus();
266 }
267 default:
268 // Control flow should have returned earlier.
269 return InvalidSelectTargetError();
270 }
271}
272
273absl::StatusOr<bool> SelectStep::PerformSelect(ExecutionFrame* frame,
274 const Value& arg,

Callers

nothing calls this directly

Calls 10

TestOnlySelectFunction · 0.85
InvalidSelectTargetErrorFunction · 0.85
ErrorValueFunction · 0.85
PopAndPushMethod · 0.80
kindMethod · 0.45
GetMapMethod · 0.45
descriptor_poolMethod · 0.45
message_factoryMethod · 0.45
arenaMethod · 0.45
GetStructMethod · 0.45

Tested by

no test coverage detected