Commits

Chris Lattner committed 4f4c698ed6a
Change 'self' to be an rvalue instead of an lvalue in non-@mutating struct methods. This does not including properties and subscripts, but covers the bulk of the change. The implication of this is that the compiler now rejects mutations of self in a non-@mutating method, and rejects attempts to call a @mutating method from a non-@mutating method. Along with this: - Fix a refcounting bug in SILGenExpr where I emitted multiple releases in the rvalue member_ref_expr case, which was exposed by the testsuite now that rvalues are being used a lot more. - Change a few native binding things in objc/Foundation to understand that String is passed by value now when calling size() and that you can't take the address of self in a non-mutating method (this should probably pass the components by value instead of passing &self, for better performance). I filed rdar://15726720 to track this. - Update a ton of testcases. We now don't materialize nearly as much as we used to. - Brutalize the test/stdlib/Getopt.swift testcase to work, now that the "GetoptLongOptions().noArgument("foo")" builder pattern doesn't work anymore (noArgument is a @mutating method, which isn't allowed on an rvalue temporary). Swift SVN r11662