Commit Graph

12848 Commits

Author SHA1 Message Date
John McCall
ea5e37e276 Getterize uses of TupleTypeElt. I'm trying to figure out how
parameter attributes should work here.



Swift SVN r1066
2012-01-18 04:05:25 +00:00
Chris Lattner
1c42e8f6a6 rename DottedNameType to IdentifierType. It captures loc information for random uses of type names, among other things.
Swift SVN r1064
2012-01-18 01:52:28 +00:00
John McCall
9c63d1e7e6 Fix a bug with curried function emission and teach the mangler
to differentiate uncurried and curried function types.



Swift SVN r1059
2012-01-17 08:08:47 +00:00
Chris Lattner
3303aaca7b I must have accidentally disabled all the move logic in DiverseStack at some point,
reenable it.


Swift SVN r1052
2012-01-17 06:37:34 +00:00
Chris Lattner
4f8193956d introduce DottedNameType, which will eventually be used for foo.bar in a type context.
Swift SVN r1049
2012-01-17 01:55:17 +00:00
John McCall
8f60dafc76 Recommit r1044 out of spite.
Swift SVN r1048
2012-01-16 07:03:59 +00:00
Chris Lattner
26fbedee09 revert r1044, it looks like Linking.h wasn't 'svn add'ed.
Swift SVN r1047
2012-01-16 06:59:19 +00:00
John McCall
2fa6d329be Propagate currying/explosion information down to the
mangler.  No functionality change.



Swift SVN r1046
2012-01-14 09:44:30 +00:00
John McCall
44da666866 Move ExplosionKind to IRGen.h so that using it doesn't
require Explosion.h.  This is just to isolate the parts
of IR-generation that shouldn't have anything to do with
emitting code within functions.



Swift SVN r1039
2012-01-13 10:20:59 +00:00
John McCall
5dde760272 Switch function prologue and application over to using Explosion
and teach them about currying.



Swift SVN r1038
2012-01-13 10:08:14 +00:00
Chris Lattner
be666df09e introduce a ModuleExpr node.
Swift SVN r1035
2012-01-13 05:07:21 +00:00
Chris Lattner
73570ac177 introduce a new ModuleType, which will be the type given to ModuleExpr's.
Swift SVN r1034
2012-01-13 04:51:39 +00:00
John McCall
22b7ed948a Eliminate the implosion/RValue-projection code, which is now dead.
Swift SVN r1031
2012-01-12 22:55:55 +00:00
John McCall
5b1fbce82b More renaming.
Swift SVN r1030
2012-01-12 22:54:11 +00:00
John McCall
16ebb9e4f5 Rename.
Swift SVN r1029
2012-01-12 22:51:18 +00:00
John McCall
0e638a02ea IR generation for plus func references. I'm not convinced
that we should permit these references, really.



Swift SVN r1025
2012-01-12 21:27:26 +00:00
John McCall
59bed696a5 Introduce a ParenExpr to represent the special case of
a tuple with one element and no labels.  This form is
treated specially in essentially every case, so it might
as well be its own expression kind.



Swift SVN r1021
2012-01-12 19:55:06 +00:00
John McCall
286abfc5f7 Mostly kill off RValue. More tomorrow. :)
Swift SVN r1020
2012-01-12 10:18:40 +00:00
Chris Lattner
c1d68d9fcc constructor call and dotsyntaxcall are just sugar for applyexpr.
Swift SVN r1019
2012-01-12 08:07:43 +00:00
John McCall
885783ab76 Start switching things over to using explosions.
Swift SVN r1014
2012-01-12 07:05:49 +00:00
Chris Lattner
9f5d37dd2f introduce a new ConstructorCallExpr node, which is sugar node used to represent
the syntactic form of an argument list applied to a metatype.  Semantically,
this is yet-another ApplyExpr.


Swift SVN r1008
2012-01-12 05:43:07 +00:00
John McCall
c7bcadf450 On further reflection and use, the concept of an RValue is not actually
very useful;  it is much more interesting to divide r-value emission
into "to arguments" and "to memory" models.  To that end, introduce a
new structure for holding an "exploded" r-value.



Swift SVN r1006
2012-01-11 23:59:57 +00:00
Chris Lattner
37cb633b12 Change TypeAliasDecl to be a ValueDecl, whose type is MetaTypeType.
Swift SVN r1004
2012-01-11 07:13:32 +00:00
Chris Lattner
e22a30a130 revert r995: "introduce MetaTypeDecl (though nothing creates it yet)".
After some pondering on this, I can just use DeclRefExpr(TypeAliasDecl) to
represent a named metatype, there is not need to have yet-another decl.  I'm
glad about this, because it didn't seem right.



Swift SVN r999
2012-01-11 05:42:22 +00:00
Chris Lattner
f204abf010 introduce MetaTypeDecl (though nothing creates it yet)
Swift SVN r997
2012-01-06 20:50:56 +00:00
Chris Lattner
527c58f846 implement MetaTypeType, the type system representation of a metatype.
Swift SVN r996
2012-01-06 19:51:50 +00:00
John McCall
7e2b5e5410 Missing cases.
Swift SVN r994
2012-01-06 04:12:41 +00:00
John McCall
d559794e73 Introduce a new kind of sugar, ParenType. A tuple with one
anonymous member is actually one of these.

A func decl is curried over all of its parameter clauses,
as long as they're written without parentheses.  So the body
of a func is the body of the "most curried" function:
  func foo(x:int) -> (y:int) -> int {
    // This is the body of the function that takes 'y'.
    // It returns an int.
  }
  func bar(x:int) -> ((y:int) -> int) {
    // This is the body of the function that takes 'x'.
    // It returns a functon of type (y:int) -> int.
  }



Swift SVN r993
2012-01-06 04:10:32 +00:00
John McCall
c6decb43e9 Emit plus functions as normal global functions.
I meant to do this first.



Swift SVN r983
2011-12-23 01:20:26 +00:00
John McCall
632b979188 Skeletal IR gen support for ExtensionDecl.
Swift SVN r981
2011-12-23 00:30:24 +00:00
Chris Lattner
19b7a934a1 rename BuiltinFloatingPointType to BuiltinFloatType.
Swift SVN r980
2011-12-23 00:07:58 +00:00
Chris Lattner
320e4747cc Codegen was silently truncating IntegerLiteralExpr's to 64 bits, bad codegen!
Swift SVN r979
2011-12-23 00:04:06 +00:00
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