Skip to content
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

id->class is not consistently defined #72

Open
HPCguy opened this issue Oct 6, 2021 · 3 comments
Open

id->class is not consistently defined #72

HPCguy opened this issue Oct 6, 2021 · 3 comments

Comments

@HPCguy
Copy link
Contributor

HPCguy commented Oct 6, 2021

id->class is 0 for passed parameters vs. class 'Par' or 'Loc'. There may be other inconsistencies for other storage types.

@jserv
Copy link
Owner

jserv commented Oct 6, 2021

id->class is 0 for passed parameters vs. class 'Par' or 'Loc'. There may be other inconsistencies for other storage types.

Can you make a list of proposed changes to improve the consistency?

@HPCguy
Copy link
Contributor Author

HPCguy commented Oct 7, 2021

Yes. I may pick up this ticket in the next few weeks. There is a lot of detail work to make everything consistent. It probably won't be a lot of code changes (15-30 lines?), but I (or whoever takes this on) will have to check every corner of the code to make sure they have it right. After it is done though, it will greatly increase the power of working with class-types, and maybe types in general.

@HPCguy
Copy link
Contributor Author

HPCguy commented Oct 7, 2021

The issue is that id->class needs to be (1) set to non-zero when an identifier is defined/instantiated and (2) zero valued when an identifier is referenced but not yet instantiated/defined. This knowledge is especially useful in a one pass compiler like AMACC when generating IR. For instance, Labels can be used by goto statements before the Label appears in the source code stream.

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

No branches or pull requests

2 participants