diff options
author | Griffin Smith <root@gws.fyi> | 2022-10-23T16·25-0400 |
---|---|---|
committer | grfn <grfn@gws.fyi> | 2022-10-23T17·39+0000 |
commit | 89aee6443c0211759480911f3e4f9a7ce9eb2423 (patch) | |
tree | 5c9540c5e42fbaf61c03241113a4f85b4bfc3902 /tvix/eval/src/builtins/mod.rs | |
parent | d4569cb5046882dd5d4c8f3b187d167119186fa5 (diff) |
fix(tvix/eval): Use natural arg order for call_with r/5187
Since we push arguments onto a stack when calling multi-argument functions, we actually were ending up calling `call_with` with the arguments in the *reverse order* - we patched around this by passing the arguments in the reverse order for `foldl'`, but it makes more sense to have them just be the order that the function would be called with in user surface code instead. Change-Id: Ifddb98f46970ac89872383709c3ce758dc965c65 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7067 Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/builtins/mod.rs')
-rw-r--r-- | tvix/eval/src/builtins/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index 073edf8ffb7a..ecd19213c3b3 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -277,7 +277,7 @@ fn pure_builtins() -> Vec<Builtin> { let mut res = args.pop().unwrap(); let op = args.pop().unwrap(); for val in list { - res = vm.call_with(&op, [val, res])?; + res = vm.call_with(&op, [res, val])?; res.force(vm)?; } |