Commit Graph

317 Commits

Author SHA1 Message Date
Chris Lattner
75e558af9d rearrange code to group class declaration and implementation together.
Swift SVN r794
2011-11-01 03:32:01 +00:00
Chris Lattner
9298082ebb move Diagnostics header to include/swift/AST to match .cpp files.
Swift SVN r782
2011-10-22 00:47:35 +00:00
Chris Lattner
dfd529ce3a rename diags::foo to diag::foo
Swift SVN r779
2011-10-22 00:36:19 +00:00
Chris Lattner
d36e080d5f switch name binding to the new diagnostics stuffola
Swift SVN r771
2011-10-21 23:00:34 +00:00
Chris Lattner
3c43cae8b4 now that types can get their astcontext, remove some pointless argument passing.
Swift SVN r757
2011-10-18 23:25:42 +00:00
Chris Lattner
3d168c4cdc make sure Type aliases in the builtin module get a declcontext.
Swift SVN r754
2011-10-18 22:01:53 +00:00
Chris Lattner
a7c7d64fa0 Switch swift to use SourceLoc instead of SMLoc.
Also use the new getAdvancedLoc() method instead of hacking
on SMLoc directly.

Also fix the warning/note/error methods to forward through ASTContext
instead of being replicated everywhere.



Swift SVN r750
2011-10-18 01:22:29 +00:00
Chris Lattner
2d43b8812f update for mainline API changes.
Swift SVN r745
2011-10-16 06:17:27 +00:00
John McCall
6b27921ce3 Propagate around l-value-ness. There aren't any interesting invariants
here yet.



Swift SVN r740
2011-09-27 23:46:08 +00:00
John McCall
b6f312aea0 Verification should clearly follow each phase rather than coming
at the start of the next phase.



Swift SVN r731
2011-09-24 09:32:18 +00:00
John McCall
5fddb24ddc Basic verifier framework.
Swift SVN r728
2011-09-23 23:50:02 +00:00
John McCall
b2facdae4b Getterize Stmt.h.
Swift SVN r720
2011-09-20 07:07:53 +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
Chris Lattner
da27a650ea don't reallocate small vectors, just a cleanup.
Swift SVN r702
2011-09-09 05:19:08 +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
ad8081b02e Remove the duplicate swift.swift by implementing import search paths.
Swift SVN r696
2011-09-07 00:30:20 +00:00
John McCall
97cb2cddd6 Add a comment explaining the trade-off behind using a single builtins
cache.



Swift SVN r694
2011-09-06 21:47:02 +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
aaf8acee5e Qualified lookup needs to be a different lookup kind so that
having a builtin module around doesn't contaminate unqualified
lookups.

Also, enable name binding in imported modules.



Swift SVN r687
2011-09-04 07:02:42 +00:00
John McCall
ccb2d4e98f Framework for builtin lookup.
Swift SVN r685
2011-09-03 06:51:34 +00:00
John McCall
66b287d3b1 Slow module access down with pointless abstraction.
Swift SVN r684
2011-09-03 06:23:56 +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
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
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
92051fd98e add a new Subsystems.h file to hold the entrypoints for various subsystems,
instead of smashing them into Parser.h, resolving some FIXME's.



Swift SVN r556
2011-08-13 22:43:17 +00:00
Chris Lattner
73a3f9d888 fix clients to not poke the Parser class directly.
Swift SVN r555
2011-08-13 22:38:20 +00:00
Chris Lattner
b8fd157450 rip out the dead "isPrecededByIdentifier" logic from the AST and Lexer.
Swift SVN r529
2011-08-12 21:36:25 +00:00
Chris Lattner
1dc200c973 introduce an official ErrorType. This is to be used when a type is incorrectly
constructed.  When put on a decl, this should cause all uses of the decl to 
collapse away into badness during type checking.


Swift SVN r514
2011-08-12 05:42:20 +00:00
Chris Lattner
10f5c2fc66 remove the UnresolvedType, representing it with a null Type() instead. There is no need to
have two different ways to represent the same thing.  This has the pleasant bonus that stuff
crashes when you do things with unresolved types.


Swift SVN r513
2011-08-12 05:19:52 +00:00
Chris Lattner
72260c7cad add name binding support for statements at top-level.
Swift SVN r461
2011-07-31 17:36:26 +00:00
Chris Lattner
30b878c5d6 add support for walking statements properly, dissolving some hacks.
Swift SVN r459
2011-07-31 07:40:13 +00:00
Chris Lattner
3a059605e7 convert TypeKind and WalkOrder to scoped enums
Swift SVN r441
2011-07-24 19:24:55 +00:00
Chris Lattner
123c200953 switch more stuff to use enum class, C++'0x needs a :foo operator :)
Swift SVN r438
2011-07-24 18:28:52 +00:00
Chris Lattner
259fab4238 adopt a few more '0x features.
Swift SVN r437
2011-07-24 00:45:51 +00:00
Chris Lattner
096a3e16bc switch to range-based for loops where possible. I'm actually surprised how many
places are blocked by needing an index exposed for other purposes.  Not having a
MutableArrayRef doesn't help either.


Swift SVN r434
2011-07-23 20:47:13 +00:00
Chris Lattner
4f29cc0e8c convert TheUnresolvedType/TheDependentType and the empty tuple type
to be accessors on their respective classes, for consistency.


Swift SVN r429
2011-07-19 06:41:42 +00:00
Chris Lattner
10017bef15 ArrayRef and SmallVector[Impl]
Swift SVN r423
2011-07-19 06:03:26 +00:00
Chris Lattner
7275ca527a pull in StringRef and Twine.
Swift SVN r422
2011-07-19 06:00:20 +00:00
Chris Lattner
19dbcaa171 pull the casting operators into LLVM.h
Swift SVN r421
2011-07-19 05:57:01 +00:00
Chris Lattner
e647b29339 stop the llvm-namespace-qualification-insanity by caving in and
adding a new swift/AST/LLVM.h file which forward declares and imports
common llvm classes, starting with SMLoc.


Swift SVN r420
2011-07-19 05:49:43 +00:00
Chris Lattner
96103cab95 use the new llvm::TinyPtrVector class, which was derived from this code.
Swift SVN r408
2011-07-18 02:13:37 +00:00
Doug Gregor
50323196b3 Teach module lookup to look first in the directory where the importing
module is located, and then fall back to the current directory if
nothing was found there. This allows us to run the Swift regression
tests from a directory other than "test" (e.g., in the build
directory, as is currently needed by CMake).

The implementation itself is a temporary hack that will eventually
need to be replaced with a proper virtual file system + module
manager.


Swift SVN r405
2011-07-14 19:16:45 +00:00
Chris Lattner
79ba41c1fe add a specialization of AllocateCopy to help out argument deduction a bit,
simplifying some code.


Swift SVN r385
2011-04-29 07:18:11 +00:00
Chris Lattner
c3c602f9d3 Reimplement processing of dot expressions to have their base resolved as part of Type checking of SequenceExprs. This ensures that we can establish a proper base expression for the value.
Swift SVN r363
2011-04-11 05:20:21 +00:00
Chris Lattner
a6ccf69bc6 Implement support for overloading in .-style name lookup. This is not super useful yet because we don't have conversion ranking, but it's progress.
Swift SVN r356
2011-04-10 16:48:31 +00:00
Chris Lattner
3b4a8b03d2 1. With overloading in play, SemaDecl should never resolve unqualified lookup that hits at translation unit scope to a DeclRefExpr. Doing so can break overloading.
2. This exposed a bug: when parsing structs, we weren't adding all decls to the translation unit, we were just adding the type alias.
3. This exposed that TypeChecking wasn't handling OneOfElementDecl.
4. Introduce a new NLKind enum in NameLookup instead of passing around a bool.
5. Have unqualified lookup that returns an overload set form a new OverloadSetRefExpr, which has dependent type.
6. Enhance various stuff to handle OverloadSetRefExpr.  It's still not fully handled yet though, so it can't be used for anything useful.
7. Change Expr.cpp to print types with << instead of T->print(OS) which is simpler and correct in the face of null.

Swift SVN r351
2011-04-10 05:57:10 +00:00