Commit Graph

7976 Commits

Author SHA1 Message Date
Chris Lattner
e6e58d1390 Have NameBinder ctor set up the implicit import for the builtin
module.  Heap allocate it for consistency.


Swift SVN r795
2011-11-01 03:46:01 +00:00
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
bf91e00f4c rearrange code, upshot being that "a.b" will resolve if there is only one candidate
for b even if a is dependent.


Swift SVN r793
2011-10-28 00:40:34 +00:00
Chris Lattner
d4b9889b68 remove dead code, unresolved dot expressions always have a base now.
Swift SVN r792
2011-10-28 00:35:45 +00:00
Chris Lattner
cc7ac96baa fix some bugs handling dependent typed values, prepare for integers becoming dependent typed.
Swift SVN r791
2011-10-28 00:33:39 +00:00
Chris Lattner
e78809874f update comments
Swift SVN r787
2011-10-26 23:42:48 +00:00
Chris Lattner
55fa35662c rename TypeChecking -> TypeChecker to match the name of the class.
Swift SVN r786
2011-10-26 23:42:08 +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
2ac742d7c6 convert the rest of sema to the new diagnostics stuff.
Swift SVN r775
2011-10-22 00:25:35 +00:00
Chris Lattner
0c3b3fe76b use Type and Identifier arguments to diagnostics more uniformly.
Swift SVN r774
2011-10-21 23:32:14 +00:00
Chris Lattner
0c0e65e553 violate diagnostic layering harder, making it fine to cram types into diagnostics.
Lets here it for non-pod's in unions.


Swift SVN r773
2011-10-21 23:25:29 +00:00
Chris Lattner
2f5964abd8 switch TC Coercion over.
Swift SVN r772
2011-10-21 23:19:39 +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
f121bd5e2d Arbitrary-associativity operator precedence parsing.
Swift SVN r743
2011-09-29 01:31:16 +00:00
John McCall
25ee366396 Add an lvalue-to-rvalue conversion AST node.
Swift SVN r742
2011-09-28 01:12:34 +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
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
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
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
Chris Lattner
f2ae02a7b2 switch a couple of files to use AST.h umbrella header. Swift eagerly awaits clang modules...
Swift SVN r691
2011-09-06 07:01:03 +00:00
John McCall
1e89b0e274 Remove the __builtin type keywords and make the Builtin
module export those types.

Also, document the language changes I've been making in this area.



Swift SVN r688
2011-09-04 07:34:01 +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
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
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
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
26dfa97027 better QOI for invalid arguments, produce:
error: unexpected diagnostic produced: error: operators must have one or two arguments
func %%%() {}
^

instead of:
error: unexpected diagnostic produced: error: operators must be declared 'infix_left'
func %%%() {}
^



Swift SVN r648
2011-08-31 00:52:13 +00:00
Chris Lattner
fd4aefa837 rename the infix attribute to infix_left.
Swift SVN r647
2011-08-31 00:32:15 +00:00