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.
| 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 |