Skip to content

[Constant Evaluator] Add support for interpreting SIL code with partial applies (i.e., closure creations). #27640

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

A new SymbolicValue: SymbolicClosure represents a closure. It
tracks the SILFunction corresponding to the target of the closure
and the SIL and Symbolic Values of the captured arguments. The
representation does not impose that all captured values must have an
associated symbolic value. This allows the evaluator to track
creations of closures whose captured arguments or bodies are not
constant evaluable.

This commit does not add support for closure applications. It only
adds suppport for closure creations, which correspond to partial_apply
instructions in SIL.

partial applies (i.e., closure creations).

A new SymbolicValue: SymbolicClosure represents a closure. It
tracks the SILFunction corresponding to the target of the closure
and the SIL and Symbolic Values of the captured arguments. The
representation does not impose that all captured values must have an
associated symbolic value. This allows the evaluator to track
creations of closures whose captured arguments or bodies are not
constant evaluable.

This commit does not add support for closure applications. It only
adds suppport for closure creations, which correspond to partial_apply
instructions in SIL.
@ravikandhadai
Copy link
Contributor Author

@swift-ci Please test

@ravikandhadai ravikandhadai merged commit d037183 into swiftlang:master Oct 14, 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