Skip to content

Conversation

@ravikandhadai
Copy link
Contributor

@ravikandhadai ravikandhadai commented Mar 12, 2020

Fix the symbolic-closure folding code to create new closures only when all captures of the symbolic closure, including address-typed captures, are symbolic constants. In all other cases, the closure must be an autoclosure passed to the log call and therefore it need not be duplicated
and can be reused as such.

This eliminates the need to copy the non-constant captured values of
closures. Instead the closure itself is copied as a whole.

Fixes rdar://problem/60344043

cc @meg-gupta

new closures when all captures of the symbolic closure, including address-typed
captures, are symbolic constants. For other closures, they must have been
autoclosures passed to the log call and therefore they need not be duplicated
but reused as such.

This eliminates the need to copy_value the non-constant captured values of
closures. Instead the closure itself is copied as a whole.

Fixes <rdar://problem/60344043>
@ravikandhadai
Copy link
Contributor Author

@swift-ci Please test and merge

@ravikandhadai
Copy link
Contributor Author

@swift-ci Please smoke test Linux Platform

2 similar comments
@ravikandhadai
Copy link
Contributor Author

@swift-ci Please smoke test Linux Platform

@ravikandhadai
Copy link
Contributor Author

@swift-ci Please smoke test Linux Platform

@ravikandhadai ravikandhadai merged commit c315bff into swiftlang:master Mar 13, 2020
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