Add object-oriented records example
This commit is contained in:
@@ -472,9 +472,12 @@ impl Optimizer {
|
||||
|
||||
for (old_idx, capture_addr) in original_upvalues.iter().enumerate() {
|
||||
let mut inlined_val = None;
|
||||
if let Some(val) = sub.get_value(capture_addr) {
|
||||
if !sub.assigned.contains(capture_addr)
|
||||
&& let Some(val) = sub.get_value(capture_addr)
|
||||
{
|
||||
inlined_val = Some(val.clone());
|
||||
}
|
||||
|
||||
if let Address::Local(slot) = capture_addr {
|
||||
sub.captured_slots.insert(*slot);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user