Commit Graph

67 Commits

Author SHA1 Message Date
Pavel Yaskevich
f6b0d2d2cf [ABI/IRGen] Add custom function parameter flags representation for metadata use 2017-11-06 11:16:46 -08:00
Pavel Yaskevich
51d9542a2a [Reflection] Add label and flags to function type reference parameters 2017-10-16 16:46:45 -07:00
Pavel Yaskevich
3f58daba4a [RemoteAST] Extend MetadataReader to collect flags related to function parameters 2017-10-16 16:46:45 -07:00
Greg Parker
dd38ace506 [runtime] Fix more const cast warnings. (#11725)
* [runtime] Fix more const cast warnings.
2017-09-05 13:13:01 -07:00
Slava Pestov
23ded3cf6f Reflection: Fix crash when reflecting existential with fileprivate protocol member
Fixes <rdar://problem/31661662>, <rdar://problem/31668126>,
and probably many other crashes with the same backtrace.
2017-05-04 15:45:35 -07:00
Slava Pestov
f3761c1c2e Reflection: Update for subclass existentials and primitive AnyObject 2017-05-02 02:23:08 -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
Slava Pestov
c6c6d5859d Reflection: Fixes for deriveSubstitutions() patch
Somehow ninja didn't rebuild everything, so I ended up pushing code
that didn't compile. I did a clean re-build and fixed a minor issue
in the logic, now the test passes.
2016-05-05 22:54:29 -07:00
Slava Pestov
73b1bd8f4e Reflection: Add TypeRef::deriveSubstitutions()
When deriving substitutions from closure contexts, we end up with
a problem where we have an original type and a substituted type,
and the original type is not necessarily a type parameter.
We need to decompose the original and substituted types to derive
the substitutions that produced the substitution.

For example, deriveSubstitutions(Foo<T -> Int>, Foo<String -> Int>)
will give us a substitution of T := Int.
2016-05-05 22:28:48 -07:00
Slava Pestov
a62d414086 Reflection: Add TypeRef::isConcreteAfterSubstitutions()
This is needed for closure context layout.
2016-05-05 22:28:48 -07:00
Slava Pestov
5858756651 Reflection: Correct handling of nested types in TypeRef substitution 2016-05-05 22:28:48 -07:00
practicalswift
8e3ba900b0 [gardening] Fix recently introduced headers. 2016-05-01 12:59:13 +02:00
David Farler
bfed7d0e01 unittest/Reflection: Test that TypeRefs remain unique after substitution
A TypeRef for C<T, U>, substituted to C<Int, Int>, should have the same
pointer identity as a C<Int, Int> created by other means. This prevents
repeating reflective layout work if we've already seen a particular
instantiation of a generic type.
2016-04-28 15:14:00 -07:00
David Farler
8e0412f84f Don't include Parent pointer in Nominal/BoundGeneric TypeRef uniquing
This information is already in the mangled type name.
2016-04-26 01:11:31 -07:00
David Farler
defe2b17a2 Include WasAbstract flag when uniquing MetatypeTypeRef 2016-04-26 00:11:46 -07:00
David Farler
50440abcd0 TypeRef Uniquing
We'd like to be able to compare TypeRefs with pointer equality,
but we can't link LLVMSupport, so make a lightweight TypeRefID
like FoldingSetID, that only supports the input types necessary
to unique TypeRefs.

rdar://problem/25924875
2016-04-25 23:56:28 -07:00