From 3a79f937951d34c7293bb093e4c21ddc3c2d88fc Mon Sep 17 00:00:00 2001 From: Aspen Smith Date: Fri, 5 Jul 2024 20:50:56 -0400 Subject: refactor(tvix/eval): Construct globals in EvaluationBuilder::build Construct the Rc for the evaluation as part of EvaluiationBuilder::build, rather than deferring it until we actually compile. This changes nothing functionally, but gets us one step closer to sharing this globals map across evaluations. Change-Id: Id92e9fb88d974d763056d4f15ce61962ab776e84 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11957 Tested-by: BuildkiteCI Autosubmit: aspen Reviewed-by: flokli --- tvix/eval/src/compiler/mod.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'tvix/eval/src/compiler/mod.rs') diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index ebc59a0aa035..1ec47599ff9c 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -44,11 +44,6 @@ pub struct CompilationOutput { pub lambda: Rc, pub warnings: Vec, pub errors: Vec, - - // This field must outlive the rc::Weak reference which breaks the - // builtins -> import -> builtins reference cycle. For this - // reason, it must be passed to the VM. - pub globals: Rc, } /// Represents the lambda currently being compiled. @@ -1689,6 +1684,5 @@ pub fn compile( lambda, warnings: c.warnings, errors: c.errors, - globals, }) } -- cgit 1.4.1