close
Skip to content

Closure reflection#2452

Closed
slavapestov wants to merge 8 commits intoswiftlang:masterfrom
slavapestov:closure-reflection-part-1
Closed

Closure reflection#2452
slavapestov wants to merge 8 commits intoswiftlang:masterfrom
slavapestov:closure-reflection-part-1

Conversation

@slavapestov
Copy link
Copy Markdown
Contributor

No description provided.

@slavapestov
Copy link
Copy Markdown
Contributor Author

@swift-ci Please test

Remote metadata for closure contexts points to a capture descriptor.
We have a local copy of all capture descriptors. Translate the
address by recording the local and remote start address of
reflection metadata.
This adds various MetadataReader methods to support closure layout:
- Reading generic arguments from metadata
- Reading parent metadata
- Reading capture descriptor from heap metadata

To a large extent, this is not currently taken advantage of, because
SILGen always wraps address-only captures in SIL box types.

Tests are in the next patch.
@slavapestov slavapestov force-pushed the closure-reflection-part-1 branch from 0436633 to d96ee50 Compare May 9, 2016 07:42
…nce()

Also add end-to-end tests for this finally, and fix a bug in
the SwiftReflectionTest library where we would give up on an
module completely if it did not have a field metadata section.
This is of course wrong if the module defines closures but
not nominal types.
@slavapestov slavapestov force-pushed the closure-reflection-part-1 branch from d96ee50 to 4518888 Compare May 9, 2016 07:44
@slavapestov
Copy link
Copy Markdown
Contributor Author

@swift-ci Please test

@slavapestov slavapestov changed the title Closure reflection (part 1) Closure reflection May 9, 2016
@slavapestov slavapestov closed this May 9, 2016
@slavapestov slavapestov deleted the closure-reflection-part-1 branch May 27, 2016 06:02
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