about summary refs log tree commit diff
path: root/tvix/eval/src/eval.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-10-03T14·08+0300
committertazjin <tazjin@tvl.su>2022-10-04T21·27+0000
commit2ff764ceb700a1ef18fb532fbbc1ff937ed63f8a (patch)
tree231f0994a80f81d0fa5c2df5a0500738ed4ee0c8 /tvix/eval/src/eval.rs
parentb69b50feb1a1323188cf1f6da2141c5e8d21999a (diff)
refactor(tvix/eval): remove unnecessary clones in compiler r/5034
There's basically nothing that needs *ownership* of an AST
node (which is just a little box full of references to other things
anyways), so we can thread this through as references all the way.

Change-Id: I35a1348a50c0e8e07d51dfc18847829379166fbf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6853
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/eval.rs')
-rw-r--r--tvix/eval/src/eval.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/eval.rs b/tvix/eval/src/eval.rs
index e6199e00b0e2..bc430e58043f 100644
--- a/tvix/eval/src/eval.rs
+++ b/tvix/eval/src/eval.rs
@@ -60,7 +60,7 @@ pub fn interpret(code: &str, location: Option<PathBuf>, options: Options) -> Eva
 
     let result = if options.dump_bytecode {
         crate::compiler::compile(
-            root_expr,
+            &root_expr,
             location,
             file.clone(),
             global_builtins(),
@@ -68,7 +68,7 @@ pub fn interpret(code: &str, location: Option<PathBuf>, options: Options) -> Eva
         )
     } else {
         crate::compiler::compile(
-            root_expr,
+            &root_expr,
             location,
             file.clone(),
             global_builtins(),