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:
parent
8eb32fb2d7
commit
3b92ff454f
1 changed files with 1 additions and 0 deletions
|
@ -304,6 +304,7 @@ impl<'o> VM<'o> {
|
||||||
Ok(res)
|
Ok(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
fn tail_call_value(&mut self, callable: Value) -> EvalResult<()> {
|
fn tail_call_value(&mut self, callable: Value) -> EvalResult<()> {
|
||||||
match callable {
|
match callable {
|
||||||
Value::Builtin(builtin) => self.call_builtin(builtin),
|
Value::Builtin(builtin) => self.call_builtin(builtin),
|
||||||
|
|
Loading…
Reference in a new issue