Skip to content

[Constant Evaluator] Support debug-stdlib, improve diagnostics and support assertionFailure #27205

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

Conversation

ravikandhadai
Copy link
Contributor

Add support to the constant evaluator for:

  1. builtin "int_expect", which makes the evaluator work on more integer operations such as left/right shift (with traps) and integer conversions.

  2. builtin "_assertConfiguration", which enables the evaluator to work with debug stdlib.

  3. builtin "ptrtoint", which enables the evaluator to track StaticString

  4. _assertionFailure API, which enables the evaluator to report stdlib assertion failures encountered during constant evaluation.

Also, enable attaching auxiliary data with the enum "UnknownReason" and use it to improve diagnostics for UnknownSymbolicValues, which represent failures during constant evaluation.

1. builtin "int_expect", which makes the evaluator work on more
integer operations such as left/right shift (with traps) and
integer conversions.

2. builtin "_assertConfiguration", which enables the evaluator
to work with debug stdlib.

3. builtin "ptrtoint", which enables the evaluator to track
StaticString

4. _assertionFailure API, which enables the evaluator to report
stdlib assertion failures encountered during constant evaluation.

Also, enable attaching auxiliary data with the enum "UnknownReason"
and use it to improve diagnostics for UnknownSymbolicValues,
which represent failures during constant evaluation.
@ravikandhadai
Copy link
Contributor Author

@swift-ci Please test

@ravikandhadai ravikandhadai merged commit fa5b0f3 into swiftlang:master Sep 18, 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.

1 participant