aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler.rs')
-rw-r--r--src/compiler.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler.rs b/src/compiler.rs
index c0dacec..c70640d 100644
--- a/src/compiler.rs
+++ b/src/compiler.rs
@@ -923,8 +923,7 @@ impl Compiler {
};
add_op(self, block, Op::Link(slot));
if let Value::Function(_, block) = &self.constants[slot] {
- let needs_linking = block.borrow().upvalues.len() != 0;
- block.borrow_mut().constant = needs_linking;
+ block.borrow_mut().mark_constant();
} else {
unreachable!();
}