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

Method Call

eval/eval/evaluator_core.h:375–386  ·  view source on GitHub ↗

Move pc to a subexpression. Unlike a `Call` in a programming language, the subexpression is evaluated in the same context as the caller (e.g. no stack isolation or scope change) Only intended for use in built-in notion of lazily evaluated subexpressions.

Source from the content-addressed store, hash-verified

373 // Only intended for use in built-in notion of lazily evaluated
374 // subexpressions.
375 void Call(size_t slot_index, size_t subexpression_index) {
376 ABSL_DCHECK_LT(subexpression_index, subexpressions_.size());
377 ExecutionPathView subexpression = subexpressions_[subexpression_index];
378 ABSL_DCHECK(subexpression != execution_path_);
379 size_t return_pc = pc_;
380 // return pc == size() is supported (a tail call).
381 ABSL_DCHECK_LE(return_pc, execution_path_.size());
382 call_stack_.push_back(SubFrame{return_pc, slot_index, execution_path_,
383 value_stack().size() + 1});
384 pc_ = 0UL;
385 execution_path_ = subexpression;
386 }
387
388 EvaluatorStack& value_stack() { return *value_stack_; }
389

Callers 2

TESTFunction · 0.80
EvaluateMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by 1

TESTFunction · 0.64