about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2022-11-23T08·32-0800
committerclbot <clbot@tvl.fyi>2022-12-02T13·36+0000
commit3b92ff454f574ce3ece912ebf26790c0228cc48a (patch)
tree370cc0b31c94d6a09b0244591c20338616299679 /tvix/eval/src
parent8eb32fb2d79699ffc429f3bd355958da185cb6d9 (diff)
feat(tvix/eval): inline(always) tail_call_value r/5367
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>
Diffstat (limited to 'tvix/eval/src')
-rw-r--r--tvix/eval/src/vm.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs
index b5f948a96a55..bfca5d59843c 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -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),