Commit Graph

12 Commits

Author SHA1 Message Date
Saleem Abdulrasool d281b98220 litter the tree with llvm_unreachable
This silences the instances of the warning from Visual Studio about not all
codepaths returning a value.  This makes the output more readable and less
likely to lose useful warnings.  NFC.
2018-09-13 15:26:14 -07:00
Roman Levenstein 0a865ca92d Properly set the alignment for archetypes with layout constraints of Trivial types. 2017-09-20 16:39:40 -07:00
Slava Pestov 67b235490b AST: Print AnyObject layout constraint as ': AnyObject' and not ': _Class' 2017-05-01 17:33:05 -07:00
practicalswift 00ba5dc248 [gardening] Fix typos 2017-04-02 16:23:45 +02:00
Roman Levenstein 2f91ee197d Add a syntax to express the new _Class and _Native class layout constraints
The syntax is "T: _Class" and "T: _NativeClass".
2017-03-24 16:32:23 -07:00
Roman Levenstein e1403c6dc2 [GSB] Improve handling of layout constraints
This PR addresses TODOs from #8241.

- It supports merging for layout constraints, e.g., if both a _Trivial constraint and a _Trivial(64) constraint appear on a type parameter, we keep only _Trivial(64) as a more specific layout constraint. We do a similar thing for ref-counted/native-ref-counted. The overall idea is to keep the more specific of two compatible layout constraints.
- The presence of a superclass constraint implies a layout constraint, e.g., a superclass constraint implies _Class or _NativeClass
2017-03-22 16:39:02 -07:00
Roman Levenstein 4e2262944d Extend the representation of layout constraints
- Add support for _Class and _NativeClass layout constraints, which are supposed to represent T: Superclass and P: class constraints in the future.
- Use the re-factoring to also reduce the number of dynamic allocations when creating layout constraints. Simple non-parametrized layout constraints are now represented as statically allocated singletons (static members of LayoutConstraintInfo).
2017-03-22 16:37:38 -07:00
Roman Levenstein e5d5d7d5fd Some LayoutConstraint improvements.
This biggest change is:
- LayoutConstraintInfo is now a FoldingSetNode, which allows for proper canonicalization of LayoutConstraints. This is important for the correctness of type comparisons if types contain layout constraints.

No functionality changes from the client's point of view.
2017-02-07 17:03:11 -08:00
practicalswift 7e48c04277 [gardening] Fix inconsistent headers. 2017-01-21 10:59:10 +01:00
practicalswift 157fa60371 [gardening] Fix invalid Swift URLs. 2017-01-21 10:33:27 +01:00
Hugh Bellamy 2445862e1b FIx recently introduced MSVC control path warnings 2017-01-14 12:40:41 +00:00
Roman Levenstein 94e6a34b32 Define datatypes to represent layout constraints. 2017-01-11 19:17:45 -08:00