Introduced during the bring-up of the generics system in July, 2012,
Substitution (and SubstitutionList) has been completely superseded by
SubstitutionMap. R.I.P.
This flag supports promoting KeyPath access violations to an error in
Swift 4+, while building the standard library in Swift 3 mode. This is
only necessary as long as the standard library continues to build in
Swift 3 mode. Once the standard library build migrates, it can all be
ripped out.
<rdar://problem/40115738> [Exclusivity] Enforce Keypath access as an error, not a warning in 4.2.
No major change in execution time, but why make things more
complicated than they need to be? It does make
SILInstructionResultArray::begin drop out of the top ten functions in
the inverted call stack (not counting performLLVM).
In a non-rigorous test, this change shaves off 20% of the time spent
in SIL optimizations for the standard library in a +Asserts build.
(Admittedly the wins for a no-asserts build will be much lower because
SILInstructionResultArray has a bunch of assertions in its
constructor.)
Replace the tail-allocated Substitution arrays with a SubstitutionMap.
This only affects the internal representation of the instructions, not their
constructors or serialization.
Now that SubstitutionMap is used in so many places, reduce it's header
dependencies by moving SubstitutionMap::Storage into its own separate
implementation header. Use forward declarations of other entities
(GenericSignature, Substitution) instead.
Good for build times and general sanity.
There isn't a clean cut point here, so switch
GenericSpecializationInformation from SubstitutionList to
SubstitutionMap and carry along dual SubstitutionMap/SubstitutionList
representations for a small part of ReabstractionInfo.
The class contains two inline operator overloads which are marked as
friends. These overloads actually will be promoted to a global
function. MSVC will not mark them as friends resulting in access to the
members being lost. Explicitly mark the overloads as friends. This is
needed by LLDB.
Rename `Base` to `InstBase`. This is needed to help MSVC disambiguate
the typename from the enumerator member in certain specializations. The
SILInstruction is used in LLDB and when building with MSVC would fail
due to an ambiguous resolution.
The pattern we see for noescape closure passed to objective c is different:
There is the additional without actually escaping closure sentinel.
rdar://39682865
Mandatory pass will clean it up and replace it by a copy_block and
is_escaping/cond_fail/release combination on the %closure in follow-up
patches.
The instruction marks the dependence of a block on a closure that is
used as an 'withoutActuallyEscaping' sentinel.
rdar://39682865
Centralize the logic for finding a callee while ignoring conversions. We already
use getCalleeFunction() in many places, but sometimes you want to know if the
callee is a partial_apply.
This may be a functional change because the existing getCalleeFunction() helper
now uses the new helper, which also looks through ConvertEscapeToNoescape.