feat(tvix/eval): implement tail-calling of __functor attributes

This implements __functor calling in situations where `OpTailCall` is
used, but not yet for `OpCall`.

For some reason I have not yet figured out, this same implementation
does not work in call_value, which means that it also doesn't yet work
in builtins that apply functions.

Change-Id: I378f9065ac53d4c05166a7d0151acb1f55c91579
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6826
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2022-09-29 23:58:53 +03:00 committed by clbot
parent c1d8cee215
commit 8336577c41
3 changed files with 39 additions and 19 deletions

View file

@ -0,0 +1 @@
42

View file

@ -0,0 +1 @@
{ x = 21; __functor = self: y: self.x * y; } 2