John McCall
080b7dfabf
Remove the default handle-all Decl and DeclAttribute
...
cases from ASTVisitor and privatize SILGen's statement
emitter. NFC.
Swift SVN r26402
2015-03-22 03:22:45 +00:00
Jordan Rose
727a7eb77a
Attributes: Use class names in the DAK_* enum instead of attribute spellings.
...
This allows for single attributes that can be spelled multiple ways.
No functionality change.
Swift SVN r18993
2014-06-18 23:28:28 +00:00
Ted Kremenek
ad2afaeb34
Start serializing out DeclAttribute objects using generalized serialization logic.
...
To generalize our serialization logic for more attributes, serialize
each DeclAttribute object in a separate bitcode record.
For simple declaration attributes (no arguments), all of this
serialization logic can be fully automatically generated, and is
done so in this patch. This currently includes @final, but will
expand over time.
To illustrate the plumbing end-to-end, move the serialization logic
for asmnmame over to the new mechanism.
Swift SVN r15933
2014-04-04 08:52:32 +00:00
Doug Gregor
be3ec6359a
Make DeclAttributes visitable via an AST visitor.
...
Swift SVN r15900
2014-04-03 22:57:15 +00:00
Argyrios Kyrtzidis
84e20a0620
[AST] Break down IdentTypeRepr to different subtypes.
...
This makes memory allocation for it more efficient and it's more convenient to handle.
Swift SVN r12541
2014-01-18 20:19:09 +00:00
Argyrios Kyrtzidis
a70eff6609
Introduce TypeRepr and related subclasses, that is a representation of a type as written in source.
...
This the first part for improving source location fidelity for types,
changes to follow:
-The Parser will not create any types, it will just create TypeReprs.
-The type checker will create the types by going through TypeReprs.
-IdentifierType will be removed.
Swift SVN r6112
2013-07-10 14:58:52 +00:00
Joe Groff
554b8f4d12
AST: Fix up ASTVisitor's argument support.
...
Missed a few places where the extra args needed to be forwarded.
Swift SVN r3578
2012-12-21 21:16:34 +00:00
Joe Groff
6378e4312d
AST: Allow ASTVisitors to add visit() args.
...
Allow an ASTVisitor subtype to have additional arguments to visit(T *, Args...) forwarded down to its instance methods.
Swift SVN r3569
2012-12-21 02:37:08 +00:00
Ted Kremenek
0e5ff44b27
Add boilerplate for the *start* of Swift CFGs. Nothing to look at yet. Major WIP.
...
Swift SVN r2506
2012-08-02 21:21:03 +00:00
John McCall
0cd849b19c
Complete the pattern-matching IR emission logic,
...
at least for exhaustive patterns.
Swift SVN r1359
2012-04-10 08:28:31 +00:00
John McCall
95f97e89ea
The DeclRetTy of an ASTVisitor is the third argument.
...
Swift SVN r1266
2012-03-26 06:08:16 +00:00
Chris Lattner
7c2da880e1
Put 'Expr' in the right place.
...
Swift SVN r1197
2012-03-11 14:54:43 +00:00
Chris Lattner
672801980d
enhance ASTVisitor for expressions to automatically synthesize visit methods for nodes
...
that are not handled by a visitor. Make their implementation chain up to a parent node's
implementation. For example, a (silly) visitor could choose to just implement visitExpr
and get all nodes.
Swift SVN r1194
2012-03-11 14:47:16 +00:00
John McCall
d74f17259c
Incremental getterization of Decl.h.
...
Swift SVN r882
2011-11-18 00:17:20 +00:00
Chris Lattner
7e96d0d53e
embrace macro metaprogramming for decls.
...
Swift SVN r867
2011-11-10 22:08:46 +00:00
John McCall
344fe891da
Macro metaprogramming for Stmt nodes.
...
Swift SVN r726
2011-09-23 23:32:07 +00:00
John McCall
cf0da63bbc
A couple more unreachables.
...
Swift SVN r725
2011-09-23 21:59:16 +00:00
John McCall
ef8b77b718
Use Expr metaprogramming.
...
Swift SVN r723
2011-09-23 21:53:39 +00:00
John McCall
b2facdae4b
Getterize Stmt.h.
...
Swift SVN r720
2011-09-20 07:07:53 +00:00
John McCall
02e47ed9ce
Privatize Expr's Ty and Kind members; introduce getters and setters.
...
Swift SVN r716
2011-09-19 22:00:20 +00:00
Chris Lattner
8eaddc1cda
AST support for floating point literals.
...
Swift SVN r707
2011-09-15 21:37:46 +00:00
Chris Lattner
77237852d2
implement a.x syntax for using elements of a protocol.
...
Swift SVN r704
2011-09-11 17:39:45 +00:00
John McCall
54ff2ccf4a
Lop the last word off ModuleDecl and TranslationUnitDecl.
...
Swift SVN r693
2011-09-06 21:43:46 +00:00
John McCall
4a0f713e62
Progress towards a builtin module.
...
Swift SVN r682
2011-09-03 05:35:49 +00:00
Chris Lattner
a838f412f4
eliminate ProtocolFuncElementDecl, just use FuncDecl instead.
...
Swift SVN r668
2011-09-01 18:17:12 +00:00
Chris Lattner
70bbb65241
make ProtocolType a DeclContext, add AST and trivial sema support for
...
ProtocolFuncElementDecl, the first thing we will allow in a protocol.
Swift SVN r664
2011-08-31 23:31:42 +00:00
Chris Lattner
4c9b8ecf11
add ast and sema support for unary operators. We need some serious AST refactoring
...
to unify our representation of calls, which I'll do later.
Swift SVN r570
2011-08-19 22:40:26 +00:00
John McCall
ddd134854e
Rename ApplyExpr to CallExpr and change the signature of SemaCallExpr.
...
Swift SVN r523
2011-08-12 17:31:14 +00:00
Chris Lattner
ce6f6a83cd
add AST support for WhileStmt. This isn't important, but is easy to add.
...
Swift SVN r501
2011-08-11 20:33:34 +00:00
Chris Lattner
433d6de807
implement AST and parser support for 'return'. We're still not doing a conversion
...
to a return type yet though. We happily diagnose thigns like this as an error:
func foo() -> int {
return 4 5
}
Swift SVN r493
2011-08-03 23:19:24 +00:00
Chris Lattner
c86e786ab5
switch langref to new func syntax, switch implementation to use FuncExpr instead of LambdaExpr.
...
Swift SVN r487
2011-08-03 00:32:15 +00:00
Chris Lattner
350b89e6e4
Represent assignments as their own AssignStmt, preserving the model we had
...
before, but removing the hack where we'd represent them as a binary operator
with a null operator function. We still have no clear semantics for what
is valid or not.
Swift SVN r478
2011-08-01 17:45:21 +00:00
Chris Lattner
ebc33d306f
add AST support for semicolon statements and clean up the parser. While noone cares, it is trivial
...
to support and good for completeness.
Swift SVN r475
2011-07-31 21:09:23 +00:00
Chris Lattner
fb8621f53a
introduce DeclVisitor, ExprVisitor, and StmtVisitor template typedefs.
...
Swift SVN r472
2011-07-31 20:46:12 +00:00
Chris Lattner
d5523fa257
rename ExprStmtVisitor to ASTVisitor.
...
Swift SVN r471
2011-07-31 20:41:11 +00:00