Includes enums in all their flavors, plus swift_wrapper structs.
Planned future content:
- Methods, initializers, properties
- "Omit-needless-words" rules
- NSError
- Boolean properties
- Inferred default arguments
- Factory methods as initializers
- Protocols (mainly just that they check for collision)
- CF types (low-priority since non-Apple people can't make them)
- Custom names, including import-as-member and import-as-accessor
- swift_private
This commit adds docs for copy_unmanaged_value to SIL.rst as requested by
@eeckstein in #26839. I noticed while doing the PR that copy_unowned_value was
also not documented, so I added docs for it as well as a bonus. = ).
This commit introduces a CMake target for each component, adds install targets
for them, and switches build-script-impl to use the target `install-components`
for installation. Each of the targets for each component depends on each
of the individual targets and outputs that are associated with the
corresponding swift-component.
This is equivalent to what already exists, because right now install rules are
only generated for components that we want to install. Therefore, this commit
should be an NFC.
This is a resubmission (with modifications) of an earlier change. I originally
committed this but there were problems with some installation rules.
In case of a tuple as value type, the initializer and setter takes the tuple elements as separate arguments. This was just not handled in the assign_by_wrapper instruction lowering.
rdar://problem/53866473
`partial_apply` does not own `@inout_aliasable` arguments, so the original description "the closure does however take ownership of the partially applied arguments" is not accurate. This patch makes things clear.
This flag adds diagnostic names to the end of their messages, e.g. 'error: cannot convert value of type '[Any]' to specified type '[Int]' [cannot_convert_initializer_value]'. It's intended to be used for debugging purposes when working on the compiler.
This adds documentation to build the android SDK (standard library,
libdispatch, foundation, and XCTest) for Android on Windows. This is
pretty bare abut provides a line in the sand from where we can improve
the documentation for cross-compilation, building just the SDK, and
android specific items.
When mangling a dependent protocol conformance ref, the mangler currently uses `0_` to mean an unknown index and `N_` to mean the index `N - 1`. Unfortunately, this is somewhat confused: `0_` is actually the mangling for index 1, and index 0 is supposed to be mangled as just `_`, so true indexes are actually offset by 2. So the first thing to do here is to clarify what's going on throughout the mangler, demangler, and ABI documentation.
Also, the demangler attempts to produce a `DependentProtocolConformance*` node with the appropriate child nodes and an optional index payload. Unfortunately, demangle nodes cannot have both children and a value payload, so whenever it creates a node with an index payload, the demangler will assert. It does this whenever the mangled index is not 0; since (per above) the mangler always produces a non-zero mangled index in this production, the demangler will always assert when processing these. So clearly this is well-tested code, since +asserts builds will always trigger the demangler when mangling a name in the first place. To fix this, we need to make the index a child of the mangling node instead of its payload; at the same time, we can make it store the semantically correct index value and just introduce a new `UnknownIndex` node to handle the `0_` case. This is easy because all current clients ignore this information.
Finally, due to an apparent copy-and-paste error, the demangler attempts to produce a `DependentProtocolConformanceRoot` node for associated protocol conformances; this is easily resolved.
This fixes the crash in SR-10926 (rdar://51710424). The obscurity of this crash --- which originally made us think it might be related to Error self-conformance --- is because it is only triggered when a function signature takes advantage of a concrete-but-dependent retroactive conformance, which (to be both concrete and dependent) must furthermore be conditional. Testing the other cases besides a root conformance requires an even more obscure testcase.
These options do not make sense just in the type checker section since they can
also be used to diagnose why SIL passes emit diagnostics as well.
Since the prose was originally written, I also added an additional option to
assert on the first warning emitting. I added that to the documentation.
Our mangling did not encode if an Objective-C block was escaping or
not. This is not a huge problem in practice, but for debug info we
want type reconstruction to round-trip exactly. There was a previous
workaround to paper over this specific problem.
Remove the workaround, and add a new 'XL' mangling for escaping
blocks. Since we don't actually want to break ABI compatibility,
only use the new mangling in DWARF debug info.
Add a manifesto which describes where the build infrastructure is slowly
evolving to. Although a good chunk of the necessary work to enable this
is already in the tree, this helps explain the desired state to everyone
working on the project.