about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/mod.rs
diff options
context:
space:
mode:
authorAspen Smith <root@gws.fyi>2024-02-10T17·39-0500
committerclbot <clbot@tvl.fyi>2024-02-13T16·49+0000
commit7e286aab1a573edc9aef16bb68e9907371917adc (patch)
treef3e9aeb1ac674800ed13dbb0bfacddfb50dd372e /tvix/eval/src/compiler/mod.rs
parentdd261773192d0928571f806892d8065fbba1cf2d (diff)
feat(tvix/eval): Box Value::Catchable r/7508
This is now the only enum variant for Value that is larger than 8
bytes (it's 16 bytes), so boxing it (especially since it's not
perf-critical) allows us to get the Value size down to only 16 bytes!

Change-Id: I98598e2b762944448bef982e8ff7da6d6683c4aa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10798
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: aspen <root@gws.fyi>
Diffstat (limited to 'tvix/eval/src/compiler/mod.rs')
-rw-r--r--tvix/eval/src/compiler/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index 0a9ee2320b1d..d64202c2ad74 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -399,9 +399,9 @@ impl Compiler<'_> {
             // TODO: decide what to do with findFile
             if raw_path.len() == 2 {
                 return self.emit_constant(
-                    Value::Catchable(CatchableErrorKind::NixPathResolution(
+                    Value::Catchable(Box::new(CatchableErrorKind::NixPathResolution(
                         "Empty <> path not allowed".into(),
-                    )),
+                    ))),
                     node,
                 );
             }