Commit Graph

12 Commits

Author SHA1 Message Date
Kavon Farvardin
102ccbc70b Test: updates for NoncopyableGenerics
These tests of the type system are being updated because of the new
presence of Copyable and Escapable conformances & conformance
requirements.
2024-03-14 23:10:44 -07:00
Kavon Farvardin
f296d8e158 NCGenerics: mass XFAIL tests
It's easier to get a handle on regressions while working through
failures if the tests that are known to not pass are XFAIL'd for
NoncopyableGenerics.
2024-02-20 18:26:05 -05:00
Slava Pestov
4d097da73c RequirementMachine: Re-use requirement machines constructed by minimization for queries
Fixes rdar://problem/88135641.
2022-03-26 00:56:41 -04:00
Slava Pestov
5404754cb7 RequirementMachine: More concise printed output for concrete type and superclass symbols
Types cannot contain Terms, so the Symbol representation uses
GenericTypeParameterTypes whose index refers to an array of
"substitution" Terms.

We can (ab)use the PrintOptions.AlternateTypeNames mechanism
to print those GenericTypeParamTypes as if they were Terms.
2022-02-16 16:27:40 -05:00
Slava Pestov
f06f59a18a RequirementMachine: Generalize relations so they look more like rules 2022-01-13 00:02:31 -05:00
Slava Pestov
3a92d2fc53 AST: Remove legacy GSB-based GenericSignature query implementation 2022-01-12 12:33:34 -05:00
Slava Pestov
be772cc74b RequirementMachine: Layout requirement implied by superclass is now handled in the property map 2022-01-05 22:41:03 -05:00
Slava Pestov
a4e848f598 RequirementMachine: New way of modeling layout requirement implied by superclass requirement
A superclass requirement implies a layout requirement. We don't
want the layout requirement to be present in the minimal
signature, so instead of adding a pair of requirements:

    T.[superclass: C<X, Y>] => T
    T.[layout: _NativeClass] => T

Add this pair of requirements:

    T.[superclass: C<X, Y>] => T
    [superclass: C<X, Y>].[layout: _NativeClass] => [superclass: C<X, Y>] [permanent]

Completion then derives the rule as a consequence:

    T.[layout: _NativeClass] => T

Since this rule is a consequence of the other two rules, homotopy
reduction will mark it redundant.
2021-11-10 00:18:18 -05:00
Slava Pestov
1057b56395 RequirementMachine: Rename HomotopyGenerator to RewriteLoop
Also, stop talking about 2-cells and 3-cells.
2021-10-27 01:28:24 -04:00
Slava Pestov
8850380896 RequirementMachine: Update tests for change in -dump-requirement-machine output 2021-09-24 08:59:51 -04:00
Slava Pestov
fe2f42bc72 RequirementMachine: Rename -debug-requirement-machine flag to -dump-requirement-machine 2021-08-19 22:14:58 -04:00
Slava Pestov
f39a0a888f RequirementMachine: Use the correct predicate to determine if a class uses Objective-C reference counting
Also, introduce the layout requirement implied by a superclass requirement
when lowering requirements, instead of when building the property map.

Right now this is functionally equivalent, but if we ever start to
test properties by checking for joinability of T with T.[p] instead of
looking at the property map entry of T, this new formulation is the
right one.
2021-08-04 01:24:00 -04:00