Skip to content

stop using PyAttr everywhere #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Roger-luo opened this issue Feb 18, 2025 · 0 comments · Fixed by #308
Closed

stop using PyAttr everywhere #270

Roger-luo opened this issue Feb 18, 2025 · 0 comments · Fixed by #308
Labels
attribute IR attribute changes dialect: py python statement dialect related issues

Comments

@Roger-luo
Copy link
Member

A confusion has been PyAttr accepting random Python objects but this is actually not legit.

For example, list should use a ListAttr because what it means by compile-time value is slightly different from a runtime object - when at compile-time we can say the hash(list) is returning the object id because it is compile-time constant, but at runtime this is not hashable or should be composing all its elements to perform the expensive hash.

@Roger-luo Roger-luo added attribute IR attribute changes dialect: py python statement dialect related issues labels Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attribute IR attribute changes dialect: py python statement dialect related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant