This is yet another waypoint on the path towards the final
generic-metadata design. The immediate goal is to make the
pattern a private implementation detail and to give the runtime
more visibility into the allocation and caching of generic types.
The key path pattern needs to include a reference to the external descriptor, along with hooks for lowering its type arguments and indices, if any. The runtime will need to instantiate and interpolate the external component when the key path object is instantiated.
While we're here, let's also reserve some more component header bytes for future expansion, since this is an ABI we're going to be living with for a while.
This is mostly intended to be used for testing at this point; in the
long run, we want to be using availability information to decide
whether to weak-link something or not. You'll notice a bunch of FIXMEs
in the test case that we may not need now, but will probably need to
handle in the future.
Groundwork for doing backward-deployment execution tests.
Within conformance records, reference Objective-C class objects
indirectly so the runtime can update those references appropriately.
We don't need to do this for classes with Swift metadata.
Fixes the ABI-affecting part of rdar://problem/36310179.
This new format more efficiently represents existing information, while
more accurately encoding important information about nested generic
contexts with same-type and layout constraints that need to be evaluated
at runtime. It's also designed with an eye to forward- and
backward-compatible expansion for ABI stability with future Swift
versions.
It queried for [transparent] [serialized] definitions and only had an effect
when the module was compiled with -Onone because we remove [serialized]
as part of the optimizer pipeline.
It was causing bad effects when the module we imported from was compiled
with -Onone:
The definition would be marked internal in said module.
and the importing module is compile with -O:
The definition would be marked as available_externally.
because neither would guaranteed the presence of a definition of the
imported symbol available to the importer.
rdar://35100697
Use the KeyPath implementation's new support for instantiating and dealing with captures to lower the generic context required to dispatch computed accessors with dependent generics.
Rather than pretend that the requirement signature of a protocol is a
full, well-formed generic signature that one can meaningfully query,
treat it as a flat set of requirements. Nearly all clients already did
this, but make it official. NFC
Also, add a third [serializable] state for functions whose bodies we
*can* serialize, but only do so if they're referenced from another
serialized function.
This will be used for bodies synthesized for imported definitions,
such as init(rawValue:), etc, and various thunks, but for now this
change is NFC.
Hoist alloc_stack instructions of 'generic' or resilient type to the entry
block. At the same time also perform a very simple stack coloring analysis.
This does not use a true liveness-analysis yet but rather employs some simple
conservative checks to see whether the live ranges of two alloc_stacks might
interfere.
AllocStackHoisting is an IRGen SIL pass. This allows for using IRGen's type
lowering information. Furthermore, hoisting and merging the alloc_stack
instructions this late does not interfere with SIL optimizations because the
resulting SIL never gets serialized.
This pipeline is run as part of IRGen and has access to the IRGenModule.
Passes that run as part of this pipeline can query for the IRGenModule.
We will use it for the AllocStackHoisting pass. It wants to know if a type is of
non-fixed size.
To break the cyclic dependency between IRGen -> SILOptimizer -> IRGen that would
arise from the SILPassManager having to know about the createIRGENPASS()
function IRGen passes instead of exposing this function dynamically have to add
themselves to the pass manager.
This is useful in -i and REPL modes, which do not have a separate linking
step. This version of the -l flag doesn't rely on TranslationUnit. I also
cleaned up the library-loading diagnostics.
Swift SVN r9488
-disable-llvm-optzns in clang tells the frontend to do everything it would
normally do at lets say -O2, except run the actual LLVM IR passes on the
resulting IR. This is useful in the case where one wants to look at the result
of a non gauranteed SIL optimization pass at the IR level without llvm
optimizations applied.
Swift SVN r8594
and lexical scopes, which can be enabled through the new -g option.
When -g is enabled, line tables and scopes compile all the way
down to DWARF.
Changes to SIL:
- In addition to a SILLocation, every instruction now also has a pointer
to a SILDebugScope (its containing lexical scope).
- Added LexicalScope, which is to be used for all Scopes we want to show
up in the debug info.
Swift SVN r5772
When generating IR for the JIT, use sel_registerName() to unique the
selector references we generate. Static code doesn't need this
pessimization. Fixes <rdar://problem/12764732>.
Swift SVN r3403