diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-11T08·50+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-08-25T12·07+0000 |
commit | 75a22321ce55512d5f436168a2f913cf9f8f8ee3 (patch) | |
tree | a8d262bfa633226c99435e8aeba0bffdd259247b /tvix/eval/src/vm.rs | |
parent | 4eafaae9e66c66a7765ff3854890039d7536a9b9 (diff) |
feat(tvix/eval): implement list concatenation r/4479
Change-Id: Icdf715d116371a9f139bdf95266410bf967bef25 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6144 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r-- | tvix/eval/src/vm.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index 30f2c5a4a414..540845d2c668 100644 --- a/tvix/eval/src/vm.rs +++ b/tvix/eval/src/vm.rs @@ -151,6 +151,13 @@ impl VM { } OpCode::OpList(count) => self.run_list(count)?, + + OpCode::OpConcat => { + let rhs = self.pop().as_list()?; + let lhs = self.pop().as_list()?; + self.push(Value::List(lhs.concat(&rhs))) + } + OpCode::OpInterpolate(count) => self.run_interpolate(count)?, } |