Commit Graph

22474 Commits

Author SHA1 Message Date
John McCall
bbf14c61d3 Macro metaprogramming for the Expr hierarchy.
Swift SVN r722
2011-09-23 06:29:28 +00:00
John McCall
b2facdae4b Getterize Stmt.h.
Swift SVN r720
2011-09-20 07:07:53 +00:00
John McCall
b351394b6e Getterify the rest of Expr.h.
Swift SVN r719
2011-09-20 00:18:57 +00:00
John McCall
802262a7da More incremental getterization.
Swift SVN r718
2011-09-19 23:37:21 +00:00
John McCall
7a259f4bad Differentiate between the starting location and caret location of
an expression.  More incremental getterization.



Swift SVN r717
2011-09-19 22:45:58 +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
John McCall
35d822f10f Give this enumeration an explicit backing type.
Swift SVN r714
2011-09-19 21:32:52 +00:00
John McCall
c61c807589 Mangle types for all declarations. Save the names of modules and mangle
those in, too.



Swift SVN r713
2011-09-18 09:21:42 +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
Chris Lattner
f833a1ed11 have ASTContext own the strings for its import paths instead of referencing
strings sitting on the stack in main().  No functionality change, just futureproofs
ASTContext a bit.


Swift SVN r701
2011-09-09 05:15:44 +00:00
Chris Lattner
e248bc875f switch to llvm.h
Swift SVN r700
2011-09-09 04:59:19 +00:00
Chris Lattner
8e369b34da make builtins.cpp include its header first (exposing that it isn't actually self-contained),
and switch to AST.h


Swift SVN r699
2011-09-09 04:58:39 +00:00
John McCall
37b07c8691 Add builtin bindings for a bunch of primitive LLVM instructions.
Swift SVN r698
2011-09-08 00:21:11 +00:00
John McCall
d56299972b Add the missing Module.h.
Swift SVN r697
2011-09-08 00:20:25 +00:00
John McCall
ad8081b02e Remove the duplicate swift.swift by implementing import search paths.
Swift SVN r696
2011-09-07 00:30:20 +00:00
John McCall
54ff2ccf4a Lop the last word off ModuleDecl and TranslationUnitDecl.
Swift SVN r693
2011-09-06 21:43:46 +00:00
Chris Lattner
a915596f0f switch decl's classof to use range comparisons.
Swift SVN r690
2011-09-06 06:49:11 +00:00
John McCall
ccb2d4e98f Framework for builtin lookup.
Swift SVN r685
2011-09-03 06:51:34 +00:00
John McCall
6ddc15143b Support qualified names for types.
Swift SVN r683
2011-09-03 06:07:44 +00:00
John McCall
4a0f713e62 Progress towards a builtin module.
Swift SVN r682
2011-09-03 05:35:49 +00:00
Chris Lattner
0090c43b80 all members of a protocol have to be NamedDecl's, tighten up
typing.  Various tidying up.


Swift SVN r678
2011-09-02 00:58:38 +00:00
Chris Lattner
34ec8bc4aa implement support for var members of protocols.
Swift SVN r672
2011-09-01 21:57:35 +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
cd66133b48 simplify interface to OneOfType::getNew.
Swift SVN r663
2011-08-31 23:11:05 +00:00
Chris Lattner
bd9e21ed01 add a method to get an ASTContext from a DeclContext.
Swift SVN r662
2011-08-31 23:09:32 +00:00
Chris Lattner
74b804a03a rearrange DeclContext arguments so that they are at the end, not the beginning.
Swift SVN r661
2011-08-31 23:05:51 +00:00
John McCall
7b78e7b943 Document DeclContext.
Swift SVN r656
2011-08-31 21:22:35 +00:00
John McCall
6dfa91282d 'float' -> 'float32', 'double' -> 'float64'
Swift SVN r654
2011-08-31 19:57:52 +00:00
Chris Lattner
f9b024adb0 implement parser and AST support for trivial (empty) protocol types.
Swift SVN r652
2011-08-31 19:43:06 +00:00
John McCall
58b81c8da0 Add builtin float and double types.
Swift SVN r650
2011-08-31 18:43:22 +00:00
Chris Lattner
af4d36f463 Eliminate the 'unary' attribute, instead just know that operators
that take a single argument are unary.  Move a bunch of semantic
checking of operators from the parser to TypeCheckDecl now that it
has a decent place to hold it.


Swift SVN r646
2011-08-31 00:13:57 +00:00
John McCall
bf62f3662e Switch DeclContext to use a PointerIntPair.
Swift SVN r640
2011-08-30 06:34:38 +00:00
Doug Gregor
63ca527a95 Introduce accessors into DeclVarName and eliminate direct mutation by
setting all fields on construction. Use this opportunity to save a
pointer of storage for every DeclVarName.
squeeze out a pointer's worth of storage


Swift SVN r639
2011-08-29 19:59:33 +00:00
Chris Lattner
d7c0076b2f finish up sema of 'return', force converting the returned expression to the return type of the enclosing func.
Swift SVN r629
2011-08-26 00:24:35 +00:00
Chris Lattner
da64531ca3 modernize #includes.
Swift SVN r627
2011-08-25 23:48:29 +00:00
Chris Lattner
a071b37639 optimize out trivial accessors.
Swift SVN r626
2011-08-25 23:46:51 +00:00
John McCall
b2bd8e12a7 Introduce the idea of a DeclContext.
Swift SVN r623
2011-08-25 19:26:50 +00:00
Chris Lattner
2711ad03c9 now that WalkOrder is in a common header, move the WalkStmt to be a
Stmt method, rename it to just 'walk' to follow the naming convention,
and give it an accurate doc comment for good measure.


Swift SVN r622
2011-08-25 18:24:54 +00:00
Chris Lattner
cb59d9c926 split the walkorder enum out to its own header file. This is a silly waste of
a file, but is needed to share it between two other heads.  Header files seem
so baroque.


Swift SVN r621
2011-08-25 18:18:22 +00:00
Chris Lattner
26cee15cf3 Switch expr walking functionality to take blocks instead of function pointer + void*.
Swift SVN r602
2011-08-25 00:51:31 +00:00
Chris Lattner
c827cc11a0 tidy up visitor, UnresolvedDotExpr base cannot be null since John's rework.
Swift SVN r584
2011-08-23 00:39:47 +00:00
Chris Lattner
3e02267edf hoist the argument expression of Call/Unary/Binary up to ApplyExpr.
Swift SVN r581
2011-08-22 22:45:02 +00:00
Chris Lattner
035b65d407 change the representation of BinaryExpr to use an implicit tuple
to bind its LHS/RHS together, making it more similar to other ApplyExprs.


Swift SVN r580
2011-08-22 22:42:12 +00:00
Chris Lattner
624efc8491 introduce a new ApplyExpr class, and make it the parent class of CallExpr,UnaryExpr,BinaryExpr.
Swift SVN r579
2011-08-22 21:11:37 +00:00
Chris Lattner
b04c19e647 introduce a enw AST/AST.h umbrella header and use it to
simplify #includes.



Swift SVN r578
2011-08-22 21:02:44 +00:00
Chris Lattner
f03486e991 diagnose a bunch of problem cases with operators.
Swift SVN r575
2011-08-20 01:29:00 +00:00
Chris Lattner
28f05f0348 add parser and sema support for user defined unary operators.
Swift SVN r572
2011-08-20 00:27:11 +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