-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[Dynamic Casting] Overhauled Runtime #33561
Merged
tbkka
merged 15 commits into
swiftlang:master
from
tbkka:tbkka/dynamicCastRework-pt3-Runtime
Aug 27, 2020
Merged
[Dynamic Casting] Overhauled Runtime #33561
tbkka
merged 15 commits into
swiftlang:master
from
tbkka:tbkka/dynamicCastRework-pt3-Runtime
Aug 27, 2020
Commits on Aug 19, 2020
-
This is a completely refactored version of the core swift_dynamicCast runtime method. This fixes a number of bugs, especially in the handling of multiply-wrapped types such as Optional within Any. The result should be much closer to the behavior specified by `docs/DynamicCasting.md`. Most of the type-specific logic is simply copied over from the earlier implementation, but the overall structure has been changed to be uniformly recursive. In particular, this provides uniform handling of Optional, existentials, Any and other common "box" types along all paths. The consistent structure should also be easier to update in the future with new general types. Benchmarking does not show any noticable performance implications. **Temporarily**, the old implementation is still available. Setting the environment variable `SWIFT_OLD_DYNAMIC_CAST_RUNTIME` before launching a program will use the old runtime implementation. This is only to facilitate testing; once the new implementation is stable, I expect to completely remove the old implementation.
Configuration menu - View commit details
-
Copy full SHA for df9a0f4 - Browse repository at this point
Copy the full SHA df9a0f4View commit details
Commits on Aug 24, 2020
-
Streamline casting of nil just a bit
The old `tryCastFromNil` could never fail (hence doesn't need to "try") and doesn't need all the arguments we were giving it.
Configuration menu - View commit details
-
Copy full SHA for fea5309 - Browse repository at this point
Copy the full SHA fea5309View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b23ced - Browse repository at this point
Copy the full SHA 3b23cedView commit details -
Don't memoize the bridging witness for Dictionary
We know this memoization makes a big difference for String, but the wins for Dictionary are less clear. It's easy to add it back later if it proves helpful.
Configuration menu - View commit details
-
Copy full SHA for 2fbb67a - Browse repository at this point
Copy the full SHA 2fbb67aView commit details
Commits on Aug 25, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 4a3b48d - Browse repository at this point
Copy the full SHA 4a3b48dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f312f6d - Browse repository at this point
Copy the full SHA f312f6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e66535 - Browse repository at this point
Copy the full SHA 7e66535View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a3c43b - Browse repository at this point
Copy the full SHA 6a3c43bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b5b5ace - Browse repository at this point
Copy the full SHA b5b5aceView commit details -
Configuration menu - View commit details
-
Copy full SHA for b09b9b9 - Browse repository at this point
Copy the full SHA b09b9b9View commit details
Commits on Aug 26, 2020
-
Mark types that we should never see as "unreachable"
Clarify the unreachable messaging a bit: * "Unexpected" means I knew about it but thought it could never appear here * "Unknown" means I didn't know about it when I wrote this code
Configuration menu - View commit details
-
Copy full SHA for df82a0f - Browse repository at this point
Copy the full SHA df82a0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a2cd863 - Browse repository at this point
Copy the full SHA a2cd863View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2acaa1a - Browse repository at this point
Copy the full SHA 2acaa1aView commit details -
These are not XFAIL for optimized builds because they always force no…
…n-optimized builds
Configuration menu - View commit details
-
Copy full SHA for a7364ee - Browse repository at this point
Copy the full SHA a7364eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a413f0 - Browse repository at this point
Copy the full SHA 0a413f0View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.