diff options
Diffstat (limited to 'tvix/eval/src')
-rw-r--r-- | tvix/eval/src/compiler/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index 34a15330c227..db6031e0a4f8 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -898,7 +898,7 @@ impl Compiler<'_> { /// Compile an expression into a runtime cloure or thunk fn compile_lambda_or_thunk<N, F>( &mut self, - is_thunk: bool, + is_suspended_thunk: bool, outer_slot: LocalIdx, node: &N, content: F, @@ -936,7 +936,7 @@ impl Compiler<'_> { } let lambda = Rc::new(compiled.lambda); - if is_thunk { + if is_suspended_thunk { self.observer.observe_compiled_thunk(&lambda); } else { self.observer.observe_compiled_lambda(&lambda); @@ -945,7 +945,7 @@ impl Compiler<'_> { // If no upvalues are captured, emit directly and move on. if lambda.upvalue_count == 0 { self.emit_constant( - if is_thunk { + if is_suspended_thunk { Value::Thunk(Thunk::new_suspended(lambda, span)) } else { Value::Closure(Closure::new(lambda)) @@ -962,7 +962,7 @@ impl Compiler<'_> { let blueprint_idx = self.chunk().push_constant(Value::Blueprint(lambda)); let code_idx = self.push_op( - if is_thunk { + if is_suspended_thunk { OpCode::OpThunkSuspended(blueprint_idx) } else { OpCode::OpThunkClosure(blueprint_idx) @@ -977,7 +977,7 @@ impl Compiler<'_> { compiled.captures_with_stack, ); - if !is_thunk && !self.scope()[outer_slot].needs_finaliser { + if !is_suspended_thunk && !self.scope()[outer_slot].needs_finaliser { if !self.scope()[outer_slot].must_thunk { // The closure has upvalues, but is not recursive. Therefore no thunk is required, // which saves us the overhead of Rc<RefCell<>> |