Skip to content

Comments

introduce FieldState#12980

Merged
RazvanN7 merged 1 commit intodlang:masterfrom
WalterBright:FieldState
Aug 16, 2021
Merged

introduce FieldState#12980
RazvanN7 merged 1 commit intodlang:masterfrom
WalterBright:FieldState

Conversation

@WalterBright
Copy link
Member

This refactoring is because state needed to be carried around for bit fields is more than what is needed for regular fields. So replace the offset parameter with fieldState. The bit field PR will just add more to FieldState.

Doing it as a separate refactoring to practice what I preach :-)

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#12980"

@WalterBright WalterBright force-pushed the FieldState branch 4 times, most recently from f49cfdd to dbbe036 Compare August 16, 2021 02:00
@WalterBright WalterBright requested a review from ibuclaw as a code owner August 16, 2021 02:00
Copy link
Member

@ibuclaw ibuclaw left a comment

Choose a reason for hiding this comment

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

Headers aren't quite right, but rest looks fine.

src/dmd/attrib.h Outdated
const char *kind() const;
bool oneMember(Dsymbol **ps, Identifier *ident);
void setFieldOffset(AggregateDeclaration *ad, unsigned *poffset, bool isunion);
void setFieldOffset(AggregateDeclaration *ad, FieldState *fieldState, bool isunion);
Copy link
Member

Choose a reason for hiding this comment

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

It's a ref, not a pointer.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@RazvanN7 RazvanN7 merged commit f0eedb4 into dlang:master Aug 16, 2021
@WalterBright WalterBright deleted the FieldState branch August 16, 2021 09:44
ibuclaw added a commit that referenced this pull request Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants