Skip to content

Conversation

@CodaFi
Copy link
Contributor

@CodaFi CodaFi commented May 12, 2020

This required moving aside the hacks that necessitated mutating these options outside of the frontend.

For LangOptions, -experimental-skip-function-bodies was silently disabling itself if the module under scrutiny was SwiftOnoneSupport. Push this computation into the frontend and warn about it.

For TypeCheckerOptions the main offender was the expression checker's debugging flags. For these, add a bit to ConstraintSystemFlags and convert the save-and-restore patterns to use that instead. A beneficial behavior where constraint debugging was turned off for loaded modules is being emulated by plumbing the notion of the "main module" into ModuleDecl itself.

@CodaFi CodaFi requested a review from xedin May 12, 2020 00:22
@CodaFi
Copy link
Contributor Author

CodaFi commented May 12, 2020

@swift-ci test

@CodaFi CodaFi requested a review from harlanhaskins May 12, 2020 00:22
Copy link
Contributor

@harlanhaskins harlanhaskins left a comment

Choose a reason for hiding this comment

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

Do we need to change the CMake to avoid passing this to SwiftOnoneSupport?

@CodaFi
Copy link
Contributor Author

CodaFi commented May 12, 2020

Do we need to change the CMake to avoid passing this to SwiftOnoneSupport?

I'll get it in a follow-up.

@CodaFi CodaFi force-pushed the const-of-proportionality branch from c153241 to c1db4be Compare May 12, 2020 01:35
@CodaFi
Copy link
Contributor Author

CodaFi commented May 12, 2020

@swift-ci smoke test

@CodaFi
Copy link
Contributor Author

CodaFi commented May 12, 2020

@swift-ci test Windows

@swiftlang swiftlang deleted a comment from swift-ci May 12, 2020
@swiftlang swiftlang deleted a comment from swift-ci May 12, 2020
@CodaFi CodaFi requested a review from hborla May 12, 2020 18:55
CodaFi added 4 commits May 13, 2020 09:13
…bodies

This allows us to push the validation and, importantly, the mutation of this flag into the compiler invocation where it belongs.
The constraint system will need this if it wants to disable debug mode for serialized modules
This eliminates the final source of mutation of the TypeCheckerFlags on the ASTContext.
@CodaFi CodaFi force-pushed the const-of-proportionality branch from c1db4be to 2bca013 Compare May 13, 2020 16:14
@CodaFi
Copy link
Contributor Author

CodaFi commented May 13, 2020

@swift-ci smoke test

@CodaFi
Copy link
Contributor Author

CodaFi commented May 13, 2020

@swift-ci clean smoke test Linux platform

@CodaFi
Copy link
Contributor Author

CodaFi commented May 13, 2020

@CodaFi CodaFi merged commit d82880a into swiftlang:master May 13, 2020
@CodaFi CodaFi deleted the const-of-proportionality branch May 13, 2020 20:36
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