diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-17 21:15:54 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-17 21:15:54 +0100 |
| commit | 090dd8c52e4ae60742fe8bad7b74e18bb808ba0d (patch) | |
| tree | 249b5857b5dc8d8be7b89a136405fce50856730a /src/compiler.rs | |
| parent | b205748bde51c551468a8dc89123f85b67c660dd (diff) | |
| download | sylt-090dd8c52e4ae60742fe8bad7b74e18bb808ba0d.tar.gz | |
use enums instead of 2 bools
Diffstat (limited to 'src/compiler.rs')
| -rw-r--r-- | src/compiler.rs | 3 |
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!(); } |
