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

Method Evaluate

eval/eval/create_list_step.cc:53–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51};
52
53absl::Status CreateListStep::Evaluate(ExecutionFrame* frame) const {
54 if (list_size_ < 0) {
55 return absl::Status(absl::StatusCode::kInternal,
56 "CreateListStep: list size is <0");
57 }
58
59 if (!frame->value_stack().HasEnough(list_size_)) {
60 return absl::Status(absl::StatusCode::kInternal,
61 "CreateListStep: stack underflow");
62 }
63
64 Value result;
65 CEL_RETURN_IF_ERROR(DoEvaluate(frame, &result));
66
67 frame->value_stack().PopAndPush(list_size_, std::move(result));
68 return absl::OkStatus();
69}
70
71absl::Status CreateListStep::DoEvaluate(ExecutionFrame* frame,
72 Value* result) const {

Callers 1

EvaluateMethod · 0.45

Calls 5

HasEnoughMethod · 0.80
PopAndPushMethod · 0.80
CustomListValueClass · 0.50
PushMethod · 0.45
arenaMethod · 0.45

Tested by

no test coverage detected