Commit Graph

2657 Commits

Author SHA1 Message Date
Chris Lattner
42d0fdadcf - Introduce the ability for attributes to be inverted with !.
- Switch @mutable to be a tri-state attribute that is invertable with @!mutable.
- Move the semantic form of 'mutable' to being a bit on FuncDecl instead of
  something in DeclAttrs.  The former is a binary bit, the later is a tristate
  which differentiates between "not present", "present and set" "present and inverted".
- Diagnose some invalid uses of @mutable, e.g. on class methods.
- Make setters default to mutable, and allow them to be switched with @!mutable.



Swift SVN r11439
2013-12-18 21:38:53 +00:00
Chris Lattner
51862b91fd rename the inout decl attribute (not the type attribute) to @mutating.
Swift SVN r11416
2013-12-18 04:44:56 +00:00
Chris Lattner
b11903a6fc Reject calls to inout methods on rvalues and 'let' values.
Many thanks to Doug for helping with the constraint solver magic.


Swift SVN r11391
2013-12-17 21:15:44 +00:00
Doug Gregor
61318e33f0 Compute potential bindings with the help of the constraint graph.
Rather than performing a two-pass walk over all of the constraints in
the system to attach them to type variables, use the existing type
variable -> constraints mapping in the constraint graph to make this a
faster single-pass process. Also clarify the type bindings a little
bit. Improves type checking time for the standard library by ~3%.



Swift SVN r11098
2013-12-10 23:25:37 +00:00
Doug Gregor
79f8175e0b Solver: Keep track of a solution's score as we're computing it.
No functionality change here; just staging for some future optimizations.


Swift SVN r11028
2013-12-09 17:12:07 +00:00
Doug Gregor
5bb053c0dd Fix renamed file names
Swift SVN r11017
2013-12-09 14:20:33 +00:00
Doug Gregor
ee545e9f68 Rename TypeCheckConstraintsFoo.cpp to CSFoo.cpp.
It's more idiomatic and easier to type.


Swift SVN r11015
2013-12-09 14:09:54 +00:00