Commit Graph

20 Commits

Author SHA1 Message Date
Doug Gregor
ef020c74aa Eliminate all vestiges of Substitution and SubstitutionList.
Introduced during the bring-up of the generics system in July, 2012,
Substitution (and SubstitutionList) has been completely superseded by
SubstitutionMap. R.I.P.
2018-05-11 21:43:40 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Joe Groff
a60a52d72e SIL: Add a "builtin" instruction to represent builtin invocations.
Modeling builtins as first-class function values doesn't really make sense because there's no real function value to emit, and modeling them this way complicates passes that work with builtins because they have to invent function types for builtin invocations. It's much more straightforward to have a single instruction that references the builtin by ID, along with the type information for the necessary values, type parameters, and results, so add a new "builtin" instruction that directly represents a builtin invocation. NFC yet.

Swift SVN r22690
2014-10-11 20:34:24 +00:00
John McCall
0ddc7ee5b6 Resilience expansion is not an IR-generation concept.
If a type has to be passed or returned resiliently, it
will necessarily be passed indirectly, which is already
represented in SILFunctionType.  There is no need to
represent this as a separate channel of information.

NFC. Also fixes a problem where the signature cache
for ExtraData::Block was writing past the end of an
array (but into the storage for an adjacent array
which was fortunately never used).

ExtraData should also disappear as a concept, but we're
still relying on that for existential protocol witnesses.

Swift SVN r21548
2014-08-28 23:07:50 +00:00
John McCall
9728a90780 Stop trying to analyze every possible type in
reemitAsUnsubstituted and just bitcast between the
explosion kinds.

Swift SVN r16791
2014-04-25 01:31:15 +00:00
John McCall
d2bea410be Remove reemitAsSubstituted.
Swift SVN r15428
2014-03-24 23:15:50 +00:00
John McCall
a1b469ed2f ExplosionKind -> ResilienceExpansion. NFC.
Swift SVN r12364
2014-01-16 00:25:29 +00:00
Joe Groff
bbe346d004 IRGen: Strip out dead and obstructive function abstraction checks.
These checks should be dead now that abstraction changes are handled in SILGen.

Swift SVN r11639
2013-12-25 22:16:34 +00:00
Joe Groff
f9a5b2cf25 IRGen: Lower the witness polymorphic convention.
Add a new SourceKind for PolymorphicConvention, 'WitnessSelf', which always introduces a final 'Self' metadata argument to the signature and uses it to fulfill all of the generic parameters of the Self type, regardless of the SIL-level polymorphic signature of the function.

Swift SVN r11467
2013-12-19 06:48:08 +00:00
John McCall
20e58dcf93 Change the type of function values in SIL to SILFunctionType.
Perform major abstraction remappings in SILGen.  Introduce
thunking functions as necessary to map between abstraction
patterns.

Swift SVN r10562
2013-11-19 22:55:09 +00:00
Joe Groff
f866e5af25 Revert "IRGen: Pass existentials as generic parameters by unwrapping the container."
This reverts commit r6350. We don't imminently need this and intend to do it right soon.

Swift SVN r6605
2013-07-25 18:38:14 +00:00
Joe Groff
5fe164df07 IRGen: Pass existentials as generic parameters by unwrapping the container.
When an existential's contained type is used as a generic parameter, unwrap the existential container and save its metadata and witnesses to be used as polymorphic arguments.

Our AST representation can't quite express the distinction between a type parameter being satisfied by the existential type itself from being satisfied by the existential's contained yet. I use a goofy heuristic where I assume a protocol type bound to a type variable with no requirements is satisfied by the protocol type itself; this covers all of the existing <T> (Slice<T>, T) cases that come up in the library, while enabling the <T:Foo> (T) cases. This hopefully addresses <rdar://problem/14470097> well enough to unblock library work until we get a solid AST representation of this difference.

Swift SVN r6352
2013-07-18 19:09:19 +00:00
Joe Groff
0566088bf2 Move name mangling into SIL.
Sever the last load-bearing link between SILFunction and SILConstant by naming SILFunctions with their mangled symbol names. Move the core of the mangler up to SIL, and teach SILGen how to use it to mangle a SILConstant.

Swift SVN r4964
2013-04-28 03:32:41 +00:00
John McCall
2353465f3f Add an API for reemitting as a substituted type and change
protocol witnesses over to the new API.  There's some badness
that we're papering over here involving generic types, but
this is a necessary first step.

Swift SVN r3003
2012-10-14 07:36:22 +00:00
John McCall
261731a8aa Make a function for reemitting an unsubstituted explosion
as a substituted one, which is critical for thunk emission.

Swift SVN r2976
2012-10-11 04:29:32 +00:00
John McCall
64c8346afc Promote reemitUnderSubstitutions to API and give it a better
name that makes the direction of substitution clear.

Swift SVN r2975
2012-10-11 04:29:29 +00:00
John McCall
3467e63516 Emit pointers to final overriders of member functions into
the metadata objects for classes.  This is currently only
done for methods defined in the main class body, and it's
(naturally) totally fragile, and it's screwed up in a
couple known ways w.r.t. generic classes:  there's no
thunking when the overrider differs by abstraction from
the overridden method, and methods on classes currently
expect to get all the type arguments passed directly
and thus will disagree in signature from members of
non-generic classes.  Also, of course, we're not using
any of this in the call infrastructure.  But it's progress.

Swift SVN r2901
2012-09-27 06:17:46 +00:00
John McCall
ed38caaa04 Support generic return types, as long as they don't differ
by abstraction from the concrete return type.

This basically gets generic calls working totally as long
as there's no remapping required.

Swift SVN r2402
2012-07-23 07:06:28 +00:00