Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
da55f60
feat(typesystem): register interfaces as data types in the index
volsa Feb 16, 2026
01c666f
refactor(lowering): reorganize polymorphism modules into table/dispat…
volsa Feb 16, 2026
7339508
feat(lowering): generate interface tables (itables) for polymorphic d…
volsa Feb 16, 2026
7348b04
feat(lowering): generate fat pointer struct and replace interface typ…
volsa Feb 16, 2026
0b5d91d
refactor(lowering): use borrowed index/annotations in dispatch lowerers
volsa Feb 16, 2026
bcb964a
feat(lowering): lower concrete POU to interface assignments
volsa Feb 16, 2026
be599b9
feat(lowering): add skeleton tests for call argument lowering
volsa Feb 16, 2026
47f245b
feat(lowering): lower call arguments and assignments with fat pointer…
volsa Feb 17, 2026
f393ae7
feat(lowering): lower interface method calls to indirect itable dispatch
volsa Feb 18, 2026
9d8b076
feat(codegen): register interface methods as implementations for indi…
volsa Feb 18, 2026
e55d2f1
fix(lowering): rewrite interface method params and deref data pointer…
volsa Feb 18, 2026
5ffed38
fix(codegen): register debug types for synthetic structs like __FATPO…
volsa Feb 18, 2026
503e8d4
refactor: reorder AstVisitorMut methods in InterfaceDispatchLowerer
volsa Feb 19, 2026
b2f6274
fix: address clippy warnings and rustfmt formatting
volsa Feb 19, 2026
0769f1e
fix(lowering): hoist call preamble above assignment in interface disp…
volsa Feb 19, 2026
e5eea16
fix: move AggregateTypeLowerer POU signature changes from post_index …
volsa Feb 19, 2026
dfe96a4
fix(lowering): process ExpressionList elements individually in Aggreg…
volsa Feb 19, 2026
20db04a
fix: address clippy warning in AggregateTypeLowerer::map
volsa Feb 19, 2026
a8fda3b
refactor: rename and extend interface polymorphism lit tests
volsa Feb 20, 2026
274b797
test: add multi-file interface polymorphism lit test
volsa Feb 21, 2026
53aff95
refactor: self-review
volsa Feb 21, 2026
a0d4c14
tests: address todo
volsa Feb 22, 2026
28768ef
docs(polymorphism): align draft.md and doc comments with implementation
volsa Feb 22, 2026
cdfc89c
fix(lowering): expand fat pointers for calls returning concrete types
volsa Feb 23, 2026
625a6f8
style(lowering): fix doc list indentation warnings
volsa Feb 23, 2026
c248d20
Merge branch 'master' of github.com:PLC-lang/rusty into vosa/ipolymor…
volsa Feb 23, 2026
7b624e1
fix: tests after merge
volsa Feb 23, 2026
9eb5c9a
fix(codegen): exclude internal types from debug info
volsa Feb 23, 2026
23bdb36
style(codegen): apply rustfmt formatting
volsa Feb 23, 2026
58cc850
test: restrict alignment tests to macos
volsa Feb 23, 2026
85c9a19
Merge branch 'master' into vosa/ipolymorphism
volsa Feb 23, 2026
87ad8e9
refactor(lowering): rewrite interface dispatch lowerer with statement…
volsa Feb 28, 2026
b3e7a24
Merge branch 'master' of https://github.com/PLC-lang/rusty into vosa/…
volsa Mar 3, 2026
b8ed189
fix: resolve merge conflicts with master's initializer refactoring
volsa Mar 3, 2026
c7611d0
refactor: clean up import formatting and remove macOS-specific test c…
volsa Mar 3, 2026
8763a4c
refactor: restore alignment_tests to master state
volsa Mar 3, 2026
a0fd047
feat(polymorphism): enable property dispatch through interface itables
volsa Mar 4, 2026
ae55b63
fix(resolver): resolve inherited properties through interface extensi…
volsa Mar 5, 2026
ee37723
test: add property dispatch tests for POU and interface polymorphism
volsa Mar 6, 2026
cb636f0
fix(resolver): use recursive interface walk for inherited property re…
volsa Mar 9, 2026
ca59262
merge: integrate latest master (struct IEC addresses)
volsa Mar 9, 2026
2faf346
address PR review feedback
volsa Mar 11, 2026
4e21435
Merge branch 'master' into vosa/polymorphism-properties
volsa Mar 11, 2026
49440e0
chore: cargo fmt
volsa Mar 11, 2026
849e2b5
Merge branch 'master' of https://github.com/PLC-lang/rusty into vosa/…
volsa Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/plc_driver/src/pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,12 @@ impl<T: SourceContainer> BuildPipeline<T> {

// XXX: should we use a static array of participants?
let mut_participants: Vec<Box<dyn PipelineParticipantMut>> = vec![
Box::new(PropertyLowerer::new(self.context.provider())),
Box::new(PolymorphismLowerer::new(
self.context.provider(),
self.context.should_generate_external_constructors(),
)),
Box::new(ControlStatementParticipant::new(self.context.provider())),
Box::new(PropertyLowerer::new(self.context.provider())),
Box::new(RetainParticipant::new(self.context.provider())),
Box::new(AggregateTypeLowerer::new(self.context.provider())),
Box::new(InheritanceLowerer::new(self.context.provider())),
Expand Down
356 changes: 314 additions & 42 deletions compiler/plc_lowering/src/tests/inheritance_tests.rs

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,9 @@ impl InterfaceIndexEntry {
.collect()
}

/// Returns a list of ALL existing interfaces this interface extends directly or indirectly
pub fn get_parent_interfaces_recursive<'i>(&self, index: &'i Index) -> Vec<&'i InterfaceIndexEntry> {
/// Returns a list of ALL interfaces in this interface's hierarchy, **including `self`**,
/// as well as all interfaces it extends directly or indirectly.
pub fn get_interface_hierarchy<'i>(&self, index: &'i Index) -> Vec<&'i InterfaceIndexEntry> {
let mut seen: FxHashSet<&Identifier> = FxHashSet::default();
let mut queue: VecDeque<&InterfaceIndexEntry> = VecDeque::new();

Expand Down
3 changes: 1 addition & 2 deletions src/index/tests/interface_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,7 @@ fn find_all_derived_interfaces_directly_or_indirectly() {
let entry = index.find_interface("h").unwrap();

// We expect no failure, even though the relationship is cyclic
let mut derived =
entry.get_parent_interfaces_recursive(&index).iter().map(|it| &it.ident.name).collect_vec();
let mut derived = entry.get_interface_hierarchy(&index).iter().map(|it| &it.ident.name).collect_vec();

derived.sort();
assert_eq!(derived, vec!["a", "b", "c", "d", "e", "f", "g", "h"]);
Expand Down
Loading
Loading