Skip to content

Support nested classes (#4178) - #5778

Merged
wsnyder merged 2 commits into
verilator:masterfrom
antmicro:nested-classes
Feb 17, 2025
Merged

Support nested classes (#4178)#5778
wsnyder merged 2 commits into
verilator:masterfrom
antmicro:nested-classes

Conversation

@kamilrakoczy

Copy link
Copy Markdown
Member

Fixes #4178.

This PR enable initial support for nested classes.

Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
@kamilrakoczy
kamilrakoczy requested a review from wsnyder February 14, 2025 15:12
@wsnyder wsnyder changed the title Enable initial support for nested classes Support for nested classes (#4178) Feb 14, 2025
@wsnyder wsnyder changed the title Support for nested classes (#4178) Support nested classes (#4178) Feb 14, 2025

@wsnyder wsnyder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, I especially appreciate the good testing.

In what ways is this only "initial" vs "complete"? (I'm surprised there weren't more back end and optimizer changes needed.)

Comment thread src/V3WidthCommit.cpp
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
@kamilrakoczy

Copy link
Copy Markdown
Member Author

In what ways is this only "initial" vs "complete"?

I think, that it is quite complete. I've added tests for nested classes with parameters, extends, new function, access to member variables/functions, access to outer local/protected, static/virtual methods.

I added initial as I think there still might be corner cases, where nested classes might not work correctly.

@wsnyder
wsnyder merged commit c840ffb into verilator:master Feb 17, 2025
@kamilrakoczy
kamilrakoczy deleted the nested-classes branch February 17, 2025 12:50
magancarz pushed a commit to antmicro/verilator that referenced this pull request Mar 5, 2025
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support nested classes

2 participants