Skip to content

Commit 2561e5a

Browse files
committed
aml: handle stores to locals/args
1 parent 37afb69 commit 2561e5a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

aml/src/lib.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,22 @@ where
15541554
_ => panic!(),
15551555
},
15561556
Object::FieldUnit(field) => self.do_field_write(field, object)?,
1557+
Object::Reference { kind, inner } => {
1558+
match kind {
1559+
ReferenceKind::RefOf => todo!(),
1560+
ReferenceKind::LocalOrArg => {
1561+
if let Object::Reference { kind: inner_kind, inner: inner_inner } = &**inner {
1562+
// TODO: this should store into the reference, potentially doing an
1563+
// implicit cast
1564+
todo!()
1565+
} else {
1566+
// Overwrite the value
1567+
*inner.gain_mut() = object.gain_mut().clone();
1568+
}
1569+
}
1570+
ReferenceKind::Unresolved => todo!(),
1571+
}
1572+
}
15571573
Object::Debug => {
15581574
self.handler.handle_debug(&*object);
15591575
}

0 commit comments

Comments
 (0)