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
Chris Lattner
c8ca11a199
Drop in the new DottedNameType and wire it up in name binding.
...
This is horribly hack and slash (but enough to pass all tests) for a few reasons:
- I've #if 0'd out the tendrils of the old code
- This handles *just* what was handled before instead of being more general
- We don't have an llvm::MutableArrayRef type, so there is some really gross
const_cast'ing and other struggles to deal with its absence.
Swift SVN r1050
2012-01-17 06:32:00 +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
Chris Lattner
fab4ef8820
introduce a new OverloadSetRefExpr::createWithCopy method to eliminate
...
some redundancy in the code that always has to create an overload set
or a single declrefexpr depending on what various lookups produce.
Swift SVN r1044
2012-01-14 07:22:25 +00:00
Chris Lattner
f1db6de509
remove the :: token and DCE UnresolvedScopedIdentifierExpr.
...
Swift SVN r1043
2012-01-14 07:00:45 +00:00
Chris Lattner
82bf169d90
implement ModuleType::get.
...
Swift SVN r1040
2012-01-14 06:40:39 +00:00
John McCall
1ec9db43c8
Provide helper methods to look through parentheses. Learning
...
from Clang, actually give these explicit high-level behavior
rules so that it's clear what should be added to them in the
future.
Swift SVN r1037
2012-01-13 10:07:17 +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
Chris Lattner
be7d7ffe2c
print the members of an overloadsetref_expr. We can handle the truth.
...
Swift SVN r1026
2012-01-12 21:34:58 +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
Chris Lattner
4c050c0e52
Fix a nasty type checking bug (exposed by my next patch), where we would lose a
...
required type conversion in the presence of integer literals and dependent types.
Swift SVN r1016
2012-01-12 07:16:42 +00:00
Chris Lattner
0ed1f417fd
also don't crash on an integer literal type if the type is null,
...
which happens before type checking.
Swift SVN r1013
2012-01-12 06:56:12 +00:00
Chris Lattner
b693da6851
fix -ast-dump to not crash on integer literals with dependent type.
...
Swift SVN r1012
2012-01-12 06:54:31 +00:00
Chris Lattner
1d38f0d0f4
don't abbreviate the AST in -ast-dump, it is more confusing than useful.
...
Swift SVN r1011
2012-01-12 06:30:04 +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
Doug Gregor
ae11ec70f0
Fix CMake build and sync up exception specifications
...
Swift SVN r1007
2012-01-12 01:08:40 +00:00
Chris Lattner
b01261632a
getTypeJudgement() should now work on TypeAliasDecl's.
...
Swift SVN r1005
2012-01-11 07:29:39 +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
173df8794d
implement the construction for MetaTypeType's and plug a leak of the ParenTypes map.
...
Swift SVN r1002
2012-01-11 06:59:14 +00:00
Chris Lattner
627b055989
MetaTypeType doesn't refer to a oneof anymore, it refers to any named type,
...
which means it wraps a TypeAliasDecl.
Swift SVN r1001
2012-01-11 06:50:24 +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
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
Chris Lattner
b737b112e7
modernize ProtocolType a bit to follow the form of OneOfType
...
Swift SVN r991
2012-01-05 21:51:48 +00:00
John McCall
b2569c7786
Provide PrettyStackTraceEntries for Expr* and Stmt* as well,
...
and type-check functions within the former.
Swift SVN r989
2011-12-23 03:53:23 +00:00
John McCall
5bdea18fc4
Introduce a PrettyStackTraceEntry implementation for
...
processing declarations and use it in debug builds whenever
the tree walker walks into a Decl.
Swift SVN r984
2011-12-23 01:58:26 +00:00
John McCall
ce9259d2e5
Teach the walker to walk inside ExtensionDecls correctly.
...
Causes massive crashes because something else apparently
isn't doing this. Investigating.
Swift SVN r982
2011-12-23 01:19:27 +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
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
33f784d48e
zap some #if 0 code accidentally left in
...
Swift SVN r970
2011-12-22 07:45:45 +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
6a51dbba34
Remove hard coded list of integer types from ASTContext, making BuiltinIntegerType have a "plus" factory method to create them like other types.
...
Swift SVN r966
2011-12-22 07:07:01 +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
Chris Lattner
8ce4737534
implement "a.b" AST and type checker support. Semantics are that 'a' is evaluated and discard. 'b' is evaluated and returned.
...
Swift SVN r950
2011-12-21 23:49:30 +00:00
Chris Lattner
17b11e9bbd
implement parsing, AST, and LangRef support for 'plus' methods. Dot syntax will need some work though to actually use them.
...
Swift SVN r949
2011-12-21 23:21:58 +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
8a8f297bde
Basic resilience query.
...
Swift SVN r937
2011-12-15 00:45:31 +00:00
Chris Lattner
6315b94e6b
split out integer types to their own subclass of BuiltinType.
...
Swift SVN r932
2011-12-14 21:49:08 +00:00
Chris Lattner
2bb9e992e4
fix typo
...
Swift SVN r926
2011-12-14 20:30:21 +00:00
Chris Lattner
5f1f4d8ce9
simplify code in Parser::actOnOneOfType now that oneof's always have names.
...
Give OneOfType an ivar for its TypeAlias. It already knew its DeclContext.
Swift SVN r923
2011-12-13 01:41:19 +00:00
John McCall
a1f7eefba3
Extract out decl attributes into a separately-allocated structure.
...
Swift SVN r920
2011-12-10 00:39:10 +00:00
Chris Lattner
a1b7419a36
remove support for looking up global names with dot syntax. "x.y" != "y(x)" now.
...
Swift SVN r917
2011-12-07 00:59:09 +00:00
Chris Lattner
ff130c602e
implement dot lookup in extensions!
...
Swift SVN r913
2011-12-07 00:11:01 +00:00
Chris Lattner
10b29da87d
fix formating in -ast-dump
...
Swift SVN r910
2011-12-06 21:48:11 +00:00
Chris Lattner
a23f19af78
remove redundant qualification
...
Swift SVN r907
2011-12-06 02:11:08 +00:00