Skip to content

[Constant evaluator] Add support for destructure_tuple and destructure_struct instructions to the constant evaluator. #25133

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
May 30, 2019

Conversation

ravikandhadai
Copy link
Contributor

No description provided.

destructure_struct instructions to the constant evaluator.
@ravikandhadai
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 2c97b72

@@ -1370,6 +1370,23 @@ ConstExprFunctionState::evaluateFlowSensitive(SILInstruction *inst) {
return None;
}

if (isa<DestructureTupleInst>(inst) || isa<DestructureStructInst>(inst)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you could probably do this in a more general way, but I think for now this is fine.

@ravikandhadai
Copy link
Contributor Author

@swift-ci Please test macOS Platform

@ravikandhadai ravikandhadai merged commit 29a8dbf into swiftlang:master May 30, 2019
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.

3 participants