Commit Graph

61 Commits

Author SHA1 Message Date
Chris Lattner
bc005219d1 Implement most of support for properties in function scope, part of rdar://15922884.
Most of the complexity here is teaching SILGen how to handle closed-over direct 
accesses to observing properties, since all of the getter/setter/willSet/didSet
members of the property are actually full closures when in a function body.

We generate correct but really terrible code here, since the setter captures the
willset/didset members themselves.  I'm not worrying about the performance of 
this construct though, functionality is what matters.


Swift SVN r13778
2014-02-11 06:23:14 +00:00
Joe Groff
d78a328c4f AST: Give AnyFunctionRef.h a getInterfaceType() method.
And make its methods all const. getInterfaceType() gives the interface type of an underlying AbstractFunctionDecl.

Swift SVN r10608
2013-11-20 22:30:44 +00:00
Dmitri Hrybenko
0900e992b9 Simplify AnyFunctionRef::getAsDeclContext()
Swift SVN r8322
2013-09-17 01:39:45 +00:00
Dmitri Hrybenko
f1f189f4e0 Rename PipeClosureExpr -> ClosureExpr
Swift SVN r8321
2013-09-17 01:37:36 +00:00
Dmitri Hrybenko
64cb7058e4 Add AnyFunctionRef::getArgParamPatterns()
... and simplify getFuncNaturalUncurryLevel() with it


Swift SVN r8317
2013-09-17 01:13:42 +00:00
Dmitri Hrybenko
a35edf252d AnyFunctionRef: add an assertion that it wraps a non-null AST node
Swift SVN r8312
2013-09-17 00:15:13 +00:00
Dmitri Hrybenko
9636b9fffb Migrate the last use of FuncExprLike to AnyFunctionRef
Swift SVN r8309
2013-09-16 23:54:29 +00:00
Dmitri Hrybenko
b18c38a322 Rename ImplicitClosureExpr -> AutoClosureExpr
Swift SVN r8304
2013-09-16 23:03:50 +00:00
Dmitri Hrybenko
f2cc4cb303 Rename CapturingExpr -> AbstractClosureExpr
Swift SVN r8299
2013-09-16 21:58:44 +00:00
Dmitri Hrybenko
3354dd402b Unify two implementations of TypeChecker::computeCaptures()
Swift SVN r8296
2013-09-16 21:17:00 +00:00
Dmitri Hrybenko
536ed954ad Remove FuncExpr. Add CaptureInfo to FuncDecl. Introduce AnyFunctionRef.
AnyFunctionRef is a universal function reference that can wrap all AST nodes
that represent functions and exposes a common interface to them.  Use it in two
places in SIL where CapturingExpr was used previously.

AnyFunctionRef allows further simplifications in other places, but these will
be done separately.


Swift SVN r8239
2013-09-14 02:15:48 +00:00