feat(tvix/eval): inline(always) tail_call_value

Rust doesn't do tail-call elimination (still!) so the best we can
hope for here is to inline non-recursive invocations.

Change-Id: I78949967e48b006fcbf31786d8f6281cd122f36f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7360
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: Adam Joseph <adam@westernsemico.com>
This commit is contained in:
Adam Joseph 2022-11-23 00:32:55 -08:00 committed by clbot
parent 8eb32fb2d7
commit 3b92ff454f

View file

@ -304,6 +304,7 @@ impl<'o> VM<'o> {
Ok(res)
}
#[inline(always)]
fn tail_call_value(&mut self, callable: Value) -> EvalResult<()> {
match callable {
Value::Builtin(builtin) => self.call_builtin(builtin),