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

Generalize AST Flags to a single 4-byte flag #42

Open
Ed94 opened this issue Sep 12, 2023 · 0 comments
Open

Generalize AST Flags to a single 4-byte flag #42

Ed94 opened this issue Sep 12, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request simplification Simplifying the library

Comments

@Ed94
Copy link
Owner

Ed94 commented Sep 12, 2023

Right now there is:

ModuleFlag        ModuleFlags;
union {
	b32           IsFunction;  // Used by typedef to not serialize the name field.
	b32           IsParamPack; // Used by typename to know if type should be considered a parameter pack.
	OperatorT     Op;
	AccessSpec    ParentAccess;
	s32           NumEntries;
};

At the end of the AST data layout. We can simplify the layout to:

CodeFlag CodeFlags;
union {
	OperatorT  Op;
	AccessSpec ParentAccess;
	s32        NumEntries;
};

Where CodeFlag is an enum : u32

This would leave open the ability for others to add their own flags without much hassle.

@Ed94 Ed94 added enhancement New feature or request simplification Simplifying the library labels Sep 12, 2023
@Ed94 Ed94 moved this to Todo in gencpp roadmap Sep 25, 2023
@Ed94 Ed94 self-assigned this Sep 25, 2023
@Ed94 Ed94 removed the status in gencpp roadmap Sep 25, 2023
@Ed94 Ed94 moved this to Todo in gencpp roadmap Sep 25, 2023
@Ed94 Ed94 moved this from Todo to In Progress in gencpp roadmap Nov 21, 2023
@Ed94 Ed94 moved this from In Progress to Todo in gencpp roadmap Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request simplification Simplifying the library
Projects
Status: Todo
Development

No branches or pull requests

1 participant