Commit Graph

12816 Commits

Author SHA1 Message Date
Chris Lattner
926a3fe671 completely reimplement floating point literals to follow the model of integer literals.
Among other things, this gives us the amazing power to accept "var x : float = 0.0"



Swift SVN r978
2011-12-22 23:50:03 +00:00
John McCall
510d80f706 Fix alignment computation.
Swift SVN r977
2011-12-22 23:47:35 +00:00
John McCall
224bf576c0 Emission of expressions at global scope.
Swift SVN r976
2011-12-22 23:47:06 +00:00
John McCall
6bb1b947d8 Emit initializers of global variables as global constructors.
This isn't the actor model for globals, but is certainly still a
valid model.



Swift SVN r975
2011-12-22 23:35:41 +00:00
Chris Lattner
c91c1d9db1 generalize builtin floating point types to support all of the FP types
that LLVM supports.  The standard library still only exports float and double,
but the swift core should be more general.  Yay for PPC128 :)


Swift SVN r973
2011-12-22 22:01:07 +00:00
Chris Lattner
8363dd8051 round up size and alignment to a power of two. Occurred to me in the shower.
Swift SVN r972
2011-12-22 19:30:31 +00:00
John McCall
3b5a5509a7 Revisit the Condition logic, which turns out to be subtly wrong in
an extremely simple test case that happens to come up in swift.swift.



Swift SVN r971
2011-12-22 09:05:29 +00:00
Chris Lattner
d525ba5fda simplify builtin type processing by eliminating BuiltinTypeKind.
Swift SVN r967
2011-12-22 07:38:17 +00:00
Chris Lattner
98c5f5fad4 change BuiltinIntegerType to keep its width as an ivar, eliminating the
number of switches scattered through the compiler.


Swift SVN r964
2011-12-22 06:50:34 +00:00
John McCall
e04492f808 Give oneof types prettier type names.
Swift SVN r959
2011-12-22 06:13:21 +00:00
Chris Lattner
1fb01a746a Allow this to be built with Xcode 4.2's version of clang.
Swift SVN r958
2011-12-22 06:12:01 +00:00
John McCall
9b7fb0c227 New l-value representation.
Swift SVN r956
2011-12-22 05:28:33 +00:00
Chris Lattner
667485af82 implement mangling for extensions, by mangling them as the type being extended.
I have no idea if this is right, but it seems plausible :)


Swift SVN r955
2011-12-22 04:39:35 +00:00
Chris Lattner
1c04aa9a2e coding standard's nitpicks
Swift SVN r944
2011-12-15 18:40:43 +00:00
Chris Lattner
d3597afdca silence a warning
Swift SVN r943
2011-12-15 18:39:45 +00:00
John McCall
c7f58d3541 Utility class for a stack of heterogenous objects. I'm going
to need this for l-values as well as the Clang-like cleanup stacks.



Swift SVN r942
2011-12-15 09:18:02 +00:00
John McCall
1f6481d86e Fill out a few cases.
Swift SVN r941
2011-12-15 04:52:14 +00:00
John McCall
88d0f28698 Correctly call oneof injections.
Swift SVN r940
2011-12-15 03:20:02 +00:00
John McCall
e0d74cd91a Mangle some decl contexts properly, and fix the mangling
of some references in the swift module.



Swift SVN r939
2011-12-15 02:41:32 +00:00
Chris Lattner
eef2f69637 improve AST modeling of dot syntax calls to follow the syntactic structure instead of being weird and broken and losing source loc info.
Swift SVN r938
2011-12-15 00:52:58 +00:00
John McCall
6b935588e5 On second thought, components need to be known in the AST.
Swift SVN r918
2011-12-07 03:57:41 +00:00
John McCall
c756d37afd Basic Component interface.
Swift SVN r911
2011-12-06 21:48:27 +00:00
Chris Lattner
7568876781 update for mainline api change.
Swift SVN r895
2011-12-05 22:52:50 +00:00
John McCall
784ee9047c Emit exploded tuple shuffles directly.
Swift SVN r891
2011-11-18 19:19:21 +00:00
John McCall
b69d5f95cd Implement tuple shuffles.
Swift SVN r890
2011-11-18 10:10:21 +00:00
John McCall
32736ea2ab Rename hasSingleElement to isTransparentType to better
capture what's being tested.  This also makes IR gen
correctly avoid a discriminator for a non-transparent
single-element oneof.



Swift SVN r887
2011-11-18 01:17:53 +00:00
John McCall
b700f171a2 More getters.
Swift SVN r886
2011-11-18 01:10:03 +00:00
John McCall
d716f82984 Getterize ValueDecl.
Swift SVN r885
2011-11-18 01:04:12 +00:00
John McCall
9079154ded Getterize TypeAliasDecl.
Swift SVN r884
2011-11-18 00:48:14 +00:00
John McCall
50fb0d63f6 More incremental getterization.
.w



Swift SVN r883
2011-11-18 00:29:15 +00:00
John McCall
d74f17259c Incremental getterization of Decl.h.
Swift SVN r882
2011-11-18 00:17:20 +00:00
John McCall
de3c3ff04d Build an implicit expression to record the conversion
of a oneof to its underlying type.  Much better.



Swift SVN r881
2011-11-17 11:38:05 +00:00
John McCall
737e646f56 Remove accidental logging changes. Having no reliable '0x
debugger is obnoxious.



Swift SVN r880
2011-11-17 10:47:48 +00:00
John McCall
922e6f0916 Build fix.
Swift SVN r878
2011-11-17 10:16:51 +00:00
John McCall
6c559b2ce1 More missing tuple functionality.
Swift SVN r877
2011-11-17 10:12:21 +00:00
John McCall
ff5e6aa591 Implement tuple element projection.
Swift SVN r876
2011-11-17 09:32:45 +00:00
John McCall
c21b11eb28 Add a method for conditionally trying to evaluate an expression
as its underlying l-value.  Often more efficient than evaluating
it fully into an r-value and only then transforming it.



Swift SVN r875
2011-11-17 09:32:06 +00:00
John McCall
2a4352b4ca Fix the build for LLVM API changes.
Swift SVN r869
2011-11-16 19:30:31 +00:00
Doug Gregor
dc8d4d7df9 Teach CMake about the various header files in the lib subdirectories, so they show up in the project.
Swift SVN r849
2011-11-09 18:02:12 +00:00
Chris Lattner
d2ed4c2f3f remove some unneeded ASTContext arguments from subsystem entrypoints
now that it is reachable from TU


Swift SVN r815
2011-11-01 18:33:48 +00:00
Chris Lattner
0ca79b1075 rename ASTContext::BuiltinModule -> TheBuiltinModule for consistency with
the other ASTContext members.


Swift SVN r799
2011-11-01 04:18:23 +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
f92f616aaf remove hte ASTContext::hadError bool.
Swift SVN r778
2011-10-22 00:32:39 +00:00
Chris Lattner
5e8370dea0 eliminate some printouts from IRGen in favor of real diagnostics.
Swift SVN r777
2011-10-22 00:32:14 +00:00
Chris Lattner
60afdf4842 switch irgen to new diags
Swift SVN r769
2011-10-20 21:29:50 +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
25ee366396 Add an lvalue-to-rvalue conversion AST node.
Swift SVN r742
2011-09-28 01:12:34 +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