From 8513a58b37ffb032a621fb25d5952f6d4df27872 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 21 Jan 2023 14:10:12 +0300 Subject: docs(tvix/eval): update some outdated comments These don't apply anymore since the "antidote-CL". Change-Id: I40ee73ef43d44bbfc650a8fe6c2b33263dd06959 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7890 Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/eval/src/compiler/mod.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index a552f50b5e..99e1d4c53c 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -46,10 +46,9 @@ pub struct CompilationOutput { pub warnings: Vec, pub errors: Vec, - // This field must outlive the rc::Weak reference which breaks - // the builtins -> import -> builtins reference cycle. - // - // TODO: ensure through compiler + // 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, } @@ -1266,10 +1265,6 @@ pub fn prepare_globals( // builtins contain themselves (`builtins.builtins`), which we // can resolve by manually constructing a suspended thunk that // dereferences the same weak pointer as above. - // - // This is an inefficient hack, but *if* anyone was to use - // `builtins.builtins`, it would only happen once as the thunk - // is then resolved. let weak_globals = weak.clone(); builtins.insert( "builtins", -- cgit 1.4.1