Eli Friedman
4ca443d0f5
Add OneOfDecl; use it as a DeclContext for OneOfElementDecls instead of OneOfType, and get rid of the implicit TypeAliasDecl. Add TypeDecl as a base class for OneOfDecl and TypeAliasDecl (and StructDecl, once we have it). Adjust a whole bunch of stuff to this new scheme.
...
Swift SVN r1774
2012-05-08 21:09:42 +00:00
Eli Friedman
c2868d6d0a
Make local oneofs not crash in IRGen. <rdar://problem/11292678>.
...
Swift SVN r1743
2012-05-04 18:20:51 +00:00
Eli Friedman
0241d0ec20
Implement IRGen for local function decls. Known limitations at the moment: currying is unimplemented, and capturing the decl is unimplemented.
...
Swift SVN r1647
2012-04-26 01:16:38 +00:00
Eli Friedman
ae08edf5bb
Do a bit of naming cleanup in IRGen. Make sure closure IRgen doesn't get confused when we capture something other than a variable.
...
Swift SVN r1644
2012-04-25 23:47:57 +00:00
John McCall
93e02410ef
Move IRGenFunction::getGlobal into the l-value code.
...
Swift SVN r1628
2012-04-25 08:36:28 +00:00
John McCall
113aa3d1ff
Fix the emission of MemberRefExpr l-values and getter/setter
...
pairs in extensions. The AST here is a little wierd; I don't
really get why there needs to be a PatternBindingDecl here.
It's easy enough to ignore.
Swift SVN r1592
2012-04-24 09:36:58 +00:00
John McCall
6cdecc020c
Make all the subscripting getters/setters go down the same path.
...
This intentionally changes the mangling of variable getters and
setters so that we can have a reproducible mangling that doesn't
depend on things like the variables names, which is important
for resilience. It's not currently important for subscripting,
although equally I see no reason to mangle in the subscript
pattern name.
Swift SVN r1590
2012-04-24 09:04:54 +00:00
John McCall
85fecab3b1
Reorganize the emission of a call site so that it's abstracted over
...
exactly how the arguments are emitted. Introduce a new code path
which emits arguments from existing Explosions (possibly of the wrong
resilience level). Use that code path to implement getter/setter
code for MemberRefExpr l-values. This is just a checkpoint for the
latter two parts, but the ApplyExpr path is working correctly in the
new framework, which is worth a commit.
Swift SVN r1589
2012-04-24 08:16:51 +00:00
Eli Friedman
be602fcd05
Get rid of the implicit BraceStmt for the TranslationUnit; instead, have the TranslationUnit directly store a list of decls.
...
Swift SVN r1521
2012-04-20 00:17:13 +00:00
Eli Friedman
d5e7784010
Get rid of isModuleScope bit, since we don't like scattering bits across the AST; as a replacement, introduce TopLevelCodeDecl, which provides a DeclContext for all expressions and statements at the top level. <rdar://problem/11259941>.
...
Swift SVN r1503
2012-04-19 21:22:12 +00:00
Doug Gregor
b6140f3b2c
Teach IR generation that there are no global subscript operations
...
Swift SVN r1498
2012-04-19 20:42:36 +00:00
Doug Gregor
06881faea2
Introduce an AST node for subscript declarations, and verify that the bodies of the getter and setter are being type-checked.
...
Swift SVN r1496
2012-04-19 20:29:48 +00:00
Eli Friedman
4848072285
Add a hack which makes us run the initializers for "true" and "false" in script mode and REPL mode. <rdar://problem/11256886>
...
Swift SVN r1494
2012-04-19 19:04:28 +00:00
Eli Friedman
dc213bca76
Implement basic REPL under swift -repl. Known demo-blockers: need error recovery, need better brace/paren handling, need to implement the "print" part of REPL.
...
Swift SVN r1452
2012-04-18 00:52:11 +00:00
John McCall
6b1a0a2de4
Merge GenLocal.cpp and GenGlobal.cpp.
...
Swift SVN r1386
2012-04-11 03:39:01 +00:00