Commit Graph

268 Commits

Author SHA1 Message Date
Joe Groff
3d4c1251f1 Rename 'byref' attribute to 'inout'.
Swift SVN r8661
2013-09-25 20:56:52 +00:00
John McCall
03466c12e9 Add an implicit conversion from T to T?.
Swift SVN r8624
2013-09-25 06:40:45 +00:00
John McCall
3ef23d6268 [weak] variables have Optional type.
This contains one significant difference from the design:
previously, you declared:
  var [weak] x : NSObject
and the type of 'x' was implicitly Optional.  This change
in the formal type proved problematic in a number of ways,
and Joe made the excellent suggestion to eliminate it:
so now you have to declare:
  var [weak] x : NSObject?
and [weak] is just a kind of modifier on the storage of the
optional value.  You could argue that this is somewhat
pedantic, but I think it restores a lot of consistency to
the model.

Swift SVN r8538
2013-09-21 00:26:17 +00:00
Adrian Prantl
e3b30dbbf9 Silence a couple more warnings.
Swift SVN r8347
2013-09-17 20:29:13 +00:00
Adrian Prantl
83d7e9d69b silence warnings
Swift SVN r8231
2013-09-14 00:19:06 +00:00
Joe Groff
7c3e1e1dd1 SILGen: Emit semantic-to-storage conversions in implicit struct ctors.
If a struct has [unowned] fields and an implicit elementwise constructor, then the constructor receives a strong reference argument corresponding to the unowned field, and we have to introduce that conversion as part of the construction.

Swift SVN r8207
2013-09-13 20:39:03 +00:00
John McCall
b9dea7f458 Remove the emitSemantic* methods from TypeLowering and
move the corresponding functionality into SILGen.

I've switched around 'assign' so that it's no longer a
semantic assignment --- that is, so that it expects a properly
lowered value as its operand, not an r-value of the semantic
type.  This actually simplifies quite a lot of code and removes
some ugly special-casing from MemoryPromotion.

Swift SVN r7942
2013-09-05 06:44:50 +00:00
John McCall
215ffa5381 Make SILGenFunction methods for stores as well.
Swift SVN r7941
2013-09-05 06:44:48 +00:00
John McCall
a26584584e Move some basic l-values and address operations into SILGenLValue.cpp.
Swift SVN r7940
2013-09-05 06:44:46 +00:00
John McCall
6aae6402ba Refactor in support of semantic vs. storage type differences.
Swift SVN r7939
2013-09-05 06:44:44 +00:00
Anna Zaks
422ab63a38 [SIL] Add proper location when copying a ManagedValue.
Swift SVN r7925
2013-09-05 00:01:54 +00:00
Anna Zaks
115a15830b [SIL] Replace empty locations with valid locations in tuple exploding/encoding and pattern gen code.
Tuple exploding happens during RValue construction, so changed the constructor and addElement() method to take the location parameter. The imploding happens on RValue::forwardAsSingleValue and RValue::getAsSingleValue(). Make sure the right SIL locations are passed to all of these

Also, added some missing locations in pattern matching code.

Swift SVN r7916
2013-09-04 21:57:52 +00:00
Doug Gregor
0554c944a2 Fold GenericSubscriptExpr into SubscriptExpr.
Swift SVN r7845
2013-09-03 16:25:07 +00:00
Doug Gregor
2958f73f63 Fold emitAnyMemberRefExpr() into its own caller.
Swift SVN r7843
2013-09-03 15:51:26 +00:00
Doug Gregor
786f9d299b Fold GenericMemberRefExpr into MemberRefExpr.
MemberRefExpr now uses ConcreteDeclRef to refer to its member, which
includes the substitutions and obviates the need for
GenericMemberRefExpr.


Swift SVN r7842
2013-09-03 15:49:19 +00:00
Dmitri Hrybenko
69cfa73640 More 'this' -> 'self' replacements
Swift SVN r7657
2013-08-28 02:57:21 +00:00
Michael Gottesman
d41b871b3a At Joe's suggestion added the prefix strong to instructions Retain,Release,RetainAutoreleased,RetainUnowned to prevent confusion in between RetainUnowned and UnownedRetain.
This is was a very mechanical patch where I basically first renamed SILNodes.def
and then just kept fixing things until everything compiled, so even though it is
large patch I feel ok(ish) with committing it.

If anyone has any concerns/etc, please email me and I will revert in 1 second.

Swift SVN r7604
2013-08-26 23:32:16 +00:00
Stephen Lin
8d90466523 Reorganize SIL source tree: move lib/SIL/SILGen -> lib/SILGen, move lib/SIL/Passes -> lib/SILPasses, add lib/SILPasses/Utils
Swift SVN r7246
2013-08-14 23:47:29 +00:00