Skip to content

[NFC] Factor out ASTContext operator news #38948

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

Merged
merged 1 commit into from
Aug 20, 2021

Conversation

beccadax
Copy link
Contributor

Many, many, many types in the Swift compiler are intended to only be allocated in the ASTContext. We have previously implemented this by writing several operator new and operator delete implementations into these types. Factor those out into a new base class instead.

@beccadax
Copy link
Contributor Author

@swift-ci please smoke test

@beccadax beccadax requested a review from slavapestov August 19, 2021 04:03
@beccadax beccadax force-pushed the the-copypasta-is-stale branch from 1adb80a to 69a05ec Compare August 19, 2021 04:44
@beccadax
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

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

Nice!

Many, many, many types in the Swift compiler are intended to only be allocated in the ASTContext. We have previously implemented this by writing several `operator new` and `operator delete` implementations into these types. Factor those out into a new base class instead.
@beccadax beccadax force-pushed the the-copypasta-is-stale branch from 69a05ec to 59bb325 Compare August 19, 2021 18:21
@beccadax
Copy link
Contributor Author

I guess Microsoft's no-exceptions mode handles operator delete differently from clang's.

@swift-ci please smoke test

@beccadax
Copy link
Contributor Author

@swift-ci please test windows platform

@beccadax beccadax merged commit c517b45 into swiftlang:main Aug 20, 2021
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

Successfully merging this pull request may close these issues.

2 participants