Commit Graph

1510 Commits

Author SHA1 Message Date
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