You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This reworks attributes to use a system like the Ctx trait for attribute types. This would allow us to use a single get call with any type of attribute. This system currently has a few issues:
The Attr struct is currently used to parse attributes, but is pretty useless otherwise.
Ideally, we would like to be able to give different sets of attributes for different attribute contexts (ports vs components).
@rachitnigam Currently attribute types are specified in the utils directory but that doesn't seem right. I could also move them to ast instead if that seems more reasonable but they are also used in IR...
I don't have strong opinions on where they should live! The utils separation is probably because they are included by both ast and ir but we don't want to include ir in ast.
Yup, definitely agree with not including ir in AST. My main worry is that although the attribute traits and stuff could go into utils, the actual attributes themselves are somewhat tied to Filament and my impression of utils was that they should be "language-agnostic" compiler utilities... Maybe I will move attribs to AST.
No, the utils are utilities for the Filament compiler infrastructure. I don't think it is specifically architected to contained truly agnostic utilities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reworks attributes to use a system like the
Ctxtrait for attribute types. This would allow us to use a singlegetcall with any type of attribute. This system currently has a few issues:TheAttrstruct is currently used to parse attributes, but is pretty useless otherwise.Ideally, we would like to be able to give different sets of attributes for different attribute contexts (ports vs components).